%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
\ifdefined\pdfpxdimen
   \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=.75bp\relax

\PassOptionsToPackage{warn}{textcomp}
\usepackage[utf8]{inputenc}
\ifdefined\DeclareUnicodeCharacter
% support both utf8 and utf8x syntaxes
  \ifdefined\DeclareUnicodeCharacterAsOptional
    \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
  \else
    \let\sphinxDUC\DeclareUnicodeCharacter
  \fi
  \sphinxDUC{00A0}{\nobreakspace}
  \sphinxDUC{2500}{\sphinxunichar{2500}}
  \sphinxDUC{2502}{\sphinxunichar{2502}}
  \sphinxDUC{2514}{\sphinxunichar{2514}}
  \sphinxDUC{251C}{\sphinxunichar{251C}}
  \sphinxDUC{2572}{\textbackslash}
\fi
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amstext}
\usepackage{babel}



\usepackage{times}
\expandafter\ifx\csname T@LGR\endcsname\relax
\else
% LGR was declared as font encoding
  \substitutefont{LGR}{\rmdefault}{cmr}
  \substitutefont{LGR}{\sfdefault}{cmss}
  \substitutefont{LGR}{\ttdefault}{cmtt}
\fi
\expandafter\ifx\csname T@X2\endcsname\relax
  \expandafter\ifx\csname T@T2A\endcsname\relax
  \else
  % T2A was declared as font encoding
    \substitutefont{T2A}{\rmdefault}{cmr}
    \substitutefont{T2A}{\sfdefault}{cmss}
    \substitutefont{T2A}{\ttdefault}{cmtt}
  \fi
\else
% X2 was declared as font encoding
  \substitutefont{X2}{\rmdefault}{cmr}
  \substitutefont{X2}{\sfdefault}{cmss}
  \substitutefont{X2}{\ttdefault}{cmtt}
\fi


\usepackage[Bjarne]{fncychap}
\usepackage{sphinx}

\fvset{fontsize=\small}
\usepackage{geometry}


% Include hyperref last.
\usepackage{hyperref}
% Fix anchor placement for figures with captions.
\usepackage{hypcap}% it must be loaded after hyperref.
% Set up styles of URL: it should be placed after hyperref.
\urlstyle{same}


\usepackage{sphinxmessages}
\setcounter{tocdepth}{1}



\title{MOM6 Documentation}
\date{Nov 04, 2020}
\release{0.2a3}
\author{Alistair Adcroft\and Robert Hallberg\and Stephen Griffies\and Matthew Harrison\and Brandon Reichl\and Niki Zadeh\and John Krasting\and Nic Hannah}
\newcommand{\sphinxlogo}{\vbox{}}
\renewcommand{\releasename}{Release}
\makeindex
\begin{document}

\pagestyle{empty}
\sphinxmaketitle
\pagestyle{plain}
\sphinxtableofcontents
\pagestyle{normal}
\phantomsection\label{\detokenize{index::doc}}


Contents:


\chapter{About this documentation}
\label{\detokenize{about:about-this-documentation}}\label{\detokenize{about::doc}}
This readthedocs site hosts the nascent MOM6 user documentation.
MOM6 documentation is distributed over several formats and locations with each site serving a different purpose.

Here is where to find particular documentation:
\begin{description}
\item[{Download, compile and run}] \leavevmode
Installation documentation is in the form of user\sphinxhyphen{}driven (editable) wiki attached to the MOM6\sphinxhyphen{}examples GitHub repository.
Goto \sphinxurl{https://github.com/NOAA-GFDL/MOM6-examples/wiki} and look at “Getting Started”.

Installation, compilation and running are platform specific operations for which we can only provide templates (as is
done in on the wiki) but for which MOM6 developers cannot possibly support since every platform is different. Normally
a user needs to know where libraries (such as netcdf and MPI) and compilers are on their system but once these have
been established the documented compile process can be adpated to the local system.

\item[{User guide}] \leavevmode
\sphinxhref{http://mom6.readthedocs.org}{This site} provides a high\sphinxhyphen{}level overview of the model as well as the API reference (documentation
of source code).

The user guide is written in reStructuredText (.rst files) that reside in \sphinxcode{\sphinxupquote{docs/}} of the \sphinxhref{http://github.com/NOAA-GFDL/MOM6}{MOM6 source code}.
The rst files are processed by sphinx and hosted on \sphinxhref{http://mom6.readthedocs.org}{readthedocs}.

The API reference is generated documentation \sphinxhyphen{} we use doxygen for
in\sphinxhyphen{}code documentation. The Fortran doxygen format is rather cumbersome for
writing and we therefore use the C++ .dox files for much of this
documentation.

\item[{Repository policies}] \leavevmode
Policies governing how the repositories are organized and operated live at \sphinxurl{https://github.com/NOAA-GFDL/MOM6-examples/wiki/MOM6-repository-policies}.

\item[{Developer guide}] \leavevmode
Beyond the API reference above, developer specific wiki pages are attached to the \sphinxtitleref{MOM6 code repository \textless{}https://github.com/NOAA\sphinxhyphen{}GFDL/MOM6/wiki\textgreater{}}.

\end{description}


\chapter{Equations}
\label{\detokenize{equations:equations}}\label{\detokenize{equations::doc}}
The model equations are the layer\sphinxhyphen{}integrated vector\sphinxhyphen{}invariant form of the
hydrostatic primitive equations (either Boussinesq or non\sphinxhyphen{}Boussinesq).

We present the equations starting from the hydrostatic Boussinesq equation in
height coordinates and progress through vector\sphinxhyphen{}invariant and
general\sphinxhyphen{}coordinate equations to the final equations used in the A.L.E.
algorithm, taken from \sphinxcite{zzbibliography:adcroft2019}.


\section{Notation for equations}
\label{\detokenize{api/generated/pages/Notation:notation-for-equations}}\label{\detokenize{api/generated/pages/Notation:notation}}\label{\detokenize{api/generated/pages/Notation::doc}}

\subsection{Symbols for variables}
\label{\detokenize{api/generated/pages/Notation:symbols-for-variables}}\label{\detokenize{api/generated/pages/Notation:notation-1symbols}}
\(z\) refers to elevation (or height), increasing upward so that for much of the ocean \(z\) is negative.

\(x\) and \(y\) are the Cartesian horizontal coordinates.

\(\lambda\) and \(\phi\) are the geographic coordinates on a sphere (longitude and latitude respectively).

Horizontal components of velocity are indicated by
\(u\) and \(v\) and vertical component by \(w\) .

\(p\) is pressure and \(\Phi\) is geo\sphinxhyphen{}potential:
\begin{equation*}
\begin{split}\Phi = g z .\end{split}
\end{equation*}
The thermodynamic state variables are usually salinity,
\(S\) , and potential temperature, \(\theta\) or the absolute salinity and conservative temperature, depending on the equation of state. \(\rho\) is in\sphinxhyphen{}situ density.


\subsection{Vector notation}
\label{\detokenize{api/generated/pages/Notation:vector-notation}}\label{\detokenize{api/generated/pages/Notation:notation-1vector-notation}}
The three\sphinxhyphen{}dimensional velocity vector is denoted
\(\boldsymbol{v}\)
\begin{equation*}
\begin{split}\boldsymbol{v} = \boldsymbol{u} + \widehat{\boldsymbol{k}} w ,\end{split}
\end{equation*}
where
\(\widehat{\boldsymbol{k}}\) is the unit vector pointed in the upward vertical direction and \(\boldsymbol{u} = (u, v, 0)\) is the horizontal component of velocity normal to the vertical.

The gradient operator without a suffix is three dimensional:
\begin{equation*}
\begin{split}\boldsymbol{\nabla} = ( \boldsymbol{\nabla}_z, \partial_z ) .\end{split}
\end{equation*}
but a suffix indicates a lateral gradient along a surface of constant property indicated by the suffix:
\begin{equation*}
\begin{split}\boldsymbol{\nabla}_z = \left( \left. \partial_x \right|_z, \left. \partial_y \right|_z, 0 \right) .\end{split}
\end{equation*}

\section{Governing Equations}
\label{\detokenize{api/generated/pages/Governing_Equations:governing-equations}}\label{\detokenize{api/generated/pages/Governing_Equations:id1}}\label{\detokenize{api/generated/pages/Governing_Equations::doc}}
The Boussinesq hydrostatic equations of motion in height coordinates are

\begin{eqnarray} D_t \boldsymbol{u} + f \widehat{\boldsymbol{k}} \times \boldsymbol{u} + \frac{\rho}{\rho_o} \boldsymbol{\nabla}_z \Phi + \frac{1}{\rho_o} \boldsymbol{\nabla}_z p &= \boldsymbol{\mathcal{F}} &\mbox{ momentum} \\ \rho \, \frac{\partial \Phi}{\partial z} + \frac{\partial p}{\partial z} &= 0 &\mbox{ hydrostatic} \\ \boldsymbol{\nabla}_z \cdotp \boldsymbol{u} + \frac{\partial w}{\partial z} &= 0 &\mbox{ thickness} \\ D_t \theta &= \boldsymbol{\mathcal{N}}_\theta^\gamma - \frac{\partial J_\theta^{(z)}}{\partial z} &\mbox{ potential temp} \\ D_t S &= \boldsymbol{\mathcal{N}}_S^\gamma - \frac{\partial J_S^{(z)}}{\partial z} &\mbox{ salinity} \\ \rho &= \rho(S, \theta, z) &\mbox{ equation of state.} \end{eqnarray}

where notation is described in {\hyperref[\detokenize{api/generated/pages/Notation:notation}]{\sphinxcrossref{\DUrole{std,std-ref}{Notation for equations}}}}
, \(\boldsymbol{\mathcal{F}}\) represents the accelerations due to the divergence of stresses including those provided through boundary interactions.

The prognostic thermodynamic variables are potential temperature,
\(\theta\) , and salinity \(S\) , which are related to \sphinxstyleemphasis{in situ} density \(\rho\) through the \sphinxcite{zzbibliography:wright1997} equation of state. In the potential temperature and salinity equations, fluxes due to diabatic, vertically oriented processes are indicated by \(J^{(z)}\) . The tendency due to the convergence of fluxes oriented along neutral directions is indicated by \(\boldsymbol{\mathcal{N}}^\gamma\) . Our implementation of this \sphinxstyleemphasis{neutral diffusion} parameterization is detailed in Shao et al. (personal comm.)

The total derivative is

\begin{eqnarray} D_t & \equiv \frac{\partial}{\partial t} + \boldsymbol{v} \cdotp \boldsymbol{\nabla} \\ &= \frac{\partial}{\partial t} + \boldsymbol{u} \cdotp \boldsymbol{\nabla}_z + w \frac{\partial}{\partial z}. \end{eqnarray}

The non\sphinxhyphen{}divergence of flow allows a total derivative to be re\sphinxhyphen{}written in flux form:

\begin{eqnarray} D_t \theta &= \frac{\partial}{\partial t} + \boldsymbol{\nabla} \cdotp ( \boldsymbol{v} \theta ) \\ &= \frac{\partial}{\partial t} + \boldsymbol{\nabla}_z \cdotp ( \boldsymbol{u} \theta ) + \frac{\partial ( w \theta )}{\partial z}. \end{eqnarray}

The above equations of motion can thus be written as:

\begin{eqnarray} D_t \boldsymbol{u} + f \widehat{\boldsymbol{k}} \times \boldsymbol{u} + \frac{\rho}{\rho_o}\boldsymbol{\nabla}_z \Phi + \frac{1}{\rho_o} \boldsymbol{\nabla}_z p &= \boldsymbol{\mathcal{F}} &\mbox{ momentum}\\ \rho \, \frac{\partial \Phi}{\partial z} + \frac{\partial p}{\partial z} &= 0 &\mbox{ hydrostatic} \\ \boldsymbol{\nabla}_z \cdotp \boldsymbol{u} + \frac{\partial w}{\partial z} &= 0 &\mbox{ thickness} \\ \frac{\partial \theta}{\partial t} + \boldsymbol{\nabla}_z \cdotp ( \boldsymbol{u} \theta ) + \frac{\partial ( w \theta )}{\partial z} &= \boldsymbol{\mathcal{N}}_\theta^\gamma - \frac{\partial J_\theta^{(z)}}{\partial z} &\mbox{ potential temp} \\ \frac{\partial S}{\partial t} + \boldsymbol{\nabla}_z \cdotp ( \boldsymbol{u} S ) + \frac{\partial ( w S )}{\partial z} &= \boldsymbol{\mathcal{N}}_S^\gamma - \frac{\partial J_S^{(z)}}{\partial z} &\mbox{ salinity} \\ \rho &= \rho(S, \theta, z) &\mbox{ equation of state.} \end{eqnarray}


\subsection{Vector Invariant Equations}
\label{\detokenize{api/generated/pages/Governing_Equations:vector-invariant-equations}}\label{\detokenize{api/generated/pages/Governing_Equations:governing-equations-1vector-invariant-eqns}}
MOM6 solves the momentum equations written in vector\sphinxhyphen{}invariant form.

A vector identity allows the total derivative of velocity to be written in the vector\sphinxhyphen{}invariant form:

\begin{eqnarray} D_t \boldsymbol{u} &= \partial_t \boldsymbol{u} + \boldsymbol{v} \cdotp \boldsymbol{\nabla} \boldsymbol{u} \\ &= \partial_t \boldsymbol{u} + \boldsymbol{u} \cdotp \boldsymbol{\nabla}_z \boldsymbol{u} + w \partial_z \boldsymbol{u} \\ &= \partial_t \boldsymbol{u} + \left( \boldsymbol{\nabla} \times \boldsymbol{u} \right) \times \boldsymbol{v} + \boldsymbol{\nabla} \underbrace{\frac{1}{2} \left|\boldsymbol{u}\right|^2}_{\equiv K} . \end{eqnarray}

The flux\sphinxhyphen{}form equations of motion in height coordinates can thus be written succinctly as:

\begin{eqnarray} \partial_t \boldsymbol{u} + \left( f \widehat{\boldsymbol{k}} + \boldsymbol{\nabla} \times \boldsymbol{u} \right) \times \boldsymbol{v} + \boldsymbol{\nabla} K + \frac{\rho}{\rho_o} \boldsymbol{\nabla} \Phi + \frac{1}{\rho_o} \boldsymbol{\nabla} p &= \boldsymbol{\mathcal{F}} &\mbox{ momentum} \\ \boldsymbol{\nabla}_z \cdotp \boldsymbol{u} + \partial_z w &= 0 &\mbox{ thickness} \\ \partial_t \theta + \boldsymbol{\nabla}_z \cdotp ( \boldsymbol{u} \theta ) + \partial_z ( w \theta ) &= \boldsymbol{\mathcal{N}}_\theta^\gamma - \frac{\partial J_\theta^{(z)}}{\partial z} &\mbox{ potential temp} \\ \partial_t S + \boldsymbol{\nabla}_z \cdotp ( \boldsymbol{u} S ) + \partial_z ( w S ) &= \boldsymbol{\mathcal{N}}_S^\gamma - \frac{\partial J_S^{(z)}}{\partial z} &\mbox{ salinity} \\ \rho &= \rho(S, \theta, z) &\mbox{ equation of state} \end{eqnarray}

where the horizontal momentum equations and vertical hydrostatic balance equation have been written as a single three\sphinxhyphen{}dimensional equation.


\section{General coordinate equations}
\label{\detokenize{api/generated/pages/General_Coordinate:general-coordinate-equations}}\label{\detokenize{api/generated/pages/General_Coordinate:general-coordinate}}\label{\detokenize{api/generated/pages/General_Coordinate::doc}}
Transforming to a vertical coordinate
\(r(z,x,y,t)\) , with \(\dot{r} = \frac{\partial r}{\partial t}\) …

The Boussinesq hydrostatic equations of motion in general\sphinxhyphen{}coordinate
\(r\) are:

\begin{eqnarray} \rho_0 \left( \frac{\partial \mathbf{u}}{\partial t} + ( f + \zeta ) \, \hat{\mathbf{z}} \times \mathbf{u} + \dot{r} \, \frac{\partial \mathbf{u}}{\partial r} + \nabla_r \, K \right) &= -\nabla_r \, p - \rho \nabla_r \, \Phi + \boldsymbol{\mathcal{F}} &\mbox{momentum} \label{eq:r-horz-momentum} \\ \rho \, \frac{\partial \Phi}{\partial r} + \frac{\partial p}{\partial r} &= 0 &\mbox{hydrostatic} \label{eq:r-hydrostatic-equation} \\ \frac{\partial z_r }{\partial t} + \nabla_r \cdot \, \left( z_r \, \mathbf{u} \right) + \frac{\partial ( z_r \, \dot{r} ) }{\partial r} &= 0 &\mbox{thickness} \label{eq:r-non-divergence} \\ \frac{\partial ( \theta \, z_r ) }{\partial t} + \nabla_r \cdot \left( \theta z_r \, \mathbf{u} \right) + \frac{\partial ( \theta \, z_r \, \dot{r} )}{\partial r} &= z_r \boldsymbol{\mathcal{N}}_\theta^\gamma - \frac{\partial J_\theta^{(z)}}{\partial r} &\mbox{potential temp} \label{eq:r-temperature-equation} \\ \frac{\partial ( S \, z_r) }{\partial t} + \nabla_r \cdot \left( S \, z_r \, \mathbf{u} \right) + \frac{\partial ( S \, z_r \, \dot{r} )}{\partial r} &= z_r \boldsymbol{\mathcal{N}}_S^\gamma - \frac{\partial J_S^{(z)}}{\partial r} &\mbox{salinity} \label{eq:r-salinity-equation} \\ \rho &= \rho\left( S, \theta, -g \rho_0 z(r) \right) &\mbox{equation of state.} \end{eqnarray}

The time derivatives are now computed with the generalized vertical coordinate fixed rather than the geopotential. We introduced the specific thickness,
\(z_r = \partial z/\partial r\) , which measures the inverse vertical stratification of the vertical coordinate surfaces.

Similar to \sphinxcite{zzbibliography:bleck2002}
, MOM6 is discretized in the vertical by integrating between surfaces of \(r\) to yield layer equations where the layer thickness is \(h = \int z_r dr\) and variables are treated as finite volume averages over each layer:

\begin{eqnarray} \rho_0 \left( \frac{\partial \mathbf{u}}{\partial t} + \frac{( f + \zeta )}{h} \, \hat{\mathbf{z}} \times h \, \mathbf{u} + \underbrace{ \dot{r} \, \frac{\partial \mathbf{u}}{\partial r} } + \nabla_r K \right) &= -\nabla_r \, p - \rho \nabla_r \, \Phi + \boldsymbol{\mathcal{F}} &\mbox{momentum} \label{eq:h-horz-momentum} \\ \rho \, \delta_r \Phi + \delta_r p &= 0 &\mbox{hydrostatic} \label{eq:h-hydrostatic-equation} \\ \frac{\partial h}{\partial t} + \nabla_r \cdot \left( h \, \mathbf{u} \right) + \underbrace{ \delta_r ( z_r \dot{r} ) } &= 0 &\mbox{thickness} \label{eq:h-thickness-equation} \\ \frac{\partial ( \theta \, h )}{\partial t} + \nabla_r \cdot \left( \theta h \, \mathbf{u} \right) + \underbrace{ \delta_r ( \theta \, z_r \dot{r} ) } &= h \boldsymbol{\mathcal{N}}_\theta^\gamma - \delta_r J_\theta^{(z)} &\mbox{potential temp} \label{eq:h-temperature-equation} \\ \frac{\partial ( S \, h )}{\partial t} + \nabla_r \cdot \left( S \, h \, \mathbf{u} \right) + \underbrace{ \delta_r ( S \, z_r \dot{r} ) } &= h \boldsymbol{\mathcal{N}}_S^\gamma - \delta_r J_S^{(z)} &\mbox{salinity} \label{eq:h-salinity-equation} \\ \rho &= \rho\left( S, \theta, -g \rho_0 z(r) \right) &\mbox{equation of state,} \label{eq:h-equation-of-state} \end{eqnarray}

where
\(\delta_{r} = \mathrm{d}r \, (\partial/\partial r)\) is the discrete vertical difference operator. The pressure gradient accelerations in the momentum equation \ref{eq:h-horz-momentum} are written in continuous\sphinxhyphen{}in\sphinxhyphen{}the\sphinxhyphen{}vertical form for brevity; the exact discretization is detailed in \sphinxcite{zzbibliography:adcroft2008} . The MOM6 time\sphinxhyphen{}stepping algorithm integrates the above layer\sphinxhyphen{}averaged equations forward allowing the vertical grid to follow the motion, i.e. \(\dot{r}=0\) , so that the underbraced terms are dropped. This approach is generally known as the Lagrangian method but here the Lagrangian method is used only in the vertical direction. After each Lagrangian step, a remap step is applied that generates a new vertical grid of the user’s choosing. The ocean state is then mapped from the old to the new grid. The physical state is not meant to change during the remap step, yet truncation errors make remapping imperfect. We employ high\sphinxhyphen{}order accurate reconstructions to minimize errors introduced during the remap step (\sphinxcite{zzbibliography:white2008} , \sphinxcite{zzbibliography:white2009} ). The connection between time\sphinxhyphen{}stepping and remapping is described in section {\hyperref[\detokenize{api/generated/pages/ALE_Timestep:ale-timestep}]{\sphinxcrossref{\DUrole{std,std-ref}{ALE Timestep}}}} .


\section{Specifics}
\label{\detokenize{api/generated/pages/Specifics:specifics}}\label{\detokenize{api/generated/pages/Specifics:id1}}\label{\detokenize{api/generated/pages/Specifics::doc}}

\subsection{Specifics of the Ocean Model Equations}
\label{\detokenize{api/generated/pages/Specifics:specifics-of-the-ocean-model-equations}}\label{\detokenize{api/generated/pages/Specifics:specifics-1section-specifics}}
We here provide more details of the terms appearing in the ocean model equations described in {\hyperref[\detokenize{api/generated/pages/General_Coordinate:general-coordinate}]{\sphinxcrossref{\DUrole{std,std-ref}{General coordinate equations}}}}
.


\subsection{Horizontal Momentum Equation}
\label{\detokenize{api/generated/pages/Specifics:horizontal-momentum-equation}}\label{\detokenize{api/generated/pages/Specifics:specifics-1horiz-mom-eq}}
Equation \ref{eq:h-horz-momentum} is the horizontal momentum equation written in its vector\sphinxhyphen{}invariant advective form %
\begin{footnote}[1]\sphinxAtStartFootnote
The vector\sphinxhyphen{}invariant advective form is commonly used in models such as MOM6 using an Arakawa C\sphinxhyphen{}grid (e.g., see section 10 of \sphinxcite{zzbibliography:griffies2000-2}).
%
\end{footnote}
with \(\mathbf{u} = \hat{\mathbf{x}} \, u + \hat{\mathbf{y}} \, v\) the horizontal velocity, \(p\) the hydrostatic pressure, \(f\) the Coriolis parameter, and
\begin{equation*}
\begin{split}\zeta^{(r)} = \hat{\bf z} \cdot (\nabla_{r}\times \mathbf{u})\end{split}
\end{equation*}
the vertical component of the vorticity using \(\nabla_{r}\) for the curl operator. The discretization of the Coriolis term is the enstrophy conserving scheme of \sphinxcite{zzbibliography:sadourny1975} . The geopotential coordinate, \(z\) , has a value \(z=0\) at a resting ocean surface, \(z=\eta(x,y,t)\) at the ocean free surface, and \(z=-H(x,y)\) at the ocean bottom. We use the Boussinesq approximation (volume conserving kinematics) with \(\rho_{0} = 1035~\mbox{kg}~\mbox{m}^{-3}\) the reference density. %
\begin{footnote}[2]\sphinxAtStartFootnote
MOM6 has an option for compressible non\sphinxhyphen{}Boussinesq flow (mass conserving kinematics). We chose the Boussinesq option largely based on legacy.
%
\end{footnote} Time and horizontal derivatives are computed holding the generalized vertical coordinate fixed rather than the geopotential
\begin{equation*}
\begin{split}\frac{\partial}{\partial t} = \left[ \frac{\partial}{\partial t} \right]_{r} \qquad \nabla_{r} = \hat{\mathbf{x}} \left[ \frac{\partial}{\partial x} \right]_{r} + \hat{\mathbf{y}} \left[ \frac{\partial}{\partial y} \right]_{r}.\end{split}
\end{equation*}
The transport of seawater crossing surfaces of constant
\(r\) is measured by the dia\sphinxhyphen{}surface velocity component (see section 6.7 of \sphinxcite{zzbibliography:smgbook} )
\begin{equation*}
\begin{split}\frac{\partial z}{\partial r} \, \frac{\mathrm{D}r}{\mathrm{D}t} = z_{r} \, \dot{r},\end{split}
\end{equation*}
with \(z_{r}\) the specific thickness that is assumed one\sphinxhyphen{}signed throughout the ocean, and \(\mathrm{D}/\mathrm{D}t\) the material time derivative operator. In the ocean interior where \(r\) is aligned with isopycnals, the dia\sphinxhyphen{}surface velocity becomes the diapycnal velocity whose value is directly related to irreversible processes such as mixing that act on potential temperature and salinity. In the unstratified mixed layers, \(r =z^{*}\) so that \(z_{r} \dot{r} = (\partial z/\partial z^{*}) \, \mathrm{D}z^{*}/\mathrm{D}t\) , which is close to the familiar vertical velocity component \(\mathrm{D}z/\mathrm{D}t\) .

Viscous dissipation (Laplacian and biharmonic friction following \sphinxcite{zzbibliography:griffies2000}
) and mechanical boundary forces (winds, bottom stress) contribute to the divergence of the deviatoric (symmetric and trace\sphinxhyphen{}free) stress tensor, \(\boldsymbol{\mathcal{F}} = \nabla \cdot \mathbf{\tau}\) . MOM6 and the real ocean have no vertical sidewalls, and MOM6 treats all solid\sphinxhyphen{}earth boundaries with bottom stress parameterized as a quadratic drag.


\subsection{Hydrostatic balance}
\label{\detokenize{api/generated/pages/Specifics:hydrostatic-balance}}\label{\detokenize{api/generated/pages/Specifics:specifics-1hydrostatic-balance}}
Equation \ref{eq:h-hydrostatic-equation} is the discrete version of the hydrostatic balance. The horizontal pressure gradient force is implemented as a contact force following the method of \sphinxcite{zzbibliography:adcroft2008}
. These equations differ from \sphinxcite{zzbibliography:bleck2002} who uses the Montgomery potential to calculate pressure gradient accelerations.


\subsection{Thickness and tracer equations}
\label{\detokenize{api/generated/pages/Specifics:thickness-and-tracer-equations}}\label{\detokenize{api/generated/pages/Specifics:specifics-1thickness-and-tracer}}
Volume conservation appears in the form of a prognostic flux\sphinxhyphen{}form layer thickness equation \ref{eq:h-thickness-equation}, with the non\sphinxhyphen{}negative layer thickness given by
\begin{equation*}
\begin{split}h = \frac{\partial z}{\partial r} \, \mathrm{d}r,\end{split}
\end{equation*}
where \(\mathrm{d}r\) is the thickness of a layer in \(r\) \sphinxhyphen{}space (e.g., the density difference between target density classes or the thickness between target depths). The layer thickness increases where horizontal thickness fluxes converge, \(\nabla_r \cdot \left( h_k \, \mathbf{u} \right) < 0\) , and where dia\sphinxhyphen{}surface flow converges, \(\delta_r (z_{r} \, \dot{r} ) < 0\) . The volume flux \(h_k \mathbf{u}\) is computed using the quasi\sphinxhyphen{}third order PPM scheme (\sphinxcite{zzbibliography:colella1984} ) using a positive\sphinxhyphen{}definite limiter rather than the monotonic limiter. This last choice avoids limiting of positive extrema and thus retains third\sphinxhyphen{}order accuracy everywhere except near vanishing layers.

Transport in the thickness equation is discretized compatibly with that in the flux\sphinxhyphen{}form potential temperature and salinity equations \ref{eq:h-temperature-equation} and  \ref{eq:h-salinity-equation}. Compatibility is required to maintain global and layer integrated conservation properties for volume, heat, and salt. Tracer reconstruction for transport uses PPM with monotonic limiters but using third order interpolation for edge values. This reduces the size of the stencil which helps the computational efficiency of the transport scheme. The flux convergences,
\(\boldsymbol{\mathcal{N}}_\theta^\gamma\) and \(\boldsymbol{\mathcal{N}}_S^\gamma\) , provide subgrid scale neutral diffusion for the potential temperature and salinity, whereas \(\delta_{r}J_{\theta}^{(z)}\) and \(\delta_{r}J_{S}^{(z)}\) provide subgrid scale vertical diffusion as well as boundary fluxes. In the interior, both subgrid fluxes vanish when their respective tracers are spatially uniform, thus ensuring that the tracer equation reduces to the thickness equation when the tracer is uniform.

Parameterized subgrid scale advection from the submesoscale (\sphinxcite{zzbibliography:fox-kemper2011}
) and mesoscale (\sphinxcite{zzbibliography:gent1995} ) parameterizations are combined with the lateral advection of thickness and tracer, thus providing a residual mean advective transport for the scalar fields. Furthermore, we implement subgrid advective terms solely as lateral transports, thus interpreting them as layer bolus transport as appropriate for vertical Lagrangian models rather than a three\sphinxhyphen{}dimensional eddy\sphinxhyphen{}induced advection as appropriate for vertical Eulerian models (see \sphinxcite{zzbibliography:mcdougall2001} for details).


\subsection{Equation of state}
\label{\detokenize{api/generated/pages/Specifics:equation-of-state}}\label{\detokenize{api/generated/pages/Specifics:specifics-1eos}}
The equation of state, \ref{eq:h-equation-of-state}, determines
\sphinxstyleemphasis{in situ}
density as a function of potential temperature, salinity, and pressure. We evaluate the pressure in the equation of state according to \(- g \, \rho_{0} \, z\) . Doing so maintains energetic consistency for the Boussinesq fluid according to section 2.4.3 of \sphinxcite{zzbibliography:gvbook} . We make use of the \sphinxcite{zzbibliography:wright1997} equation of state so that \(\theta\) is potential temperature and \(S\) is the practical salinity. Although MOM6 has the more updated equation of state from \sphinxcite{zzbibliography:teos2010} , the required changes for thermodynamic variables were implemented only after the basic model configuration was developed. Time constraints on model development prompted us to retain usage of \sphinxcite{zzbibliography:wright1997} for OM4.

The freezing point of seawater is approximated as
\begin{equation*}
\begin{split}T_f = -0.054 S - 7.75\times10^{-08} p,\end{split}
\end{equation*}
where \(p\) is in units of Pascals and \(S\) is in units of \(1\times10^{-3}\) . When the local temperature anywhere in the ocean column falls below the freezing point, the water\sphinxhyphen{}equivalent volume of ice is calculated and the fusion heat locally added back to the ocean to raise the liquid seawater temperature back to the freezing point. The frozen water and salt are sent to the sea\sphinxhyphen{}ice model.


\section{ALE}
\label{\detokenize{api/generated/pages/ALE:ale}}\label{\detokenize{api/generated/pages/ALE:id1}}\label{\detokenize{api/generated/pages/ALE::doc}}

\subsection{Basics of the Vertical Lagrangian\sphinxhyphen{}Remap Method in MOM6}
\label{\detokenize{api/generated/pages/ALE:basics-of-the-vertical-lagrangian-remap-method-in-mom6}}\label{\detokenize{api/generated/pages/ALE:ale-1section-ale}}
As discussed by \sphinxcite{zzbibliography:adcroft2006}
, there are two general classes of algorithms that frame how hydrostatic ocean models are formulated. The two classes differ in how they treat the vertical direction. Quasi\sphinxhyphen{}Eulerian methods follow the approach traditionally used in geopotential coordinate models, whereby vertical motion is diagnosed via the continuity equation. Quasi\sphinxhyphen{}Lagrangian methods are traditionally used by layered isopycnal models, with the Lagrangian approach specifying motion that crosses coordinate surfaces. Indeed, such dia\sphinxhyphen{}surface flow can be set to zero using Lagrangian methods for studies of adiabatic dynamics. MOM6 makes use of the vertical Lagrangian remap method, as pioneered for ocean modeling by \sphinxcite{zzbibliography:bleck2002} , which is a limit case of the Arbitrary\sphinxhyphen{}Lagrangian\sphinxhyphen{}Eulerian method (\sphinxcite{zzbibliography:hirt1997} ). Dia\sphinxhyphen{}surface transport is implemented via a remapping so that the method can be summarized as the Lagrangian plus remap approach and is essentially a one\sphinxhyphen{}dimensional version of the incremental remapping of \sphinxcite{zzbibliography:dukowicz2000} .

The MOM6 implementation of the vertical Lagrangian\sphinxhyphen{}remap method makes use of two general steps. The first evolves the ocean state forward in time according to a vertical Lagrangian limit with
\(\dot{r}=0\) . Hence, the horizontal momentum, thickness, and tracers are time stepped with the red terms removed in equations \ref{eq:h-horz-momentum},  \ref{eq:h-thickness-equation}, \ref{eq:h-temperature-equation}, and \ref{eq:h-salinity-equation}. All advective transport thus occurs within a layer as defined by constant \(r\) \sphinxhyphen{}surfaces so that the volume within each layer is fixed. All other terms are retained in their full form, including subgrid scale terms that contribute to the transfer of tracer and momentum into distinct \(r\) layers (e.g., dia\sphinxhyphen{}surface diffusion of tracer and velocity). Maintaining constant volume within a layer yet allowing for tracers to move between layers engenders no inconsistency between tracer and thickness evolution. The reason is that tracer diffusion, even dia\sphinxhyphen{}surface diffusion, does not transfer volume.

The second step in the algorithm comprises the generation of a new vertical grid following a prescription, such as whether the grid should align with isopcynals or constant
\(z^{*}\) or a combination. The ocean state is then vertically remapped to the newly generated vertical grid. The remapping step incorporates dia\sphinxhyphen{}surface transfer of properties, with such transfer depending on the prescription given for the vertical grid generation. To minimize discretization errors and the associated spurious mixing, the remapping step makes use of the high order accurate methods developed by \sphinxcite{zzbibliography:white2008} and \sphinxcite{zzbibliography:white2009} .

The underlying algorithm for treatment of the vertical can be related to operator\sphinxhyphen{}splitting of the red terms in equations  \ref{eq:h-thickness-equation}
\ref{eq:h-temperature-equation}. If we consider, for simplicity, an Euler\sphinxhyphen{}forward update for a time\sphinxhyphen{}step \(\Delta t\) , the time\sphinxhyphen{}stepping for the continuity and temperature equation can be summarized as

\begin{eqnarray} h^\dagger &= h^{(n)} - \Delta t \left[ \nabla_r \cdot \left( h \, \mathbf{u} \right) \right] &\mbox{thickness} \label{eq:ale-thickness-equation} \\ \theta^\dagger \, h^\dagger &= \theta^{(n)} \, h^{(n)} - \Delta t \left[ \nabla_r \cdot \left( \theta h \, \mathbf{u} \right) - h \boldsymbol{\mathcal{N}}_\theta^\gamma + \delta_r J_\theta^{(z)} \right] &\;\;\;\;\mbox{potential temp} \label{eq:ale-temperature-equation} \\ h^{(n+1)} &= h^\dagger - \Delta t \, \delta_r \left( z_r \dot{r} \right) &\mbox{move grid} \label{eq:ale-new-grid} \\ \theta^{(n+1)} h^{(n+1)} &= \theta^\dagger h^\dagger - \Delta t \, \delta_r \left( z_r \dot{r} \, \theta^\dagger \right) &\mbox{remap temperature.} \label{eq:ale-remap-temperature} \end{eqnarray}

Substituting \ref{eq:ale-thickness-equation} into \ref{eq:ale-new-grid} recovers a time\sphinxhyphen{}discrete form of \ref{eq:h-thickness-equation}. The intermediate quantities indicated by
\(^\dagger\) \sphinxhyphen{}symbols are the result of the vertical Lagrangian step of the algorithm. What were the red terms in the continuous\sphinxhyphen{}in\sphinxhyphen{}time equations are used to evolve the the intermediate quantities to the final updated quantities each step. In MOM6, equation  \ref{eq:ale-new-grid} is essentially used to define the dia\sphinxhyphen{}surface transport \(z_r \dot{r}\) by prescribing \(h^{(n+1)}\) . For example, to recover a z\sphinxhyphen{}coordinate model, \(h^{(n+1)}=\Delta z\) , and \(z_r \dot{r}\) becomes the Eulerian vertical velocity, \(w\) .

Within the above framework for evolving the ocean state, we make use of a standard split\sphinxhyphen{}explicit time stepping method by decomposing the horizontal momentum equation into its fast (depth integrated) and slow (deviation from depth integrated) components. Furthermore, we follow the methods of \sphinxcite{zzbibliography:hallberg2009}
to ensure that the free surface resulting from time stepping the depth integrated thickness equation (i.e., the free surface equation) is consistent with the sum of the thicknesses that result from time stepping the layer thickness equations for each of the discretized layers; i.e., \(\sum_{k} h = H + \eta\) .


\chapter{Spatial Discretization}
\label{\detokenize{discrete_space:spatial-discretization}}\label{\detokenize{discrete_space::doc}}
The model equations are the layer\sphinxhyphen{}integrated vector\sphinxhyphen{}invariant form of the
hydrostatic primitive equations (either Boussinesq or non\sphinxhyphen{}Boussinesq).

We present the equations starting from the hydrostatic Boussinesq equation in
height coordinates and progress through vector\sphinxhyphen{}invariant and
general\sphinxhyphen{}coordinate equations to the final equations used in the A.L.E.
algorithm.


\section{Discrete Horizontal and Vertical Grids}
\label{\detokenize{api/generated/pages/Discrete_Grids:discrete-horizontal-and-vertical-grids}}\label{\detokenize{api/generated/pages/Discrete_Grids:discrete-grids}}\label{\detokenize{api/generated/pages/Discrete_Grids::doc}}

\subsection{Horizontal grids}
\label{\detokenize{api/generated/pages/Discrete_Grids:horizontal-grids}}\label{\detokenize{api/generated/pages/Discrete_Grids:discrete-grids-1horizontal-grids}}
The placement of model variables on the horizontal C\sphinxhyphen{}grid is illustrated here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Arakawa_C_grid}.png}
\caption{MOM6 uses an Arakawa C grid staggering of variables with a North\sphinxhyphen{}East indexing convention.}\label{\detokenize{api/generated/pages/Discrete_Grids:id1}}\end{figure}

Scalars are located at the
\(h\) \sphinxhyphen{}points, velocities are staggered such that \(u\) \sphinxhyphen{}points and \(v\) \sphinxhyphen{}points are not co\sphinxhyphen{}located, and vorticities are located at \(q\) \sphinxhyphen{}points. The indexing for points ( \(i,j\) ) in the logically\sphinxhyphen{}rectangular domain is such that \(i\) increases in the \(x\) direction (eastward for spherical polar coordinates), and \(j\) increases in the \(y\) direction (northward for spherical polar coordinates). A \(q\) \sphinxhyphen{}point with indices ( \(i,j\) ) lies to the upper right (northeast) of the \(h\) \sphinxhyphen{}point with the same indices. The index for the vertical dimension \(k\) increases with depth, although the vertical coordinate \(z\) , measured from the mean surface level \(z = 0\) , decreases with depth.

When the horizontal grid is generated, it is actually computed on the “supergrid” at twice the nominal resolution of the model. The grid file contains the grid metrics and the areas of this fine grid. The model then decomposes it into the four staggered grids, along with computing the grid metrics as shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Grid_metrics}.png}
\caption{The grid metrics around both \(h\)\sphinxhyphen{}points and \(q\)\sphinxhyphen{}points.}\label{\detokenize{api/generated/pages/Discrete_Grids:id2}}\end{figure}

The model carries both the metrics as well as their inverses, for instance, IdyT = 1/dyT. There are also the areas and the inverse areas for all four grid locations. areaT and areaBu are the sum of the four areas from the supergrid surrounding each h\sphinxhyphen{}point and each q\sphinxhyphen{}point, respectively. The velocity faces can be partially blocked and their areas are adjusted accordingly, where
\(dy\_Cu\) and \(dx\_Cv\) are the blocked distances at \(u\) and \(v\) points, respectively.

\begin{eqnarray} \mbox{areaCu}_{i,j} &= dxCu_{i,j} * dy\_Cu_{i,j} \\ \mbox{areaCv}_{i,j} &= dx\_Cv_{i,j} * dyCv_{i,j} \\ \mbox{IareaCu}_{i,j} &= 1 / \mbox{areaCu}_{i,j} \\ \mbox{IareaCv}_{i,j} &= 1 / \mbox{areaCv}_{i,j} \end{eqnarray}

The horizontal grids can be spherical, tripole, regional, or cubed sphere. The default is for grids to be re\sphinxhyphen{}entrant in the
\(x\) \sphinxhyphen{}direction; this needs to be turned off for regional grids.


\subsection{Vertical grids}
\label{\detokenize{api/generated/pages/Discrete_Grids:vertical-grids}}\label{\detokenize{api/generated/pages/Discrete_Grids:discrete-grids-1vertical-grids}}
The placement of model variables in the vertical is illustrated here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{cell_3d}.png}
\caption{The MOM6 interfaces are at vertical location \(e\) which are separated by the layer thicknesses \(h\).}\label{\detokenize{api/generated/pages/Discrete_Grids:id3}}\end{figure}

The vertical coordinate is Lagrangian in that the interfaces between the layers are free to move up and down with time. The interfaces have target depths or target densities, depending on the desired vertical coordinate system. They can even have target sigma values for terrain\sphinxhyphen{}following coordinates or you can design a hybrid coordinate in which different interfaces have differing behavior. In any case, the interfaces move with the fluid during the dynamic timesteps and then get reset during a remapping operation. See section {\hyperref[\detokenize{api/generated/pages/ALE_Timestep:ale-timestep}]{\sphinxcrossref{\DUrole{std,std-ref}{ALE Timestep}}}}
for details.


\section{Finite Difference Operators}
\label{\detokenize{api/generated/pages/Finite_Difference_Operators:finite-difference-operators}}\label{\detokenize{api/generated/pages/Finite_Difference_Operators:id1}}\label{\detokenize{api/generated/pages/Finite_Difference_Operators::doc}}
Finite Difference Operators


\section{PPM Advection Scheme}
\label{\detokenize{api/generated/pages/PPM:ppm-advection-scheme}}\label{\detokenize{api/generated/pages/PPM:ppm}}\label{\detokenize{api/generated/pages/PPM::doc}}

\subsection{Advection Scheme}
\label{\detokenize{api/generated/pages/PPM:advection-scheme}}\label{\detokenize{api/generated/pages/PPM:ppm-1section-ppm}}
Following \sphinxcite{zzbibliography:colella1984}
and \sphinxcite{zzbibliography:carpenter1990} , we use the Piecewise Parabolic Method (PPM) to represent values within the model cells. Each cell is assumed to have a piecewise parabolic representation, which is uniquely prescribed by conservation and the two edge values. This method has the following features:
\begin{itemize}
\item {} 
The PPM approach is conservative.

\item {} 
The (unlimited) order of accuracy is determined by the estimates of the edge values.

\item {} 
Monotonicity is ensured by adjusting the edge values to flatten the profile.

\end{itemize}

An example is shown in this figure:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{ppm_arc}.png}
\caption{The parabolic representation of a field within a cell.}\label{\detokenize{api/generated/pages/PPM:id5}}\end{figure}
\begin{equation*}
\begin{split}x'_i \equiv \frac{x - x_{i-1/2}} {\Delta x_i}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\Delta x_i \equiv x_{i + 1/2} - x_{i- 1/2}\end{split}
\end{equation*}\begin{equation*}
\begin{split}c \equiv u \Delta t / \Delta x_i\end{split}
\end{equation*}\begin{equation*}
\begin{split}A_i(x') = a_L + (a_R - a_L) x'_i + a_6 x'_i(1 - x'_i)\end{split}
\end{equation*}\begin{equation*}
\begin{split}a_6 = 6a_i - 3 (a_R + a_L)\end{split}
\end{equation*}
\begin{eqnarray} a_i &= \int_0^1 A_i(x'_i) dx'_i = \int_0^1 a_L + (a_R - a_L) x'_i + a_6 x'_i (1 - x'_i) dx'_i \\ &= \left[ a_L x'_i + \frac{1}{2} (a_R - a_L) x_i^{\prime 2} + a_6 \left( \frac{1}{2} x_i^{\prime 2} - \frac{1}{3} x_i^{\prime 3} \right) \right]_0^1 \\ &= \frac{1}{2} (a_R + a_L) + \frac{1}{6} a_6 \end{eqnarray}

\begin{eqnarray} F_{i+1/2} &= \frac{1}{\Delta t} \int_{x_{i + 1/2} - u \Delta t}^{x_{i + 1/2}} A_i^n(x) dx = \frac{\Delta x}{\Delta t} \int_{1-c}^1 A_i (x'_i) dx'_i \\ &= \frac{\Delta x}{\Delta t} \left[ a_L x'_i + \frac{1}{2} (a_R - a_L) x_i^{\prime 2} + a_6 \left( \frac{1}{2} x_i^{\prime 2} - \frac{1}{3} x_i^{\prime 3} \right) \right]_{1 - c}^1 \\ &= \frac{\Delta x}{\Delta t} \left[ a_L c + (a_R - a_L + a_6) \left( c - \frac{1}{2} c^2 \right) - a_6 \left( c - c^2 + \frac{1}{3} c^3 \right) \right] \\ &= u \left[ a_R + \frac{1}{2} (a_L - a_R) c + a_6 \left( \frac{1}{2} c - \frac{1}{3} c^2 \right) \right] \end{eqnarray}

The choice of
\(a_L\) and \(a_R\) is not unique, but can be done according to \sphinxcite{zzbibliography:colella1984} (CW84) or \sphinxcite{zzbibliography:huynh1997} (H3) as mentioned in {\hyperref[\detokenize{api/generated/pages/Tracer_Advection:tracer-advection}]{\sphinxcrossref{\DUrole{std,std-ref}{Tracer Advection}}}} .


\section{Discrete Coriolis Term}
\label{\detokenize{api/generated/pages/Discrete_Coriolis:discrete-coriolis-term}}\label{\detokenize{api/generated/pages/Discrete_Coriolis:discrete-coriolis}}\label{\detokenize{api/generated/pages/Discrete_Coriolis::doc}}

\subsection{Coriolis Term}
\label{\detokenize{api/generated/pages/Discrete_Coriolis:coriolis-term}}\label{\detokenize{api/generated/pages/Discrete_Coriolis:discrete-coriolis-1coriolis}}
In general, the discrete equations are written as simple difference equations based on the Arakawa C\sphinxhyphen{}grid as described in section {\hyperref[\detokenize{api/generated/pages/Discrete_Grids:discrete-grids-1horizontal-grids}]{\sphinxcrossref{\DUrole{std,std-ref}{Horizontal grids}}}}
. One of the more interesting exceptions is the Coriolis term. It is computed in the form shown in \ref{eq:h-horz-momentum}, or:
\begin{equation*}
\begin{split}\frac{( f + \zeta )}{h} \, \hat{\mathbf{z}} \times h \, \mathbf{u}\end{split}
\end{equation*}
This term needs to be evaluated at
\(u\) points for the \(v\) equation and vice versa, plus we need to keep the thickness, \(h\) , positive definite. MOM6 contains a number of options for how to compute this term.
\begin{itemize}
\item {} 
SADOURNY75\_ENERGY Sadourny \sphinxcite{zzbibliography:sadourny1975} figured out how to conserve energy or enstrophy but not both. This option is energy conserving. The term in the \(u\) equation becomes:

\end{itemize}
\begin{equation*}
\begin{split}\frac{1}{4 dx} \left( q_{i,j} (vh_{i+1,j} + vh_{i,j}) + q_{i,j-1} (vh_{i+1,j-1} + vh_{i,j-1}) \right)\end{split}
\end{equation*}
where \(q = \frac{f + \zeta}{h}\) and \(h\) is an area\sphinxhyphen{}weighted average of the four thicknesses surrounding the \(q\) point, such that it is guaranteed to be positive definite.

There is a variant on this scheme with the CORIOLIS\_EN\_DIS option. If true, two estimates of the thickness fluxes \(vh\) are used to estimate the Coriolis term, and the one that dissipates energy relative to the other one is used.
\begin{itemize}
\item {} 
SADOURNY75\_ENSTRO Also from \sphinxcite{zzbibliography:sadourny1975} , this option is enstrophy conserving.

\end{itemize}
\begin{equation*}
\begin{split}\frac{1}{8 dx} ( q_{i,j} + q_{i,j-1} ) ((vh_{i+1,j} + vh_{i,j}) + (vh_{i+1,j-1} + vh_{i,j-1}) )\end{split}
\end{equation*}\begin{itemize}
\item {} 
ARAKAWA\_LAMB81 From \sphinxcite{zzbibliography:arakawa1981} is a scheme which is both energy and enstrophy conserving. Its weaknesses are a large stencil and differing thickness stencils in the numerator and denominator. This scheme and several others (with differing values of \(a, b, c, d\) and \(ep\) ) are implemented as:

\end{itemize}

\begin{eqnarray} \frac{1}{dx} (a_{i,j} vh_{i+1,j} &+ b_{i,j} vh_{i,j} + d_{i,j} vh_{i+1,j-1} + c_{i,j} vh_{i,j-1} \\ &+ ep_{i,j}*uh_{i-1,j} - ep_{i+1,j}*uh_{i+1,j}) \label{eq:Coriolis_abcd} \end{eqnarray}

with

\begin{eqnarray} a_{i,j} &= \frac{1}{24} (2.0*(q_{i+1,j} + q_{i,j-1}) + (q_{i,j} + q_{i+1,j-1})) \\ b_{i,j} &= \frac{1}{24} ((q_{i,j} + q_{i-1,j-1}) + 2.0*(q_{i-1,j} + q_{i,j-1})) \\ c_{i,j} &= \frac{1}{24} (2.0*(q_{i,j} + q_{i-1,j-1}) + (q_{i-1,j} + q_{i,j-1})) \\ d_{i,j} &= \frac{1}{24} ((q_{i+1,j} + q_{i,j-1}) + 2.0*(q_{i,j} + q_{i+1,j-1})) \\ ep_{i,j} &= \frac{1}{24}((q_{i,j} - q_{i-1,j-1}) + (q_{i-1,j} - q_{i,j-1})) \end{eqnarray}
\begin{itemize}
\item {} 
ARAKAWA\_HSU90 From \sphinxcite{zzbibliography:arakawa1990} is a scheme which always conserves energy and conserves enstrophy in the limit of non\sphinxhyphen{}divergent flow. This one has a larger stencil than Sadourny’s energy scheme, but it’s much better behaved in terms of handling vanishing layers than Arakawa and Lamb. This scheme is implemented with:

\end{itemize}
\begin{equation*}
\begin{split}\frac{1}{dx} (a_{i,j} vh_{i+1,j} + b_{i,j} vh_{i,j} + d_{i,j} vh_{i+1,j-1} + c_{i,j} vh_{i,j-1})\end{split}
\end{equation*}
and

\begin{eqnarray} a_{i,j} &= \frac{1}{12} (q_{i,j} + (q_{i+1,j} + q_{i,j-1})) \\ b_{i,j} &= \frac{1}{12} (q_{i,j} + (q_{i-1,j} + q_{i,j-1})) \\ c_{i,j} &= \frac{1}{12} (q_{i,j} + (q_{i-1,j-1} + q_{i,j-1})) \\ d_{i,j} &= \frac{1}{12} (q_{i,j} + (q_{i+1,j-1} + q_{i,j-1})) \end{eqnarray}
\begin{itemize}
\item {} 
ARAKAWA\_LAMB\_BLEND This is a blending of Arakawa and Lamb, Arakawa and Hsu, and the Sadourny Energy scheme. There are weights CORIOLIS\_BLEND\_WT\_LIN and CORIOLIS\_BLEND\_F\_EFF\_MAX to control this scheme. The equation is the same as for Arakawa and Lamb \eqref{equation:api/generated/pages/Discrete_Coriolis:eq:Coriolis_abcd}, but the values of \(a, b, c, d\) and \(ep\) differ when the pure Arakawa and Lamb scheme breaks down due to thickness variations.

\item {} 
ROBUST\_ENSTRO An enstrophy\sphinxhyphen{}conserving scheme which is robust to vanishing layers.

\end{itemize}

Some of these options also support the BOUND\_CORIOLIS flag. If true, the Coriolis terms in the \(u\) equation are bounded by the four estimates of \(\frac{(f+\zeta)}{h}vh\) from the four neighboring \(v\) points, and similarly in the \(v\) equation. This option would have no effect on the SADOURNY75\_ENERGY scheme if it were possible to use centered difference thickness fluxes.

Note, if BOUND\_CORIOLIS is on, it will also turn on the BOUND\_CORIOLIS\_BIHARM option by default. This option uses a viscosity that increases with the square of the velocity shears, so that the resulting viscous drag is of comparable magnitude to the Coriolis terms when the velocity differences between adjacent grid points is 0.5*BOUND\_CORIOLIS\_VEL.


\subsubsection{Wall boundary conditions}
\label{\detokenize{api/generated/pages/Discrete_Coriolis:wall-boundary-conditions}}\label{\detokenize{api/generated/pages/Discrete_Coriolis:discrete-coriolis-1coriolis-bc}}
Two sets of boundary conditions have been coded in the definition of relative vorticity. These are written as:

NOSLIP defined (in spherical coordinates):

\begin{eqnarray} \mbox{relvort} &= dv/dx \mbox{ (east $\&$ west)}, \mbox{ with } v = 0. \\ \mbox{relvort} &= -\sec(\phi) * d(u \cos(\phi))/dy \mbox{ (north $\&$ south)}, \mbox{ with } u = 0. \end{eqnarray}

Free slip (NOSLIP not defined):
\begin{equation*}
\begin{split}\mbox{relvort} = 0 \mbox{ (all boundaries)}\end{split}
\end{equation*}
with
\(\phi\) defined as latitude. The free slip boundary condition is much more natural on a C\sphinxhyphen{}grid.


\section{Discrete Pressure Gradient Term}
\label{\detokenize{api/generated/pages/Discrete_PG:discrete-pressure-gradient-term}}\label{\detokenize{api/generated/pages/Discrete_PG:discrete-pg}}\label{\detokenize{api/generated/pages/Discrete_PG::doc}}

\subsection{Pressure Gradient Term}
\label{\detokenize{api/generated/pages/Discrete_PG:pressure-gradient-term}}\label{\detokenize{api/generated/pages/Discrete_PG:discrete-pg-1section-pg}}
Following \sphinxcite{zzbibliography:adcroft2008}
, the horizontal momentum equation in the general coordinate \(r\) can be written as:
\begin{equation*}
\begin{split}\frac{\partial \vec{u}}{\partial t} + \nabla_r \Phi + \alpha \nabla_r p = \cal{F}\end{split}
\end{equation*}
where the vector \(\cal{F}\) represents all the forcing terms other than the pressure gradient. Here, \(\vec{u}\) is the horizontal component of the velocity, \(\Phi\) is the geopotential:
\begin{equation*}
\begin{split}\Phi = gz\end{split}
\end{equation*}
\(\alpha = 1/\rho\) is the specific volume and \(p\) is the pressure. The gradient operator is a gradient along the coordinate surface \(r\) .

MOM6 offers two options, an older one using a Montgomery potential as described in \sphinxcite{zzbibliography:hallberg1997}
and \sphinxcite{zzbibliography:sun1999} . However, it can have the instability described in \sphinxcite{zzbibliography:hallberg2005} . The version described here is that in \sphinxcite{zzbibliography:adcroft2008} and is the recommended option (ANALYTIC\_FV\_PGF = True). The paper describes the Boussinesq form while the code supports that and also a non\sphinxhyphen{}Boussinesq form.

In two dimensions (
\(x\) and \(p\) ), we can integrate the zonal component of the momentum equation above over a finite volume:

\begin{eqnarray} - \int dx \int dp \frac{\partial u}{\partial t} &= \int dx \int dp \left. \frac{\partial \Phi}{\partial x}\right|_p \\ &= \int_{p_{br}}^{p_{tr}} \Phi dp + \int_{p_{tr}}^{p_{tl}} \Phi dp + \int_{p_{tl}}^{p_{bl}} \Phi dp &+ \int_{p_{bl}}^{p_{br}} \Phi dp \label{eq:PG_loop} \end{eqnarray}

We convert to line integrals thanks to the Leibniz rule. See the figure for the location of the line integral ranges:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{PG_loop}.png}
\caption{Schematic of the finite volume used for integrating the \(u\)\sphinxhyphen{}component of momentum. The thermodynamic variables \(\theta\) and \(s\) reside on the sides of the depicted volume and are considered uniform for the vertical extent of the volume but with linear variation in the horizontal. The volume is depicted in \((x, p)\) space so \(p\) is linear around the volume but \(\Phi\) can vary arbitrarily along the edges.}\label{\detokenize{api/generated/pages/Discrete_PG:id7}}\end{figure}

The only approximations made are (i) that the potential temperature
\(\theta\) and the salinity \(s\) can be represented continuously in the vertical within each layer although discontinuities between layers are allowed and (ii) that \(\theta\) and \(s\) can be represented continuously along each layer. MOM6 has options for piecewise constant (PCM), piecewise linear (PLM), and piecewise parabolic (PPM) in the vertical.

If we use the Wright equation of state (\sphinxcite{zzbibliography:wright1997}
), we can integrate the above integrals analytically. This equation of state can be written as:
\begin{equation*}
\begin{split}\alpha(s, \theta, p) = A(s, \theta) + \frac{\lambda(s, \theta)}{P(s, \theta) + p}\end{split}
\end{equation*}
where
\(A, \lambda\) and \(P\) are functions only of \(s\) and \(\theta\) . The integral form of hydrostatic balance is:
\begin{equation*}
\begin{split}\Phi(p_t) - \Phi(p_b) = \int_{p_t}^{p_b} \alpha(s, \theta, p) dp\end{split}
\end{equation*}
Assuming piecewise constant values for
\(\theta\) and \(s\) and the above equation of state, we get:

\begin{eqnarray} \Phi(p_t) - \Phi(p_b) &= \int_{p_t}^{p_b} \alpha(s, \theta, p) dp \\ &= (p_b - p_t) A + \lambda \ln \left| \frac{P + p_b}{P + p_t} \right| \\ &= \Delta p \left( A + \frac{\lambda}{P + \overline{p}} \frac{1}{2 \epsilon} \ln \left| \frac{1 + \epsilon}{1 - \epsilon} \right| \right) \label{eq:PG_vert} \end{eqnarray}

which is the exact solution for the continuum only if \(\theta\) and \(s\) are uniform in the interval \(p_t\) to \(p_b\) . Here, we have introduced the variables:
\begin{equation*}
\begin{split}\Delta p = p_b - p_t\end{split}
\end{equation*}\begin{equation*}
\begin{split}\overline{p} = \frac{1}{2}(p_t + p_b)\end{split}
\end{equation*}
and
\begin{equation*}
\begin{split}\epsilon = \frac{\Delta p}{2 (P + \overline{p})}\end{split}
\end{equation*}
We will show later that \(\epsilon \ll 1\) . Note the series expansion:
\begin{equation*}
\begin{split}\frac{1}{2 \epsilon} \ln \left| \frac{1 + \epsilon}{1 - \epsilon} \right| = \sum_{n=1}^\infty \frac{\epsilon^{2n-2}}{2n - 1} = 1 + \frac{\epsilon^2}{3} + \frac{\epsilon^4}{5} + \cdots \forall |\epsilon | \leq 1\end{split}
\end{equation*}
Typical values for the deep ocean with 100 m layer thickness are
\(6 \times 10^8\) Pa and \(10^6\) Pa, respectively, yielding \(\epsilon \sim 8 \times 10^{-4}\) and a corresponding accuracy in the geopotential height calculation of \(\frac{\lambda \epsilon^3}{g} \sim 10^{-5}\) m. For this value of \(\epsilon\) , the series converges with just three terms. In MOM6, we use series rather than the intrinsic log function , since the log is machine dependent and insufficiently accurate. In extreme circumstances, \(\Delta p \sim 6 \times 10^7\) Pa (limited by the depth of the ocean) for which \(\epsilon \sim 0.04\) with geopotential height errors of order 1 m. In this case, the series converges to machine precision with six terms.

The finite volume acceleration is expression terms of four integrals around the volume,
\(\int \Phi dp\) . The side integrals can be calculated by direct integration of  \eqref{equation:api/generated/pages/Discrete_PG:eq:PG_vert}, which gives:

\begin{eqnarray} \int_{p_t}^{p_b} \Phi dp &= \Delta p \left( \Phi_b + \frac{1}{2} A \Delta p + \lambda \left( 1 - \frac{1 - \epsilon}{2 \epsilon} \ln \left| \frac{1 + \epsilon}{1 - \epsilon} \right| \right) \right) \\ &= \Delta p \left( \Phi_b + \frac{1}{2} A \Delta p + \lambda \left( 1 - (1 - \epsilon) \left( 1 + \frac{\epsilon^2}{3} + \frac{\epsilon^4}{5} + \cdots \right) \right) \right) \\ &= \Delta p \left( \Phi_b + \frac{1}{2} A \Delta p + \lambda \left( \epsilon - (1 - \epsilon) \epsilon^2 \left( \frac{1}{3} + \frac{\epsilon^2}{5} + \cdots \right) \right) \right) \end{eqnarray}

where \(\Phi, \Delta p, P, A\) and \(\lambda\) are each evaluated on the left or right side of the volume.

The top and bottom integrals in \eqref{equation:api/generated/pages/Discrete_PG:eq:PG_loop} must allow for the effect of varying
\(\theta\) and \(s\) on \(A, \lambda\) and \(P\) . We evaluate these integrals numerically using sixth\sphinxhyphen{}order quadrature; Boole’s rule requires evaluating the coefficients in the equation of state at five points, two of which have already been evaluated for the side integrals. For efficiency, we linearly interpolate the coefficients \(A, P\) and \(\lambda\) between the end points, which seems to make very little difference to the solution. We also verified that tenth\sphinxhyphen{}order quadrature makes little difference to the solution. The values of the top and bottom integrals are carried upward in a hydrostatic\sphinxhyphen{}like integration, obtained as follows:

\begin{eqnarray} \int_{p_{tl}}^{p_{tr}} \Phi_t dp &= (p_{tr} - p_{tl}) \int_0^1 \Phi_t dx \\ &= (p_{tr} - p_{tl}) \int_0^1 \left( \Phi_b + A(x) \Delta p(x) + \lambda (x) \ln \left| \frac{1 + \epsilon (x)}{1 - \epsilon (x)} \right| \right) dx \\ &= (p_{tr} - p_{tl}) \int_0^1 \Phi_b dx \\ &+ \int_0^1 \Delta p(x) \left( A(x) + \frac{\lambda (x)}{P(x) + \overline{p} (x)} \sum_{n=1}^\infty \frac{\epsilon^{2n-2}}{2n-1} \right) dx \end{eqnarray}

The first integral is either known from the top integral of the layer below or the boundary condition at the ocean bottom. The second integral is evaluated numerically.

All the above definite integrals are specific to the Wright equation of state; the use of a different equation of state requires analytic integration of the appropriate equations. We have found, however, that high\sphinxhyphen{}order numerical integration appears to be sufficient. Although the numerical implementation is more general (allowing the use of arbitrary equations of state), it is significantly more expensive and so we advocate the analytic implementation for efficiency.


\section{Energetic Consistency}
\label{\detokenize{api/generated/pages/Energetic_Consistency:energetic-consistency}}\label{\detokenize{api/generated/pages/Energetic_Consistency:id1}}\label{\detokenize{api/generated/pages/Energetic_Consistency::doc}}
Energetic Consistency


\section{Discrete Open Boundary Conditions}
\label{\detokenize{api/generated/pages/Discrete_OBC:discrete-open-boundary-conditions}}\label{\detokenize{api/generated/pages/Discrete_OBC:discrete-obc}}\label{\detokenize{api/generated/pages/Discrete_OBC::doc}}
Discrete Open Boundary Conditions


\chapter{Time Discretization}
\label{\detokenize{discrete_time:time-discretization}}\label{\detokenize{discrete_time::doc}}

\section{Timestepping Overview}
\label{\detokenize{api/generated/pages/Timestep_Overview:timestepping-overview}}\label{\detokenize{api/generated/pages/Timestep_Overview:timestep-overview}}\label{\detokenize{api/generated/pages/Timestep_Overview::doc}}
In MOM6, it is common to have at least four different timesteps: the barotropic timestep, the baroclinic (momentum dynamics) timestep, the tracer timestep, and the remapping interval. There can also be a forcing timestep on which model coupling occurs.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{timesteps_4}.png}
\caption{Graphic representation of the various timesteps used by MOM6.}\label{\detokenize{api/generated/pages/Timestep_Overview:id1}}\end{figure}


\section{Barotropic Momentum Equations}
\label{\detokenize{api/generated/pages/Barotropic_Momentum_Equations:barotropic-momentum-equations}}\label{\detokenize{api/generated/pages/Barotropic_Momentum_Equations:id1}}\label{\detokenize{api/generated/pages/Barotropic_Momentum_Equations::doc}}
Barotropic Momentum Equations

The barotropic equations are timestepped on a relatively short timestep compared to the rest of the model. Since the timestep constraints for this are known, the barotropic timestep is computed at runtime.

The 2\sphinxhyphen{}d linear momentum equations with integrated continuity are:
\begin{equation*}
\begin{split}\frac{\partial \eta}{\partial t} + \nabla \cdot \left( ( D + \eta) \vec{u}_{BT} h_k \right) = P - E\end{split}
\end{equation*}\begin{equation*}
\begin{split}\frac{\partial \vec{u}_{BT}}{\partial t} = - g \nabla \eta - f \hat{z} \times \vec{u}_{BT} + \vec{F}_{BT}\end{split}
\end{equation*}
where
\begin{equation*}
\begin{split}\vec{u}_{BT} \equiv \frac{1}{D + \eta} \int_{-D}^\eta \vec{u}dz\end{split}
\end{equation*}
and
\(\vec{F}_{BT}\) is the barotropic momentum forcing from baroclinic processes. Note that explicit mass fluxes such as evaporation and precipitation change the model volume explicitly.

In the mode splitting between baroclinic and barotropic processes, it is important to include the contribution of free surface waves on the internal interface heights on the pressure gradient force, shown here as
\(g_{Eff}\) :
\begin{equation*}
\begin{split}\frac{\partial p}{\partial z} = -\rho g\end{split}
\end{equation*}\begin{equation*}
\begin{split}g_{Eff} = g + \frac{\partial}{\partial \eta} \left[ \frac{1}{D + \eta} \int_{-D}^\eta p dz \right]\end{split}
\end{equation*}
The barotropic momentum equation then becomes:
\begin{equation*}
\begin{split}\frac{\partial \vec{u}_{BT}}{\partial t} + f \hat{z} \times \vec{u}_{BT} + \frac{1}{\rho_0} \nabla g_{Eff} \eta = \mbox{Residual}\end{split}
\end{equation*}
Without including the internal wave motion in the barotropic equations, one can generate instabilities (\sphinxcite{zzbibliography:bleck1990}
, \sphinxcite{zzbibliography:hallberg1997a} ).


\section{Baroclinic Momentum Equations}
\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations:baroclinic-momentum-equations}}\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations:id1}}\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations::doc}}

\subsection{Baroclinic Momentum Equations}
\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations:baroclinic-momentum-equations-1section-bc-momentum}}\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations:id2}}
The baroclinic momentum equations are the stacked shallow water equations:
\begin{equation*}
\begin{split}\frac{\partial \vec{u}_k}{\partial t} + (f + \nabla_s \times \vec{u}_k) \hat{z} \times \vec{u}_k = - \frac{\nabla_s p_k}{\rho} - \nabla_s (\phi_k + \frac{1}{2} || \vec{u}_k ||^2 ) + \frac{\nabla \cdot \tilde{\tau}_k}{\rho}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\frac{\partial h_k}{\partial t} + \nabla_s \cdot (\vec{u}h_k) = 0\end{split}
\end{equation*}
The timestepping for these equations is a (quasi?) second\sphinxhyphen{}order Runge\sphinxhyphen{}Kutta step for the inertial oscillations and a forward\sphinxhyphen{}backward Euler step for the pressure (gravity) waves. Using the graphical notation from \sphinxcite{zzbibliography:shchepetkin2005}
, it looks like:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{timestep_MOM6}.png}
\caption{Graphical notation for timestepping schemes in which the black line represents the ideal solution and the red line shows the actual solution. Phase errors are represented by the grey shapes between the bars normal to the circle.}\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations:id4}}\end{figure}

The timestep used in ROMS looks instead like:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{timestep_ROMS}.png}
\caption{Graphical notation for the Adams\sphinxhyphen{}Bashforth technique used in the ROMS model.}\label{\detokenize{api/generated/pages/Baroclinic_Momentum_Equations:id5}}\end{figure}

The ROMS timestepping has smaller phase errors, strong damping at high frequency. The MOM6 use as a global climate model has made the phase errors of lower priority. However, the phase errors may become more problematic for future uses of MOM6. While the MOM6 use of the ALE remapping makes an Adams\sphinxhyphen{}Bashforth scheme impractical, there may be a better timestepping scheme out there for MOM6. Please let the MOM6 developers know if you would like to work on this problem.


\section{Barotropic\sphinxhyphen{}Baroclinic Coupling}
\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:barotropic-baroclinic-coupling}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:id1}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling::doc}}
Time\sphinxhyphen{}averaged accelerations

The barotropic equations are timestepped with a timestep to resolve the surface gravity waves. With care, the baroclinic timestep only need resolve the inertial oscillations. The barotropic accelerations are averaged over the many barotropic timesteps taken between baroclinic steps. At time
\(n\) , the baroclinic accelerations are computed. The vertical average of that acceleration is subtracted off and replaced by the time\sphinxhyphen{}averaged acceleration from the group of barotropic timesteps:
\begin{equation*}
\begin{split}\Delta t \frac{\partial \vec{u}}{\partial t} = \Delta t \left( \frac{\partial \vec{u}}{\partial t} - \frac{\partial \vec{u}_{BT}}{\partial t} \right)^n + \Delta t \overline{\frac{\partial \vec{u}_{BT}}{\partial t}}^{\Delta t}\end{split}
\end{equation*}
Similarly, the velocities used in the tracer equation are a careful blend of the barotropic and baroclinic solutions:
\begin{equation*}
\begin{split}\Delta t \frac{\partial \theta}{\partial t} + \Delta t \left( \tilde{\vec{u}} \cdot \nabla \theta + \widetilde{w} \frac{\partial \theta}{\partial z} \right)\end{split}
\end{equation*}
with
\begin{equation*}
\begin{split}\tilde{\vec{u}} = \vec{u}_{BC} + \overline{\vec{u}_{BT}}^{\Delta t}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\frac{\partial \widetilde{w}}{\partial z} = - \nabla \cdot \tilde{\vec{u}}\end{split}
\end{equation*}

\subsection{Two estimates of the free surface height}
\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:two-estimates-of-the-free-surface-height}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:barotropic-baroclinic-coupling-1ssh-estimates}}
The vertically discrete, temporally continuous layer continuity equations are:
\begin{equation*}
\begin{split}\frac{\partial h_k}{\partial t} = - \nabla \cdot (\vec{u} h_k) = - \nabla \cdot \mathbf{F} (u_k, h_k)\end{split}
\end{equation*}
The relationship between the free surface height and the layer thicknesses
\(h_k\) is:
\begin{equation*}
\begin{split}\eta = \sum_{k=1}^N h_k - D\end{split}
\end{equation*}
We get an evolution equation for the free surface height:
\begin{equation*}
\begin{split}\frac{\partial \eta}{\partial t} = \sum_{k=1}^N \frac{\partial h_k}{\partial t} = - \nabla \cdot \sum_{k=1}^N \mathbf{F} (u_k, h_k)\end{split}
\end{equation*}
If the algorithms for the fluxes in the continuity equations are
\sphinxstyleemphasis{linear}
in the velocity, the free surface height can be rewritten as:
\begin{equation*}
\begin{split}\frac{\partial \eta}{\partial t} \&= - \nabla \cdot \sum_{k=1}^N \mathbf{F} (u_k, h_k) = - \nabla \cdot \sum_{k=1}^N (\vec{u}_k h_k) \\ \&= - \nabla \cdot \left[ \sum_{k=1}^N h_k \frac{\sum_{k=1}^N (\vec{u}_k h_k)} {\sum_{k=1}^M k_k} \right] \equiv - \nabla \cdot H \mathbf{U}\end{split}
\end{equation*}
where
\begin{equation*}
\begin{split}\mathbf{U} \equiv \frac{\sum_{k=1}^N (\vec{u}_k h_k)} {\sum_{k=1}^M k_k}\end{split}
\end{equation*}\begin{equation*}
\begin{split}H \equiv \sum_{k=1}^N h_k\end{split}
\end{equation*}
However, ALE models like MOM6 require positive\sphinxhyphen{}definite, nonlinear continuity solvers (MOM6 uses {\hyperref[\detokenize{api/generated/pages/PPM:ppm}]{\sphinxcrossref{\DUrole{std,std-ref}{PPM Advection Scheme}}}} ). We need a different way to reconcile this estimate of free surface height with the one coming from the barotropic equations. After rejecting several other options, MOM6 is now using the scheme from \sphinxcite{zzbibliography:hallberg2009} . The barotropic update of \(\eta\) is given by:
\begin{equation*}
\begin{split}\frac{\eta^{n+1} - \eta^n}{\Delta t} + \nabla \cdot \left( \overline{UH} \right) = 0\end{split}
\end{equation*}
Determine the
\(\Delta U\) such that:
\begin{equation*}
\begin{split}\sum_{k=1}^N \mathbf{F} (\tilde{u}_k, h_k) = \left( \overline{UH} \right)\end{split}
\end{equation*}
where
\begin{equation*}
\begin{split}\tilde{u}_k = u_k + \Delta U\end{split}
\end{equation*}
The layer timestep equation becomes:
\begin{equation*}
\begin{split}h_k^{n+1} = h_k^n - \Delta t \nabla \cdot \mathbf{F} (\tilde{u}_k, h_k)\end{split}
\end{equation*}
This scheme has these properties:
\begin{itemize}
\item {} 
Total mass is conserved layer\sphinxhyphen{}wise.

\item {} 
Layer equations retain their flux form.

\item {} 
Total salt, heat, and other tracers are exactly conserved.

\item {} 
Free surface heights exactly agree.

\item {} 
Requires (very few) completely local iterations.

\item {} 
The velocity corrections are barotropic, and more likely to correspond to the layers whose flow was deficient than in some older schemes.

\end{itemize}

The solution is unique provided that:
\begin{equation*}
\begin{split}\frac{\partial}{\partial \tilde{u}_k} \mathbf{F}(\tilde{u}_k, h_k) > 0\end{split}
\end{equation*}
This is a reasonable requirement for any discretization of the continuity equation. In the continuous limit, \(\mathbf{F} (u,h) = uh\) , so one interpretation is:
\begin{equation*}
\begin{split}\frac{\partial}{\partial \tilde{u}_k} \mathbf{F}(\tilde{u}_k, h_k) = h_{k,\mbox{Marginal}}\end{split}
\end{equation*}
With the PPM continuity scheme:
\begin{equation*}
\begin{split}F_{i+1/2} = \frac{1}{\Delta t} \int_{x_{i+1/2} - u \Delta t}^{x_{i+1/2}} h_i^n (x) dx\end{split}
\end{equation*}
leads to:
\begin{equation*}
\begin{split}\frac{\partial F_{i+1/2}}{\partial u_{i+1/2}} = h_i^n ( x_{i+1/2} - u_{i+1/2} \Delta t ) \equiv h_{k, \mbox{Marginal}}\end{split}
\end{equation*}
\(h_i(x) > 0\) is already required for positive definiteness.

Newton’s method iterations quickly give
\(\Delta U\) :
\begin{equation*}
\begin{split}\Delta U^{m+1} = \Delta U^m + \frac{\left( \overline{UH} \right) - \sum_{k=1}^N F(u_k + \Delta U^m, h_k)}{\sum_{k=1}^N h_{k,\mbox{Marginal}}}\end{split}
\end{equation*}

\subsubsection{How practical is this iterative approach?}
\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:how-practical-is-this-iterative-approach}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:barotropic-baroclinic-coupling-1subsec-practical}}
The piecewise parabolic method continuity solver uses two steps:
\begin{itemize}
\item {} 
Set up the positive\sphinxhyphen{}definite subgridscale profiles, \(h_{PPM}(x)\) .

\end{itemize}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{h_PPM}.png}
\caption{Piecewise parabolic reconstructions of \(h(x)\).}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:id3}}\end{figure}
\begin{itemize}
\item {} 
Integrating the profiles to determine \(F\) . Step 1 is typically \(\sim 3\) times as expensive as step 2. \(F(u,h)\) is piecewise cubic in \(u\) , but often nearly linear. Newton’s method iterations converge quickly:

\end{itemize}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Newton_PPM}.png}
\caption{Newton’s method iterations for finding \(\Delta U\).}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:id4}}\end{figure}

In a global model the sea surface heights converge everywhere to a tolerance of
\(10^{-6}\) m within five iterations. These five iterations add \(\sim 1.6\) times more CPU time to the PPM continuity solver and the continuity solver is just 12\% of the total model time.


\subsubsection{A note on bottom drag}
\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:a-note-on-bottom-drag}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:barotropic-baroclinic-coupling-1bottom-drag}}
Barotropic accelerations do not lead to barotropic flows after a timestep when vertical viscosity is taken into account.
\begin{equation*}
\begin{split}u_k^{n+1} = u_k^n + \Delta t A_k + \Delta t \frac{\tau_{k-1/2} - \tau_{k+1/2}}{h_k}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\tau_{1/2} = \tau_{Wind}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\tau_{k+1/2} = \nu_{k+1/2} \frac{u_k^{n+1} - u_{k+1}^{n+1}}{h_{k+1/2}}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\tau_{N+1/2} = \nu_{N+1/2} \frac{2 u_N^{n+1}}{h_{N+1/2}}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\gamma_k \equiv \frac{1}{\Delta t} \frac{\partial u_k^{n+1}} {\overline{\partial A}}\end{split}
\end{equation*}
A tridiagonal equation for
\(\gamma_k\) results, going from 0 for thin layers near the bottom to 1 far above the bottom.
\begin{equation*}
\begin{split}\gamma_1 = 1 + \frac{1}{h_1} \left[ - \frac{\nu_{3/2} \Delta t}{h_{3/2}} (\gamma_1 - \gamma_2) \right]\end{split}
\end{equation*}\begin{equation*}
\begin{split}\gamma_k = 1 + \frac{1}{h_k} \left[ \frac{\nu_{k-1/2} \Delta t}{h_{k-1/2}} (\gamma_{k-1} - \gamma_k) - \frac{\nu_{k+1/2} \Delta t}{h_{k+1/2}} (\gamma_k - \gamma_{k+1}) \right]\end{split}
\end{equation*}\begin{equation*}
\begin{split}\gamma_N = 1 + \frac{1}{h_N} \left[ \frac{\nu_{N-1/2} \Delta t}{h_{N-1/2}} (\gamma_{N-1} - \gamma_N) - \frac{2\nu_{N+1/2} \Delta t}{h_{N+1/2}} \gamma_N \right]\end{split}
\end{equation*}
In the continuous limit:
\begin{equation*}
\begin{split}\gamma(z) = 1 + \Delta t \frac{d}{dz} \left( \nu \frac{d \gamma}{dz} \right)\end{split}
\end{equation*}
with boundary conditions:
\begin{equation*}
\begin{split}\frac{d \gamma}{dz} (0) = 0\end{split}
\end{equation*}\begin{equation*}
\begin{split}\gamma(-D) = 0\end{split}
\end{equation*}
For deep water and constant
\(\nu\) , we get:
\begin{equation*}
\begin{split}\gamma (z) = 1 - \exp \left( - \sqrt{\nu \Delta t} (z + D) \right)\end{split}
\end{equation*}
\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{bottom_drag}.png}
\caption{The continuous solution for barotropic flow plus a no\sphinxhyphen{}slip condition at the bottom.}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:id5}}\end{figure}

We want a scheme in which the split model looks exactly like the unsplit model would if we had taken all those short 3D timesteps. Rather than applying a barotropic velocity, we use a barotropic acceleration and allow the continuity solver to determine the transports consistent with a no\sphinxhyphen{}slip bottom boundary layer and perhaps also a no\sphinxhyphen{}slip surface boundary layer under an ice shelf.

From above, the barotropic equation is:
\begin{equation*}
\begin{split}\frac{\eta^{n+1} - \eta^n}{\Delta t} + \nabla \cdot \left( \overline{UH} \right) = 0\end{split}
\end{equation*}
We need to determine the \(\Delta \overline{A}\) such that:
\begin{equation*}
\begin{split}\sum_{k=1}^N \mathbf{F} (\tilde{u}_k, h_k) = \left( \overline{UH} \right)\end{split}
\end{equation*}
where
\begin{equation*}
\begin{split}\tilde{u}_k = u_k + \gamma_k \Delta \overline{A} \Delta t\end{split}
\end{equation*}

\subsection{Additional details about the split time stepping}
\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:additional-details-about-the-split-time-stepping}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:barotropic-baroclinic-coupling-1bt-bc-details}}\begin{itemize}
\item {} 
Transports are used as input and output to the barotropic solver. The continuity solver is inverted to determine velocities.

\end{itemize}
\begin{equation*}
\begin{split}\frac{\partial \eta}{\partial t} = \nabla \cdot \overline{U} + M\end{split}
\end{equation*}\begin{equation*}
\begin{split}\overline{U} (\overline{u}) = \frac{1}{\Delta t} \int_0^{\overline{u} \Delta t} H(x) dx\end{split}
\end{equation*}\begin{equation*}
\begin{split}\overline{u}^n = \overline{U}^{-1} \left( \sum_{k=1}^N U_k^n \right)\end{split}
\end{equation*}\begin{equation*}
\begin{split}u_k^{n+1} = \tilde{u}_k^{n+1} + \Delta \overline{u}\end{split}
\end{equation*}
We need to find
\(\Delta \overline{u}\) such that:
\begin{equation*}
\begin{split}\sum_{k=1}^N U_k \left( \tilde{u}_k^{n+1} + \Delta \overline{u} \right) = \overline{U}^{n+1}\end{split}
\end{equation*}\begin{itemize}
\item {} 
Barotropic accelerations are treated as anomalies from the baroclinic state:

\end{itemize}
\begin{equation*}
\begin{split}\frac{\partial \overline{u}}{\partial t} \&= - f \hat{k} \times (\overline{u} - \overline{u}_{Cor}) - \nabla \overline{g} (\eta - \eta_{PF}) - \\ \& \frac{c_D \left( ||u_{Bot}|| + ||u_{Shelf}|| \right)}{\sum_{k=1}^N h_k} (\overline{u} - \overline{u}_{Drag}) + \frac{\sum_{k=1}^N h_k \frac{\partial u_k}{\partial t}} {\sum_{k=1}^N h_k}\end{split}
\end{equation*}\begin{itemize}
\item {} 
Bottom drag (and under ice surface\sphinxhyphen{}drag) is treated implicitly.

\item {} 
The barotropic continuity solver uses flow\sphinxhyphen{}dependent thickness fits which approximate the sum of the layer thickness transports, to accommodate wetting and drying. An image of this is shown here:

\end{itemize}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{bt_bc_thickness}.png}
\caption{The barotropic transports depend on the baroclinic flows and thicknesses.}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:id6}}\end{figure}


\subsection{Summary of MOM6 split time stepping}
\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:summary-of-mom6-split-time-stepping}}\label{\detokenize{api/generated/pages/Barotropic_Baroclinic_Coupling:barotropic-baroclinic-coupling-1time-split-summary}}\begin{itemize}
\item {} 
We use an efficient approach for handling fast modes via simplified 2\sphinxhyphen{}d equations, while the 3\sphinxhyphen{}d baroclinic timestep is determined by baroclinic dynamics.

\item {} 
The barotropic solver determines free surface height and time\sphinxhyphen{}averaged depth\sphinxhyphen{}integrated transports.

\item {} 
By using anomalies, the MOM6 split solver gives identical answers to an equivalent unsplit scheme for short timesteps.

\item {} 
This scheme has been demonstrated to work with wetting and drying, as well as under ice\sphinxhyphen{}shelves.

\item {} 
The linear barotropic solver allows MOM6 to automatically set a stable barotropic timestep (e.g. to 98\% of maximum).

\end{itemize}


\section{Tracer Timestep}
\label{\detokenize{api/generated/pages/Tracer_Timestep:tracer-timestep}}\label{\detokenize{api/generated/pages/Tracer_Timestep:id1}}\label{\detokenize{api/generated/pages/Tracer_Timestep::doc}}
Overview of Tracer Timestep

The MOM6 code handles advection and lateral diffusion of all tracers. For potential temperature and salinity, it also timesteps the thermodynamics and vertical mixing (column physics). Since evaporation and precipitation are handled as volume changes, the layer thicknesses need to be updated:
\begin{equation*}
\begin{split}\frac{\partial h_k}{\partial t} = (P - E)_k\end{split}
\end{equation*}
The full tracer equation for tracer
\(\theta\) is:
\begin{equation*}
\begin{split}\frac{\partial}{\partial t} (h_k\theta_k) + \nabla_s \cdot (\vec{u}h_k \theta_k) = Q_k^\theta h_k + \frac{1}{h_k} \Delta \left( \kappa \frac{\partial \theta}{\partial z} \right) + \frac{1}{h_k} \nabla_s (h_k K \nabla_s \theta)\end{split}
\end{equation*}
Here, the advection is on the left hand side of the equation while the right hand side contains thermodynamic processes, vertical diffusion, and horizontal diffusion. There is more than one choice for vertical diffusion; these will be described elsewhere. Also, the lateral diffusion is handled in novel ways so as to avoid introduction of new extrema and to avoid instabilities associated with rotated mixing tensors. The lateral diffusion is described in {\hyperref[\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion}]{\sphinxcrossref{\DUrole{std,std-ref}{Horizontal Diffusion}}}}
.


\section{ALE Timestep}
\label{\detokenize{api/generated/pages/ALE_Timestep:ale-timestep}}\label{\detokenize{api/generated/pages/ALE_Timestep:id1}}\label{\detokenize{api/generated/pages/ALE_Timestep::doc}}

\subsection{Explanation of ALE remapping}
\label{\detokenize{api/generated/pages/ALE_Timestep:explanation-of-ale-remapping}}\label{\detokenize{api/generated/pages/ALE_Timestep:ale-timestep-1section-ale-remap}}
The Arbitrary Lagrangian\sphinxhyphen{}Eulerian (ALE) remapping is not a timestep in the traditional sense, but rather an operation performed to bring the vertical coordinate back to the target specification. This remapping can be less frequent than the momentum or thermodynamic timesteps, but must be done before the layer interfaces become entangled with each other.

Assuming the target vertical grid is level
\(z\) \sphinxhyphen{}surfaces, the initial state is shown on the left in the following figure:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{remapping1}.png}
\caption{The initial state with level surface (left) and the perturbed state after a wave has come through (right).}\label{\detokenize{api/generated/pages/ALE_Timestep:id2}}\end{figure}

Some time later, a wave has perturbed the surfaces which move with the fluid and it has been determined that a remapping operation is needed. The target vertical grid is still level \(z\) \sphinxhyphen{}surfaces, so this new target grid is shown overlaid on the left as regrid:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{remapping2}.png}
\caption{The regrid operation (left) and the remap operation (right).}\label{\detokenize{api/generated/pages/ALE_Timestep:id3}}\end{figure}

The complex part of the operation is remapping the wavy field onto the new grid as shown on the right and again in the final frame after the old deformed coordinate system has been deleted:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{remapping3}.png}
\caption{The final state after remapping.}\label{\detokenize{api/generated/pages/ALE_Timestep:id4}}\end{figure}

Mathematically, the new layer thicknesses, \(h_k\) , are computed and then populated with the new velocities and tracers:
\begin{equation*}
\begin{split}h_k^{\mbox{new}} = \nabla_k z_{\mbox{coord}}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\sum h_k^{\mbox{new}} = \sum h_k^{\mbox{old}}\end{split}
\end{equation*}\begin{equation*}
\begin{split}\vec{u}_k^{\mbox{new}} = \frac{1}{h_k} \int_{z_{k + \frac{1}{2}}}^{z_{k + \frac{1}{2}} + h_k} \vec{u}^{\mbox{old}}(z')dz'\end{split}
\end{equation*}\begin{equation*}
\begin{split}\theta^{\mbox{new}} = \frac{1}{h_k} \int_{z_{k + \frac{1}{2}}}^{z_{k + \frac{1}{2}} + h_k} \theta^{\mbox{old}}(z')dz'\end{split}
\end{equation*}

\chapter{Tracers in MOM6}
\label{\detokenize{tracers:tracers-in-mom6}}\label{\detokenize{tracers::doc}}

\section{Tracer Advection}
\label{\detokenize{api/generated/pages/Tracer_Advection:tracer-advection}}\label{\detokenize{api/generated/pages/Tracer_Advection:id1}}\label{\detokenize{api/generated/pages/Tracer_Advection::doc}}
MOM6 implements a generalised tracer advection scheme, which is a combination of the modified flux advection scheme \sphinxcite{zzbibliography:easter1993}
with reconstructed tracer distributions. The tracer distributions may be piecewise linear (PLM) or piecewise parabolic (PPM), which may itself use either the \sphinxcite{zzbibliography:colella1984} (CW84) or \sphinxcite{zzbibliography:huynh1997} (H3) reconstruction.


\subsection{Flux advection}
\label{\detokenize{api/generated/pages/Tracer_Advection:flux-advection}}\label{\detokenize{api/generated/pages/Tracer_Advection:tracer-advection-1flux-advection}}
The modified flux advection scheme preserves the tracer mixing ratio in a cell across directional splitting by accounting for changes in mass changes. Fluxes are applied to alternate directions in turn, restricting the applied flux so as not to evacuate all mass out of a cell. Because of this, we need to know the stencil used during the calculation of the reconstruction. Every iteration of the splitting algorithm, cells at the edge of a processor’s data domain are invalidated. When this invalidation region extends below the halo, a group pass is required to refresh the halo. A larger stencil (such as for the CW84 reconstruction) therefore introduces more frequent updates, and may impact performance.


\subsection{Tracer reconstruction}
\label{\detokenize{api/generated/pages/Tracer_Advection:tracer-reconstruction}}\label{\detokenize{api/generated/pages/Tracer_Advection:tracer-advection-1tracer-reconstruction}}
While MOM6 only carries the mean tracer concentration in a cell, a higher order reconstruction is computed for the purpose of advection. Reconstructions are also modified to ensure that monotonicity is preserved (i.e. spurious minima or maxima cannot be introduced).

The piecewise linear (PLM) reconstruction uses the monotonic modified van Leer scheme \sphinxcite{zzbibliography:lin1994}
. One might think to use the average of the one\sphinxhyphen{}sided differences of mean tracer concentration within a cell to calculate the slope of the linear reconstruction, however this method guarantees neither monotonicity, nor positive definiteness. Instead, the method is locally limited to the minimum of this average slope and each of the one\sphinxhyphen{}sided slopes, i.e.
\begin{equation*}
\begin{split}\Delta \Phi_i = \min\left\{\left|[\Delta \Phi_i]_\text{avg}\right|, 2\left(\Phi_i - \Phi_i^\text{min}\right), 2\left(\Phi_i^\text{max} - \Phi_i\right)\right\}\end{split}
\end{equation*}
(where \(\Phi_i^\text{min}\) is the minimum in the 3\sphinxhyphen{}point stencil).

In a PPM scheme ({\hyperref[\detokenize{api/generated/pages/PPM:ppm}]{\sphinxcrossref{\DUrole{std,std-ref}{PPM Advection Scheme}}}}
), for a cell with mean tracer concentration \(\Phi_i\) , the values at the left and right interfaces, \(\Phi_{L,i}\) and \(\Phi_{R,i}\) must be estimated. First, an interpolation is used to calculate \(\Phi_{i-1/2}\) and \(\Phi_{i+1/2}\) . These values are then modified to preserve monotonicity in each cell, which introduces discontinuities between cell edges (e.g. \(\Phi_{R,i}\) and \(\Phi_{L,i+1}\) ).

The reconstruction
\(\Phi_i(\xi)\) then satisfies three properties:
\begin{itemize}
\item {} 
total amount of tracer is conserved, \(\int_{\xi_{i-1/2}}^{\xi_{i+1/2}} \Phi_i(\xi') \,\mathrm d\xi' = \Phi_i\)

\item {} 
left interface value matches, \(\Phi(\xi_{i-1/2}) = \Phi_{L,i}\)

\item {} 
right interface value matches, \(\Phi(\xi_{i+1/2}) = \Phi_{R,i}\)

\end{itemize}

There are two methods of reconstruction for a piecewise parabolic (PPM) profile. They differ in the estimate of interface values
\(\Phi_{i+1/2}\) prior to monotonicity limiting. The CW84 scheme makes use of the limited slope \(\Delta\Phi_i\) from PLM, above. This has the effect of requiring a larger stencil for each reconstruction. On the other hand, the H3 scheme reduces the requirement of this stencil, by only examining the tracer concentrations in adjacent cells, at the same time reducing order of accuracy of the reconstruction.


\section{Tracer Transport Equations}
\label{\detokenize{api/generated/pages/Tracer_Transport_Equations:tracer-transport-equations}}\label{\detokenize{api/generated/pages/Tracer_Transport_Equations:id1}}\label{\detokenize{api/generated/pages/Tracer_Transport_Equations::doc}}
\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{PPM_1d}.png}
\caption{The 1\sphinxhyphen{}D finite volume advection of tracers. The reddish fluid will be in the cell at the end of the timestep.}\label{\detokenize{api/generated/pages/Tracer_Transport_Equations:id6}}\end{figure}

Given a piecewise polynomial description of the tracer concentration, the new tracer cell concentration is the average of the fluid that will be in the cell after a timestep.

\begin{eqnarray} \int_{x_{i-1/2}}^{x_{i+1/2}} A_i^{n+1} (x) dx = \int_{x_{i-1/2 - u \Delta t}}^{x_{i+1/2-u\Delta t}} A_i^{n} (x) dx &= \mbox{} \\ \int_{x_{i-1/2}}^{x_{i+1/2}} A_i^{n} (x) dx - \int_{x_{i+1/2 - u \Delta t}}^{x_{i+1/2}} A_i^{n} (x) dx &+ \int_{x_{i-1/2 - u \Delta t}}^{x_{i-1/2}} A_i^{n} (x) dx \end{eqnarray}

Fluxes are found by analytically integrating the profile over the distance that is swept past the face within a timestep.
\begin{equation*}
\begin{split}a_i^n = \frac{1}{\Delta x} \int_{x_{i-1/2}}^{x_{i+1/2}} A_i^n(x) dx\end{split}
\end{equation*}\begin{equation*}
\begin{split}a_i^{n+1} = a_i^n - \frac{\Delta t}{\Delta x} (F_{i+1/2} - F_{i-1/2})\end{split}
\end{equation*}\begin{equation*}
\begin{split}F_{i+1/2} = \frac{1}{\Delta t} \int_{x_{i+1/2 - u \Delta t}}^{x_{i+1/2}} A_i^n(x) dx\end{split}
\end{equation*}\begin{equation*}
\begin{split}F_{i-1/2} = \frac{1}{\Delta t} \int_{x_{i-1/2 - u \Delta t}}^{x_{i-1/2}} A_i^n(x) dx\end{split}
\end{equation*}
With piecewise constant profiles, this approach give first order upwind advection. Higher order polynomials (e.g., parabolas) can give higher order accuracy.


\subsection{Multidimensional Tracer Advection}
\label{\detokenize{api/generated/pages/Tracer_Transport_Equations:multidimensional-tracer-advection}}\label{\detokenize{api/generated/pages/Tracer_Transport_Equations:tracer-transport-equations-1multidimensional-tracer-advection}}
Using “Easter’s Pseudo\sphinxhyphen{}compressibility” (\sphinxcite{zzbibliography:easter1993}
), we start with these basic equations for a tracer \(\psi\) :

\phantomsection\label{\detokenize{api/generated/pages/Tracer_Transport_Equations:tracer-transport-equations-1ht-equation}}\begin{equation*}
\begin{split}\frac{\partial h}{\partial t} + \vec{\nabla} \cdot (\vec{u}h) = 0 \equiv \frac{\partial h}{\partial t} + \vec{\nabla} \cdot (\vec{U})\end{split}
\end{equation*}\begin{equation*}
\begin{split}\frac{\partial}{\partial t} (h \psi) + \vec{\nabla} \cdot (\vec{U}\psi) = 0\end{split}
\end{equation*}\begin{equation*}
\begin{split}\frac{\partial \psi}{\partial t} + \vec{u} \cdot \vec{\nabla} \psi = 0\end{split}
\end{equation*}
We discretize the first of these equations in space:
\begin{equation*}
\begin{split}\frac{\partial h}{\partial t} = \frac{1}{\Delta x} \left(U_{i-\frac{1}{2},j} - U_{i+\frac{1}{2},j} \right) + \frac{1}{\Delta y} \left(V_{i, j-\frac{1}{2}} - V_{i,j+\frac{1}{2}} \right)\end{split}
\end{equation*}
Using our monotonic one\sphinxhyphen{}dimensional flux:
\begin{equation*}
\begin{split}F_{i+\frac{1}{2},j} (\psi) = U_{i+\frac{1}{2},j} \psi_{i+\frac{1}{2},j}\end{split}
\end{equation*}
we come up with an estimate based only on an update in the
\(x\) direction:
\begin{equation*}
\begin{split}\tilde{h}_{i,j} \tilde{\psi}_{i,j} = h^n_{i,j} \psi_{i,j} + \frac{\Delta t}{\Delta x} \left( F_{i-\frac{1}{2},j} (\psi^n) - F_{i+\frac{1}{2},j} (\psi^n) \right)\end{split}
\end{equation*}\begin{equation*}
\begin{split}\tilde{h}_{i,j} = h^n_{i,j} + \frac{\Delta t}{\Delta x} \left( U_{i-\frac{1}{2},j} - U_{i+\frac{1}{2},j} \right)\end{split}
\end{equation*}\begin{equation*}
\begin{split}\tilde{\psi}_{i,j} = \frac{\tilde{h}_{i,j} \tilde{\psi}_{i,j}}{\tilde{h}_{i,j}}\end{split}
\end{equation*}
Next, we update in the
\(y\) direction:
\begin{equation*}
\begin{split}h^{n+1}_{i,j} \psi^{n+1}_{i,j} = \tilde{h}_{i,j} \tilde{\psi}_{i,j} + \frac{\Delta t}{\Delta y} \left( G_{i,j-\frac{1}{2}} (\tilde{\psi}) - G_{i,j+\frac{1}{2}} (\tilde{\psi}) \right)\end{split}
\end{equation*}\begin{equation*}
\begin{split}h^{n+1}_{i,j} = \tilde{h}_{i,j} + \frac{\Delta t}{\Delta y} \left( V_{i,j-\frac{1}{2}} - V_{i,j+\frac{1}{2}} \right)\end{split}
\end{equation*}\begin{equation*}
\begin{split}\psi^{n+1}_{i,j} = \frac{h^{n+1}_{i,j} \psi^{n+1}_{i,j}}{h^{n+1}_{i,j}}\end{split}
\end{equation*}\begin{itemize}
\item {} 
This method ensures monotonicity. Strang splitting can reduce directional splitting error. See \sphinxcite{zzbibliography:easter1993} , \sphinxcite{zzbibliography:durran2010} (section 5.9.4), and \sphinxcite{zzbibliography:russell1981} .

\item {} 
Flux\sphinxhyphen{}form pseudo\sphinxhyphen{}compressibility advection is based on accumulated mass (or volume) fluxes, not velocities.

\item {} 
Additional pseudo\sphinxhyphen{}compressibility passes can be added to accommodate transports exceeding cell masses. Extra passes of tracer advection are used in MOM6 in the small fraction of cells where this is needed.

\item {} 
Explicit layered dynamics time\sphinxhyphen{}steps are limited by Doppler\sphinxhyphen{}shifted internal gravity wave speeds or inertial oscillations. Flow speeds in most of the ocean volume are much smaller than the peak internal wave speeds so that the advective time\sphinxhyphen{}steps can be longer.

\item {} 
Advective mass fluxes in MOM6 are often accumulated over multiple dynamic steps. The goal is that as we go to higher resolution, this tracer advection will remain stable at relatively long time\sphinxhyphen{}steps, allowing for the inclusion of many biogeochemical tracers without adding an undue burden in computational cost.

\end{itemize}


\section{Horizontal Diffusion}
\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id1}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion::doc}}
Horizontal diffusion of tracers

Lateral mixing due to mesoscale eddies is believed to occur according to this figure:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{eddy_fluxes}.png}
\caption{Horizontal surface boundary layer fluxes and interior epineutral fluxes.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id3}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1eddy-flux}}\end{figure}

We start by describing an implementation of the mixing in the interior and then introduce a surface mixed layer implementation. A bottom mixed layer implementation is planned for the future.


\subsection{Epineutral Diffusion}
\label{\detokenize{api/generated/pages/Horizontal_Diffusion:epineutral-diffusion}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1epineutral-diffusion}}
For the interior of the ocean, we would like to have horizontal diffusion with the following properties:
\begin{itemize}
\item {} 
Suitable for general coordinate models

\item {} 
Preserves extrema

\item {} 
Has no need for regularization or tapering (such as needed by rotated mixing tensors)

\end{itemize}

The algorithm used in MOM6 is described by \sphinxcite{zzbibliography:shao2019-in-review} and will be introduced here. The aim is to allow lateral mixing of tracers within isopycnal layers. It is appropriate for the adiabatic interior of the ocean while a lateral mixing scheme for the surface boundary layer is described below.

Before presenting this scheme, a quick review of polynomial reconstructions is in order. Some choices for the vertical representation of a finite volume quantity are shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{shao0}.png}
\caption{Polynomial reconstructions, starting with piecewise constant on the left, piecewise linear in the middle and piecewise parabolic on the right.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id4}}\end{figure}

Some desired quantities for the polynomial reconstructions to be used are:
\begin{itemize}
\item {} 
Tracer concentrations represent the cell\sphinxhyphen{}averages in vertical discretization.

\item {} 
Must be monotonic and introduce no new extrema.

\item {} 
Discontinuous reconstructions are desirable to limit intracell slopes.

\end{itemize}

The algorithm has three phases: initialization, sorting, and flux calculation.


\subsubsection{Initialization}
\label{\detokenize{api/generated/pages/Horizontal_Diffusion:initialization}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1epineutral-initialization}}
We begin by generating polynomial reconstructions of the vertical tracer quantities such as shown by the blue lines here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{shao1}.png}
\caption{Polynomial reconstructions of two adjacent water columns.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id5}}\end{figure}

Because we are looking to mix along epineutral surfaces, we will need to find surfaces of uniform density by using the temperature, salinity, and their effect on the density, \(\alpha\) and \(\beta\) . The next step is to find the values of \(\alpha\) and \(\beta\) at the interfaces.

Also during the initialization, the unstable parts of the water column are set aside to be skipped by this algorithm.


\subsubsection{Sorting}
\label{\detokenize{api/generated/pages/Horizontal_Diffusion:sorting}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1epineutral-sorting}}
The epineutral surfaces have constant density, where we use this equation:
\begin{equation*}
\begin{split}\Delta \rho = \rho_1 - \rho_2 = \frac{\alpha_1 + \alpha_2}{2} (T_1 - T_2) + \frac{\beta_1 + \beta_2}{2} (S_1 - S_2)\end{split}
\end{equation*}
When calculating
\(\alpha\) and \(\beta\) , there’s more than one way to do it. Using a midpoint pressure gives neutral density while using a reference pressure gives isopycnal values.

Given two adjacent water columns, we are going to be looking to match densities. The match does not need to be at the same level or even near each other in depth. Starting from the top two interfaces, search the column with the lighter surface water (second column) downward to find which layer contains water matching that of the first column at the surface:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{shao2}.png}
\caption{Searching the column with the lighter surface for the water matching the other column’s surface water.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id6}}\end{figure}

If the surface density matches that of an interface, point to the interface. Otherwise, solve for the matching density along the polynomial reconstruction for that layer. There are again some choices:
\begin{itemize}
\item {} 
Use Newton’s method to find the root with higher order polynomials.

\item {} 
Assume \(\alpha\) and \(\beta\) vary linearly from top to bottom (cubic if \(T\) and \(S\) are parabolic).

\item {} 
Equation of state is linear from top to bottom interface (parabolic of \(T\) and \(S\) are parabolic).

\item {} 
\(\Delta \rho\) is linear in the vertical.

\end{itemize}

Once the location of the first column’s surface density is found in the second column, one goes to the next interface below to find the bottom density of the water to be mixed. Then find that density within the first column. Iterate downward until no more matches are found. These pairs of surfaces make up what is known as a sublayer along which the diffusion can take place.


\subsubsection{Flux Calculation}
\label{\detokenize{api/generated/pages/Horizontal_Diffusion:flux-calculation}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1epineutral-flux-calculation}}
For each sublayer, the fluxes are based on the mean tracer quantities within that sublayer in each column. For a tracer
\(C\) , compute the vertical average of that tracer within the sublayer to form \(\overline{C}\) . The flux can then be computed based on:
\begin{equation*}
\begin{split}F = K h_{\mbox{eff}} \frac{\overline{C_{j,k+1}} - \overline{C_{j+1,k-1}} }{\Delta x} \Delta t\end{split}
\end{equation*}
where the effective thickness of the sublayer is:
\begin{equation*}
\begin{split}h_{\mbox{eff}} = \frac{2 h_{j,n}^\gamma h_{j,n+1}^\gamma}{h_{j,n}^\gamma + h_{j,n+1}^\gamma}\end{split}
\end{equation*}
and as shown in this figure:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{shao3}.png}
\caption{Diagram of sublayer thickness for the sublayer bounded by surfaces \(\gamma_n\) and \(\gamma_{n+1}\).}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id7}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{shao4}.png}
\caption{Flux of tracer \(C\) along the sublayer.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id8}}\end{figure}

When updating the tracer state, one needs to accumulate all the fluxes through each face as shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{shao5}.png}
\caption{Accumulate all the fluxes across a face from all the layers in the next column contributing to it.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id9}}\end{figure}


\subsection{Surface Diffusion}
\label{\detokenize{api/generated/pages/Horizontal_Diffusion:surface-diffusion}}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1surface-diffusion}}
As shown in figure {\hyperref[\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion-1eddy-flux}]{\sphinxcrossref{\DUrole{std,std-ref}{Horizontal surface boundary layer fluxes and interior epineutral fluxes.}}}}
of the eddy fluxes, the diffusion in the surface boundary layer is assumed to be purely horizontal. A bulk scheme was explored but found wanting, so a layer\sphinxhyphen{}by\sphinxhyphen{}layer approach has been implemented instead. It is this layer\sphinxhyphen{}by\sphinxhyphen{}layer code which is described here.

For each water column, the boundary layer thickness is determined first. This can be either via the CVMIX boundary layer thickness or through some other means. Next, determine how many of the model layers are within this boundary layer thickness. It is common for neighboring cells to have differing numbers of layers within the surface boundary layer, such as shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{sbl1}.png}
\caption{Two cells within the surface mixed layer, red on the left, blue on the right. The mixed layer depth is shown in green.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id10}}\end{figure}

In this case, the cell on the left has four layers within the boundary layer while the cell on the right has just two. The layer\sphinxhyphen{}by\sphinxhyphen{}layer scheme computes fluxes for the first two layers, then has linearly reduced fluxes for the next two layers below as shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{sbl2}.png}
\caption{Two cells within the surface mixed layer with down\sphinxhyphen{}gradient fluxes as shown by the black arrows.}\label{\detokenize{api/generated/pages/Horizontal_Diffusion:id11}}\end{figure}

In all cases, the tracer flux is always down\sphinxhyphen{}gradient.
\begin{equation*}
\begin{split}F(k) = K h_{\mbox{eff}(k)} \left[ \phi_L(k) - \phi_R(k)\right]\end{split}
\end{equation*}
where the effective thickness of the layer
\(k\) is:
\begin{equation*}
\begin{split}h_{\mbox{eff}(k)} = \frac{2 h_{L}(k) h_{R}(k)} {h_{L}(k) + h_{R}(k)}\end{split}
\end{equation*}

\section{Vertical Diffusion}
\label{\detokenize{api/generated/pages/Vertical_Diffusion:vertical-diffusion}}\label{\detokenize{api/generated/pages/Vertical_Diffusion:id1}}\label{\detokenize{api/generated/pages/Vertical_Diffusion::doc}}
Vertical diffusion of tracers

The MOM6 tracer registry takes care of the tracer advection as well as horizontal diffusion, but it is up to each individual tracer package to define its own vertical diffusion.


\section{Passive and Other User\sphinxhyphen{}defined Tracers}
\label{\detokenize{api/generated/pages/Passive_Tracers:passive-and-other-user-defined-tracers}}\label{\detokenize{api/generated/pages/Passive_Tracers:passive-tracers}}\label{\detokenize{api/generated/pages/Passive_Tracers::doc}}

\subsection{Passive Tracers}
\label{\detokenize{api/generated/pages/Passive_Tracers:passive-tracers-1passive-tracers}}\label{\detokenize{api/generated/pages/Passive_Tracers:id1}}

\subsection{Generic Tracers}
\label{\detokenize{api/generated/pages/Passive_Tracers:generic-tracers}}\label{\detokenize{api/generated/pages/Passive_Tracers:passive-tracers-1generic-tracers}}

\subsection{User\sphinxhyphen{}defined Tracers}
\label{\detokenize{api/generated/pages/Passive_Tracers:user-defined-tracers}}\label{\detokenize{api/generated/pages/Passive_Tracers:passive-tracers-1user-tracers}}

\chapter{Grids}
\label{\detokenize{grids:grids}}\label{\detokenize{grids::doc}}
We love grids.


\section{Global Orthogonal Grids}
\label{\detokenize{api/generated/pages/Global_Grids:global-orthogonal-grids}}\label{\detokenize{api/generated/pages/Global_Grids:global-grids}}\label{\detokenize{api/generated/pages/Global_Grids::doc}}
Global Orthogonal Grids


\subsection{Dipole Grids}
\label{\detokenize{api/generated/pages/Global_Grids:dipole-grids}}\label{\detokenize{api/generated/pages/Global_Grids:global-grids-1dipole}}

\subsection{Tripole Grids}
\label{\detokenize{api/generated/pages/Global_Grids:tripole-grids}}\label{\detokenize{api/generated/pages/Global_Grids:global-grids-1tripole}}

\section{Regional Orthogonal Grids}
\label{\detokenize{api/generated/pages/Regional_Grids:regional-orthogonal-grids}}\label{\detokenize{api/generated/pages/Regional_Grids:regional-grids}}\label{\detokenize{api/generated/pages/Regional_Grids::doc}}
Regional Orthogonal Grids


\subsection{Map Projections}
\label{\detokenize{api/generated/pages/Regional_Grids:map-projections}}\label{\detokenize{api/generated/pages/Regional_Grids:regional-grids-1map-projections}}

\subsection{Open Boundary Segments}
\label{\detokenize{api/generated/pages/Regional_Grids:open-boundary-segments}}\label{\detokenize{api/generated/pages/Regional_Grids:regional-grids-1obc-segments}}

\section{Vertical Grids}
\label{\detokenize{api/generated/pages/Vertical_Grids:vertical-grids}}\label{\detokenize{api/generated/pages/Vertical_Grids:id1}}\label{\detokenize{api/generated/pages/Vertical_Grids::doc}}

\subsection{Layered}
\label{\detokenize{api/generated/pages/Vertical_Grids:layered}}\label{\detokenize{api/generated/pages/Vertical_Grids:vertical-grids-1vert-layer}}

\subsection{Z\sphinxhyphen{}Star}
\label{\detokenize{api/generated/pages/Vertical_Grids:z-star}}\label{\detokenize{api/generated/pages/Vertical_Grids:vertical-grids-1vert-z-star}}

\subsection{Sigma}
\label{\detokenize{api/generated/pages/Vertical_Grids:sigma}}\label{\detokenize{api/generated/pages/Vertical_Grids:vertical-grids-1vert-sigma}}

\subsection{Rho}
\label{\detokenize{api/generated/pages/Vertical_Grids:rho}}\label{\detokenize{api/generated/pages/Vertical_Grids:vertical-grids-1vert-rho}}

\subsection{Hybrid}
\label{\detokenize{api/generated/pages/Vertical_Grids:hybrid}}\label{\detokenize{api/generated/pages/Vertical_Grids:vertical-grids-1vert-hybrid}}

\chapter{Parameterizations}
\label{\detokenize{parameterizations:parameterizations}}\label{\detokenize{parameterizations::doc}}
Sub\sphinxhyphen{}grid scale parameterizations are broadly grouped into vertical and lateral directions, referring to the direction in which fluxes are predominantly oriented.


\section{Vertical Parameterizations}
\label{\detokenize{parameterizations_vertical:vertical-parameterizations}}\label{\detokenize{parameterizations_vertical::doc}}
The following sub\sphinxhyphen{}grid scale parameterizations generally yield fluxes that act in the vertical direction, with no lateral components resolved by the model.


\subsection{Upper boundary}
\label{\detokenize{parameterizations_vertical:upper-boundary}}\begin{description}
\item[{K\sphinxhyphen{}profile parameterization (KPP)}] \leavevmode
Provided by module MOM\_KPP, uses the CVmix implementation of KPP.
\begin{quote}

\DUrole{xref,std,std-ref}{CVMix\_KPP}
\end{quote}

\item[{Energetic Planetary Boundary Layer (ePBL)}] \leavevmode
A energetically constrained boundary layer scheme following \sphinxcite{zzbibliography:reichl2018}. Implemented in MOM\_energetic\_PBL.

\item[{Bulk mixed layer (BML)}] \leavevmode
A 2\sphinxhyphen{}layer bulk mixed layer used in pure\sphinxhyphen{}isopycnal model. Implemented in MOM\_bulk\_mixed\_layer.

\end{description}


\subsection{Interior and bottom\sphinxhyphen{}driven mixing}
\label{\detokenize{parameterizations_vertical:interior-and-bottom-driven-mixing}}\begin{description}
\item[{Kappa\sphinxhyphen{}shear}] \leavevmode
MOM\_kappa\_shear implement the shear\sphinxhyphen{}driven mixing of \sphinxcite{zzbibliography:jackson2008}.

\item[{Internal\sphinxhyphen{}tide driven mixing}] \leavevmode
The schemes of \sphinxcite{zzbibliography:st-laurent2002}, \sphinxcite{zzbibliography:polzin2009}, and \sphinxcite{zzbibliography:melet2012}, are all implemented through MOM\_set\_diffusivity and MOM\_diabatic\_driver.

\end{description}


\subsection{Vertical friction}
\label{\detokenize{parameterizations_vertical:vertical-friction}}
Vertical viscosity is implemented in MOM\_vert\_frict and coefficient computed in MOM\_set\_viscosity, although contributions to viscosity from other parameterizations are calculated in those respective modules (e.g. MOM\_kappa\_shear, MOM\_KPP, MOM\_energetic\_PBL).


\subsection{Vertical diffusion}
\label{\detokenize{parameterizations_vertical:vertical-diffusion}}
Vertical diffusion of scalars is implemented in MOM\_diabatic\_driver although contributions to diffusion from other parameterizations are calculated in those respective modules (e.g. MOM\_kappa\_shear, MOM\_KPP, MOM\_energetic\_PBL).


\subsection{Radiation}
\label{\detokenize{parameterizations_vertical:radiation}}\begin{description}
\item[{Opacity}] \leavevmode
Ocean color is prescribed or dynamically calculated in converted into optical properties in MOM\_opacity.

\item[{Short\sphinxhyphen{}wave absorption}] \leavevmode
Optical properties from MOM\_opacity are used to calculate the convergence of shortwave radiation penetrating from the upper surface in MOM\_shortwave\_abs.

\end{description}


\subsection{Geothermal heating}
\label{\detokenize{parameterizations_vertical:geothermal-heating}}
Geothermal heat fluxes are implemented in MOM\_geothermal.


\subsection{Isopycnal\sphinxhyphen{}mode entrainment and diapycnal diffusion}
\label{\detokenize{parameterizations_vertical:isopycnal-mode-entrainment-and-diapycnal-diffusion}}
Diapycnal diffusion in a layered isopycnal mode following \sphinxcite{zzbibliography:hallberg2000}, is implemented in MOM\_entrain\_diffuse.


\section{Lateral Parameterizations}
\label{\detokenize{parameterizations_lateral:lateral-parameterizations}}\label{\detokenize{parameterizations_lateral::doc}}
The following sub\sphinxhyphen{}grid scale parameterizations generally yield fluxes that act in the lateral direction.


\subsection{Lateral viscosity}
\label{\detokenize{parameterizations_lateral:lateral-viscosity}}
Laplacian and bi\sphinxhyphen{}harmonic viscosities with linear and Smagorinsky options are implemented in MOM\_hor\_visc.


\subsection{Gent\sphinxhyphen{}McWilliams/TEM/isopycnal height diffusion}
\label{\detokenize{parameterizations_lateral:gent-mcwilliams-tem-isopycnal-height-diffusion}}
Lagrangian mean eddy mass transport is parameterized following \sphinxcite{zzbibliography:gent1990}, in MOM\_thickness\_diffuse.

The diffusivity coefficients are calculated in MOM\_lateral\_mixing\_coeffs
and MOM\_thickness\_diffuse and includes constants and the \sphinxcite{zzbibliography:visbeck1997}
scaling.

A model of sub\sphinxhyphen{}grid scale Mesoscale Eddy Kinetic Energy (MEKE) is implement in MOM\_MEKE and the associated diffusivity added in MOM\_thickness\_diffuse.
See \sphinxcite{zzbibliography:jansen2015} and \sphinxcite{zzbibliography:marshall2010}.
\begin{quote}

{\hyperref[\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke}]{\sphinxcrossref{\DUrole{std,std-ref}{The Mesoscale Eddy Kinetic Energy (MEKE) framework}}}}
\end{quote}


\subsection{Backscatter}
\label{\detokenize{parameterizations_lateral:backscatter}}
A parameterization of the upscale unresolved cascade utilizes MOM\_MEKE
and negative Laplacian viscosity in MOM\_hor\_visc.


\subsection{Mixed layer restratification by sub\sphinxhyphen{}mesoscale eddies}
\label{\detokenize{parameterizations_lateral:mixed-layer-restratification-by-sub-mesoscale-eddies}}
Mixed layer restratification from \sphinxcite{zzbibliography:fox-kemper2008} and
\sphinxcite{zzbibliography:fox-kemper2008-2} is implemented in MOM\_mixed\_layer\_restrat.


\subsection{Lateral diffusion}
\label{\detokenize{parameterizations_lateral:lateral-diffusion}}
See {\hyperref[\detokenize{api/generated/pages/Horizontal_Diffusion:horizontal-diffusion}]{\sphinxcrossref{\DUrole{std,std-ref}{Horizontal Diffusion}}}}.


\subsection{Tidal forcing}
\label{\detokenize{parameterizations_lateral:tidal-forcing}}
Astronomical tidal forcings and self\sphinxhyphen{}attraction and loading are implement in MOM\_tidal\_forcing.


\chapter{Other Physics}
\label{\detokenize{other_physics:other-physics}}\label{\detokenize{other_physics::doc}}

\section{Equation of State}
\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state}}\label{\detokenize{api/generated/pages/Equation_of_State:id1}}\label{\detokenize{api/generated/pages/Equation_of_State::doc}}
Within MOM6, there is a wrapper for the equation of state, so that all calls look the same from the rest of the model. The equation of state code has to calculate not just in situ density, but also the compressibility and various derivatives of the density. There is also code for computing specific volume and the freezing temperature.


\subsection{Linear Equation of State}
\label{\detokenize{api/generated/pages/Equation_of_State:linear-equation-of-state}}\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state-1linear-eos}}
Compute the required quantities with uniform values for
\(\alpha = \frac{\partial \rho}{\partial T}\) and \(\beta = \frac{\partial \rho}{\partial S}\) , (DRHO\_DT, DRHO\_DS in MOM\_input, also uses RHO\_T0\_S0).


\subsection{Wright Equation of State}
\label{\detokenize{api/generated/pages/Equation_of_State:wright-equation-of-state}}\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state-1wright-eos}}
Compute the required quantities using the equation of state from \sphinxcite{zzbibliography:wright1997}
. This equation of state is in the form:
\begin{equation*}
\begin{split}\alpha(s, \theta, p) = A(s, \theta) + \frac{\lambda(s, \theta)}{P(s, \theta) + p}\end{split}
\end{equation*}
where \(A, \lambda\) and \(P\) are functions only of \(s\) and \(\theta\) and \(\alpha = 1/ \rho\) is the specific volume. This form is useful for the pressure gradient computation as discussed in {\hyperref[\detokenize{api/generated/pages/Discrete_PG:discrete-pg-1section-pg}]{\sphinxcrossref{\DUrole{std,std-ref}{Pressure Gradient Term}}}} .


\subsection{NEMO Equation of State}
\label{\detokenize{api/generated/pages/Equation_of_State:nemo-equation-of-state}}\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state-1nemo-eos}}
Compute the required quantities using the equation of state from \sphinxcite{zzbibliography:roquet2015}
.


\subsection{UNESCO Equation of State}
\label{\detokenize{api/generated/pages/Equation_of_State:unesco-equation-of-state}}\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state-1unesco-eos}}
Compute the required quantities using the equation of state from \sphinxcite{zzbibliography:jackett1995}
.


\subsection{TEOS\sphinxhyphen{}10 Equation of State}
\label{\detokenize{api/generated/pages/Equation_of_State:teos-10-equation-of-state}}\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state-1teos-10-eos}}
Compute the required quantities using the equation of state from
\sphinxhref{http://www.teos-10.org/}{TEOS\sphinxhyphen{}10}
.


\subsection{Freezing Temperature of Sea Water}
\label{\detokenize{api/generated/pages/Equation_of_State:freezing-temperature-of-sea-water}}\label{\detokenize{api/generated/pages/Equation_of_State:equation-of-state-1tfreeze}}
There are three choices for computing the freezing point of sea water:
\begin{itemize}
\item {} 
Linear The freezing temperature is a linear function of the salinity and pressure:

\end{itemize}
\begin{equation*}
\begin{split}T_{Fr} = (T_{Fr0} + a\,S) + b\,P\end{split}
\end{equation*}
where \(T_{Fr0},a,b\) are contants which can be set in MOM\_input (TFREEZE\_S0\_P0, DTFREEZE\_DS, DTFREEZE\_DP).
\begin{itemize}
\item {} 
Millero The \sphinxcite{zzbibliography:millero1978} equation is used, but modified so that it is a function of potential temperature rather than \sphinxstyleemphasis{in situ} temperature:

\end{itemize}
\begin{equation*}
\begin{split}T_{Fr} = S(a + (b \sqrt{\max(S,0.0)} + c\, S)) + d\,P\end{split}
\end{equation*}
where \(a,b, c, d\) are fixed contants.
\begin{itemize}
\item {} 
TEOS\sphinxhyphen{}10 The TEOS\sphinxhyphen{}10 package is used to compute the freezing conservative temperature {[}degC{]} from absolute salinity {[}g/kg{]}, and pressure {[}Pa{]}. This one must be used if you are using the NEMO or TEOS\sphinxhyphen{}10 equation of state.

\end{itemize}


\section{Sea Ice Considerations}
\label{\detokenize{api/generated/pages/Sea_Ice:sea-ice-considerations}}\label{\detokenize{api/generated/pages/Sea_Ice:sea-ice}}\label{\detokenize{api/generated/pages/Sea_Ice::doc}}

\subsection{Ice Formation}
\label{\detokenize{api/generated/pages/Sea_Ice:ice-formation}}\label{\detokenize{api/generated/pages/Sea_Ice:sea-ice-1frazil}}

\chapter{Working with MOM6}
\label{\detokenize{working_with_MOM6:working-with-mom6}}\label{\detokenize{working_with_MOM6::doc}}

\section{Organization of the code}
\label{\detokenize{code_organization:organization-of-the-code}}\label{\detokenize{code_organization::doc}}
The MOM6 source code is divided into a tree of directories (folders) to group
related code (e.g. \sphinxtitleref{src/core}) or similar modules (e.g.
\sphinxtitleref{src/parametizations/vertical}).

The highest level of directories are:
\begin{description}
\item[{\sphinxtitleref{src/}}] \leavevmode
Code underneath \sphinxtitleref{src/} is always required and compiled.

\item[{\sphinxtitleref{config\_src/}}] \leavevmode
Under \sphinxtitleref{config\_src} are various drivers and memory configuration sources that
can only be compiled in limited configurations. See {\hyperref[\detokenize{code_organization:config-src}]{\sphinxcrossref{\DUrole{std,std-ref}{config\_src/}}}}

\item[{\sphinxtitleref{pkg/}}] \leavevmode
Packages (source code) from other sources/parties only some of which might
be used. We include the entire package as a sub\sphinxhyphen{}module but use
symbolic\sphinxhyphen{}links to extract the parts the MOM6 uses.

\item[{\sphinxtitleref{docs/}}] \leavevmode
The directory that contains this documentation, namely that beyond the
in\sphinxhyphen{}code API documentation. Some of the files are configuration files
needed for running doxygen and sphinx. Most documentation in this folder
is in the form of reStructuredText (.rst) files.

\item[{\sphinxtitleref{.testing/}}] \leavevmode
A directory for running tests on MOM6. These are some of the
smaller/simpler examples that MOM6 can run out of the box, without
large netCDF files.

\end{description}

The directory tree is:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
MOM6
├── config\PYGZus{}src
│   ├── coupled\PYGZus{}driver
│   ├── dynamic
│   ├── dynamic\PYGZus{}symmetric
│   ├── external
│   │   ├── GFDL\PYGZus{}ocean\PYGZus{}BGC
│   │   └── ODA\PYGZus{}hooks
│   ├── ice\PYGZus{}solo\PYGZus{}driver
│   ├── mct\PYGZus{}driver
│   ├── nuopc\PYGZus{}driver
│   ├── solo\PYGZus{}driver
│   └── unit\PYGZus{}drivers
├── docs
│   └── images
├── pkg
│   ├── CVMix\PYGZhy{}src
│   │   ├── ...
│   │   └── src
│   │       ├── drivers
│   │       └── shared
│   └── GSW\PYGZhy{}Fortran
├── src
│   ├── ALE
│   ├── core
│   ├── diagnostics
│   ├── equation\PYGZus{}of\PYGZus{}state
│   │   └── TEOS10
│   ├── framework
│   ├── ice\PYGZus{}shelf
│   ├── initialization
│   ├── parameterizations
│   │   ├── CVmix \PYGZhy{}\PYGZgt{} ../../pkg/CVMix\PYGZhy{}src/src/shared
│   │   ├── lateral
│   │   └── vertical
│   ├── tracer
│   └── user
└── .testing
    ├── tc0
    ├── tc1
    ├── tc1.a
    ├── tc1.b
    ├── tc2
    ├── tc2.a
    ├── tc3
    └── tc4
\end{sphinxVerbatim}


\subsection{\sphinxtitleref{config\_src/}}
\label{\detokenize{code_organization:config-src}}\label{\detokenize{code_organization:id1}}\begin{description}
\item[{\sphinxtitleref{dynamic/}, \sphinxtitleref{dynamic\_symmetric/}}] \leavevmode
One or none of \sphinxtitleref{config\_src/dynamic/} or \sphinxtitleref{config\_src/dynamic\_symmetric/} can
be included at compile time. If neither is used then a \sphinxtitleref{MOM\_memory.h} file
specific to the model configuration must be present \sphinxhyphen{} this is known as a
“static” compile with fixed layout and domain shape.

\item[{\sphinxtitleref{external/}}] \leavevmode
Contains “null” modules providing the API to optional components to use
with MOM6. Currently available are ocean data assimilation (\sphinxtitleref{ODA\_hooks}) and
the GFDL ocean bio\sphinxhyphen{}geochemistry model (\sphinxtitleref{GFDL\_ocean\_BGC}). When building
MOM6 in stand\sphinxhyphen{}alone ocean\sphinxhyphen{}only mode these modules should be compiled in.
To use the actual ODA or BGC, add the appropriate source to the search
paths .

\item[{\sphinxtitleref{solo\_driver/}}] \leavevmode
This driver produces an ocean\sphinxhyphen{}only executable with no other coupled
components (no sea\sphinxhyphen{}ice, no atmosphere, etc.). It is the simplest
configuration and fastest to compile and thus used for a lot of testing.

\item[{\sphinxtitleref{coupled\_driver/}}] \leavevmode
This driver provides an interface for the GFDL coupler to call. It requires
compiling MOM6 along with at least a sea\sphinxhyphen{}ice model and possibly all other
components in a coupled model.

\end{description}


\subsection{\sphinxtitleref{src/}}
\label{\detokenize{code_organization:src}}\label{\detokenize{code_organization:id2}}\begin{description}
\item[{\sphinxtitleref{core/}}] \leavevmode
The dynamical core modules (except for the ALE remapping/regridding).

\item[{\sphinxtitleref{ALE/}}] \leavevmode
Functions for remapping from between arbitrary vertical grids
and generating grids.

\item[{\sphinxtitleref{diagnostics/}}] \leavevmode
Some diagnostic calculations

\item[{\sphinxtitleref{equation\_of\_state/}}] \leavevmode
Various equations of state (linear; Wright, 1997; TEOS\sphinxhyphen{}10; …).

\item[{\sphinxtitleref{framework/}}] \leavevmode
Low\sphinxhyphen{}level wrappers for communication, diagnostics management, parsing
of input parameters, time management, CPU clocks.

\item[{\sphinxtitleref{initialization/}}] \leavevmode
Initialization of the horizontal grid, vertical coordinate, and the state.

\item[{\sphinxtitleref{parameterizations/lateral}}] \leavevmode
Sub\sphinxhyphen{}grid scale parameterization with fluxes primarily oriented in the
lateral direction.

\item[{\sphinxtitleref{parameterizations/vertical}}] \leavevmode
Sub\sphinxhyphen{}grid scale parameterization with fluxes primarily oriented in the
vertical direction, including the top and bottom boundary layer schemes.

\item[{\sphinxtitleref{tracer/}}] \leavevmode
Everything to do with tracers, including advection and isopycnal stirring.

\item[{\sphinxtitleref{user/}}] \leavevmode
Initialization and forcing for specific (coded) configurations.

\end{description}


\section{Run\sphinxhyphen{}time Parameter System}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:run-time-parameter-system}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System::doc}}
How run\sphinxhyphen{}time parameters work in MOM6

MOM6 has an extensive set of parameters that are set at run\sphinxhyphen{}time by parsing an input file. Many parameters have default values and are not required to be in the input file, although there are a number of parameters that must be set for the model to run. The numerous examples provided with the MOM6 code mostly differ in their run\sphinxhyphen{}time parameters (although some add other components, like sea\sphinxhyphen{}ice), and comparison between these examples is an excellent way to get a broad overview of many of MOM6’s parameters and how they might be set.


\subsection{Getting parameters into MOM6}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:getting-parameters-into-mom6}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system-1reading-params}}
Run\sphinxhyphen{}time parameters are provided to the model in two phases:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
A very small set of logistical parameters are read as namelist variables from the FMS parameter file \sphinxcode{\sphinxupquote{input.nml}} . One of these logistical parameters is a list of ascii files that contain all the other run\sphinxhyphen{}time parameters.

\item {} 
All of the above\sphinxhyphen{}named parameter files are scanned for MOM6 model parameters, default values assigned and replaced, conflicts detected and various parameter summaries logged to files and/or the standard output.

\end{enumerate}


\subsubsection{Namelist parameters (\sphinxtitleref{input.nml})}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:namelist-parameters-input-nml}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system-1mom6-namelist}}
All FMS derived MOM6 parameters reside in the namelist \sphinxcode{\sphinxupquote{MOM\_input\_nml}}
in the file \sphinxcode{\sphinxupquote{input.nml}} . The parameters are:
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{input\_filename}} \sphinxhyphen{} If equal to “n” will run a new run (i.e. will not read a restart file). If equal to “r” MOM6 will attempt to read a restart file.

\item {} 
\sphinxcode{\sphinxupquote{parameter\_filename}} \sphinxhyphen{} A list of file names containing the MOM6 internal run\sphinxhyphen{}time parameters. Typically \sphinxcode{\sphinxupquote{param\_files="MOM6\_input","MOM6\_override"}} where the file MOM6\_input contains all the non\sphinxhyphen{}default parameters that define a “baseline” experiment and MOM6\_override will be either empty (for baseline) or contain a few parameters that define a “derived” experiment (that differs from the baseline). This helps keep the parameter lists concise and enables easy comparison of parameters in related experiments.

\item {} 
\sphinxcode{\sphinxupquote{restart\_input\_dir}} , \sphinxcode{\sphinxupquote{restart\_output\_dir}} , and \sphinxcode{\sphinxupquote{output\_directory}} \sphinxhyphen{} These specify the directories for reading input files, writing restart files, and writing many non\sphinxhyphen{}restart files.

\end{itemize}


\subsubsection{Other MOM6\sphinxhyphen{}relevant FMS parameters}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:other-mom6-relevant-fms-parameters}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system-1fms-params}}
The namelist ocean\_solo\_nml may have the integer parameters secs, hours, days, months and years, which dictate how long the FMS ocean driver will try to run the model each run\sphinxhyphen{}segment.


\subsubsection{MOM6 parameter file syntax}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:mom6-parameter-file-syntax}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system-1param-syntax}}
The general syntax for an entry in a MOM6 parameter file is

\begin{sphinxVerbatim}[commandchars=\\\{\}]
[!]\PYGZsh{}[override]  PARAMETER\PYGZus{}NAME  =  value[,value][...][!comments]
\end{sphinxVerbatim}

Parameter names must be constructed from the characters \sphinxcode{\sphinxupquote{{[}A\sphinxhyphen{}Za\sphinxhyphen{}z0\sphinxhyphen{}9\_{]}}}
and by soft convention are upper case. The \sphinxcode{\sphinxupquote{!}} character is a remark or comment indicator; all subsequent text on that line is ignored.

Parameters that are not specified in the parameter files may assume a default value. It is not an error to specify a parameter more than once with the same value. It is an error to specify different values.

The keyword \#override indicates that this parameter specification takes precedence over other specifications. It is
an error to have two \#override specifications for a single parameter with the same values. It is an error to have two \#override statements with different values.

Some illustrations:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
DO\PYGZus{}THIS  =  True   !  Set  the  Boolean  to  .TRUE.
DO\PYGZus{}THAT  =  False  !  Set  the  Boolean  to  .FALSE.
NXYZ  =  5   !  Set  the  value  to  NXYZ  to  5
HALF  =  0.5   !  Set  the  value  of  HALF  to  0.5
NAME  =  \PYGZdq{}abc\PYGZdq{}   !  Set  the  string  NAME  to  \PYGZsq{}abc\PYGZsq{}
VECTOR  =  1.0,2.0   !  Set  the  array  VECTOR  to  [1.0,  2.0]
NAMES  =  \PYGZsq{}abc\PYGZsq{},\PYGZsq{}xyz\PYGZsq{}  !  Set  the  strings  NAMES  to  \PYGZsq{}abc\PYGZsq{},\PYGZsq{}xyz\PYGZsq{}
\PYGZsh{}override  DO\PYGZus{}THIS  =  False  !  Set  the  Boolean  to  .FALSE.,  ignoring  the  above  specification
\PYGZsh{}override  HALF  =  0.25  !  Set  the  value  of  HALF  to  0.25,  ignoring  the  above  value
\PYGZsh{}override  HALF  =  0.25  !  Same  as  the  above  value  of  HALF  to  0.25  so  is  accepted
\end{sphinxVerbatim}


\subsubsection{Logging of parameters}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:logging-of-parameters}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system-1param-logging}}
The subroutine that reads MOM6 parameters has also serves to log every parameter to a file set by DOCUMENT\_FILE, usually “MOM6\_parameter\_doc”. In addition to the name of the variable being read, these calls contain a brief description, along with a description of the units and the default value (if any) or an indication that there is no default and that the variable must be present. For example, \sphinxcode{\sphinxupquote{DT}}
is always required to be present:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{call}  \PYG{n}{get\PYGZus{}param}\PYG{p}{(}\PYG{n}{param\PYGZus{}file}\PYG{p}{,}  \PYG{n}{module}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{DT}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{n}{CS}\PYG{o}{\PYGZpc{}}\PYG{n}{dt}\PYG{p}{,}  \PYG{o}{\PYGZam{}}
             \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{The  (baroclinic)  dynamics  time  step.   The  time\PYGZhy{}step  that  }\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{/}\PYG{o}{/}\PYG{o}{\PYGZam{}}
             \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{is  actually  used  will  be  an  integer  fraction  of  the  }\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{/}\PYG{o}{/}\PYG{o}{\PYGZam{}}
             \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{forcing  time\PYGZhy{}step  (DT\PYGZus{}FORCING  in  ocean\PYGZhy{}only  mode  or  the  }\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{/}\PYG{o}{/}\PYG{o}{\PYGZam{}}
             \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{coupling  timestep  in  coupled  mode.)}\PYG{l+s+s2}{\PYGZdq{}} \PYG{p}{,}  \PYG{n}{units}\PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{s}\PYG{l+s+s2}{\PYGZdq{}} \PYG{p}{,}  \PYG{o}{\PYGZam{}}
             \PYG{n}{fail\PYGZus{}if\PYGZus{}missing}\PYG{o}{=}\PYG{o}{.}\PYG{n}{true}\PYG{o}{.}\PYG{p}{)}
\end{sphinxVerbatim}

At run\sphinxhyphen{}time, two levels of logging are performed, depending on the value of the parameter \sphinxcode{\sphinxupquote{MINIMAL\_DOCUMENTATION}}
:
\begin{itemize}
\item {} 
(TRUE) The end result of the combination of default values, assignments and overrides are recorded with default and current values, description and units, for all parameters.

\item {} 
(FALSE) The minimal list of required and non\sphinxhyphen{}default value parameters are recorded with current values, description and units only for those parameters needed to reproduce the configuration.

\end{itemize}

Either of the generated logging files can be used as inputs and yield the same configuration.

In addition, there are also calls that log derived quantities (e.g., a time\sphinxhyphen{}step that is derived from a CFL number, or the full path to an input file) without reading anything in.


\subsubsection{Error checking of parameters and parameter files}
\label{\detokenize{api/generated/pages/Runtime_Parameter_System:error-checking-of-parameters-and-parameter-files}}\label{\detokenize{api/generated/pages/Runtime_Parameter_System:runtime-parameter-system-1param-checking}}
There are several techniques that are used for error checking on MOM6 parameters:
\begin{itemize}
\item {} 
Some parameters have internal error messages if they are set to nonsensical values.

\item {} 
No parameter can be set twice inconsistently without an explicit \#override specification.

\item {} 
If the run\sphinxhyphen{}time parameter REPORT\_UNUSED\_PARAMS is true, a warning will be issued for any entries in the input parameter files that are not read in, for instance if they are misspelled.

\item {} 
Setting the run\sphinxhyphen{}time parameter FATAL\_UNUSED\_PARAMS to true causes a fatal error that will bring down the model if there are any unused entries in the input parameter files.

\end{itemize}


\section{Diagnostics}
\label{\detokenize{api/generated/pages/Diagnostics:diagnostics}}\label{\detokenize{api/generated/pages/Diagnostics:id1}}\label{\detokenize{api/generated/pages/Diagnostics::doc}}
Controlling run\sphinxhyphen{}time diagnostics and how to add diagnostics to the code

MOM6 diagnostics are orchestrated via the FMS diag\_manager, as for previous versions of MOM. However, because MOM6 is a general coordinate model, the model native\sphinxhyphen{}coordinae output can be less familiar to users of earlier generations of MOM. To alleviate this problem, MOM6 provides both “native” and “remapped” diagnostics; the former being diagnostics in the actual model coordinate space, and the latter in user\sphinxhyphen{}defined coordinates.


\subsection{The “diag\_table”}
\label{\detokenize{api/generated/pages/Diagnostics:the-diag-table}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table}}
At run\sphinxhyphen{}time, diagnostics are controlled by the input file \sphinxcode{\sphinxupquote{diag\_table}}
which is interpreted but the FMS package diag\_manager.

The diag\_table file has three kinds of section: Title, File and Field. The title section is mandatory and always the first. There can be multiple file and field sections, typically either in pairs or grouped in to all files and all fields, but always with the file section preceding the corresponding field section.


\subsubsection{Title section}
\label{\detokenize{api/generated/pages/Diagnostics:title-section}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table-title}}
The first two lines are mandatory and comprise a line with a title and a line with six integers defining a base date against which time will be referenced.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{My  ocean\PYGZhy{}only  test  case}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+m+mi}{1900}  \PYG{l+m+mi}{1}  \PYG{l+m+mi}{1}  \PYG{l+m+mi}{0}  \PYG{l+m+mi}{0}  \PYG{l+m+mi}{0}
\end{sphinxVerbatim}


\subsubsection{File section}
\label{\detokenize{api/generated/pages/Diagnostics:file-section}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table-files}}
This section defines an arbitrary number of files that will be created. Each file is limited to a single rate of either sampling or time\sphinxhyphen{}averaging.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{file\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{n}{output\PYGZus{}freq}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{output\PYGZus{}freq\PYGZus{}units}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{n}{file\PYGZus{}format}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time\PYGZus{}axis\PYGZus{}units}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time\PYGZus{}axis\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}
\end{sphinxVerbatim}
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{file\_name}} : The name of the file that contains diagnostics at the given frequency (excluding the “.nc” extension).

\item {} 
\sphinxcode{\sphinxupquote{output\_freq}} : The period between records in \sphinxcode{\sphinxupquote{file\_name}} , if positive. Special values of 0 mean write every time step and \sphinxhyphen{}1 write only at the end of the run.

\item {} 
\sphinxcode{\sphinxupquote{output\_freq\_units}} : The units in which \sphinxcode{\sphinxupquote{output\_freq}} is given. Valid values are “years”, “months”, “days”, “hours”, “minutes” or “seconds”.

\item {} 
\sphinxcode{\sphinxupquote{file\_format}} : Always set to 1, meaning netcdf.

\item {} 
\sphinxcode{\sphinxupquote{time\_axis\_units}} : The units to use for the time\sphinxhyphen{}axis in the file. Valid values are “years”, “months”, “days”, “hours”, “minutes” or “seconds”.

\item {} 
\sphinxcode{\sphinxupquote{time\_axis\_name}} : The name of the time\sphinxhyphen{}axis (usually “Time”).

\end{itemize}

Optional entries in the file line allow the generation of multiple files are intervals:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{file\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{n}{output\PYGZus{}freq}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{output\PYGZus{}freq\PYGZus{}units}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{n}{file\PYGZus{}format}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time\PYGZus{}axis\PYGZus{}units}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time\PYGZus{}axis\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{[}\PYG{p}{,}  \PYG{n}{new\PYGZus{}file\PYGZus{}freq}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{new\PYGZus{}file\PYGZus{}freq\PYGZus{}units}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{[}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{start\PYGZus{}time}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{[}\PYG{p}{,}  \PYG{n}{file\PYGZus{}duration}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{file\PYGZus{}duration\PYGZus{}units}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{]}\PYG{p}{]}
\end{sphinxVerbatim}
\begin{itemize}
\item {} 
file\_name : The base name of the file that contains diagnostics at the given frequency (excluding the “.nc” extension). The strings \%yr, \%mo, \%dy, \%hr \%mi, \%sc are expanded to the current year, month, day, hour, minute and second respectively, with new files created every new\_file\_freq.

\item {} 
\sphinxcode{\sphinxupquote{new\_file\_freq}} : The period between generation of new files.

\item {} 
\sphinxcode{\sphinxupquote{new\_file\_freq\_units}} : The units in which \sphinxcode{\sphinxupquote{new\_file\_freq}} is given.

\item {} 
\sphinxcode{\sphinxupquote{start\_time}} , \sphinxcode{\sphinxupquote{file\_duration}} , \sphinxcode{\sphinxupquote{file\_duration\_units}} : Even finer grain control of output files.

\end{itemize}


\subsubsection{Field section}
\label{\detokenize{api/generated/pages/Diagnostics:field-section}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table-fields}}
An arbitrary number of lines, one per diagnostic field:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{module\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{field\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{output\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{file\PYGZus{}name}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time\PYGZus{}sampling}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{reduction\PYGZus{}method}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{regional\PYGZus{}section}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{n}{packing}
\end{sphinxVerbatim}
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{module\_name}} : Name of the component model. For native ocean variables this should be “ocean\_model”. See {\hyperref[\detokenize{api/generated/pages/Diagnostics:diagnostics-1remapped-diagnostics}]{\sphinxcrossref{\DUrole{std,std-ref}{Vertically remapped diagnostics}}}} for non\sphinxhyphen{}native vertical\sphinxhyphen{}grid diagnostics in the ocean model.

\item {} 
\sphinxcode{\sphinxupquote{field\_name}} : The name of the variable as registered in the model.

\item {} 
\sphinxcode{\sphinxupquote{output\_name}} ” The name of the variable as it will appear in the file. This is usually the same as the \sphinxcode{\sphinxupquote{field\_name}} but can be used to rename a diagnostic.

\item {} 
\sphinxcode{\sphinxupquote{file\_name}} : One of the files defined above in the section {\hyperref[\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table-files}]{\sphinxcrossref{\DUrole{std,std-ref}{File section}}}} .

\item {} 
\sphinxcode{\sphinxupquote{time\_sampling}} : Always set to “all”.

\item {} 
\sphinxcode{\sphinxupquote{reduction\_method}} : “none” means sample or snapshot. “average” or “mean” performs a time\sphinxhyphen{}average. “min” or “max” diagnose the minium or maxium over each time period.

\item {} 
\sphinxcode{\sphinxupquote{regional\_section}} : “none” means global output. A string of six space separated numbers, “lat\_min, lat\_max, lon\_min, lon\_max, vert\_min, vert\_max”, limits the diagnostic to a region.

\item {} 
\sphinxcode{\sphinxupquote{packing}} : Data representation in the file. 1 means “real*8”, 2 means “real*4”, 4 mean 16\sphinxhyphen{}bit integers, 8 means 1\sphinxhyphen{}byte.

\end{itemize}


\subsubsection{Example}
\label{\detokenize{api/generated/pages/Diagnostics:example}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table-example}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{OM4  1/4  degree}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+m+mi}{1900}  \PYG{l+m+mi}{1}  \PYG{l+m+mi}{1}  \PYG{l+m+mi}{0}  \PYG{l+m+mi}{0}  \PYG{l+m+mi}{0}

\PYG{c+c1}{\PYGZsh{}  Static  file}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}static}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{months}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}  \PYG{c+c1}{\PYGZsh{}  ocean\PYGZus{}static  is  a  protected  name.  Do  not  change  this  line.}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{deptho}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}     \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{deptho}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}     \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}static}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{2}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{geolon}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}     \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{geolon}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}     \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}static}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{2}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{geolat}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}     \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{geolat}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}     \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}static}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{2}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{wet}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}        \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{wet}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}        \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}static}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{2}

\PYG{c+c1}{\PYGZsh{}  High\PYGZhy{}frequency  file}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{surf\PYGZus{}}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{4yr\PYGZus{}}\PYG{l+s+si}{\PYGZpc{}3d}\PYG{l+s+s2}{y}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{hours}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{months}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{SSH}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{SSH}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{surf\PYGZus{}}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{4yr\PYGZus{}}\PYG{l+s+si}{\PYGZpc{}3d}\PYG{l+s+s2}{y}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}

\PYG{c+c1}{\PYGZsh{}  Daily  averages}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}daily}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{tos}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{tos}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}daily}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}

\PYG{c+c1}{\PYGZsh{}  Monthly  averages}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}month}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{months}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{thetao}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{thetao}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}month}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}

\PYG{c+c1}{\PYGZsh{}  Annual  averages}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}annual}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{12}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{months}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{thetao}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{thetao}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}annual}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}

\PYG{c+c1}{\PYGZsh{}  Vertical  section}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}Bering\PYGZus{}Strait}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{5}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{thetao}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{thetao}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}Bering\PYGZus{}Strait}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}171.4  \PYGZhy{}168.7   66.1  66.1  \PYGZhy{}1  \PYGZhy{}1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}
\end{sphinxVerbatim}


\subsection{Native diagnostics}
\label{\detokenize{api/generated/pages/Diagnostics:native-diagnostics}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1native-diagnostics}}
The list of available diagnostics is dependent on the particular configuration of the model. For this reason the model writes a record of the available diagnostic fields at run\sphinxhyphen{}time into a file “available\_diags.*”. See, for example,
\sphinxhref{https://github.com/NOAA-GFDL/MOM6-examples/blob/dev/master/ocean\_only/global\_ALE/z/available\_diags.000000}{available\_diags.000000}
for the global\_ALE z\sphinxhyphen{}coordinate ocean\sphinxhyphen{}only test case.

Diagnostic fields in the module “ocean\_model” refer to the native variables or diagnostics in the native grid. Since the model can be run in arbitrary coordinates, say in hybrid\sphinxhyphen{}coordinate mode, then native\sphinxhyphen{}space diagnostics can be potentially confusing. Native diagnostics are useful when examining exactly what the model is doing, or if the vertical coordinate of the model is configured to be a natural coordinate such as pure isopycnal or z* geopotential.


\subsection{Vertically remapped diagnostics}
\label{\detokenize{api/generated/pages/Diagnostics:vertically-remapped-diagnostics}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1remapped-diagnostics}}
Alternative vertical coordinates can be configured for diagnostic purposes only.

The run\sphinxhyphen{}time parameter \sphinxcode{\sphinxupquote{NUM\_DIAG\_COORDS}}
controls how many diagnostic coordinates to use.

The run\sphinxhyphen{}time parameter \sphinxcode{\sphinxupquote{DIAG\_COORDS}}
defines the mapping between each coordinate, the name of the module in the diag\_table and run\sphinxhyphen{}time parameter names that define the coordinate. A list of string tuples, separated by commas, with each tuple in the form of MODULE\_SUFFIX PARAMETER\_SUFFIX COORDINATE\_NAME. \sphinxcode{\sphinxupquote{MODULE\_SUFFIX}} is the string appended to “ocean\_model” to create a module in the diag\_table. \sphinxcode{\sphinxupquote{PARAMETER\_SUFFIX}} is the string appended to “DiAG\_COORD\_DEF”, and other parameters, used to control the generation of the named coordinate. \sphinxcode{\sphinxupquote{COORDINATE\_NAME}} is a name understood by the MOM6 regridding module. Valid examples are “ZSTAR”, “SIGMA”, “RHO”, etc.

By default, \sphinxcode{\sphinxupquote{NUM\_DIAG\_COORDS=1}}
and \sphinxcode{\sphinxupquote{DIAG\_COORDS="z Z ZSTAR"}} , meaning the module “ocean\_model\_z” provides diagnostics in “z*” coordinates and uses the parameter \sphinxcode{\sphinxupquote{DIAG\_COORD\_DEF\_Z}} .

For example, multiple z*\sphinxhyphen{}coordinates could be used for diagnostics with

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{NUM\PYGZus{}DIAG\PYGZus{}COORDS}  \PYG{o}{=}  \PYG{l+m+mi}{2}
\PYG{n}{DIAG\PYGZus{}COORDS}  \PYG{o}{=}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{z  01  ZSTAR,abc  02  ZSTAR}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{n}{DIAG\PYGZus{}COORD\PYGZus{}DEF\PYGZus{}01}  \PYG{o}{=}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{WOA09}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{n}{DIAG\PYGZus{}COORD\PYGZus{}DEF\PYGZus{}02}  \PYG{o}{=}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{UNIFORM:10,20.}\PYG{l+s+s2}{\PYGZdq{}}
\end{sphinxVerbatim}

would create the diag\_manager modules “ocean\_model\_z” and “ocean\_model\_abc”.

The above is equivalent to

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{NUM\PYGZus{}DIAG\PYGZus{}COORDS}  \PYG{o}{=}  \PYG{l+m+mi}{2}
\PYG{n}{DIAG\PYGZus{}COORDS}  \PYG{o}{=}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{z  ZA  ZSTAR,abc  ZB  ZSTAR}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{n}{DIAG\PYGZus{}COORD\PYGZus{}DEF\PYGZus{}ZA}  \PYG{o}{=}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{WOA09}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{n}{DIAG\PYGZus{}COORD\PYGZus{}DEF\PYGZus{}ZB}  \PYG{o}{=}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{UNIFORM:10,20.}\PYG{l+s+s2}{\PYGZdq{}}
\end{sphinxVerbatim}

To obtain a diagnostic of monthly\sphinxhyphen{}averaged potential temperature in both these coordinate systems the diag\_table must include the lines

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}month\PYGZus{}z}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{months}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}month\PYGZus{}abc}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{months}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+m+mi}{1}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{days}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model\PYGZus{}z}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{temp}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{temp}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}month\PYGZus{}z}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}
\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}model\PYGZus{}abc}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{temp}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{temp}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ocean\PYGZus{}month\PYGZus{}abc}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{all}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{mean}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+m+mi}{2}
\end{sphinxVerbatim}


\subsubsection{Diagnostic vertical coordinates}
\label{\detokenize{api/generated/pages/Diagnostics:diagnostic-vertical-coordinates}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-table-vertical-coords}}
For each of the \sphinxcode{\sphinxupquote{NUM\_DIAG\_COORDS}}
vertical coordinates listed in \sphinxcode{\sphinxupquote{DIAG\_COORDS}} the corresponding \sphinxcode{\sphinxupquote{DIAG\_COORD\_DEF\_\%}} parameter must be provided. It can take the following values:
\begin{itemize}
\item {} 
PARAM : In this case, a corresponding parameter \sphinxcode{\sphinxupquote{DIAG\_COORD\_RES\_\%}} is read that lists the deltas for each level in the coordinate. For example, DIAG\_COODS=”z Z ZTAR”, DIAG\_COORD\_DEF\_Z=”PARAM”, DIAG\_COORD\_RES\_Z=5,10,10,15 creates z*\sphinxhyphen{}level with 5,10,10,15 meters thicknesses.

\item {} 
UNIFORM : Uniform distribution down to the maximum depth of the model using the same number of levels as he model.

\item {} 
UNIFORM:N : Uniform distribution down to the maximum depth of the model using \sphinxcode{\sphinxupquote{N}} levels.

\item {} 
UNIFORM:N,D : Uniform distribution of \sphinxcode{\sphinxupquote{N}} levels with thickness \sphinxcode{\sphinxupquote{D}} .

\item {} 
\sphinxurl{FILE:filename,varname} : Reads vector of coordinate thicknesses from field “varname” from file “filename”.

\item {} 
\sphinxurl{FILE:filename,interfaces=varname} : Reads vector of coordinate positions from field “varname” from file “filename”.

\item {} 
WOA09 : Z\sphinxhyphen{}levels that correspond to the World Ocean Atlas, 2009, standard levels down to and including the maximum depth of the model.

\item {} 
WOA09:N : The first \sphinxcode{\sphinxupquote{N}} levels of the World Ocean Atlas, 2009, standard levels.

\end{itemize}


\subsection{APIs for diagnostics}
\label{\detokenize{api/generated/pages/Diagnostics:apis-for-diagnostics}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diagnostics-implementation}}
The multiple diagnostic\sphinxhyphen{}coordinates are implemented in a layer that sits on top of the FMS diag\_manager known as the mom6\_diag\_mediator.

A diagnostic is registered with \sphinxcode{\sphinxupquote{register\_diag\_field()}} which is an API that looks similar to the FMS diag\_manager routine of the same name:
which is an API that looks similar to the FMS diag\_manager routine of the same name:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{diag\PYGZus{}id}  \PYG{o}{=}  \PYG{n}{register\PYGZus{}diag\PYGZus{}field}\PYG{p}{(}\PYG{n}{module\PYGZus{}name}\PYG{p}{,}  \PYG{n}{diag\PYGZus{}name}\PYG{p}{,}  \PYG{n}{axes}\PYG{p}{,}  \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)}
\end{sphinxVerbatim}

The MOM6 version of this routine optionally allows the specification of CMOR names in addition to the native names which then registers the diagnostic twice, once with each name.

For each of the native and CMOR names, the diagnostic is registered in the native module “ocean\_model”, corresponding to the native model coordinate, and a module associated with each of the diagnostic coordinates.

For each diagnostic coordinate, a horizontally\sphinxhyphen{}averaged diagnostic is also registered.

In all, for each 3D diagnostic, the are 2 + 4N diagnostics registered, where N is the number of diagnostic coordinates. As a result, the global\_ALE examples have of order 900 total diagnostics available in the shipped configuration.

The data is made available to the diag\_manager via a call to post\_data() which is a wrapper that does all the vertical remapping before calling FMS’s send\_data():

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{call}  \PYG{n}{post\PYGZus{}data}\PYG{p}{(}\PYG{n}{diag\PYGZus{}id}\PYG{p}{,}  \PYG{n}{data}\PYG{p}{,}  \PYG{n}{diag\PYGZus{}control}\PYG{p}{)}
\end{sphinxVerbatim}


\subsubsection{Artifacts of posting frequency for diagnostics}
\label{\detokenize{api/generated/pages/Diagnostics:artifacts-of-posting-frequency-for-diagnostics}}\label{\detokenize{api/generated/pages/Diagnostics:diagnostics-1diag-post-frequency}}
Variables area “posted” for i/o or averaging to the diag\_manager (via MOM6’s diag\_mediator) at different frequencies relative to each other. This is because the MOM6 algorithm takes the form of nested sub\sphinxhyphen{}cycles with different time\sphinxhyphen{}steps in each loop (e.g. barotropic solver with dynamics). A consequence of this is that a time average of a related quantities may appear to be inconsistent since the diagnostic posted with higher frequency may not vary linearly between the end\sphinxhyphen{}points seen on the longer time\sphinxhyphen{}step. The differences are usually small, but if you see large differences it might indicate you should re\sphinxhyphen{}examine the time\sphinxhyphen{}steps used for the various sub\sphinxhyphen{}cycles.


\section{Horizontal indexing and memory}
\label{\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing-and-memory}}\label{\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing}}\label{\detokenize{api/generated/pages/Horizontal_Indexing::doc}}
Conventions for staggering of variables and loops over 2d/3d arrays

MOM6 is written in Fortran90 and uses the \sphinxcode{\sphinxupquote{i,j,k}}
order of indexing. \sphinxcode{\sphinxupquote{i}} corresponds to the fastest index (stride\sphinxhyphen{}1 in memory) and thus should be the inner\sphinxhyphen{}most loop variable. We often refer to the i\sphinxhyphen{}direction as the x\sphinxhyphen{} or zonal direction, and similarly to the j\sphinxhyphen{}direction as y\sphinxhyphen{} or meridional direction. The model can use curvilinear grids/coordinates in the horizontal and so these labels have loose meanings but convenient.


\subsection{Loops and staggered variables}
\label{\detokenize{api/generated/pages/Horizontal_Indexing:loops-and-staggered-variables}}\label{\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing-1section-staggering}}
Many variables are staggered horizontally with respect to each other. The dynamics and tracer equations are discretized on an Arakawa C grid. Staggered variables must still have integer indices and we use a north\sphinxhyphen{}east convention centered on the h\sphinxhyphen{}points. These means a variable with indices \sphinxcode{\sphinxupquote{i,j}}
will be either collocated, to the east, to the north, or to the north\sphinxhyphen{}east of the h\sphinxhyphen{}point with the same indices.

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Arakawa_C_grid}.png}
\caption{MOM6 uses an Arakawa C grid staggering of variables with a North\sphinxhyphen{}East indexing convention. “Cells” refer to the control volumes around tracer\sphinxhyphen{} or h\sphinxhyphen{}point located variables unless labelled otherwise.}\label{\detokenize{api/generated/pages/Horizontal_Indexing:id1}}\end{figure}


\subsubsection{Soft convention for loop variables}
\label{\detokenize{api/generated/pages/Horizontal_Indexing:soft-convention-for-loop-variables}}\label{\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing-1soft-convention}}
To ease reading the code we use a “soft” convection (soft because there is no syntax checking) where an upper\sphinxhyphen{}case index variable can be interpreted as the lower\sphinxhyphen{}case index variable plus
\(\frac{1}{2}\) .

For example, when a loop is over h\sphinxhyphen{}points collocated variables
\begin{itemize}
\item {} 
the do\sphinxhyphen{}loop statements will be for lower\sphinxhyphen{}case \sphinxcode{\sphinxupquote{i,j}} variables

\item {} 
references to h\sphinxhyphen{}point variables will be \sphinxcode{\sphinxupquote{h(i,j)}} , \sphinxcode{\sphinxupquote{D(i+1,j)}} , etc.

\item {} 
references to u\sphinxhyphen{}point variables will be \sphinxcode{\sphinxupquote{u(I,j)}} (meaning \(u_{i+\frac{1}{2},j}\) ), \sphinxcode{\sphinxupquote{u(I\sphinxhyphen{}1,j)}} (meaning \(u_{i-\frac{1}{2},j}\) ), etc.

\item {} 
references to v\sphinxhyphen{}point variables will be \sphinxcode{\sphinxupquote{v(i,J)}} (meaning \(v_{i,j+\frac{1}{2}}\) ), \sphinxcode{\sphinxupquote{u(I\sphinxhyphen{}1,j)}} (meaning \(u_{i,j-\frac{1}{2}}\) ), etc.

\item {} 
references to q\sphinxhyphen{}point variables will be \sphinxcode{\sphinxupquote{q(I,J)}} (meaning \(q_{i+\frac{1}{2},j+\frac{1}{2}}\) ), etc.

\end{itemize}

In contrast, when a loop is over u\sphinxhyphen{}points collocated variables
\begin{itemize}
\item {} 
the do\sphinxhyphen{}loop statements will be for upper\sphinxhyphen{}case \sphinxcode{\sphinxupquote{I}} and lower\sphinxhyphen{}case \sphinxcode{\sphinxupquote{j}} variables

\item {} 
the expression \(u_{i+\frac{1}{2},j} ( h_{i,j} + h_{i+1,j} )\) is \sphinxcode{\sphinxupquote{u(I,j) * ( h(i,j) + h(i+1,j)}} .

\end{itemize}


\subsection{Declaration of variables}
\label{\detokenize{api/generated/pages/Horizontal_Indexing:declaration-of-variables}}\label{\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing-1section-memory}}
\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Horizontal_NE_indexing_nonsym}.png}
\caption{Non\sphinxhyphen{}symmetric mode: All arrays are declared with the same shape (isd:ied,jsd:jed).}\label{\detokenize{api/generated/pages/Horizontal_Indexing:id2}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Horizontal_NE_indexing_sym}.png}
\caption{Symmetric mode: Arrays have different shapes depending on their staggering location on the Arakawa C grid.}\label{\detokenize{api/generated/pages/Horizontal_Indexing:id3}}\end{figure}

A field is described by 2D or 3D arrays which are distributed across parallel processors. Each processor only sees a small window of the global field. The processor “owns” the computational domain (red in above figure) but arrays are extended horizontally with halos which are intermittently updated with the values from neighboring processors. The halo regions (blue in above figure) may not always be up\sphinxhyphen{}to\sphinxhyphen{}date. Data in halo regions (blue in above figure) will be overwritten my mpp\_updates.

MOM6 has two memory models, “symmetric” and “non\sphinxhyphen{}symmetric”. In non\sphinxhyphen{}symmetric mode all arrays are given the same shape. The consequence of this is that there are fewer staggered variables to the south\sphinxhyphen{}west of the computational domain. An operator applied at h\sphinxhyphen{}point locations involving u\sphinxhyphen{} or v\sphinxhyphen{} point data can not have as wide a stencil on the south\sphinxhyphen{}west side of the processor domain as it can on the north\sphinxhyphen{}east side.

In symmetric mode, declarations are dependent on the variables staggered location on the Arakawa C grid. This allows loops to be symmetric and stencils to be applied more uniformly.

In the code, declarations are consistent with the symmetric memory model. The non\sphinxhyphen{}symmetric mode is implemented by setting the start values of the staggered data domain to be the same as the non\sphinxhyphen{}staggered start value.

The horizontal index type (\sphinxcode{\sphinxupquote{mom\_hor\_index::hor\_index\_type()}}) provides the data domain start values. The values are also copied into the
) provides the data domain start values. The values are also copied into the \sphinxcode{\sphinxupquote{mom\_grid::ocean\_grid\_type()}} for convenience although we might deprecate this convenience in the future.for convenience although we might deprecate this convenience in the future.

Declarations of h\sphinxhyphen{}point data take the form:
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%isd:HI\%ied, HI\%jsd:HI\%jed) :: D !\textless{} Depth at h\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%isd:HI\%ied, HI\%jsd:HI\%jed, GV\%ke) :: h !\textless{} Layer thickness (H units)}}

\end{itemize}

Declarations of u\sphinxhyphen{}point data take the form:
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%IsdB:HI\%IedB, HI\%jsd:HI\%jed) :: Du !\textless{} Depth at u\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%IsdB:HI\%IedB, HI\%jsd:HI\%jed, GV\%ke) :: h !\textless{} Zonal flow (m/s)}}

\end{itemize}

Declarations of v\sphinxhyphen{}point data take the form:
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%isd:HI\%ied, HI\%JsdB:HI\%JedB) :: Dv !\textless{} Depth at v\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%isd:HI\%ied, HI\%JsdB:HI\%JedB, GV\%ke) :: h !\textless{} Zonal flow (m/s)}}

\end{itemize}

Declarations of q\sphinxhyphen{}point data take the form:
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%IsdB:HI\%IedB, HI\%JsdB:HI\%JedB) :: Dq !\textless{} Depth at q\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension(HI\%IsdB:HI\%IedB, HI\%JsdB:HI\%JedB, GV\%ke) :: vort !\textless{} Vertical componentof vorticity (s\sphinxhyphen{}1)}}

\end{itemize}

The file \sphinxcode{\sphinxupquote{MOM\_memory\_macros.h}}
provides the macros \sphinxcode{\sphinxupquote{SZI\_}} , \sphinxcode{\sphinxupquote{SZJ\_}} , \sphinxcode{\sphinxupquote{SZIB\_}} and \sphinxcode{\sphinxupquote{SZJB\_}} that help make the above more concise:
\begin{itemize}
\item {} 
\sphinxcode{\sphinxupquote{real, dimension( SZI\_(HI) ,  SZJ\_(HI) ) :: D !\textless{} Depth at h\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension( SZIB\_(HI) ,  SZJ\_(HI) ) :: Du !\textless{} Depth at u\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension( SZI\_(HI) ,  SZJB\_(HI) ) :: Dv !\textless{} Depth at v\sphinxhyphen{}points (m)}}

\item {} 
\sphinxcode{\sphinxupquote{real, dimension( SZIB\_(HI) ,  SZJB\_(HI) ) :: Dq !\textless{} Depth at q\sphinxhyphen{}points (m)}}

\end{itemize}

See \sphinxcode{\sphinxupquote{MOM\_memory\_macros.h}}
for the complete list of macros used in various memory modes.


\subsection{Calculating a global index}
\label{\detokenize{api/generated/pages/Horizontal_Indexing:calculating-a-global-index}}\label{\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing-1global-index}}
For the most part MOM6 code should be independent of an equivalent absolute global index. There are exceptions and when the global index of a cell \sphinxcode{\sphinxupquote{i,j}}
is needed is can be calculated as follows:
\sphinxcode{\sphinxupquote{i\_global = i + HI\%idg\_offset}}

Before the \sphinxcode{\sphinxupquote{mom\_hor\_index::hor\_index\_type()}} was introduced, this conversion was done use variables in the
was introduced, this conversion was done use variables in the \sphinxcode{\sphinxupquote{mom\_grid::ocean\_grid\_type()}}::
\sphinxcode{\sphinxupquote{i\_global = (i\sphinxhyphen{}G\%isd) + G\%isd\_global}}

which is no longer preferred.

Note that a global index only makes sense for a rectangular global domain. If the domain is a Mosaic of connected tiles (e.g. size tiles of a cube) the global indices (i,j) become meaningless.


\chapter{Forcing}
\label{\detokenize{forcing:forcing}}\label{\detokenize{forcing::doc}}

\section{Solar Radiation}
\label{\detokenize{api/generated/pages/Solar_Radiation:solar-radiation}}\label{\detokenize{api/generated/pages/Solar_Radiation:id1}}\label{\detokenize{api/generated/pages/Solar_Radiation::doc}}

\subsection{Jerlov water type}
\label{\detokenize{api/generated/pages/Solar_Radiation:jerlov-water-type}}\label{\detokenize{api/generated/pages/Solar_Radiation:solar-radiation-1jerlov-wt}}

\subsection{Absorption by Chlorophyll}
\label{\detokenize{api/generated/pages/Solar_Radiation:absorption-by-chlorophyll}}\label{\detokenize{api/generated/pages/Solar_Radiation:solar-radiation-1chl-absorb}}

\section{Tracer Fluxes}
\label{\detokenize{api/generated/pages/Tracer_Fluxes:tracer-fluxes}}\label{\detokenize{api/generated/pages/Tracer_Fluxes:id1}}\label{\detokenize{api/generated/pages/Tracer_Fluxes::doc}}

\subsection{Tracer Fluxes}
\label{\detokenize{api/generated/pages/Tracer_Fluxes:tracer-fluxes-1section-tracer-fluxes}}\label{\detokenize{api/generated/pages/Tracer_Fluxes:id2}}

\subsection{River Runoff}
\label{\detokenize{api/generated/pages/Tracer_Fluxes:river-runoff}}\label{\detokenize{api/generated/pages/Tracer_Fluxes:tracer-fluxes-1section-river-runoff}}

\subsection{Ice Runoff}
\label{\detokenize{api/generated/pages/Tracer_Fluxes:ice-runoff}}\label{\detokenize{api/generated/pages/Tracer_Fluxes:tracer-fluxes-1section-ice-runoff}}

\chapter{Parallel Implementation}
\label{\detokenize{parallel:parallel-implementation}}\label{\detokenize{parallel::doc}}

\section{Domain Decomposition}
\label{\detokenize{api/generated/pages/Domain_Decomposition:domain-decomposition}}\label{\detokenize{api/generated/pages/Domain_Decomposition:id1}}\label{\detokenize{api/generated/pages/Domain_Decomposition::doc}}

\subsection{Domain Decomposition}
\label{\detokenize{api/generated/pages/Domain_Decomposition:domain-decomposition-1section-domain-decomp}}\label{\detokenize{api/generated/pages/Domain_Decomposition:id2}}
MOM6 supports serial, OpenMP, and MPI computations, with the user choosing between them at run time. All are accomplished through domain decomposition in the horizontal. All of the horizontal operations are explicit with a relatively small footprint, so the tiling is a logical choice. Some goals in the parallel design of MOM6 were:
\begin{itemize}
\item {} 
Don’t hard\sphinxhyphen{}code the number of processes.

\item {} 
MPI and OpenMP share the same basic structure.

\item {} 
Don’t break the serial optimizations.

\item {} 
Same result as serial code for any number of processes.

\item {} 
Portability \sphinxhyphen{} able to run on any (Unix) system.

\end{itemize}

The whole horizontal MOM6 grid is shown in {\hyperref[\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing-1section-memory}]{\sphinxcrossref{\DUrole{std,std-ref}{Declaration of variables}}}} . The computations are done over the cells inside the darker line; the cells are numbered 1 to NIGLOBAL in the \(x\) \sphinxhyphen{}direction and 1 to NJGLOBAL in the \(y\) \sphinxhyphen{}direction. Those looking ahead to running in parallel would be wise to include factors of two and three in their choice of NIGLOBAL and NJGLOBAL when building new grids. MOM6 will run in parallel with any values of these, but the computations might not be load\sphinxhyphen{}balanced.


\subsection{Wide Halos}
\label{\detokenize{api/generated/pages/Domain_Decomposition:wide-halos}}\label{\detokenize{api/generated/pages/Domain_Decomposition:domain-decomposition-1section-wide-halos}}

\section{Parallel I/O}
\label{\detokenize{api/generated/pages/Parallel_IO:parallel-i-o}}\label{\detokenize{api/generated/pages/Parallel_IO:parallel-io}}\label{\detokenize{api/generated/pages/Parallel_IO::doc}}
Parallel I/O

The model can be told to write a different output file per process. This may or may not save time, and is a bad idea on Lustre filesystems. If the model is writing individual files per process, one can combine them using the mppnccombine program from the
\sphinxhref{https://github.com/NOAA-GFDL/FRE-NCtools}{FRE\sphinxhyphen{}nctools package}
.


\chapter{Testing of MOM6}
\label{\detokenize{testing:testing-of-mom6}}\label{\detokenize{testing::doc}}

\section{Testing}
\label{\detokenize{api/generated/pages/Testing:testing}}\label{\detokenize{api/generated/pages/Testing:id1}}\label{\detokenize{api/generated/pages/Testing::doc}}
MOM6 Validation and Verification

In the software engineering world, people talk about validation and verification of their codes. Verification is the confirmation of design specifications, such as:
\begin{itemize}
\item {} 
Does it compile on the target platform?

\item {} 
Is it dimensionally consistent?

\item {} 
Do answers change with the number of processes?

\item {} 
Do answers change after a restart?

\end{itemize}

Validation is a little trickier:
\begin{itemize}
\item {} 
Does the model meet operational needs?

\item {} 
Does it produce realistic simulations?

\item {} 
Are relevant physical features present?

\item {} 
Can I reproduce my old simulations?

\end{itemize}

There are a number of ways in which MOM6 is tested before each commit, especially commits to the shared dev/main branch.


\subsection{Travis Testing}
\label{\detokenize{api/generated/pages/Testing:travis-testing}}\label{\detokenize{api/generated/pages/Testing:testing-1travis}}
When pushing code to github, it is possible to set it up so that testing is performed automatically by travis. For MOM6, the .travis.yml file is executed, causing the code to be compiled and then run on all the tests in the .testing directory. It is also possible to run these tests on your local machine, but you might have to do some setup first. See

\sphinxstylestrong{See also}

../../../.testing/README.md for more information.


\subsection{Consortium Testing}
\label{\detokenize{api/generated/pages/Testing:consortium-testing}}\label{\detokenize{api/generated/pages/Testing:testing-1consortium-testing}}
For commits to the dev/main branch, there is an opportunity for all consortium members to weigh in on proposed updates. A view of the consortium is shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{consortium}.png}
\caption{The MOM6 consortium.}\label{\detokenize{api/generated/pages/Testing:id2}}\end{figure}

Each group is expected to have their own tests and to keep track of expected answers when these tests are run to be compared to prior answers after the code is updated. Answer\sphinxhyphen{}changing updates have to be evaluated carefully, though there are circumstances in which the new answers may well be “better”.


\subsection{Novel Tests}
\label{\detokenize{api/generated/pages/Testing:novel-tests}}\label{\detokenize{api/generated/pages/Testing:testing-1novel-tests}}
There are two classes of tests which MOM6 performs within the .testing suite which could be considered unusual, but which can be quite useful for finding bugs.


\subsubsection{Scaling tests}
\label{\detokenize{api/generated/pages/Testing:scaling-tests}}\label{\detokenize{api/generated/pages/Testing:testing-1scalings}}
The equations of motion can be multiplied by factors of two without changing answers. One can use that to scale each of six units by a different factor of two to check for consistent use of units. For instance, the equation:
\begin{equation*}
\begin{split}u^{n+1} = u^n + \Delta t \times \cal{F}\end{split}
\end{equation*}
can be scaled as:
\begin{equation*}
\begin{split}{2^{L-T}} u^{n+1} = {2^{L-T}} u^n + {2^T} \Delta t \times {2^{L-2T}} \cal{F}\end{split}
\end{equation*}
MOM6 has been recoded to include six different scale factors:


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|T|}
\hline
\sphinxstyletheadfamily 
Unit
&\sphinxstyletheadfamily 
Scaling
&\sphinxstyletheadfamily 
Name
\\
\hline
s
&
T
&
Time
\\
\hline
m
&
L
&
Horizontal length
\\
\hline
m
&
H
&
Layer thickness
\\
\hline
m
&
Z
&
Vertical length
\\
\hline
kg/m3
&
R
&
Density
\\
\hline
J/kg
&
Q
&
Enthalpy
\\
\hline
\end{tabulary}
\par
\sphinxattableend\end{savenotes}

You can add these integer scaling factors through the runtime parameters X\_RESCALE\_POWER, where X is one of T, L, H, Z, R, or Q. The valid range for these is \sphinxhyphen{}300 to 300.

When adding contributions to MOM6, this coding style with the scale factors must be maintained. For example, if you add new parameters to read from the input file:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{call}  \PYG{n}{get\PYGZus{}param}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{DT}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}  \PYG{p}{,}  \PYG{n}{scale}\PYG{o}{=}\PYG{n}{US}\PYG{o}{\PYGZpc{}}\PYG{n}{s\PYGZus{}to\PYGZus{}T}\PYG{p}{)}
\end{sphinxVerbatim}

This is also required for explicit contants, though we are trying to move those out of the code:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{ustar}  \PYG{o}{=}  \PYG{l+m+mf}{0.01}  \PYG{o}{*}  \PYG{n}{US}\PYG{o}{\PYGZpc{}}\PYG{n}{m\PYGZus{}to\PYGZus{}Z}  \PYG{o}{*}  \PYG{n}{US}\PYG{o}{\PYGZpc{}}\PYG{n}{T\PYGZus{}to\PYGZus{}s}
\end{sphinxVerbatim}

or for adding diagnostics:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{call}  \PYG{n}{register\PYGZus{}diag\PYGZus{}field}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,}  \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{u}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}  \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}  \PYG{p}{,}  \PYG{o}{\PYGZam{}}
       \PYG{n}{conversion}\PYG{o}{=}\PYG{n}{US}\PYG{o}{\PYGZpc{}}\PYG{n}{L\PYGZus{}T\PYGZus{}to\PYGZus{}m\PYGZus{}s}\PYG{p}{)}
\end{sphinxVerbatim}

\sphinxstylestrong{See also}

{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_scaling()}}}}}


\subsubsection{Rotational tests}
\label{\detokenize{api/generated/pages/Testing:rotational-tests}}\label{\detokenize{api/generated/pages/Testing:testing-1rotations}}
By setting the runtime option ROTATE\_INDEX to True, the model rotates the domain by some number of 90 degree turns. This option can be used to look for bugs in which east\sphinxhyphen{}west operations do not match north\sphinxhyphen{}south operations. It changes the order of array elements as shown here:

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics{{Rotated_indices}.png}
\caption{The original non\sphinxhyphen{}rotated domain is shown on the left while the right shows the domain rotated counterclockwise by 90 degrees. The array values are shown by the (invariant) colors, while the array indices (and dimensions) change.}\label{\detokenize{api/generated/pages/Testing:id3}}\end{figure}

It only currently runs in serial mode. One can ask for rotations of 90, 180, or 270 degrees, but only 90 degree turns are supported if there are open boundaries.

Because order matters in numerical computations, care must be taken for four\sphinxhyphen{}way averages to match between rotated and non\sphinxhyphen{}rotated runs. Say you want to compute the following quantity:
\begin{equation*}
\begin{split}\phi_{i,j}^{(c)} = \frac{1}{4} (\phi_A + \phi_B + \phi_C + \phi_D)\end{split}
\end{equation*}
as shown in this diagram:

You might write this first as:
\begin{equation*}
\begin{split}\frac{1}{4} ((\phi_A + \phi_B) + (\phi_C + \phi_D))\end{split}
\end{equation*}
as shown on the left in this figure:

However, the round\sphinxhyphen{}off errors could give differing answers when rotated. Instead, you want to group the terms on the diagonal as shown in the right of the above figure and here:
\begin{equation*}
\begin{split}\frac{1}{4} ((\phi_A + \phi_D) + (\phi_B + \phi_C))\end{split}
\end{equation*}

\chapter{API Reference}
\label{\detokenize{apiref:api-reference}}\label{\detokenize{apiref:id1}}\label{\detokenize{apiref::doc}}
This API reference is a partial image of the complete API documentation.
The pages you find here are linkable \sphinxhyphen{} the url for the page is static.
The complete API documentation is generated with doxygen and can be found at \sphinxurl{http://noaa-gfdl.github.io/MOM6/APIs/}.


\section{Modules}
\label{\detokenize{api/modules:modules}}\label{\detokenize{api/modules:id1}}\label{\detokenize{api/modules::doc}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialization}}}}}
&
Configures the model for the geostrophic adjustment test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer}}}}}
&
This tracer package is used to test advection schemes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod}}}}}
&
A dummy version of {\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod()}}}}} module for use when the vastly larger FMS package is not needed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{baroclinic\_zone\_initialization}}}}}
&
Initial conditions for an idealized baroclinic zone.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder}}}}}
&
An idealized topography building system.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialization}}}}}
&
Initialization for the “bench mark” configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_initialization}}}}}
&
Initialization of the boundary\sphinxhyphen{}forced\sphinxhyphen{}basing configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_surface\_forcing}}}}}
&
Surface forcing for the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer}}}}}
&
Implements a boundary impulse response tracer to calculate Green’s functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/circle_obcs_initialization:f/circle_obcs_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circle\_obcs\_initialization}}}}}
&
Configures the model for the “circle\_obcs” experiment which tests Open Boundary Conditions radiating an SSH anomaly.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt}}}}}
&
Regrid columns for the adaptive coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom}}}}}
&
Regrid columns for the HyCOM coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho}}}}}
&
Regrid columns for the continuous isopycnal (rho) coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma}}}}}
&
Regrid columns for the sigma coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight}}}}}
&
Regrid columns for the SLight coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike}}}}}
&
Regrid columns for a z\sphinxhyphen{}like coordinate (z\sphinxhyphen{}star, z\sphinxhyphen{}level)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialization}}}}}
&
Initialization routines for the dense water formation and overflow experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization}}}}}
&
Initialization of the 2D DOME experiment with density water initialized on a coastal shelf.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization}}}}}
&
Configures the model for the “DOME” experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer}}}}}
&
A tracer package that is used as a diagnostic in the DOME experiments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialization}}}}}
&
Configures the model for the idealized dumbbell test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing}}}}}
&
Surface forcing for the dumbbell test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_initialization}}}}}
&
Initialization for the dyed\_channel configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer}}}}}
&
This tracer package dyes flow through open boundaries.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obcs\_initialization}}}}}
&
Dyed open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/external_gwave_initialization:f/external_gwave_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{external\_gwave\_initialization}}}}}
&
Initialization for the “external gravity wave wave” configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/fms_coupler_util:f/fms_coupler_util}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fms\_coupler\_util}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils}}}}}
&
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils()}}}}} module consists of core utility subroutines to be used by all generic tracer modules. These include the lowest level functions for adding, allocating memory, and record keeping of individual generic tracers irrespective of their physical/chemical nature.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer}}}}}
&
A non\sphinxhyphen{}functioning template of the GFDL ocean BGC.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example}}}}}
&
A tracer package of ideal age tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane}}}}}
&
Forcing for the idealized hurricane and SCM\_idealized\_hurricane examples.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization}}}}}
&
Configures the ISOMIP test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer}}}}}
&
Routines used to set up and use a set of (one for now) dynamically passive tracers in the ISOMIP configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/kdtree:f/kdtree}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kdtree}}}}}
&
A null version of K\sphinxhyphen{}d tree from geoKdTree.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialization}}}}}
&
Configures the model for the Kelvin wave experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/lock_exchange_initialization:f/lock_exchange_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lock\_exchange\_initialization}}}}}
&
Initialization of the “lock exchange” experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_surface\_forcing}}}}}
&
Sets forcing for the MESO configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom}}}}}
&
The central module of the MOM6 ocean model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale}}}}}
&
This module contains the main regridding routines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge}}}}}
&
This module contains the routines used to apply sponge layers when using the ALE mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_array\_transform}}}}}
&
Module for supporting the rotation of a field’s index map.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic}}}}}
&
Baropotric solver.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing}}}}}
&
Interface to background mixing schemes, including the Bryan and Lewis (1979) which is applied via CVMix.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update}}}}}
&
Controls where open boundary conditions are applied.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer}}}}}
&
Build mixed layer parameterization.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages}}}}}
&
Provides routines that do checksums of groups of MOM variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums}}}}}
&
Routines to calculate checksums of various array and vector types.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms}}}}}
&
Interfaces to non\sphinxhyphen{}domain\sphinxhyphen{}oriented communication subroutines, including the MOM6 reproducing sums facility.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_constants:f/mom_constants}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_constants}}}}}
&
Provides a few physical constants.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity}}}}}
&
Solve the layer continuity equation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm}}}}}
&
Solve the layer continuity equation using the PPM method for layer fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_controlled\_forcing}}}}}
&
Use control\sphinxhyphen{}theory to adjust the surface heat flux and precipitation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization}}}}}
&
Initializes fixed aspects of the related to its vertical coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv}}}}}
&
Accelerations due to the Coriolis force and momentum advection.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock}}}}}
&
Wraps the MPP cpu clock functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv}}}}}
&
Interface to CVMix convection scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff}}}}}
&
Interface to CVMix double diffusion scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp}}}}}
&
Provides the K\sphinxhyphen{}Profile Parameterization (KPP) of Large et al., 1994, via CVMix.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_shear}}}}}
&
Interface to CVMix interior shear schemes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging}}}}}
&
Provides checksumming functions for debugging.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals}}}}}
&
Provides integrals of density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux}}}}}
&
Provides functions for some diabatic processes such as fraxil, brine rejection, tendency due to surface flux divergence.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver}}}}}
&
This routine drives the diabatic/dianeutral physics for MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_manager_wrapper:f/mom_diag_manager_wrapper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_manager\_wrapper}}}}}
&
A simple (very thin) wrapper for register\_diag\_field to avoid a compiler bug with PGI.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator}}}}}
&
The subroutines here provide convenient wrappers to the fms diag\_manager interfaces with additional diagnostic capabilies.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap}}}}}
&
provides runtime remapping of diagnostics to z star, sigma and rho vertical coordinates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_vkernels}}}}}
&
Provides kernels for single\sphinxhyphen{}column interpolation, re\sphinxhyphen{}integration (re\sphinxhyphen{}mapping of integrated quantities) and intensive\sphinxhyphen{}variable remapping in the vertical.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics}}}}}
&
Calculates any requested diagnostic quantities that are not calculated in the various subroutines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req}}}}}
&
Calculates the energy requirements of mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document}}}}}
&
The subroutines here provide hooks for document generation functions at various levels of granularity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains}}}}}
&
Describes the decomposed MOM domain and has routines for communications across PEs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid}}}}}
&
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines that work on this type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2}}}}}
&
Time step the adiabatic dynamic core of MOM using RK2 method.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit}}}}}
&
Time steps the ocean dynamics with an unsplit quasi 3rd order scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2}}}}}
&
Time steps the ocean dynamics with an unsplit quasi 2nd order Runge\sphinxhyphen{}Kutta scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/MOM_energetic_PBL:f/MOM_energetic_PBL}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_energetic\_PBL}}}}}
&
By Robert Hallberg, 2015.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl}}}}}
&
Energetically consistent planetary boundary layer parameterization.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive}}}}}
&
Diapycnal mixing and advection in isopycnal mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos}}}}}
&
Provides subroutines for quantities specific to the equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_linear}}}}}
&
A simple linear equation of state for sea water with constant coefficients.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_nemo}}}}}
&
The equation of state using the expressions of Roquet et al.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_teos10}}}}}
&
The equation of state using the TEOS10 expressions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_unesco}}}}}
&
The equation of state using the Jackett and McDougall fits to the UNESCO EOS.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_wright}}}}}
&
The equation of state using the Wright 1997 expressions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler}}}}}
&
Routines for error handling and I/O management.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser}}}}}
&
The MOM6 facility to parse input files for runtime parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization}}}}}
&
Initializes fixed aspects of the model, such as horizontal grid metrics, topography and Coriolis.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type}}}}}
&
This module implements boundary forcing for MOM6.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_full\_convection}}}}}
&
Does full convective adjustment of unstable regions via a strong diffusivity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer}}}}}
&
Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_geothermal}}}}}
&
Implemented geothermal heating at the ocean bottom.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input}}}}}
&
Reads the only Fortran name list needed to boot\sphinxhyphen{}strap the model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid}}}}}
&
Provides the ocean grid type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize}}}}}
&
Initializes horizontal grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index}}}}}
&
Defines the horizontal index type (\sphinxcode{\sphinxupquote{hor\_index\_type()}}) used for providing index ranges.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc}}}}}
&
Calculates horizontal viscosity and viscous stresses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding}}}}}
&
Horizontal interpolation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf}}}}}
&
Implements the thermodynamic aspects of ocean / ice\sphinxhyphen{}shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the MOM framework and coding style.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics}}}}}
&
Implements a crude placeholder for a later implementation of full ice shelf dynamics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize}}}}}
&
Initialize ice shelf variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state}}}}}
&
Implements the thermodynamic aspects of ocean / ice\sphinxhyphen{}shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the MOM framework and coding style.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_int\_tide\_input}}}}}
&
Calculates energy input to the internal tides.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_interface\_heights}}}}}
&
Functions for calculating interface heights, including free surface height.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides}}}}}
&
Subroutines that use the ray\sphinxhyphen{}tracing equations to propagate the internal tide energy density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_intrinsic_functions:f/mom_intrinsic_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_intrinsic\_functions}}}}}
&
A module with intrinsic functions that are used by MOM but are not supported by some compilers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io}}}}}
&
This module contains I/O framework code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_isopycnal\_slopes}}}}}
&
Calculations of isoneutral slopes and stratification.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear}}}}}
&
Shear\sphinxhyphen{}dependent mixing following Jackson et al.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion}}}}}
&
Calculates and applies diffusive fluxes as a parameterization of lateral mixing (non\sphinxhyphen{}neutral) by mesoscale eddies near the top and bottom (to be implemented) boundary layers of the ocean.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs}}}}}
&
Variable mixing coefficients.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_marine\_ice}}}}}
&
Routines incorporating the effects of marine ice (sea\sphinxhyphen{}ice and icebergs) into the ocean model dynamics and thermodynamics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke}}}}}
&
Implements the Mesoscale Eddy Kinetic Energy framework with topographic beta effect included in computing beta in Rhines scale.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke_types:f/mom_meke_types}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke\_types}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat}}}}}
&
Parameterization of mixed layer restratification by unresolved mixed\sphinxhyphen{}layer eddies.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion}}}}}
&
A column\sphinxhyphen{}wise toolbox for implementing neutral diffusion.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics}}}}}
&
Provides a mechanism for recording diagnostic variables that are no longer valid, along with their replacement name if appropriate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params}}}}}
&
Methods for testing for, and list of, obsolete run\sphinxhyphen{}time parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc}}}}}
&
Simulates CFCs using the OCMIP2 protocols.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/MOM_oda_driver_mod:f/MOM_oda_driver_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_oda\_driver\_mod}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod}}}}}
&
Interfaces for MOM6 ensembles and data assimilation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux}}}}}
&
Contains routines related to offline transport of tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main}}}}}
&
The routines here implement the offline tracer algorithm used in MOM6.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity}}}}}
&
Routines used to calculate the opacity of the ocean.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary}}}}}
&
Controls where open boundary conditions are applied.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pointaccel}}}}}
&
Debug accelerations at a given point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce}}}}}
&
A thin wrapper for Boussinesq/non\sphinxhyphen{}Boussinesq forms of the pressure force calculation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv}}}}}
&
Finite volume pressure gradient (integrated by quadrature or analytically)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont}}}}}
&
Provides the Montgomery potential form of pressure gradient.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_random}}}}}
&
Provides gridded random number capability.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding}}}}}
&
Generates vertical grids as part of the ALE algorithm.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers}}}}}
&
Provides regularization of layers in isopycnal mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping}}}}}
&
Provides column\sphinxhyphen{}wise vertical remapping functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart}}}}}
&
The MOM6 facility for reading and writing restart files, and querying what has been read.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_safe\_alloc}}}}}
&
Convenience functions for safely allocating memory without accidentally reallocating pointer and causing memory leaks.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity}}}}}
&
Calculate vertical diffusivity from all mixing processes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc}}}}}
&
Calculates various values related to the bottom boundary layer, such as the viscosity and thickness of the BBL (set\_viscous\_BBL).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization}}}}}
&
Code that initializes fixed aspects of the model grid, such as horizontal grid metrics, topography and Coriolis, and can be shared between components.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means}}}}}
&
Functions and routines to take area, volume, mass\sphinxhyphen{}weighted, layerwise, zonal or meridional means.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge}}}}}
&
Implements sponge regions in isopycnal mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization}}}}}
&
Initialization functions for state variables, u, v, h, T and S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions}}}}}
&
Handy functions for manipulating strings.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output}}}}}
&
Reports integrated quantities for monitoring the model state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing}}}}}
&
Functions that calculate the surface wind stresses and fluxes of buoyancy or temperature/salinity andfresh water, in ocean\sphinxhyphen{}only (solo) mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tfreeze}}}}}
&
Freezing point expressions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse}}}}}
&
Thickness diffusion (or Gent McWilliams)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing}}}}}
&
Tidal contributions to geopotential.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing}}}}}
&
Interface to vertical tidal mixing schemes including CVMix tidal mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager}}}}}
&
Wraps the FMS time manager functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_advect}}}}}
&
This module contains the subroutines that advect tracers along coordinate surfaces.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic}}}}}
&
This module contains routines that implement physical fluxes of tracers (e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/MOM_tracer_flow_control:f/MOM_tracer_flow_control}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_tracer\_flow\_control}}}}}
&
By Will Cooke, April 2003 Edited by Elizabeth Yankovsky, May 2019.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control}}}}}
&
Orchestrates the registration and calling of tracer packages.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff}}}}}
&
Main routine for lateral (along surface or neutral) diffusion of tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z}}}}}
&
Initializes hydrography from z\sphinxhyphen{}coordinate climatology files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry}}}}}
&
This module contains the \sphinxcode{\sphinxupquote{tracer\_registry\_type()}} and the subroutines that handle registration of tracers and related subroutines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init}}}}}
&
Used to initialize tracers from a depth\sphinxhyphen{} (or z*\sphinxhyphen{}) space file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid}}}}}
&
Module with routines for copying information from a shared dynamic horizontal grid to an ocean\sphinxhyphen{}specific horizontal grid and the reverse.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms}}}}}
&
Support functions and interfaces to permit transformed model domains to interact with FMS operations registered on the non\sphinxhyphen{}transformed domains.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_scaling}}}}}
&
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests}}}}}
&
Invokes unit tests in all modules that have them.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_variables}}}}}
&
Provides transparent structures with groups of MOM6 variables and supporting routines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction}}}}}
&
Implements vertical viscosity (vertvisc)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid}}}}}
&
Provides a transparent vertical ocean grid type and supporting routines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface}}}}}
&
Interface for surface waves.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed}}}}}
&
Routines for calculating baroclinic wave speeds.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_structure}}}}}
&
Vertical structure functions for first baroclinic mode wave speed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime}}}}}
&
A module to monitor the overall CPU time used by MOM6 and project when to stop the model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/NETCDF:f/NETCDF}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NETCDF}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/netcdf:f/netcdf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{netcdf}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialization}}}}}
&
Initialization for the “Neverworld” configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_da\_core\_mod}}}}}
&
A set of dummy interfaces for compiling the MOM6 DA driver code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_da\_types\_mod}}}}}
&
Dummy aata structures and methods for ocean data assimilation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod}}}}}
&
Top\sphinxhyphen{}level module for the MOM6 ocean model in coupled mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer}}}}}
&
A tracer package to mimic dissolved oil.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_functions}}}}}
&
Linear interpolation functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_functions}}}}}
&
Cubic interpolation functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/PCM_functions:f/PCM_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PCM\_functions}}}}}
&
Date of creation: 2008.06.06 L.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pcm_functions:f/pcm_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcm\_functions}}}}}
&
Piecewise constant reconstruction functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialization}}}}}
&
Initialization for the “Phillips” channel configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions}}}}}
&
Piecewise linear reconstruction functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polynomial\_functions}}}}}
&
Polynomial functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions}}}}}
&
Provides functions used with the Piecewise\sphinxhyphen{}Parabolic\sphinxhyphen{}Method in the vertical ALE algorithm.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions}}}}}
&
Piecewise quartic reconstruction functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer}}}}}
&
A tracer package that mimics salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes}}}}}
&
A tracer package for using dyes to diagnose regional flows.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts}}}}}
&
Contains constants for interpreting input parameters that control regridding.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values}}}}}
&
Edge value estimation for high\sphinxhyphen{}order resconstruction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp}}}}}
&
Vertical interpolation for regridding.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers}}}}}
&
Solvers of linear systems.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_initialization}}}}}
&
\textless{}undocumented\textgreater{}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer}}}}}
&
This module contains the routines used to set up a dynamically passive tracer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization}}}}}
&
Initial conditions for the 2D Rossby front test.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests}}}}}
&
Initial conditions and forcing for the single column model (SCM) CVMix test set.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialization}}}}}
&
Configures the model for the idealized seamount test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_initialization}}}}}
&
Configures the model for the idealized shelfwave test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sloshing\_initialization}}}}}
&
Initialization for the “sloshing” internal waves configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{soliton\_initialization}}}}}
&
Initial conditions for the Equatorial Rossby soliton test (Boyd).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/supercritical_initialization:f/supercritical_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{supercritical\_initialization}}}}}
&
The “super critical” configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_bay\_initialization}}}}}
&
Configures the model for the “tidal\_bay” experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/tidal_forcing:f/tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing}}}}}
&
Code by Robert Hallberg, August 2005, based on C\sphinxhyphen{}code by Harper Simmons, February, 2003, in turn based on code by Brian Arbic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity}}}}}
&
Increments the diapycnal diffusivity in a specified band of latitudes and densities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization}}}}}
&
A template of a user to code up customized initial conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing}}}}}
&
Provides a template for users to code updating the forcing fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_shelf\_init}}}}}
&
This module specifies the initial values and evolving properties of the MOM6 ice shelf, using user\sphinxhyphen{}provided code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing}}}}}
&
Template for user to code up surface forcing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example}}}}}
&
A sample tracer package that has striped initial conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod}}}}}
&
Dummy interfaces for writing ODA data.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsection{adjustment\_initialization module reference}
\label{\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization}}\label{\detokenize{api/generated/modules/adjustment_initialization:adjustment-initialization-module-reference}}\label{\detokenize{api/generated/modules/adjustment_initialization::doc}}\index{adjustment\_initialization (module)@\spxentry{adjustment\_initialization}\spxextra{module}|spxpagem}
Configures the model for the geostrophic adjustment test case.

{\hyperref[\detokenize{api/generated/modules/adjustment_initialization:detaadjustment-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/adjustment_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialize\_thickness()}}}}}
&
Initializes the layer thicknesses in the adjustment test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialize\_temperature\_salinity()}}}}}
&
Initialization of temperature and salinity in the adjustment test case.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/adjustment_initialization:detailed-description}}\label{\detokenize{api/generated/modules/adjustment_initialization:detaadjustment-initialization}}
Configures the model for the geostrophic adjustment test case.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/adjustment_initialization:function-subroutine-documentation}}\index{adjustment\_initialize\_thickness() (fortran subroutine in module adjustment\_initialization)@\spxentry{adjustment\_initialize\_thickness()}\spxextra{fortran subroutine in module adjustment\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{adjustment\_initialization/}}\sphinxbfcode{\sphinxupquote{adjustment\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes the layer thicknesses in the adjustment test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjustment\_initialize\_temperature\_salinity() (fortran subroutine in module adjustment\_initialization)@\spxentry{adjustment\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module adjustment\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{adjustment\_initialization/}}\sphinxbfcode{\sphinxupquote{adjustment\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initialization of temperature and salinity in the adjustment test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} The temperature that is being initialized.

\item {} 
\sphinxstylestrong{s} :: {[}out{]} The salinity that is being initialized.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The model thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing T \& S.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{advection\_test\_tracer module reference}
\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer}}\label{\detokenize{api/generated/modules/advection_test_tracer:advection-test-tracer-module-reference}}\label{\detokenize{api/generated/modules/advection_test_tracer::doc}}\index{advection\_test\_tracer (module)@\spxentry{advection\_test\_tracer}\spxextra{module}|spxpagem}
This tracer package is used to test advection schemes.

{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:detaadvection-test-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/advection_test_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer\_cs}}}}}
&
The control structure for the advect\_test\_tracer module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/advection_test_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/register_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_advection\_test\_tracer()}}}}}
&
Register tracer fields and subroutines to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/initialize_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_advection\_test\_tracer()}}}}}
&
Initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer\_column\_physics()}}}}}
&
Applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this package.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_stock()}}}}}
&
Calculate the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer\_end()}}}}}
&
Deallocate memory associated with this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/advection_test_tracer:detailed-description}}\label{\detokenize{api/generated/modules/advection_test_tracer:detaadvection-test-tracer}}
This tracer package is used to test advection schemes.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/advection_test_tracer:type-documentation}}\index{advection\_test\_tracer\_cs (fortran type in module advection\_test\_tracer)@\spxentry{advection\_test\_tracer\_cs}\spxextra{fortran type in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{advection\_test\_tracer\_cs}}}
The control structure for the advect\_test\_tracer module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of tracers in this module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The full path to the IC file, or ” ” to initialize internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this subroutine, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr )}\sphinxstyleemphasis{{]}} :: The value of tr used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sponges may be applied somewhere in the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracers\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the tracers may be set up via the initialization code if they are not found in the restart files. Otherwise it is a fatal error if the tracers are not found in the restart files of a restarted run.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_origin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameters describing the test functions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_width}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameters describing the test functions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y\_origin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameters describing the test functions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y\_width}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameters describing the test functions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/advection_test_tracer:function-subroutine-documentation}}\index{register\_advection\_test\_tracer() (fortran function in module advection\_test\_tracer)@\spxentry{register\_advection\_test\_tracer()}\spxextra{fortran function in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/register_advection_test_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_advection\_test\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register tracer fields and subroutines to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_advection\_test\_tracer.

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_advection\_test\_tracer() (fortran subroutine in module advection\_test\_tracer)@\spxentry{initialize\_advection\_test\_tracer()}\spxextra{fortran subroutine in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/initialize_advection_test_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_advection\_test\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}}{}
Initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_advection\_test\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: Pointer to the control structure for the sponges.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{advection\_test\_tracer\_column\_physics() (fortran subroutine in module advection\_test\_tracer)@\spxentry{advection\_test\_tracer\_column\_physics()}\spxextra{fortran subroutine in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{advection\_test\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
Applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this package. This is a simple example of a set of advected passive tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_advection\_test\_tracer.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{advection\_test\_tracer\_surface\_state() (fortran subroutine in module advection\_test\_tracer)@\spxentry{advection\_test\_tracer\_surface\_state()}\spxextra{fortran subroutine in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{advection\_test\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_advection\_test\_tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{advection\_test\_stock() (fortran function in module advection\_test\_tracer)@\spxentry{advection\_test\_stock()}\spxextra{fortran function in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{advection\_test\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Calculate the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_advection\_test\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} the names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} the units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} the coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: the number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{advection\_test\_tracer\_end() (fortran subroutine in module advection\_test\_tracer)@\spxentry{advection\_test\_tracer\_end()}\spxextra{fortran subroutine in module advection\_test\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{advection\_test\_tracer/}}\sphinxbfcode{\sphinxupquote{advection\_test\_tracer\_end}}}{\emph{CS}}{}
Deallocate memory associated with this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_advection\_test\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{atmos\_ocean\_fluxes\_mod module reference}
\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod}}\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:atmos-ocean-fluxes-mod-module-reference}}\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod::doc}}\index{atmos\_ocean\_fluxes\_mod (module)@\spxentry{atmos\_ocean\_fluxes\_mod}\spxextra{module}|spxpagem}
A dummy version of {\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod()}}}}} module for use when the vastly larger FMS package is not needed.
module for use when the vastly larger FMS package is not needed.

{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:detaatmos-ocean-fluxes-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aof\_set\_coupler\_flux()}}}}}
&
This subroutine duplicates an interface used by the FMS coupler, but only returns a value of \sphinxhyphen{}1.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:detailed-description}}\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:detaatmos-ocean-fluxes-mod}}
A dummy version of {\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod()}}}}} module for use when the vastly larger FMS package is not needed.
module for use when the vastly larger FMS package is not needed.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:function-subroutine-documentation}}\index{aof\_set\_coupler\_flux() (fortran function in module atmos\_ocean\_fluxes\_mod)@\spxentry{aof\_set\_coupler\_flux()}\spxextra{fortran function in module atmos\_ocean\_fluxes\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod/}}\sphinxbfcode{\sphinxupquote{aof\_set\_coupler\_flux}}}{\emph{name}, \emph{flux\_type}, \emph{implementation}, \emph{atm\_tr\_index}, \emph{param}, \emph{flag}, \emph{mol\_wt}, \emph{ice\_restart\_file}, \emph{ocean\_restart\_file}, \emph{units}, \emph{caller}, \emph{verbosity}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This subroutine duplicates an interface used by the FMS coupler, but only returns a value of \sphinxhyphen{}1. None of the arguments are used for anything.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{flux\_type} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{implementation} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{atm\_tr\_index} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{param} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{flag} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{mol\_wt} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{ice\_restart\_file} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{ocean\_restart\_file} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{units} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{caller} :: {[}in{]} An unused argument

\item {} 
\sphinxstylestrong{verbosity} :: {[}in{]} An unused argument

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/flux_init_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::flux\_init\_ocmip2\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/register_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::register\_advection\_test\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::register\_boundary\_impulse\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/register_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::register\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::register\_dye\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/register_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::register\_dyed\_obc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::register\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/register_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::register\_isomip\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::register\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_register_tracer_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_register\_tracer\_example}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{baroclinic\_zone\_initialization module reference}
\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization}}\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:baroclinic-zone-initialization-module-reference}}\label{\detokenize{api/generated/modules/baroclinic_zone_initialization::doc}}\index{baroclinic\_zone\_initialization (module)@\spxentry{baroclinic\_zone\_initialization}\spxextra{module}|spxpagem}
Initial conditions for an idealized baroclinic zone.

{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:detabaroclinic-zone-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/bcz_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bcz\_params()}}}}}
&
Reads the parameters unique to this module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/baroclinic_zone_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{baroclinic\_zone\_init\_temperature\_salinity()}}}}}
&
Initialization of temperature and salinity with the baroclinic zone initial conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:detailed-description}}\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:detabaroclinic-zone-initialization}}

\paragraph{Description of the baroclinic zone initial conditions}
\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:description-of-the-baroclinic-zone-initial-conditions}}\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:namespacebaroclinic-zone-initialization-1section-baroclinic-zone}}
yada yada yada


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:function-subroutine-documentation}}\index{bcz\_params() (fortran subroutine in module baroclinic\_zone\_initialization)@\spxentry{bcz\_params()}\spxextra{fortran subroutine in module baroclinic\_zone\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/bcz_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{baroclinic\_zone\_initialization/}}\sphinxbfcode{\sphinxupquote{bcz\_params}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{S\_ref}, \emph{dSdz}, \emph{delta\_S}, \emph{dSdx}, \emph{T\_ref}, \emph{dTdz}, \emph{delta\_T}, \emph{dTdx}, \emph{L\_zone}, \emph{just\_read\_params}}{}
Reads the parameters unique to this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{s\_ref} :: {[}out{]} Reference salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{dsdz} :: {[}out{]} Salinity stratification {[}ppt Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} ppt m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{delta\_s} :: {[}out{]} Salinity difference across baroclinic zone {[}ppt{]}

\item {} 
\sphinxstylestrong{dsdx} :: {[}out{]} Linear salinity gradient {[}ppt m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{t\_ref} :: {[}out{]} Reference temperature {[}degC{]}

\item {} 
\sphinxstylestrong{dtdz} :: {[}out{]} Temperature stratification {[}degC Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} degC m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{delta\_t} :: {[}out{]} Temperature difference across baroclinic zone {[}degC{]}

\item {} 
\sphinxstylestrong{dtdx} :: {[}out{]} Linear temperature gradient in {[}degC Gx\_axis\_units\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{l\_zone} :: {[}out{]} Width of baroclinic zone in {[}Gx\_axis\_units{]}

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::closeparameterblock}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::openparameterblock}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/baroclinic_zone_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{baroclinic\_zone\_init\_temperature\_salinity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{baroclinic\_zone\_init\_temperature\_salinity() (fortran subroutine in module baroclinic\_zone\_initialization)@\spxentry{baroclinic\_zone\_init\_temperature\_salinity()}\spxextra{fortran subroutine in module baroclinic\_zone\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/baroclinic_zone_init_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{baroclinic\_zone\_initialization/}}\sphinxbfcode{\sphinxupquote{baroclinic\_zone\_init\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialization of temperature and salinity with the baroclinic zone initial conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The model thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing T \& S.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/bcz_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bcz\_params}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{basin\_builder module reference}
\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder}}\label{\detokenize{api/generated/modules/basin_builder:basin-builder-module-reference}}\label{\detokenize{api/generated/modules/basin_builder::doc}}\index{basin\_builder (module)@\spxentry{basin\_builder}\spxextra{module}|spxpagem}
An idealized topography building system.

{\hyperref[\detokenize{api/generated/modules/basin_builder:detabasin-builder}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/basin_builder:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography()}}}}}
&
Constructs idealized topography from simple functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cone()}}}}}
&
Returns the value of a triangular function centered at x=x0 with value 1 and linearly decreasing to 0 at x=x0+/\sphinxhyphen{}L, and 0 otherwise.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve()}}}}}
&
Returns an s\sphinxhyphen{}curve s(x) s.t.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof()}}}}}
&
Returns a “coastal” profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x()}}}}}
&
Distance between points x,y and a line segment (x0,y0) and (x0,y1).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_y()}}}}}
&
Distance between points x,y and a line segment (x0,y0) and (x1,y0).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast()}}}}}
&
A “coast profile” applied in an N\sphinxhyphen{}S line from lonC,lat0 to lonC,lat1.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast()}}}}}
&
A “coast profile” applied in an E\sphinxhyphen{}W line from lon0,latC to lon1,latC.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_conic\_ridge()}}}}}
&
A NS ridge with a cone profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_scurve\_ridge()}}}}}
&
A NS ridge with an scurve profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_conic\_ridge()}}}}}
&
A circular ridge with cutoff conic profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_scurve\_ridge()}}}}}
&
A circular ridge with cutoff scurve profile.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/basin_builder:detailed-description}}\label{\detokenize{api/generated/modules/basin_builder:detabasin-builder}}
An idealized topography building system.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/basin_builder:function-subroutine-documentation}}\index{basin\_builder\_topography() (fortran subroutine in module basin\_builder)@\spxentry{basin\_builder\_topography()}\spxextra{fortran subroutine in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{basin\_builder\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
Constructs idealized topography from simple functions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_conic\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_scurve\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_conic\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_scurve\_ridge}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cone() (fortran function in module basin\_builder)@\spxentry{cone()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/cone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{cone}}}{\emph{x}, \emph{x0}, \emph{L}, \emph{clip}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the value of a triangular function centered at x=x0 with value 1 and linearly decreasing to 0 at x=x0+/\sphinxhyphen{}L, and 0 otherwise. If clip is present the top of the cone is cut off at “clip”, which effectively defaults to 1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} position of peak {[}nondim{]}

\item {} 
\sphinxstylestrong{l} :: {[}in{]} half\sphinxhyphen{}width of base of cone {[}nondim{]}

\item {} 
\sphinxstylestrong{clip} :: {[}in{]} clipping height of cone {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_conic\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_conic\_ridge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scurve() (fortran function in module basin\_builder)@\spxentry{scurve()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/scurve}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{scurve}}}{\emph{x}, \emph{x0}, \emph{L}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns an s\sphinxhyphen{}curve s(x) s.t. s(x0)\textless{}=0, s(x0+L)\textgreater{}=1 and cubic in between.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} position of peak {[}nondim{]}

\item {} 
\sphinxstylestrong{l} :: {[}in{]} half\sphinxhyphen{}width of base of cone {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_scurve\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_scurve\_ridge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cstprof() (fortran function in module basin\_builder)@\spxentry{cstprof()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/cstprof}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{cstprof}}}{\emph{x}, \emph{x0}, \emph{L}, \emph{lf}, \emph{bf}, \emph{sf}, \emph{sh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns a “coastal” profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} position of peak {[}nondim{]}

\item {} 
\sphinxstylestrong{l} :: {[}in{]} width of profile {[}nondim{]}

\item {} 
\sphinxstylestrong{lf} :: {[}in{]} fraction of width that is “land” {[}nondim{]}

\item {} 
\sphinxstylestrong{bf} :: {[}in{]} fraction of width that is “beach” {[}nondim{]}

\item {} 
\sphinxstylestrong{sf} :: {[}in{]} fraction of width that is “continental slope” {[}nondim{]}

\item {} 
\sphinxstylestrong{sh} :: {[}in{]} depth of shelf as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dist\_line\_fixed\_x() (fortran function in module basin\_builder)@\spxentry{dist\_line\_fixed\_x()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{dist\_line\_fixed\_x}}}{\emph{x}, \emph{y}, \emph{x0}, \emph{y0}, \emph{y1}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Distance between points x,y and a line segment (x0,y0) and (x0,y1).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional x\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{y} :: {[}in{]} non\sphinxhyphen{}dimensional y\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} x\sphinxhyphen{}position of line segment {[}nondim{]}

\item {} 
\sphinxstylestrong{y0} :: {[}in{]} y\sphinxhyphen{}position of line segment end{[}nondim{]}

\item {} 
\sphinxstylestrong{y1} :: {[}in{]} y\sphinxhyphen{}position of line segment end{[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_y}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_conic_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_conic\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_scurve_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_scurve\_ridge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dist\_line\_fixed\_y() (fortran function in module basin\_builder)@\spxentry{dist\_line\_fixed\_y()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{dist\_line\_fixed\_y}}}{\emph{x}, \emph{y}, \emph{x0}, \emph{x1}, \emph{y0}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Distance between points x,y and a line segment (x0,y0) and (x1,y0).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional x\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{y} :: {[}in{]} non\sphinxhyphen{}dimensional y\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} x\sphinxhyphen{}position of line segment end{[}nondim{]}

\item {} 
\sphinxstylestrong{x1} :: {[}in{]} x\sphinxhyphen{}position of line segment end{[}nondim{]}

\item {} 
\sphinxstylestrong{y0} :: {[}in{]} y\sphinxhyphen{}position of line segment {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ns\_coast() (fortran function in module basin\_builder)@\spxentry{ns\_coast()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_coast}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{ns\_coast}}}{\emph{lon}, \emph{lat}, \emph{lonC}, \emph{lat0}, \emph{lat1}, \emph{dlon}, \emph{sh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A “coast profile” applied in an N\sphinxhyphen{}S line from lonC,lat0 to lonC,lat1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lonc} :: {[}in{]} Longitude of coast {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of coast end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lat1} :: {[}in{]} Latitude of coast end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{dlon} :: {[}in{]} “Radius” of coast profile {[}degrees{]}

\item {} 
\sphinxstylestrong{sh} :: {[}in{]} depth of shelf as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ew\_coast() (fortran function in module basin\_builder)@\spxentry{ew\_coast()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/ew_coast}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{ew\_coast}}}{\emph{lon}, \emph{lat}, \emph{latC}, \emph{lon0}, \emph{lon1}, \emph{dlat}, \emph{sh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A “coast profile” applied in an E\sphinxhyphen{}W line from lon0,latC to lon1,latC.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{latc} :: {[}in{]} Latitude of coast {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of coast end {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lon1} :: {[}in{]} Longitude of coast end {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{dlat} :: {[}in{]} “Radius” of coast profile {[}degrees{]}

\item {} 
\sphinxstylestrong{sh} :: {[}in{]} depth of shelf as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_y}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ns\_conic\_ridge() (fortran function in module basin\_builder)@\spxentry{ns\_conic\_ridge()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_conic_ridge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{ns\_conic\_ridge}}}{\emph{lon}, \emph{lat}, \emph{lonC}, \emph{lat0}, \emph{lat1}, \emph{dlon}, \emph{rh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A NS ridge with a cone profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lonc} :: {[}in{]} Longitude of ridge center {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of ridge end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lat1} :: {[}in{]} Latitude of ridge end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{dlon} :: {[}in{]} “Radius” of ridge profile {[}degrees{]}

\item {} 
\sphinxstylestrong{rh} :: {[}in{]} depth of ridge as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cone}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ns\_scurve\_ridge() (fortran function in module basin\_builder)@\spxentry{ns\_scurve\_ridge()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/ns_scurve_ridge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{ns\_scurve\_ridge}}}{\emph{lon}, \emph{lat}, \emph{lonC}, \emph{lat0}, \emph{lat1}, \emph{dlon}, \emph{rh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A NS ridge with an scurve profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lonc} :: {[}in{]} Longitude of ridge center {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of ridge end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lat1} :: {[}in{]} Latitude of ridge end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{dlon} :: {[}in{]} “Radius” of ridge profile {[}degrees{]}

\item {} 
\sphinxstylestrong{rh} :: {[}in{]} depth of ridge as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{circ\_conic\_ridge() (fortran function in module basin\_builder)@\spxentry{circ\_conic\_ridge()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_conic_ridge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{circ\_conic\_ridge}}}{\emph{lon}, \emph{lat}, \emph{lon0}, \emph{lat0}, \emph{ring\_radius}, \emph{ring\_thickness}, \emph{ridge\_height}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A circular ridge with cutoff conic profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of center of ring {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of center of ring {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{ring\_radius} :: {[}in{]} Radius of ring {[}degrees{]}

\item {} 
\sphinxstylestrong{ring\_thickness} :: {[}in{]} Radial thickness of ring {[}degrees{]}

\item {} 
\sphinxstylestrong{ridge\_height} :: {[}in{]} Ridge height as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/cone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cone}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{circ\_scurve\_ridge() (fortran function in module basin\_builder)@\spxentry{circ\_scurve\_ridge()}\spxextra{fortran function in module basin\_builder}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/basin_builder:f/basin_builder/circ_scurve_ridge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{basin\_builder/}}\sphinxbfcode{\sphinxupquote{circ\_scurve\_ridge}}}{\emph{lon}, \emph{lat}, \emph{lon0}, \emph{lat0}, \emph{ring\_radius}, \emph{ring\_thickness}, \emph{ridge\_height}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A circular ridge with cutoff scurve profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of center of ring {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of center of ring {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{ring\_radius} :: {[}in{]} Radius of ring {[}degrees{]}

\item {} 
\sphinxstylestrong{ring\_thickness} :: {[}in{]} Radial thickness of ring {[}degrees{]}

\item {} 
\sphinxstylestrong{ridge\_height} :: {[}in{]} Ridge height as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{benchmark\_initialization module reference}
\label{\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization}}\label{\detokenize{api/generated/modules/benchmark_initialization:benchmark-initialization-module-reference}}\label{\detokenize{api/generated/modules/benchmark_initialization::doc}}\index{benchmark\_initialization (module)@\spxentry{benchmark\_initialization}\spxextra{module}|spxpagem}
Initialization for the “bench mark” configuration.

{\hyperref[\detokenize{api/generated/modules/benchmark_initialization:detabenchmark-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/benchmark_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialize\_topography()}}}}}
&
This subroutine sets up the benchmark test case topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialize\_thickness()}}}}}
&
Initializes layer thicknesses for the benchmark test case, by finding the depths of interfaces in a specified latitude\sphinxhyphen{}dependent temperature profile with an exponentially decaying thermocline on top of a linear stratification.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_init\_temperature\_salinity()}}}}}
&
Initializes layer temperatures and salinities for benchmark.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/benchmark_initialization:detailed-description}}\label{\detokenize{api/generated/modules/benchmark_initialization:detabenchmark-initialization}}
Initialization for the “bench mark” configuration.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/benchmark_initialization:function-subroutine-documentation}}\index{benchmark\_initialize\_topography() (fortran subroutine in module benchmark\_initialization)@\spxentry{benchmark\_initialize\_topography()}\spxextra{fortran subroutine in module benchmark\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{benchmark\_initialization/}}\sphinxbfcode{\sphinxupquote{benchmark\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
This subroutine sets up the benchmark test case topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or {[}Z \textasciitilde{}\textgreater{} m{]} if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{benchmark\_initialize\_thickness() (fortran subroutine in module benchmark\_initialization)@\spxentry{benchmark\_initialize\_thickness()}\spxextra{fortran subroutine in module benchmark\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{benchmark\_initialization/}}\sphinxbfcode{\sphinxupquote{benchmark\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_Ref}, \emph{just\_read\_params}}{}
Initializes layer thicknesses for the benchmark test case, by finding the depths of interfaces in a specified latitude\sphinxhyphen{}dependent temperature profile with an exponentially decaying thermocline on top of a linear stratification.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{benchmark\_init\_temperature\_salinity() (fortran subroutine in module benchmark\_initialization)@\spxentry{benchmark\_init\_temperature\_salinity()}\spxextra{fortran subroutine in module benchmark\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_init_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{benchmark\_initialization/}}\sphinxbfcode{\sphinxupquote{benchmark\_init\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_Ref}, \emph{just\_read\_params}}{}
Initializes layer temperatures and salinities for benchmark.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} The potential temperature that is being initialized.

\item {} 
\sphinxstylestrong{s} :: {[}out{]} The salinity that is being initialized.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{bfb\_initialization module reference}
\label{\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization}}\label{\detokenize{api/generated/modules/bfb_initialization:bfb-initialization-module-reference}}\label{\detokenize{api/generated/modules/bfb_initialization::doc}}\index{bfb\_initialization (module)@\spxentry{bfb\_initialization}\spxextra{module}|spxpagem}
Initialization of the boundary\sphinxhyphen{}forced\sphinxhyphen{}basing configuration.

{\hyperref[\detokenize{api/generated/modules/bfb_initialization:detabfb-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/bfb_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_set\_coord()}}}}}
&
This subroutine specifies the vertical coordinate in terms of temperature at the surface and at the bottom.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_initialize_sponges_southonly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_initialize\_sponges\_southonly()}}}}}
&
This subroutine sets up the sponges for the southern bouundary of the domain.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/write_bfb_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_bfb\_log()}}}}}
&
Write output about the parameter values being used.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/bfb_initialization:detailed-description}}\label{\detokenize{api/generated/modules/bfb_initialization:detabfb-initialization}}
Initialization of the boundary\sphinxhyphen{}forced\sphinxhyphen{}basing configuration.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/bfb_initialization:function-subroutine-documentation}}\index{bfb\_set\_coord() (fortran subroutine in module bfb\_initialization)@\spxentry{bfb\_set\_coord()}\spxextra{fortran subroutine in module bfb\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_set_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{bfb\_initialization/}}\sphinxbfcode{\sphinxupquote{bfb\_set\_coord}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}}{}
This subroutine specifies the vertical coordinate in terms of temperature at the surface and at the bottom. This case is set up in such a way that the temperature of the topmost layer is equal to the SST at the southern edge of the domain. The temperatures are then converted to densities of the top and bottom layers and linearly interpolated for the intermediate layers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/write_bfb_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_bfb\_log}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bfb\_initialize\_sponges\_southonly() (fortran subroutine in module bfb\_initialization)@\spxentry{bfb\_initialize\_sponges\_southonly()}\spxextra{fortran subroutine in module bfb\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_initialize_sponges_southonly}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{bfb\_initialization/}}\sphinxbfcode{\sphinxupquote{bfb\_initialize\_sponges\_southonly}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{use\_temperature}, \emph{tv}, \emph{param\_file}, \emph{CSp}, \emph{h}}{}
This subroutine sets up the sponges for the southern bouundary of the domain. Maximum damping occurs within 2 degrees lat of the boundary. The damping linearly decreases northward over the next 2 degrees.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{use\_temperature} :: {[}in{]} If true, temperature and salinity are used as state variables.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{csp} :: A pointer to the sponge control structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/write_bfb_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_bfb\_log}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_bfb\_log() (fortran subroutine in module bfb\_initialization)@\spxentry{write\_bfb\_log()}\spxextra{fortran subroutine in module bfb\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/write_bfb_log}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{bfb\_initialization/}}\sphinxbfcode{\sphinxupquote{write\_bfb\_log}}}{\emph{param\_file}}{}
Write output about the parameter values being used.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_initialize_sponges_southonly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_initialize\_sponges\_southonly}}}}} {\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_set\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{bfb\_surface\_forcing module reference}
\label{\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing}}\label{\detokenize{api/generated/modules/bfb_surface_forcing:bfb-surface-forcing-module-reference}}\label{\detokenize{api/generated/modules/bfb_surface_forcing::doc}}\index{bfb\_surface\_forcing (module)@\spxentry{bfb\_surface\_forcing}\spxextra{module}|spxpagem}
Surface forcing for the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.

{\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:detabfb-surface-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/bfb_surface_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_surface_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_surface\_forcing\_cs}}}}}
&
Control structure for BFB\_surface\_forcing.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/bfb_surface_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_buoyancy\_forcing()}}}}}
&
Bouyancy forcing for the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_surface\_forcing\_init()}}}}}
&
Initialization for forcing the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/bfb_surface_forcing:detailed-description}}\label{\detokenize{api/generated/modules/bfb_surface_forcing:detabfb-surface-forcing}}
Surface forcing for the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/bfb_surface_forcing:type-documentation}}\index{bfb\_surface\_forcing\_cs (fortran type in module bfb\_surface\_forcing)@\spxentry{bfb\_surface\_forcing\_cs}\spxextra{fortran type in module bfb\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_surface_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{bfb\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{bfb\_surface\_forcing\_cs}}}
Control structure for BFB\_surface\_forcing.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temperature and salinity are used as state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restorebuoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use restoring surface buoyancy forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The restoring rate at the surface {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant unresolved background gustiness that contributes to ustar {[}Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sst\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: SST at the southern edge of the linear forcing ramp {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sst\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: SST at the northern edge of the linear forcing ramp {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lfrslat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Southern latitude where the linear forcing ramp begins {[}degLat{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lfrnlat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Northern latitude where the linear forcing ramp ends {[}degLat{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drho\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Rate of change of density with temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}. Note that temperature is being used as a dummy variable here. All temperatures are converted into density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/bfb_surface_forcing:function-subroutine-documentation}}\index{bfb\_buoyancy\_forcing() (fortran subroutine in module bfb\_surface\_forcing)@\spxentry{bfb\_buoyancy\_forcing()}\spxextra{fortran subroutine in module bfb\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_buoyancy_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{bfb\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{bfb\_buoyancy\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
Bouyancy forcing for the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the fluxes.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to BFB\_surface\_forcing\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bfb\_surface\_forcing\_init() (fortran subroutine in module bfb\_surface\_forcing)@\spxentry{bfb\_surface\_forcing\_init()}\spxextra{fortran subroutine in module bfb\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{bfb\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{bfb\_surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initialization for forcing the boundary\sphinxhyphen{}forced\sphinxhyphen{}basin (BFB) configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{boundary\_impulse\_tracer module reference}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:boundary-impulse-tracer-module-reference}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer::doc}}\index{boundary\_impulse\_tracer (module)@\spxentry{boundary\_impulse\_tracer}\spxextra{module}|spxpagem}
Implements a boundary impulse response tracer to calculate Green’s functions.

{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:detaboundary-impulse-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer\_cs}}}}}
&
The control structure for the boundary impulse tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_boundary\_impulse\_tracer()}}}}}
&
Read in runtime options and add boundary impulse tracer to tracer registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/initialize_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_boundary\_impulse\_tracer()}}}}}
&
Initialize tracer from restart or set to 1 at surface to initialize.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer\_column\_physics()}}}}}
&
Apply source or sink at boundary and do vertical diffusion.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_stock()}}}}}
&
Calculate total inventory of tracer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer\_end()}}}}}
&
Performs finalization of boundary impulse tracer.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:detailed-description}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:detaboundary-impulse-tracer}}

\paragraph{Boundary Impulse Response Tracer and Transit Time Distributions}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:boundary-impulse-response-tracer-and-transit-time-distributions}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:namespaceboundary-impulse-tracer-1section-bit-desc}}
Transit time distributions (TTD) are the Green’s function solution of the passive tracer equation between the oceanic surface and interior. The name derives from the idea that the ‘age’ (e.g. time since last contact with the atmosphere) of a water parcel is best characterized as a distribution of ages because water parcels leaving the surface arrive at a particular interior point at different times. The more commonly used ideal age tracer is the first moment of the TTD, equivalently referred to as the mean age.

A boundary impulse response (BIR) is a passive tracer whose surface boundary condition is a rectangle function with width
\(\Delta t\) . In the case of unsteady flow, multiple BIRs, initiated at different times in the model can be used to infer the transit time distribution or Green’s function between the oceanic surface and interior. In the case of steady or cyclostationary flow, a single BIR is sufficient.

In the References section, both the theoretical discussion of TTDs and BIRs are listed along with modeling studies which have this used framework in scientific investigations


\paragraph{Run\sphinxhyphen{}time parameters}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:run-time-parameters}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:namespaceboundary-impulse-tracer-1section-bit-params}}
\sphinxhyphen{}DO\_BOUNDARY\_IMPULSE\_TRACER: Enables the boundary impulse tracer model \sphinxhyphen{}IMPULSE\_SOURCE\_TIME: Length of time that the surface layer acts as a source of the BIR tracer


\paragraph{References}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:references}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:namespaceboundary-impulse-tracer-1section-bit-refs}}

\subparagraph{and BIR Theory}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:and-bir-theory}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:namespaceboundary-impulse-tracer-1ttd}}
\sphinxhyphen{}Holzer, M., and T.M. Hall, 2000: Transit\sphinxhyphen{}time and tracer\sphinxhyphen{}age distributions in geophysical flows. J. Atmos. Sci., 57, 3539\sphinxhyphen{}3558, doi:10.1175/1520\sphinxhyphen{}0469(2000)057\textless{}3539:TTATAD\textgreater{}2.0.CO;2. \sphinxhyphen{}T.W.N. Haine, H. Zhang, D.W. Waugh, M. Holzer, On transit\sphinxhyphen{}time distributions in unsteady circulation models, Ocean Modelling, Volume 21, Issues 1\textendash{}2, 2008, Pages 35\sphinxhyphen{}45, ISSN 1463\sphinxhyphen{}5003
\sphinxurl{http://dx.doi.org/10.1016/j.ocemod.2007.11.004}
.


\subparagraph{Modelling applications}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:modelling-applications}}\label{\detokenize{api/generated/modules/boundary_impulse_tracer:namespaceboundary-impulse-tracer-1section-bit-apps}}
\sphinxhyphen{}Peacock, S., and M. Maltrud (2006), Transit\sphinxhyphen{}time distributions in a global ocean model, J. Phys. Oceanogr., 36(3), 474\textendash{}495, doi:10.1175/JPO2860.1. \sphinxhyphen{}Maltrud, M., Bryan, F. \& Peacock, Boundary impulse response functions in a century\sphinxhyphen{}long eddying global ocean simulation, S. Environ Fluid Mech (2010) 10: 275. doi:10.1007/s10652\sphinxhyphen{}009\sphinxhyphen{}9154\sphinxhyphen{}3


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:type-documentation}}\index{boundary\_impulse\_tracer\_cs (fortran type in module boundary\_impulse\_tracer)@\spxentry{boundary\_impulse\_tracer\_cs}\spxextra{fortran type in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{boundary\_impulse\_tracer\_cs}}}
The control structure for the boundary impulse tracer package.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of tracers that are actually used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this subroutine, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracers\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, boundary\_impulse can be initialized if not found in restart file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr\_max )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of layers in mixed layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: A value to use to fill in tracers over land.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kw\_eff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An effective piston velocity used to flux tracer out at the surface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remaining\_source\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: How much longer (same units as the timestep) to inject the tracer at the surface {[}s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the retart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr\_max )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/boundary_impulse_tracer:function-subroutine-documentation}}\index{register\_boundary\_impulse\_tracer() (fortran function in module boundary\_impulse\_tracer)@\spxentry{register\_boundary\_impulse\_tracer()}\spxextra{fortran function in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_boundary\_impulse\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Read in runtime options and add boundary impulse tracer to tracer registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_boundary\_impulse\_tracer.

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr\_max}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_boundary\_impulse\_tracer() (fortran subroutine in module boundary\_impulse\_tracer)@\spxentry{initialize\_boundary\_impulse\_tracer()}\spxextra{fortran subroutine in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/initialize_boundary_impulse_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_boundary\_impulse\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}, \emph{tv}}{}
Initialize tracer from restart or set to 1 at surface to initialize.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_boundary\_impulse\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: Pointer to the control structure for the sponges.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{boundary\_impulse\_tracer\_column\_physics() (fortran subroutine in module boundary\_impulse\_tracer)@\spxentry{boundary\_impulse\_tracer\_column\_physics()}\spxextra{fortran subroutine in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{boundary\_impulse\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{tv}, \emph{debug}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
Apply source or sink at boundary and do vertical diffusion.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_boundary\_impulse\_tracer.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true calculate checksums

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{boundary\_impulse\_stock() (fortran function in module boundary\_impulse\_tracer)@\spxentry{boundary\_impulse\_stock()}\spxextra{fortran function in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{boundary\_impulse\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Calculate total inventory of tracer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_boundary\_impulse\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} The names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} The coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value: the number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{boundary\_impulse\_tracer\_surface\_state() (fortran subroutine in module boundary\_impulse\_tracer)@\spxentry{boundary\_impulse\_tracer\_surface\_state()}\spxextra{fortran subroutine in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{boundary\_impulse\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_boundary\_impulse\_tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{boundary\_impulse\_tracer\_end() (fortran subroutine in module boundary\_impulse\_tracer)@\spxentry{boundary\_impulse\_tracer\_end()}\spxextra{fortran subroutine in module boundary\_impulse\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer/}}\sphinxbfcode{\sphinxupquote{boundary\_impulse\_tracer\_end}}}{\emph{CS}}{}
Performs finalization of boundary impulse tracer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_boundary\_impulse\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{circle\_obcs\_initialization module reference}
\label{\detokenize{api/generated/modules/circle_obcs_initialization:f/circle_obcs_initialization}}\label{\detokenize{api/generated/modules/circle_obcs_initialization:circle-obcs-initialization-module-reference}}\label{\detokenize{api/generated/modules/circle_obcs_initialization::doc}}\index{circle\_obcs\_initialization (module)@\spxentry{circle\_obcs\_initialization}\spxextra{module}|spxpagem}
Configures the model for the “circle\_obcs” experiment which tests Open Boundary Conditions radiating an SSH anomaly.

{\hyperref[\detokenize{api/generated/modules/circle_obcs_initialization:detacircle-obcs-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/circle_obcs_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/circle_obcs_initialization:f/circle_obcs_initialization/circle_obcs_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circle\_obcs\_initialize\_thickness()}}}}}
&
This subroutine initializes layer thicknesses for the circle\_obcs experiment.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/circle_obcs_initialization:detailed-description}}\label{\detokenize{api/generated/modules/circle_obcs_initialization:detacircle-obcs-initialization}}
Configures the model for the “circle\_obcs” experiment which tests Open Boundary Conditions radiating an SSH anomaly.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/circle_obcs_initialization:function-subroutine-documentation}}\index{circle\_obcs\_initialize\_thickness() (fortran subroutine in module circle\_obcs\_initialization)@\spxentry{circle\_obcs\_initialize\_thickness()}\spxextra{fortran subroutine in module circle\_obcs\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/circle_obcs_initialization:f/circle_obcs_initialization/circle_obcs_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{circle\_obcs\_initialization/}}\sphinxbfcode{\sphinxupquote{circle\_obcs\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{just\_read\_params}}{}
This subroutine initializes layer thicknesses for the circle\_obcs experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{coord\_adapt module reference}
\label{\detokenize{api/generated/modules/coord_adapt:f/coord_adapt}}\label{\detokenize{api/generated/modules/coord_adapt:coord-adapt-module-reference}}\label{\detokenize{api/generated/modules/coord_adapt::doc}}\index{coord\_adapt (module)@\spxentry{coord\_adapt}\spxextra{module}|spxpagem}
Regrid columns for the adaptive coordinate.

{\hyperref[\detokenize{api/generated/modules/coord_adapt:detacoord-adapt}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/coord_adapt:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/adapt_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adapt\_cs}}}}}
&
Control structure for adaptive coordinates ({\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt()}}}}}).
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/coord_adapt:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/init_coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_coord\_adapt()}}}}}
&
Initialise an adapt\_CS with parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/end_coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_coord\_adapt()}}}}}
&
Clean up the coordinate control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/set_adapt_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_adapt\_params()}}}}}
&
This subtroutine can be used to set the parameters for {\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/build_adapt_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_adapt\_column()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/coord_adapt:detailed-description}}\label{\detokenize{api/generated/modules/coord_adapt:detacoord-adapt}}
Regrid columns for the adaptive coordinate.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/coord_adapt:type-documentation}}\index{adapt\_cs (fortran type in module coord\_adapt)@\spxentry{adapt\_cs}\spxextra{fortran type in module coord\_adapt}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/adapt_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{coord\_adapt/}}\sphinxbfcode{\sphinxupquote{adapt\_cs}}}
Control structure for adaptive coordinates ({\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt()}}}}}).
).
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of layers/levels.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coordinateresolution}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Nominal near\sphinxhyphen{}surface resolution {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adapttimeratio}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Ratio of optimisation and diffusion timescales.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adaptalpha}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Nondimensional coefficient determining how much optimisation to apply.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adaptzoom}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Near\sphinxhyphen{}surface zooming depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adaptzoomcoeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Near\sphinxhyphen{}surface zooming coefficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adaptbuoycoeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Stratification\sphinxhyphen{}dependent diffusion coefficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adaptdrho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Reference density difference for stratification\sphinxhyphen{}dependent diffusion {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adaptdomin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, form a HYCOM1\sphinxhyphen{}like mixed layet by preventing interfaces from becoming shallower than the depths set by coordinateResolution.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/coord_adapt:function-subroutine-documentation}}\index{init\_coord\_adapt() (fortran subroutine in module coord\_adapt)@\spxentry{init\_coord\_adapt()}\spxextra{fortran subroutine in module coord\_adapt}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/init_coord_adapt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_adapt/}}\sphinxbfcode{\sphinxupquote{init\_coord\_adapt}}}{\emph{CS}, \emph{nk}, \emph{coordinateResolution}, \emph{m\_to\_H}, \emph{kg\_m3\_to\_R}}{}
Initialise an adapt\_CS with parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Unassociated pointer to hold the control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in the grid

\item {} 
\sphinxstylestrong{coordinateresolution} :: {[}in{]} Nominal near\sphinxhyphen{}surface resolution {[}m{]} or other units specified with m\_to\_H

\item {} 
\sphinxstylestrong{m\_to\_h} :: {[}in{]} A conversion factor from m to the units of thicknesses

\item {} 
\sphinxstylestrong{kg\_m3\_to\_r} :: {[}in{]} A conversion factor from kg m\sphinxhyphen{}3 to the units of density

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initcoord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_coord\_adapt() (fortran subroutine in module coord\_adapt)@\spxentry{end\_coord\_adapt()}\spxextra{fortran subroutine in module coord\_adapt}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/end_coord_adapt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_adapt/}}\sphinxbfcode{\sphinxupquote{end\_coord\_adapt}}}{\emph{CS}}{}
Clean up the coordinate control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure for this module

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::end\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_adapt\_params() (fortran subroutine in module coord\_adapt)@\spxentry{set\_adapt\_params()}\spxextra{fortran subroutine in module coord\_adapt}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/set_adapt_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_adapt/}}\sphinxbfcode{\sphinxupquote{set\_adapt\_params}}}{\emph{CS}, \emph{adaptTimeRatio}, \emph{adaptAlpha}, \emph{adaptZoom}, \emph{adaptZoomCoeff}, \emph{adaptBuoyCoeff}, \emph{adaptDrho0}, \emph{adaptDoMin}}{}
This subtroutine can be used to set the parameters for {\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\item {} 
\sphinxstylestrong{adapttimeratio} :: {[}in{]} Ratio of optimisation and diffusion timescales

\item {} 
\sphinxstylestrong{adaptalpha} :: {[}in{]} Nondimensional coefficient determining how much optimisation to apply

\item {} 
\sphinxstylestrong{adaptzoom} :: {[}in{]} Near\sphinxhyphen{}surface zooming depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{adaptzoomcoeff} :: {[}in{]} Near\sphinxhyphen{}surface zooming coefficient

\item {} 
\sphinxstylestrong{adaptbuoycoeff} :: {[}in{]} Stratification\sphinxhyphen{}dependent diffusion coefficient

\item {} 
\sphinxstylestrong{adaptdrho0} :: {[}in{]} Reference density difference for stratification\sphinxhyphen{}dependent diffusion {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{adaptdomin} :: {[}in{]} If true, form a HYCOM1\sphinxhyphen{}like mixed layer by preventing interfaces from becoming shallower than the depths set by coordinateResolution

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_adapt\_column() (fortran subroutine in module coord\_adapt)@\spxentry{build\_adapt\_column()}\spxextra{fortran subroutine in module coord\_adapt}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/build_adapt_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_adapt/}}\sphinxbfcode{\sphinxupquote{build\_adapt\_column}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{i}, \emph{j}, \emph{zInt}, \emph{tInt}, \emph{sInt}, \emph{h}, \emph{zNext}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for this module

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index of the column to work on

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index of the column to work on

\item {} 
\sphinxstylestrong{zint} :: {[}in{]} Interface heights {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tint} :: {[}in{]} Interface temperatures {[}degC{]}

\item {} 
\sphinxstylestrong{sint} :: {[}in{]} Interface salinities {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{znext} :: {[}inout{]} updated interface positions

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_adaptive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_grid\_adaptive}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{coord\_hycom module reference}
\label{\detokenize{api/generated/modules/coord_hycom:f/coord_hycom}}\label{\detokenize{api/generated/modules/coord_hycom:coord-hycom-module-reference}}\label{\detokenize{api/generated/modules/coord_hycom::doc}}\index{coord\_hycom (module)@\spxentry{coord\_hycom}\spxextra{module}|spxpagem}
Regrid columns for the HyCOM coordinate.

{\hyperref[\detokenize{api/generated/modules/coord_hycom:detacoord-hycom}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/coord_hycom:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/hycom_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hycom\_cs}}}}}
&
Control structure containing required parameters for the HyCOM coordinate.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/coord_hycom:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/init_coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_coord\_hycom()}}}}}
&
Initialise a hycom\_CS with pointers to parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/end_coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_coord\_hycom()}}}}}
&
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/set_hycom_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_hycom\_params()}}}}}
&
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/build_hycom1_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_hycom1\_column()}}}}}
&
Build a HyCOM coordinate column.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/coord_hycom:detailed-description}}\label{\detokenize{api/generated/modules/coord_hycom:detacoord-hycom}}
Regrid columns for the HyCOM coordinate.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/coord_hycom:type-documentation}}\index{hycom\_cs (fortran type in module coord\_hycom)@\spxentry{hycom\_cs}\spxextra{fortran type in module coord\_hycom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/hycom_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{coord\_hycom/}}\sphinxbfcode{\sphinxupquote{hycom\_cs}}}
Control structure containing required parameters for the HyCOM coordinate.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of layers/levels in generated grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coordinateresolution}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Nominal near\sphinxhyphen{}surface resolution {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{target\_density}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Nominal density of interfaces {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_interface\_depths}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum depths of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_layer\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum thicknesses of layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interp\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(interp\_cs\_type)}\sphinxstyleemphasis{{]}} :: Interpolation control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/coord_hycom:function-subroutine-documentation}}\index{init\_coord\_hycom() (fortran subroutine in module coord\_hycom)@\spxentry{init\_coord\_hycom()}\spxextra{fortran subroutine in module coord\_hycom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/init_coord_hycom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_hycom/}}\sphinxbfcode{\sphinxupquote{init\_coord\_hycom}}}{\emph{CS}, \emph{nk}, \emph{coordinateResolution}, \emph{target\_density}, \emph{interp\_CS}}{}
Initialise a hycom\_CS with pointers to parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Unassociated pointer to hold the control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in generated grid

\item {} 
\sphinxstylestrong{coordinateresolution} :: {[}in{]} Nominal near\sphinxhyphen{}surface resolution {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{target\_density} :: {[}in{]} Interface target densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{interp\_cs} :: {[}in{]} Controls for interpolation

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initcoord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_coord\_hycom() (fortran subroutine in module coord\_hycom)@\spxentry{end\_coord\_hycom()}\spxextra{fortran subroutine in module coord\_hycom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/end_coord_hycom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_hycom/}}\sphinxbfcode{\sphinxupquote{end\_coord\_hycom}}}{\emph{CS}}{}
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Coordinate control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::end\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_hycom\_params() (fortran subroutine in module coord\_hycom)@\spxentry{set\_hycom\_params()}\spxextra{fortran subroutine in module coord\_hycom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/set_hycom_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_hycom/}}\sphinxbfcode{\sphinxupquote{set\_hycom\_params}}}{\emph{CS}, \emph{max\_interface\_depths}, \emph{max\_layer\_thickness}, \emph{interp\_CS}}{}
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Coordinate control structure

\item {} 
\sphinxstylestrong{max\_interface\_depths} :: {[}in{]} Maximum depths of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{max\_layer\_thickness} :: {[}in{]} Maximum thicknesses of layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{interp\_cs} :: {[}in{]} Controls for interpolation

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_depths}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_max\_depths}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_max\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_hycom1\_column() (fortran subroutine in module coord\_hycom)@\spxentry{build\_hycom1\_column()}\spxextra{fortran subroutine in module coord\_hycom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/build_hycom1_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_hycom/}}\sphinxbfcode{\sphinxupquote{build\_hycom1\_column}}}{\emph{CS}, \emph{eqn\_of\_state}, \emph{nz}, \emph{depth}, \emph{h}, \emph{T}, \emph{S}, \emph{p\_col}, \emph{z\_col}, \emph{z\_col\_new}, \emph{zScale}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Build a HyCOM coordinate column.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Coordinate control structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean bottom (positive {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]})

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Temperature of column {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity of column {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{p\_col} :: {[}in{]} Layer pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{z\_col} :: {[}in{]} Interface positions relative to the surface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{z\_col\_new} :: {[}inout{]} Absolute positions of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{zscale} :: {[}in{]} Scaling factor from the input coordinate thicknesses in {[}Z \textasciitilde{}\textgreater{} m{]} to desired units for zInterface, perhaps GVZ\_to\_H.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculation {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::build\_and\_interpolate\_grid}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_grid\_hycom1}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{coord\_rho module reference}
\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho}}\label{\detokenize{api/generated/modules/coord_rho:coord-rho-module-reference}}\label{\detokenize{api/generated/modules/coord_rho::doc}}\index{coord\_rho (module)@\spxentry{coord\_rho}\spxextra{module}|spxpagem}
Regrid columns for the continuous isopycnal (rho) coordinate.

{\hyperref[\detokenize{api/generated/modules/coord_rho:detacoord-rho}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/coord_rho:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/rho_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rho\_cs}}}}}
&
Control structure containing required parameters for the rho coordinate.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/coord_rho:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/init_coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_coord\_rho()}}}}}
&
Initialise a rho\_CS with pointers to parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/end_coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_coord\_rho()}}}}}
&
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/set_rho_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_rho\_params()}}}}}
&
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_column()}}}}}
&
Build a rho coordinate column.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column_iteratively}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_column\_iteratively()}}}}}
&
Iteratively build a rho coordinate column.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/copy_finite_thicknesses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_finite\_thicknesses()}}}}}
&
Copy column thicknesses with vanished layers removed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/old_inflate_layers_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{old\_inflate\_layers\_1d()}}}}}
&
Inflate vanished layers to finite (nonzero) width.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/coord_rho:detailed-description}}\label{\detokenize{api/generated/modules/coord_rho:detacoord-rho}}
Regrid columns for the continuous isopycnal (rho) coordinate.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/coord_rho:type-documentation}}\index{rho\_cs (fortran type in module coord\_rho)@\spxentry{rho\_cs}\spxextra{fortran type in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/rho_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{rho\_cs}}}
Control structure containing required parameters for the rho coordinate.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed for layers, often in {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_pressure}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Reference pressure for density calculations {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{integrate\_downward\_for\_e}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, integrate for interface positions from the top downward. If false, integrate from the bottom upward, as does the rest of the model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{target\_density}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Nominal density of interfaces {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interp\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(interp\_cs\_type)}\sphinxstyleemphasis{{]}} :: Interpolation control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/coord_rho:function-subroutine-documentation}}\index{init\_coord\_rho() (fortran subroutine in module coord\_rho)@\spxentry{init\_coord\_rho()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/init_coord_rho}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{init\_coord\_rho}}}{\emph{CS}, \emph{nk}, \emph{ref\_pressure}, \emph{target\_density}, \emph{interp\_CS}}{}
Initialise a rho\_CS with pointers to parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Unassociated pointer to hold the control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in the grid

\item {} 
\sphinxstylestrong{ref\_pressure} :: {[}in{]} Coordinate reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{target\_density} :: {[}in{]} Nominal density of interfaces {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{interp\_cs} :: {[}in{]} Controls for interpolation

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_coord\_rho() (fortran subroutine in module coord\_rho)@\spxentry{end\_coord\_rho()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/end_coord_rho}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{end\_coord\_rho}}}{\emph{CS}}{}
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Coordinate control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_rho\_params() (fortran subroutine in module coord\_rho)@\spxentry{set\_rho\_params()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/set_rho_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{set\_rho\_params}}}{\emph{CS}, \emph{min\_thickness}, \emph{integrate\_downward\_for\_e}, \emph{interp\_CS}}{}
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Coordinate control structure

\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Minimum allowed thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{integrate\_downward\_for\_e} :: {[}in{]} If true, integrate for interface positions from the top downward. If false, integrate from the bottom upward, as does the rest of the model.

\item {} 
\sphinxstylestrong{interp\_cs} :: {[}in{]} Controls for interpolation

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_rho\_column() (fortran subroutine in module coord\_rho)@\spxentry{build\_rho\_column()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{build\_rho\_column}}}{\emph{CS}, \emph{nz}, \emph{depth}, \emph{h}, \emph{T}, \emph{S}, \emph{eqn\_of\_state}, \emph{z\_interface}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Build a rho coordinate column.
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Density profiles are calculated on the source grid.

\item {} 
Positions of target densities (for interfaces) are found by interpolation.

\end{enumerate}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho()}}}}} control structurecontrol structure

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of levels on source grid (i.e. length of h, T, S)

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean bottom (positive downward) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Temperature for source column {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity for source column {[}ppt{]}

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{z\_interface} :: {[}inout{]} Absolute positions of interfaces

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::build\_and\_interpolate\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/copy_finite_thicknesses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_finite\_thicknesses}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/old_inflate_layers_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{old\_inflate\_layers\_1d}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_rho\_column\_iteratively() (fortran subroutine in module coord\_rho)@\spxentry{build\_rho\_column\_iteratively()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column_iteratively}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{build\_rho\_column\_iteratively}}}{\emph{CS}, \emph{remapCS}, \emph{nz}, \emph{depth}, \emph{h}, \emph{T}, \emph{S}, \emph{eqn\_of\_state}, \emph{zInterface}, \emph{h\_neglect}, \emph{h\_neglect\_edge}, \emph{dev\_tol}}{}
Iteratively build a rho coordinate column.

The algorithm operates as follows within each column:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Given T \& S within each layer, the layer densities are computed.

\item {} 
Based on these layer densities, a global density profile is reconstructed (this profile is monotonically increasing and may be discontinuous)

\item {} 
The new grid interfaces are determined based on the target interface densities.

\item {} 
T \& S are remapped onto the new grid.

\item {} 
Return to step 1 until convergence or until the maximum number of iterations is reached, whichever comes first.

\end{enumerate}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{remapcs} :: {[}in{]} Remapping parameters and options

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean bottom {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses in Z coordinates {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} T for column {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} S for column {[}ppt{]}

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{zinterface} :: {[}inout{]} Absolute positions of interfaces

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations in the same units as h {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{dev\_tol} :: {[}in{]} The tolerance for the deviation between successive grids for determining when the iterative solver has converged {[}Z \textasciitilde{}\textgreater{} m{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::build\_and\_interpolate\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/copy_finite_thicknesses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_finite\_thicknesses}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/old_inflate_layers_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{old\_inflate\_layers\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{copy\_finite\_thicknesses() (fortran subroutine in module coord\_rho)@\spxentry{copy\_finite\_thicknesses()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/copy_finite_thicknesses}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{copy\_finite\_thicknesses}}}{\emph{nk}, \emph{h\_in}, \emph{thresh}, \emph{nout}, \emph{h\_out}, \emph{mapping}}{}
Copy column thicknesses with vanished layers removed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layer for h\_in, T\_in, S\_in

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Thickness of input column {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} or {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{thresh} :: {[}in{]} Thickness threshold defining vanished layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} or {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{nout} :: {[}out{]} Number of non\sphinxhyphen{}vanished layers

\item {} 
\sphinxstylestrong{h\_out} :: {[}out{]} Thickness of output column {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} or {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{mapping} :: {[}out{]} Index of k\sphinxhyphen{}out corresponding to k\sphinxhyphen{}in

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_column}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column_iteratively}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_column\_iteratively}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{old\_inflate\_layers\_1d() (fortran subroutine in module coord\_rho)@\spxentry{old\_inflate\_layers\_1d()}\spxextra{fortran subroutine in module coord\_rho}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_rho:f/coord_rho/old_inflate_layers_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_rho/}}\sphinxbfcode{\sphinxupquote{old\_inflate\_layers\_1d}}}{\emph{min\_thickness}, \emph{nk}, \emph{h}}{}
Inflate vanished layers to finite (nonzero) width.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Minimum allowed thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in the grid

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_column}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column_iteratively}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_column\_iteratively}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/inflate_vanished_layers_old}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::inflate\_vanished\_layers\_old}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{coord\_sigma module reference}
\label{\detokenize{api/generated/modules/coord_sigma:f/coord_sigma}}\label{\detokenize{api/generated/modules/coord_sigma:coord-sigma-module-reference}}\label{\detokenize{api/generated/modules/coord_sigma::doc}}\index{coord\_sigma (module)@\spxentry{coord\_sigma}\spxextra{module}|spxpagem}
Regrid columns for the sigma coordinate.

{\hyperref[\detokenize{api/generated/modules/coord_sigma:detacoord-sigma}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/coord_sigma:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/sigma_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sigma\_cs}}}}}
&
Control structure containing required parameters for the sigma coordinate.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/coord_sigma:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/init_coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_coord\_sigma()}}}}}
&
Initialise a sigma\_CS with pointers to parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/end_coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_coord\_sigma()}}}}}
&
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/set_sigma_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_sigma\_params()}}}}}
&
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/build_sigma_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_sigma\_column()}}}}}
&
Build a sigma coordinate column.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/coord_sigma:detailed-description}}\label{\detokenize{api/generated/modules/coord_sigma:detacoord-sigma}}
Regrid columns for the sigma coordinate.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/coord_sigma:type-documentation}}\index{sigma\_cs (fortran type in module coord\_sigma)@\spxentry{sigma\_cs}\spxextra{fortran type in module coord\_sigma}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/sigma_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{coord\_sigma/}}\sphinxbfcode{\sphinxupquote{sigma\_cs}}}
Control structure containing required parameters for the sigma coordinate.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of levels.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed for layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coordinateresolution}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Target coordinate resolution, nondimensional.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/coord_sigma:function-subroutine-documentation}}\index{init\_coord\_sigma() (fortran subroutine in module coord\_sigma)@\spxentry{init\_coord\_sigma()}\spxextra{fortran subroutine in module coord\_sigma}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/init_coord_sigma}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_sigma/}}\sphinxbfcode{\sphinxupquote{init\_coord\_sigma}}}{\emph{CS}, \emph{nk}, \emph{coordinateResolution}}{}
Initialise a sigma\_CS with pointers to parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Unassociated pointer to hold the control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in the grid

\item {} 
\sphinxstylestrong{coordinateresolution} :: {[}in{]} Nominal coordinate resolution {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initcoord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_coord\_sigma() (fortran subroutine in module coord\_sigma)@\spxentry{end\_coord\_sigma()}\spxextra{fortran subroutine in module coord\_sigma}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/end_coord_sigma}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_sigma/}}\sphinxbfcode{\sphinxupquote{end\_coord\_sigma}}}{\emph{CS}}{}
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Coordinate control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::end\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_sigma\_params() (fortran subroutine in module coord\_sigma)@\spxentry{set\_sigma\_params()}\spxextra{fortran subroutine in module coord\_sigma}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/set_sigma_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_sigma/}}\sphinxbfcode{\sphinxupquote{set\_sigma\_params}}}{\emph{CS}, \emph{min\_thickness}}{}
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Coordinate control structure

\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Minimum allowed thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_sigma\_column() (fortran subroutine in module coord\_sigma)@\spxentry{build\_sigma\_column()}\spxextra{fortran subroutine in module coord\_sigma}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/build_sigma_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_sigma/}}\sphinxbfcode{\sphinxupquote{build\_sigma\_column}}}{\emph{CS}, \emph{depth}, \emph{totalThickness}, \emph{zInterface}}{}
Build a sigma coordinate column.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Coordinate control structure

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean bottom (positive {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]})

\item {} 
\sphinxstylestrong{totalthickness} :: {[}in{]} Column thickness (positive {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]})

\item {} 
\sphinxstylestrong{zinterface} :: {[}inout{]} Absolute positions of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_sigma_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_sigma\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{coord\_slight module reference}
\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight}}\label{\detokenize{api/generated/modules/coord_slight:coord-slight-module-reference}}\label{\detokenize{api/generated/modules/coord_slight::doc}}\index{coord\_slight (module)@\spxentry{coord\_slight}\spxextra{module}|spxpagem}
Regrid columns for the SLight coordinate.

{\hyperref[\detokenize{api/generated/modules/coord_slight:detacoord-slight}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/coord_slight:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/slight_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slight\_cs}}}}}
&
Control structure containing required parameters for the SLight coordinate.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/coord_slight:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/init_coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_coord\_slight()}}}}}
&
Initialise a slight\_CS with pointers to parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/end_coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_coord\_slight()}}}}}
&
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/set_slight_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_slight\_params()}}}}}
&
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/build_slight_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_slight\_column()}}}}}
&
Build a SLight coordinate column.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/rho_interfaces_col}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rho\_interfaces\_col()}}}}}
&
Finds the new interface locations in a column of water that match the prescribed target densities.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/coord_slight:detailed-description}}\label{\detokenize{api/generated/modules/coord_slight:detacoord-slight}}
Regrid columns for the SLight coordinate.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/coord_slight:type-documentation}}\index{slight\_cs (fortran type in module coord\_slight)@\spxentry{slight\_cs}\spxextra{fortran type in module coord\_slight}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight/slight_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{coord\_slight/}}\sphinxbfcode{\sphinxupquote{slight\_cs}}}
Control structure containing required parameters for the SLight coordinate.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of layers/levels.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed when building the new grid through regridding {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_pressure}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Reference pressure for potential density calculations {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{compressibility\_fraction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions. {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_ml\_avg\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Depth over which to average to determine the mixed layer potential density {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nlay\_ml\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Number of layers to offset the mixed layer density to find resolved stratification {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz\_fixed\_surface}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of fixed\sphinxhyphen{}thickness layers at the top of the model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dz\_ml\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fixed resolution in the topmost SLight\_nkml\_min layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fix\_haloclines}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, detect regions with much weaker stratification in the coordinate than based on in\sphinxhyphen{}situ density, and use a stretched coordinate there.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{halocline\_filter\_length}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A length scale over which to filter T \& S when looking for spuriously unstable water mass profiles {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{halocline\_strat\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A value of the stratification ratio that defines a problematic halocline region {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{target\_density}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Nominal density of interfaces {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_interface\_depths}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum depths of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_layer\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum thicknesses of layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interp\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(interp\_cs\_type)}\sphinxstyleemphasis{{]}} :: Interpolation control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/coord_slight:function-subroutine-documentation}}\index{init\_coord\_slight() (fortran subroutine in module coord\_slight)@\spxentry{init\_coord\_slight()}\spxextra{fortran subroutine in module coord\_slight}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight/init_coord_slight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_slight/}}\sphinxbfcode{\sphinxupquote{init\_coord\_slight}}}{\emph{CS}, \emph{nk}, \emph{ref\_pressure}, \emph{target\_density}, \emph{interp\_CS}, \emph{m\_to\_H}}{}
Initialise a slight\_CS with pointers to parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Unassociated pointer to hold the control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in the grid

\item {} 
\sphinxstylestrong{ref\_pressure} :: {[}in{]} Coordinate reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{target\_density} :: {[}in{]} Nominal density of interfaces {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{interp\_cs} :: {[}in{]} Controls for interpolation

\item {} 
\sphinxstylestrong{m\_to\_h} :: {[}in{]} A conversion factor from m to the units of thicknesses

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initcoord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_coord\_slight() (fortran subroutine in module coord\_slight)@\spxentry{end\_coord\_slight()}\spxextra{fortran subroutine in module coord\_slight}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight/end_coord_slight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_slight/}}\sphinxbfcode{\sphinxupquote{end\_coord\_slight}}}{\emph{CS}}{}
This subroutine deallocates memory in the control structure for the {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Coordinate control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::end\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_slight\_params() (fortran subroutine in module coord\_slight)@\spxentry{set\_slight\_params()}\spxextra{fortran subroutine in module coord\_slight}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight/set_slight_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_slight/}}\sphinxbfcode{\sphinxupquote{set\_slight\_params}}}{\emph{CS}, \emph{max\_interface\_depths}, \emph{max\_layer\_thickness}, \emph{min\_thickness}, \emph{compressibility\_fraction}, \emph{dz\_ml\_min}, \emph{nz\_fixed\_surface}, \emph{Rho\_ML\_avg\_depth}, \emph{nlay\_ML\_offset}, \emph{fix\_haloclines}, \emph{halocline\_filter\_length}, \emph{halocline\_strat\_tol}, \emph{interp\_CS}}{}
This subroutine can be used to set the parameters for the {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Coordinate control structure

\item {} 
\sphinxstylestrong{max\_interface\_depths} :: {[}in{]} Maximum depths of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{max\_layer\_thickness} :: {[}in{]} Maximum thicknesses of layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Minimum thickness allowed when building the new grid through regridding {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{compressibility\_fraction} :: {[}in{]} Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions. {[}nondim{]}

\item {} 
\sphinxstylestrong{dz\_ml\_min} :: {[}in{]} The fixed resolution in the topmost SLight\_nkml\_min layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nz\_fixed\_surface} :: {[}in{]} The number of fixed\sphinxhyphen{}thickness layers at the top of the model

\item {} 
\sphinxstylestrong{rho\_ml\_avg\_depth} :: {[}in{]} Depth over which to average to determine the mixed layer potential density {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nlay\_ml\_offset} :: {[}in{]} Number of layers to offset the mixed layer density to find resolved stratification {[}nondim{]}

\item {} 
\sphinxstylestrong{fix\_haloclines} :: {[}in{]} If true, detect regions with much weaker than based on in\sphinxhyphen{}situ density, and use a stretched coordinate there.

\item {} 
\sphinxstylestrong{halocline\_filter\_length} :: {[}in{]} A length scale over which to filter T \& S when looking for spuriously unstable water mass profiles {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{halocline\_strat\_tol} :: {[}in{]} A value of the stratification ratio that defines a problematic halocline region {[}nondim{]}.

\item {} 
\sphinxstylestrong{interp\_cs} :: {[}in{]} Controls for interpolation

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_depths}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_max\_depths}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_max\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_slight\_column() (fortran subroutine in module coord\_slight)@\spxentry{build\_slight\_column()}\spxextra{fortran subroutine in module coord\_slight}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight/build_slight_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_slight/}}\sphinxbfcode{\sphinxupquote{build\_slight\_column}}}{\emph{CS}, \emph{eqn\_of\_state}, \emph{H\_to\_pres}, \emph{H\_subroundoff}, \emph{nz}, \emph{depth}, \emph{h\_col}, \emph{T\_col}, \emph{S\_col}, \emph{p\_col}, \emph{z\_col}, \emph{z\_col\_new}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Build a SLight coordinate column.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Coordinate control structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{h\_to\_pres} :: {[}in{]} A conversion factor from thicknesses to scaled pressure {[}R L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} Pa m\sphinxhyphen{}1 or Pa m2 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h\_subroundoff} :: {[}in{]} GVH\_subroundoff

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean bottom (positive {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]})

\item {} 
\sphinxstylestrong{t\_col} :: {[}in{]} T for column

\item {} 
\sphinxstylestrong{s\_col} :: {[}in{]} S for column

\item {} 
\sphinxstylestrong{h\_col} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{p\_col} :: {[}in{]} Layer center pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{z\_col} :: {[}in{]} Interface positions relative to the surface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{z\_col\_new} :: {[}inout{]} Absolute positions of interfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/rho_interfaces_col}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rho\_interfaces\_col}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_grid\_slight}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rho\_interfaces\_col() (fortran subroutine in module coord\_slight)@\spxentry{rho\_interfaces\_col()}\spxextra{fortran subroutine in module coord\_slight}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_slight:f/coord_slight/rho_interfaces_col}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_slight/}}\sphinxbfcode{\sphinxupquote{rho\_interfaces\_col}}}{\emph{rho\_col}, \emph{h\_col}, \emph{z\_col}, \emph{rho\_tgt}, \emph{nz}, \emph{z\_col\_new}, \emph{CS}, \emph{reliable}, \emph{debug}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Finds the new interface locations in a column of water that match the prescribed target densities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of layers

\item {} 
\sphinxstylestrong{rho\_col} :: {[}in{]} Initial layer reference densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{h\_col} :: {[}in{]} Initial layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{z\_col} :: {[}in{]} Initial interface heights {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{rho\_tgt} :: {[}in{]} Interface target densities.

\item {} 
\sphinxstylestrong{z\_col\_new} :: {[}inout{]} New interface heights {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Coordinate control structure

\item {} 
\sphinxstylestrong{reliable} :: {[}inout{]} If true, the interface positions are well defined from a stable region.

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If present and true, do debugging checks.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_interp::nr\_iterations}} \sphinxcode{\sphinxupquote{regrid\_interp::nr\_tolerance}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/build_slight_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_slight\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{coord\_zlike module reference}
\label{\detokenize{api/generated/modules/coord_zlike:f/coord_zlike}}\label{\detokenize{api/generated/modules/coord_zlike:coord-zlike-module-reference}}\label{\detokenize{api/generated/modules/coord_zlike::doc}}\index{coord\_zlike (module)@\spxentry{coord\_zlike}\spxextra{module}|spxpagem}
Regrid columns for a z\sphinxhyphen{}like coordinate (z\sphinxhyphen{}star, z\sphinxhyphen{}level)

{\hyperref[\detokenize{api/generated/modules/coord_zlike:detacoord-zlike}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/coord_zlike:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/zlike_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zlike\_cs}}}}}
&
Control structure containing required parameters for a z\sphinxhyphen{}like coordinate.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/coord_zlike:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/init_coord_zlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_coord\_zlike()}}}}}
&
Initialise a zlike\_CS with pointers to parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/end_coord_zlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_coord\_zlike()}}}}}
&
Deallocates the zlike control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/set_zlike_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zlike\_params()}}}}}
&
Set parameters in the zlike structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/build_zstar_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_zstar\_column()}}}}}
&
Builds a z* coordinate with a minimum thickness.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/coord_zlike:detailed-description}}\label{\detokenize{api/generated/modules/coord_zlike:detacoord-zlike}}
Regrid columns for a z\sphinxhyphen{}like coordinate (z\sphinxhyphen{}star, z\sphinxhyphen{}level)


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/coord_zlike:type-documentation}}\index{zlike\_cs (fortran type in module coord\_zlike)@\spxentry{zlike\_cs}\spxextra{fortran type in module coord\_zlike}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/zlike_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{coord\_zlike/}}\sphinxbfcode{\sphinxupquote{zlike\_cs}}}
Control structure containing required parameters for a z\sphinxhyphen{}like coordinate.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of levels to be generated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed for layers, in the same thickness units (perhaps {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}) that will be used in all subsequent calls to build\_zstar\_column with this structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coordinateresolution}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Target coordinate resolution, usually in {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/coord_zlike:function-subroutine-documentation}}\index{init\_coord\_zlike() (fortran subroutine in module coord\_zlike)@\spxentry{init\_coord\_zlike()}\spxextra{fortran subroutine in module coord\_zlike}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/init_coord_zlike}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_zlike/}}\sphinxbfcode{\sphinxupquote{init\_coord\_zlike}}}{\emph{CS}, \emph{nk}, \emph{coordinateResolution}}{}
Initialise a zlike\_CS with pointers to parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Unassociated pointer to hold the control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels in the grid

\item {} 
\sphinxstylestrong{coordinateresolution} :: {[}in{]} Target coordinate resolution {[}Z \textasciitilde{}\textgreater{} m{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initcoord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_coord\_zlike() (fortran subroutine in module coord\_zlike)@\spxentry{end\_coord\_zlike()}\spxextra{fortran subroutine in module coord\_zlike}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/end_coord_zlike}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_zlike/}}\sphinxbfcode{\sphinxupquote{end\_coord\_zlike}}}{\emph{CS}}{}
Deallocates the zlike control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Coordinate control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::end\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_zlike\_params() (fortran subroutine in module coord\_zlike)@\spxentry{set\_zlike\_params()}\spxextra{fortran subroutine in module coord\_zlike}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/set_zlike_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_zlike/}}\sphinxbfcode{\sphinxupquote{set\_zlike\_params}}}{\emph{CS}, \emph{min\_thickness}}{}
Set parameters in the zlike structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Coordinate control structure

\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Minimum allowed thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_zstar\_column() (fortran subroutine in module coord\_zlike)@\spxentry{build\_zstar\_column()}\spxextra{fortran subroutine in module coord\_zlike}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/build_zstar_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{coord\_zlike/}}\sphinxbfcode{\sphinxupquote{build\_zstar\_column}}}{\emph{CS}, \emph{depth}, \emph{total\_thickness}, \emph{zInterface}, \emph{z\_rigid\_top}, \emph{eta\_orig}, \emph{zScale}}{}
Builds a z* coordinate with a minimum thickness.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Coordinate control structure

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean bottom (positive downward in the output units), units may be {[}Z \textasciitilde{}\textgreater{} m{]} or {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{total\_thickness} :: {[}in{]} Column thickness (positive definite in the same units as depth) {[}Z \textasciitilde{}\textgreater{} m{]} or {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{zinterface} :: {[}inout{]} Absolute positions of interfaces

\item {} 
\sphinxstylestrong{z\_rigid\_top} :: {[}in{]} The height of a rigid top (positive upward in the same units as depth) {[}Z \textasciitilde{}\textgreater{} m{]} or {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eta\_orig} :: {[}in{]} The actual original height of the top in the same units as depth) {[}Z \textasciitilde{}\textgreater{} m{]} or {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{zscale} :: {[}in{]} Scaling factor from the target coordinate resolution in Z to desired units for zInterface, perhaps Z\_to\_H

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_zstar\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dense\_water\_initialization module reference}
\label{\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization}}\label{\detokenize{api/generated/modules/dense_water_initialization:dense-water-initialization-module-reference}}\label{\detokenize{api/generated/modules/dense_water_initialization::doc}}\index{dense\_water\_initialization (module)@\spxentry{dense\_water\_initialization}\spxextra{module}|spxpagem}
Initialization routines for the dense water formation and overflow experiment.

{\hyperref[\detokenize{api/generated/modules/dense_water_initialization:detadense-water-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dense_water_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialize\_topography()}}}}}
&
Initialize the topography field for the dense water experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_ts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialize\_ts()}}}}}
&
Initialize the temperature and salinity for the dense water experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialize\_sponges()}}}}}
&
Initialize the restoring sponges for the dense water experiment.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dense_water_initialization:detailed-description}}\label{\detokenize{api/generated/modules/dense_water_initialization:detadense-water-initialization}}
This experiment consists of a shelf accumulating dense water, which spills over an upward slope and a sill, before flowing down a slope into an open ocean region. It’s intended as a test of one of the motivating situations for the adaptive coordinate.

The nondimensional widths of the 5 regions are controlled by the \sphinxcode{\sphinxupquote{DENSE\_WATER\_DOMAIN\_PARAMS}}
, and the heights of the sill and shelf as a fraction of the total domain depth are controlled by \sphinxcode{\sphinxupquote{DENSE\_WATER\_SILL\_HEIGHT}} and \sphinxcode{\sphinxupquote{DENSE\_WATER\_SHELF\_HEIGHT}} .

The density in the domain is governed by a linear equation of state, and is set up with a mixed layer of non\sphinxhyphen{}dimensional depth \sphinxcode{\sphinxupquote{DENSE\_WATER\_MLD}}
below which there is a linear stratification from \sphinxcode{\sphinxupquote{S\_REF}} , increasing by \sphinxcode{\sphinxupquote{S\_RANGE}} to the bottom.

To force the experiment, there are sponges on the inflow and outflow of the domain. The inflow sponge has a salinity anomaly of \sphinxcode{\sphinxupquote{DENSE\_WATER\_EAST\_SPONGE\_SALT}}
through the entire depth. The outflow sponge simply restores to the initial condition. Both sponges have controllable widths and restoring timescales.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dense_water_initialization:function-subroutine-documentation}}\index{dense\_water\_initialize\_topography() (fortran subroutine in module dense\_water\_initialization)@\spxentry{dense\_water\_initialize\_topography()}\spxextra{fortran subroutine in module dense\_water\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dense\_water\_initialization/}}\sphinxbfcode{\sphinxupquote{dense\_water\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
Initialize the topography field for the dense water experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{default\_shelf}} \sphinxcode{\sphinxupquote{default\_sill}} \sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dense\_water\_initialize\_ts() (fortran subroutine in module dense\_water\_initialization)@\spxentry{dense\_water\_initialize\_ts()}\spxextra{fortran subroutine in module dense\_water\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_ts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dense\_water\_initialization/}}\sphinxbfcode{\sphinxupquote{dense\_water\_initialize\_ts}}}{\emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{T}, \emph{S}, \emph{h}, \emph{just\_read\_params}}{}
Initialize the temperature and salinity for the dense water experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Horizontal grid control structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid control structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: EOS structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Output temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Output salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{default\_mld}} \sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dense\_water\_initialize\_sponges() (fortran subroutine in module dense\_water\_initialization)@\spxentry{dense\_water\_initialize\_sponges()}\spxextra{fortran subroutine in module dense\_water\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dense\_water\_initialization/}}\sphinxbfcode{\sphinxupquote{dense\_water\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{param\_file}, \emph{use\_ALE}, \emph{CSp}, \emph{ACSp}}{}
Initialize the restoring sponges for the dense water experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Horizontal grid control structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid control structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{use\_ale} :: {[}in{]} ALE flag

\item {} 
\sphinxstylestrong{csp} :: Layered sponge control structure pointer

\item {} 
\sphinxstylestrong{acsp} :: ALE sponge control structure pointer

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{default\_mld}} \sphinxcode{\sphinxupquote{default\_sill}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dome2d\_initialization module reference}
\label{\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization}}\label{\detokenize{api/generated/modules/dome2d_initialization:dome2d-initialization-module-reference}}\label{\detokenize{api/generated/modules/dome2d_initialization::doc}}\index{dome2d\_initialization (module)@\spxentry{dome2d\_initialization}\spxextra{module}|spxpagem}
Initialization of the 2D DOME experiment with density water initialized on a coastal shelf.

{\hyperref[\detokenize{api/generated/modules/dome2d_initialization:detadome2d-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dome2d_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialize\_topography()}}}}}
&
Initialize topography with a shelf and slope in a 2D domain.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialize\_thickness()}}}}}
&
Initialize thicknesses according to coordinate mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialize\_temperature\_salinity()}}}}}
&
Initialize temperature and salinity in the 2d DOME configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialize\_sponges()}}}}}
&
Set up sponges in 2d DOME configuration.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dome2d_initialization:detailed-description}}\label{\detokenize{api/generated/modules/dome2d_initialization:detadome2d-initialization}}
Initialization of the 2D DOME experiment with density water initialized on a coastal shelf.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dome2d_initialization:function-subroutine-documentation}}\index{dome2d\_initialize\_topography() (fortran subroutine in module dome2d\_initialization)@\spxentry{dome2d\_initialize\_topography()}\spxextra{fortran subroutine in module dome2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome2d\_initialization/}}\sphinxbfcode{\sphinxupquote{dome2d\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
Initialize topography with a shelf and slope in a 2D domain.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome2d\_initialize\_thickness() (fortran subroutine in module dome2d\_initialization)@\spxentry{dome2d\_initialize\_thickness()}\spxextra{fortran subroutine in module dome2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome2d\_initialization/}}\sphinxbfcode{\sphinxupquote{dome2d\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialize thicknesses according to coordinate mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome2d\_initialize\_temperature\_salinity() (fortran subroutine in module dome2d\_initialization)@\spxentry{dome2d\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module dome2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome2d\_initialization/}}\sphinxbfcode{\sphinxupquote{dome2d\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initialize temperature and salinity in the 2d DOME configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing T \& S.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome2d\_initialize\_sponges() (fortran subroutine in module dome2d\_initialization)@\spxentry{dome2d\_initialize\_sponges()}\spxextra{fortran subroutine in module dome2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome2d\_initialization/}}\sphinxbfcode{\sphinxupquote{dome2d\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{param\_file}, \emph{use\_ALE}, \emph{CSp}, \emph{ACSp}}{}
Set up sponges in 2d DOME configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{use\_ale} :: {[}in{]} If true, indicates model is in ALE mode

\item {} 
\sphinxstylestrong{csp} :: Layer\sphinxhyphen{}mode sponge structure

\item {} 
\sphinxstylestrong{acsp} :: ALE\sphinxhyphen{}mode sponge structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dome\_initialization module reference}
\label{\detokenize{api/generated/modules/dome_initialization:f/dome_initialization}}\label{\detokenize{api/generated/modules/dome_initialization:dome-initialization-module-reference}}\label{\detokenize{api/generated/modules/dome_initialization::doc}}\index{dome\_initialization (module)@\spxentry{dome\_initialization}\spxextra{module}|spxpagem}
Configures the model for the “DOME” experiment. DOME = Dynamics of Overflows and Mixing Experiment.

{\hyperref[\detokenize{api/generated/modules/dome_initialization:detadome-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dome_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialize\_topography()}}}}}
&
This subroutine sets up the DOME topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialize\_thickness()}}}}}
&
This subroutine initializes layer thicknesses for the DOME experiment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialize\_sponges()}}}}}
&
This subroutine sets the inverse restoration time (Idamp), and ! the values towards which the interface heights and an arbitrary ! number of tracers should be restored within each sponge.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_set\_obc\_data()}}}}}
&
This subroutine sets the properties of flow at open boundary conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dome_initialization:detailed-description}}\label{\detokenize{api/generated/modules/dome_initialization:detadome-initialization}}
Configures the model for the “DOME” experiment. DOME = Dynamics of Overflows and Mixing Experiment.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dome_initialization:function-subroutine-documentation}}\index{dome\_initialize\_topography() (fortran subroutine in module dome\_initialization)@\spxentry{dome\_initialize\_topography()}\spxextra{fortran subroutine in module dome\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_initialization/}}\sphinxbfcode{\sphinxupquote{dome\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
This subroutine sets up the DOME topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome\_initialize\_thickness() (fortran subroutine in module dome\_initialization)@\spxentry{dome\_initialize\_thickness()}\spxextra{fortran subroutine in module dome\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_initialization/}}\sphinxbfcode{\sphinxupquote{dome\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{just\_read\_params}}{}
This subroutine initializes layer thicknesses for the DOME experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome\_initialize\_sponges() (fortran subroutine in module dome\_initialization)@\spxentry{dome\_initialize\_sponges()}\spxextra{fortran subroutine in module dome\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_initialization/}}\sphinxbfcode{\sphinxupquote{dome\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{PF}, \emph{CSp}}{}
This subroutine sets the inverse restoration time (Idamp), and ! the values towards which the interface heights and an arbitrary ! number of tracers should be restored within each sponge. The ! interface height is always subject to damping, and must always be ! the first registered field. !
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, including potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{csp} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome\_set\_obc\_data() (fortran subroutine in module dome\_initialization)@\spxentry{dome\_set\_obc\_data()}\spxextra{fortran subroutine in module dome\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_initialization/}}\sphinxbfcode{\sphinxupquote{dome\_set\_obc\_data}}}{\emph{OBC}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{tr\_Reg}}{}
This subroutine sets the properties of flow at open boundary conditions. This particular example is for the DOME inflow describe in Legg et al. 2006.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, including potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{tr\_reg} :: Tracer registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_segment_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::register\_segment\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_name_lookup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::tracer\_name\_lookup}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dome\_tracer module reference}
\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer}}\label{\detokenize{api/generated/modules/dome_tracer:dome-tracer-module-reference}}\label{\detokenize{api/generated/modules/dome_tracer::doc}}\index{dome\_tracer (module)@\spxentry{dome\_tracer}\spxextra{module}|spxpagem}
A tracer package that is used as a diagnostic in the DOME experiments.

{\hyperref[\detokenize{api/generated/modules/dome_tracer:detadome-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/dome_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer\_cs}}}}}
&
The DOME\_tracer control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dome_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/register_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_dome\_tracer()}}}}}
&
Register tracer fields and subroutines to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/initialize_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_dome\_tracer()}}}}}
&
Initializes the NTR tracer fields in tr(:,:,:,:) and sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer\_end()}}}}}
&
Clean up memory allocations, if any.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dome_tracer:detailed-description}}\label{\detokenize{api/generated/modules/dome_tracer:detadome-tracer}}
By Robert Hallberg, 2002.

This file contains an example of the code that is needed to set up and use a set (in this case eleven) of dynamically passive tracers. These tracers dye the inflowing water or water initially within a range of latitudes or water initially in a range of depths.

A single subroutine is called from within each file to register each of the tracers for reinitialization and advection and to register the subroutine that initializes the tracers and set up their output and the subroutine that does any tracer physics or chemistry along with diapycnal mixing (included here because some tracers may float or swim vertically or dye diapycnal processes).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/dome_tracer:type-documentation}}\index{dome\_tracer\_cs (fortran type in module dome\_tracer)@\spxentry{dome\_tracer\_cs}\spxextra{fortran type in module dome\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{dome\_tracer/}}\sphinxbfcode{\sphinxupquote{dome\_tracer\_cs}}}
The DOME\_tracer control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The full path to the IC file, or ” ” to initialize internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this package, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr )}\sphinxstyleemphasis{{]}} :: The value of tr used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sponges may be applied somewhere in the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dome_tracer:function-subroutine-documentation}}\index{register\_dome\_tracer() (fortran function in module dome\_tracer)@\spxentry{register\_dome\_tracer()}\spxextra{fortran function in module dome\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/register_dome_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{dome\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_dome\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register tracer fields and subroutines to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer to the tracer registry.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_dome\_tracer() (fortran subroutine in module dome\_tracer)@\spxentry{initialize\_dome\_tracer()}\spxextra{fortran subroutine in module dome\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/initialize_dome_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_dome\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}, \emph{param\_file}}{}
Initializes the NTR tracer fields in tr(:,:,:,:) and sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: Structure specifying open boundary options.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to DOME\_register\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome\_tracer\_column\_physics() (fortran subroutine in module dome\_tracer)@\spxentry{dome\_tracer\_column\_physics()}\spxextra{fortran subroutine in module dome\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_tracer/}}\sphinxbfcode{\sphinxupquote{dome\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers.

The arguments to this subroutine are redundant in that h\_new(k) = h\_old(k) + ea(k) \sphinxhyphen{} eb(k\sphinxhyphen{}1) + eb(k) \sphinxhyphen{} ea(k+1)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to DOME\_register\_tracer.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome\_tracer\_surface\_state() (fortran subroutine in module dome\_tracer)@\spxentry{dome\_tracer\_surface\_state()}\spxextra{fortran subroutine in module dome\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_tracer/}}\sphinxbfcode{\sphinxupquote{dome\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to DOME\_register\_tracer.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ntr}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dome\_tracer\_end() (fortran subroutine in module dome\_tracer)@\spxentry{dome\_tracer\_end()}\spxextra{fortran subroutine in module dome\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dome\_tracer/}}\sphinxbfcode{\sphinxupquote{dome\_tracer\_end}}}{\emph{CS}}{}
Clean up memory allocations, if any.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to DOME\_register\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dumbbell\_initialization module reference}
\label{\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization}}\label{\detokenize{api/generated/modules/dumbbell_initialization:dumbbell-initialization-module-reference}}\label{\detokenize{api/generated/modules/dumbbell_initialization::doc}}\index{dumbbell\_initialization (module)@\spxentry{dumbbell\_initialization}\spxextra{module}|spxpagem}
Configures the model for the idealized dumbbell test case.

{\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:detadumbbell-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dumbbell_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialize\_topography()}}}}}
&
Initialization of topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialize\_thickness()}}}}}
&
Initializes the layer thicknesses to be uniform in the dumbbell test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialize\_temperature\_salinity()}}}}}
&
Initial values for temperature and salinity for the dumbbell test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialize\_sponges()}}}}}
&
Initialize the restoring sponges for the dumbbell test case.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dumbbell_initialization:detailed-description}}\label{\detokenize{api/generated/modules/dumbbell_initialization:detadumbbell-initialization}}
Configures the model for the idealized dumbbell test case.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dumbbell_initialization:function-subroutine-documentation}}\index{dumbbell\_initialize\_topography() (fortran subroutine in module dumbbell\_initialization)@\spxentry{dumbbell\_initialize\_topography()}\spxextra{fortran subroutine in module dumbbell\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_initialization/}}\sphinxbfcode{\sphinxupquote{dumbbell\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
Initialization of topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dumbbell\_initialize\_thickness() (fortran subroutine in module dumbbell\_initialization)@\spxentry{dumbbell\_initialize\_thickness()}\spxextra{fortran subroutine in module dumbbell\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_initialization/}}\sphinxbfcode{\sphinxupquote{dumbbell\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes the layer thicknesses to be uniform in the dumbbell test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dumbbell\_initialize\_temperature\_salinity() (fortran subroutine in module dumbbell\_initialization)@\spxentry{dumbbell\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module dumbbell\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_initialization/}}\sphinxbfcode{\sphinxupquote{dumbbell\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initial values for temperature and salinity for the dumbbell test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dumbbell\_initialize\_sponges() (fortran subroutine in module dumbbell\_initialization)@\spxentry{dumbbell\_initialize\_sponges()}\spxextra{fortran subroutine in module dumbbell\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_initialization/}}\sphinxbfcode{\sphinxupquote{dumbbell\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{param\_file}, \emph{use\_ALE}, \emph{CSp}, \emph{ACSp}}{}
Initialize the restoring sponges for the dumbbell test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Horizontal grid control structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid control structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{use\_ale} :: {[}in{]} ALE flag

\item {} 
\sphinxstylestrong{csp} :: Layered sponge control structure pointer

\item {} 
\sphinxstylestrong{acsp} :: ALE sponge control structure pointer

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dumbbell\_surface\_forcing module reference}
\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing}}\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:dumbbell-surface-forcing-module-reference}}\label{\detokenize{api/generated/modules/dumbbell_surface_forcing::doc}}\index{dumbbell\_surface\_forcing (module)@\spxentry{dumbbell\_surface\_forcing}\spxextra{module}|spxpagem}
Surface forcing for the dumbbell test case.

{\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:detadumbbell-surface-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_surface_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing\_cs}}}}}
&
Control structure for the dumbbell test case forcing.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_buoyancy\_forcing()}}}}}
&
Surface buoyancy (heat and fresh water) fluxes for the dumbbell test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_dynamic_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_dynamic\_forcing()}}}}}
&
Dynamic forcing for the dumbbell test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing\_init()}}}}}
&
Reads and sets up the forcing for the dumbbell test case.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:detailed-description}}\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:detadumbbell-surface-forcing}}
Surface forcing for the dumbbell test case.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:type-documentation}}\index{dumbbell\_surface\_forcing\_cs (fortran type in module dumbbell\_surface\_forcing)@\spxentry{dumbbell\_surface\_forcing\_cs}\spxextra{fortran type in module dumbbell\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_surface_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{dumbbell\_surface\_forcing\_cs}}}
Control structure for the dumbbell test case forcing.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temperature and salinity are used as state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restorebuoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use restoring surface buoyancy forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The restoring rate at the surface {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slp\_amplitude}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amplitude of pressure loading {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} applied to the reservoirs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slp\_period}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Period of sinusoidal pressure wave {[}days{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{forcing\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: A mask regulating where forcing occurs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_restore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The surface salinity field toward which to restore {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:function-subroutine-documentation}}\index{dumbbell\_buoyancy\_forcing() (fortran subroutine in module dumbbell\_surface\_forcing)@\spxentry{dumbbell\_buoyancy\_forcing()}\spxextra{fortran subroutine in module dumbbell\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_buoyancy_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{dumbbell\_buoyancy\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
Surface buoyancy (heat and fresh water) fluxes for the dumbbell test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the fluxes.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A control structure returned by a previous call to dumbbell\_surface\_forcing\_init

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dumbbell\_dynamic\_forcing() (fortran subroutine in module dumbbell\_surface\_forcing)@\spxentry{dumbbell\_dynamic\_forcing()}\spxextra{fortran subroutine in module dumbbell\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_dynamic_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{dumbbell\_dynamic\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{CS}}{}
Dynamic forcing for the dumbbell test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the fluxes.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: A control structure returned by a previous call to dumbbell\_surface\_forcing\_init

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{dumbbell\_surface\_forcing\_init() (fortran subroutine in module dumbbell\_surface\_forcing)@\spxentry{dumbbell\_surface\_forcing\_init()}\spxextra{fortran subroutine in module dumbbell\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{dumbbell\_surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Reads and sets up the forcing for the dumbbell test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dyed\_channel\_initialization module reference}
\label{\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization}}\label{\detokenize{api/generated/modules/dyed_channel_initialization:dyed-channel-initialization-module-reference}}\label{\detokenize{api/generated/modules/dyed_channel_initialization::doc}}\index{dyed\_channel\_initialization (module)@\spxentry{dyed\_channel\_initialization}\spxextra{module}|spxpagem}
Initialization for the dyed\_channel configuration.

{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:detadyed-channel-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/dyed_channel_initialization:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_obc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_obc\_cs}}}}}
&
Control structure for dyed\sphinxhyphen{}channel open boundaries.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dyed_channel_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/register_dyed_channel_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_dyed\_channel\_obc()}}}}}
&
Add dyed channel to OBC registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_obc\_end()}}}}}
&
Clean up the dyed\_channel OBC from registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_set_obc_tracer_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_set\_obc\_tracer\_data()}}}}}
&
This subroutine sets the dye and flow properties at open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_update_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_update\_flow()}}}}}
&
This subroutine updates the long\sphinxhyphen{}channel flow.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dyed_channel_initialization:detailed-description}}\label{\detokenize{api/generated/modules/dyed_channel_initialization:detadyed-channel-initialization}}
Setting dyes, one for painting the inflow on each side.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/dyed_channel_initialization:type-documentation}}\index{dyed\_channel\_obc\_cs (fortran type in module dyed\_channel\_initialization)@\spxentry{dyed\_channel\_obc\_cs}\spxextra{fortran type in module dyed\_channel\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_obc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{dyed\_channel\_initialization/}}\sphinxbfcode{\sphinxupquote{dyed\_channel\_obc\_cs}}}
Control structure for dyed\sphinxhyphen{}channel open boundaries.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zonal\_flow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mean inflow.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_amp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Sloshing amplitude.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frequency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Sloshing frequency.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dyed_channel_initialization:function-subroutine-documentation}}\index{register\_dyed\_channel\_obc() (fortran function in module dyed\_channel\_initialization)@\spxentry{register\_dyed\_channel\_obc()}\spxextra{fortran function in module dyed\_channel\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/register_dyed_channel_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{dyed\_channel\_initialization/}}\sphinxbfcode{\sphinxupquote{register\_dyed\_channel\_obc}}}{\emph{param\_file}, \emph{CS}, \emph{OBC\_Reg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Add dyed channel to OBC registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file.

\item {} 
\sphinxstylestrong{cs} :: Dyed channel control structure.

\item {} 
\sphinxstylestrong{obc\_reg} :: OBC registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::register\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dyed\_channel\_obc\_end() (fortran subroutine in module dyed\_channel\_initialization)@\spxentry{dyed\_channel\_obc\_end()}\spxextra{fortran subroutine in module dyed\_channel\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_obc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_channel\_initialization/}}\sphinxbfcode{\sphinxupquote{dyed\_channel\_obc\_end}}}{\emph{CS}}{}
Clean up the dyed\_channel OBC from registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Dyed channel control structure.

\end{description}\end{quote}

\end{fulllineitems}

\index{dyed\_channel\_set\_obc\_tracer\_data() (fortran subroutine in module dyed\_channel\_initialization)@\spxentry{dyed\_channel\_set\_obc\_tracer\_data()}\spxextra{fortran subroutine in module dyed\_channel\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_set_obc_tracer_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_channel\_initialization/}}\sphinxbfcode{\sphinxupquote{dyed\_channel\_set\_obc\_tracer\_data}}}{\emph{OBC}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{tr\_Reg}}{}
This subroutine sets the dye and flow properties at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{tr\_reg} :: Tracer registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dyed\_channel\_update\_flow() (fortran subroutine in module dyed\_channel\_initialization)@\spxentry{dyed\_channel\_update\_flow()}\spxextra{fortran subroutine in module dyed\_channel\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_update_flow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_channel\_initialization/}}\sphinxbfcode{\sphinxupquote{dyed\_channel\_update\_flow}}}{\emph{OBC}, \emph{CS}, \emph{G}, \emph{Time}}{}
This subroutine updates the long\sphinxhyphen{}channel flow.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: Dyed channel control structure.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dyed\_obc\_tracer module reference}
\label{\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer}}\label{\detokenize{api/generated/modules/dyed_obc_tracer:dyed-obc-tracer-module-reference}}\label{\detokenize{api/generated/modules/dyed_obc_tracer::doc}}\index{dyed\_obc\_tracer (module)@\spxentry{dyed\_obc\_tracer}\spxextra{module}|spxpagem}
This tracer package dyes flow through open boundaries.

{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:detadyed-obc-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/dyed_obc_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer\_cs}}}}}
&
The control structure for the dyed\_obc tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dyed_obc_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/register_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_dyed\_obc\_tracer()}}}}}
&
Register tracer fields and subroutines to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/initialize_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_dyed\_obc\_tracer()}}}}}
&
Initializes the CSntr tracer fields in tr(:,:,:,:) and sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer\_end()}}}}}
&
Clean up memory allocations, if any.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dyed_obc_tracer:detailed-description}}\label{\detokenize{api/generated/modules/dyed_obc_tracer:detadyed-obc-tracer}}
By Kate Hedstrom, 2017, copied from DOME tracers and also dye\_example.

This file contains an example of the code that is needed to set up and use a set of dynamically passive tracers. These tracers dye the inflowing water, one per open boundary segment.

A single subroutine is called from within each file to register each of the tracers for reinitialization and advection and to register the subroutine that initializes the tracers and set up their output and the subroutine that does any tracer physics or chemistry along with diapycnal mixing (included here because some tracers may float or swim vertically or dye diapycnal processes).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/dyed_obc_tracer:type-documentation}}\index{dyed\_obc\_tracer\_cs (fortran type in module dyed\_obc\_tracer)@\spxentry{dyed\_obc\_tracer\_cs}\spxextra{fortran type in module dyed\_obc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{dyed\_obc\_tracer/}}\sphinxbfcode{\sphinxupquote{dyed\_obc\_tracer\_cs}}}
The control structure for the dyed\_obc tracer package.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of tracers that are actually used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The full path to the IC file, or ” ” to initialize internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this subroutine, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dyed_obc_tracer:function-subroutine-documentation}}\index{register\_dyed\_obc\_tracer() (fortran function in module dyed\_obc\_tracer)@\spxentry{register\_dyed\_obc\_tracer()}\spxextra{fortran function in module dyed\_obc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/register_dyed_obc_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{dyed\_obc\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_dyed\_obc\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register tracer fields and subroutines to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer to the tracer registry.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_dyed\_obc\_tracer() (fortran subroutine in module dyed\_obc\_tracer)@\spxentry{initialize\_dyed\_obc\_tracer()}\spxextra{fortran subroutine in module dyed\_obc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/initialize_dyed_obc_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_obc\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_dyed\_obc\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}}{}
Initializes the CSntr tracer fields in tr(:,:,:,:) and sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: Structure specifying open boundary options.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to dyed\_obc\_register\_tracer.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dyed\_obc\_tracer\_column\_physics() (fortran subroutine in module dyed\_obc\_tracer)@\spxentry{dyed\_obc\_tracer\_column\_physics()}\spxextra{fortran subroutine in module dyed\_obc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_obc\_tracer/}}\sphinxbfcode{\sphinxupquote{dyed\_obc\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers.

The arguments to this subroutine are redundant in that h\_new(k) = h\_old(k) + ea(k) \sphinxhyphen{} eb(k\sphinxhyphen{}1) + eb(k) \sphinxhyphen{} ea(k+1)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to dyed\_obc\_register\_tracer.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dyed\_obc\_tracer\_end() (fortran subroutine in module dyed\_obc\_tracer)@\spxentry{dyed\_obc\_tracer\_end()}\spxextra{fortran subroutine in module dyed\_obc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_obc\_tracer/}}\sphinxbfcode{\sphinxupquote{dyed\_obc\_tracer\_end}}}{\emph{CS}}{}
Clean up memory allocations, if any.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to dyed\_obc\_register\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{dyed\_obcs\_initialization module reference}
\label{\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization}}\label{\detokenize{api/generated/modules/dyed_obcs_initialization:dyed-obcs-initialization-module-reference}}\label{\detokenize{api/generated/modules/dyed_obcs_initialization::doc}}\index{dyed\_obcs\_initialization (module)@\spxentry{dyed\_obcs\_initialization}\spxextra{module}|spxpagem}
Dyed open boundary conditions.

{\hyperref[\detokenize{api/generated/modules/dyed_obcs_initialization:detadyed-obcs-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/dyed_obcs_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization/dyed_obcs_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obcs\_set\_obc\_data()}}}}}
&
This subroutine sets the dye properties at open boundary conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/dyed_obcs_initialization:detailed-description}}\label{\detokenize{api/generated/modules/dyed_obcs_initialization:detadyed-obcs-initialization}}
Setting dyes, one for painting the inflow on each side.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/dyed_obcs_initialization:function-subroutine-documentation}}\index{dyed\_obcs\_set\_obc\_data() (fortran subroutine in module dyed\_obcs\_initialization)@\spxentry{dyed\_obcs\_set\_obc\_data()}\spxextra{fortran subroutine in module dyed\_obcs\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization/dyed_obcs_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{dyed\_obcs\_initialization/}}\sphinxbfcode{\sphinxupquote{dyed\_obcs\_set\_obc\_data}}}{\emph{OBC}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{tr\_Reg}}{}
This subroutine sets the dye properties at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{tr\_reg} :: Tracer registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_segment_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::register\_segment\_tracer}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{external\_gwave\_initialization module reference}
\label{\detokenize{api/generated/modules/external_gwave_initialization:f/external_gwave_initialization}}\label{\detokenize{api/generated/modules/external_gwave_initialization:external-gwave-initialization-module-reference}}\label{\detokenize{api/generated/modules/external_gwave_initialization::doc}}\index{external\_gwave\_initialization (module)@\spxentry{external\_gwave\_initialization}\spxextra{module}|spxpagem}
Initialization for the “external gravity wave wave” configuration.

{\hyperref[\detokenize{api/generated/modules/external_gwave_initialization:detaexternal-gwave-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/external_gwave_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/external_gwave_initialization:f/external_gwave_initialization/external_gwave_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{external\_gwave\_initialize\_thickness()}}}}}
&
This subroutine initializes layer thicknesses for the external\_gwave experiment.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/external_gwave_initialization:detailed-description}}\label{\detokenize{api/generated/modules/external_gwave_initialization:detaexternal-gwave-initialization}}
Initialization for the “external gravity wave wave” configuration.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/external_gwave_initialization:function-subroutine-documentation}}\index{external\_gwave\_initialize\_thickness() (fortran subroutine in module external\_gwave\_initialization)@\spxentry{external\_gwave\_initialize\_thickness()}\spxextra{fortran subroutine in module external\_gwave\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/external_gwave_initialization:f/external_gwave_initialization/external_gwave_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{external\_gwave\_initialization/}}\sphinxbfcode{\sphinxupquote{external\_gwave\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
This subroutine initializes layer thicknesses for the external\_gwave experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{fms\_coupler\_util module reference}
\label{\detokenize{api/generated/modules/fms_coupler_util:f/fms_coupler_util}}\label{\detokenize{api/generated/modules/fms_coupler_util:fms-coupler-util-module-reference}}\label{\detokenize{api/generated/modules/fms_coupler_util::doc}}\index{fms\_coupler\_util (module)@\spxentry{fms\_coupler\_util}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/fms_coupler_util:detafms-coupler-util}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/fms_coupler_util:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/fms_coupler_util:f/fms_coupler_util/extract_coupler_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_coupler\_values()}}}}}
&
Get element and index of a boundary condition.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/fms_coupler_util:f/fms_coupler_util/set_coupler_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coupler\_values()}}}}}
&
Set element and index of a boundary condition.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/fms_coupler_util:detailed-description}}\label{\detokenize{api/generated/modules/fms_coupler_util:detafms-coupler-util}}
\textless{}undocumented\textgreater{}


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/fms_coupler_util:function-subroutine-documentation}}\index{extract\_coupler\_values() (fortran subroutine in module fms\_coupler\_util)@\spxentry{extract\_coupler\_values()}\spxextra{fortran subroutine in module fms\_coupler\_util}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/fms_coupler_util:f/fms_coupler_util/extract_coupler_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{fms\_coupler\_util/}}\sphinxbfcode{\sphinxupquote{extract\_coupler\_values}}}{\emph{BC\_struc}, \emph{BC\_index}, \emph{BC\_element}, \emph{array\_out}, \emph{ilb}, \emph{jlb}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{conversion}}{}
Get element and index of a boundary condition.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array\_out} :: {[}out{]} The array being filled with the input values

\item {} 
\sphinxstylestrong{ilb} :: {[}in{]} Lower bounds

\item {} 
\sphinxstylestrong{jlb} :: {[}in{]} Lower bounds

\item {} 
\sphinxstylestrong{bc\_struc} :: {[}in{]} The type from which the data is being extracted

\item {} 
\sphinxstylestrong{bc\_index} :: {[}in{]} The boundary condition number being extracted

\item {} 
\sphinxstylestrong{bc\_element} :: {[}in{]} The element of the boundary condition being extracted

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The i\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The i\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The j\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The j\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} A number that every element is multiplied by

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coupler\_values() (fortran subroutine in module fms\_coupler\_util)@\spxentry{set\_coupler\_values()}\spxextra{fortran subroutine in module fms\_coupler\_util}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/fms_coupler_util:f/fms_coupler_util/set_coupler_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{fms\_coupler\_util/}}\sphinxbfcode{\sphinxupquote{set\_coupler\_values}}}{\emph{array\_in}, \emph{BC\_struc}, \emph{BC\_index}, \emph{BC\_element}, \emph{ilb}, \emph{jlb}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{conversion}}{}
Set element and index of a boundary condition.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array\_in} :: {[}in{]} The array containing the values to load into the BC

\item {} 
\sphinxstylestrong{ilb} :: {[}in{]} Lower bounds

\item {} 
\sphinxstylestrong{jlb} :: {[}in{]} Lower bounds

\item {} 
\sphinxstylestrong{bc\_struc} :: {[}inout{]} The type into which the data is being loaded

\item {} 
\sphinxstylestrong{bc\_index} :: {[}in{]} The boundary condition number being set

\item {} 
\sphinxstylestrong{bc\_element} :: {[}in{]} The element of the boundary condition being set

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The i\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The i\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The j\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The j\sphinxhyphen{} limits of array\_out to be filled

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} A number that every element is multiplied by

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{g\_tracer\_utils module reference}
\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils}}\label{\detokenize{api/generated/modules/g_tracer_utils:g-tracer-utils-module-reference}}\label{\detokenize{api/generated/modules/g_tracer_utils::doc}}\index{g\_tracer\_utils (module)@\spxentry{g\_tracer\_utils}\spxextra{module}|spxpagem}
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils()}}}}} module consists of core utility subroutines to be used by all generic tracer modules. These include the lowest level functions for adding, allocating memory, and record keeping of individual generic tracers irrespective of their physical/chemical nature.
module consists of core utility subroutines to be used by all generic tracer modules. These include the lowest level functions for adding, allocating memory, and record keeping of individual generic tracers irrespective of their physical/chemical nature.

{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:detag-tracer-utils}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/g_tracer_utils:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_diag\_type}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_common}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_common}}}}}
&
The following type fields are common to ALL generic tracers and hence has to be instantiated only once.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_type}}}}}
&
Each generic tracer node is an instant of a FORTRAN type with the following member variables.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/g_tracer_utils:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_flux\_init()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_csdiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_set\_csdiag()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_common}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_set\_common()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_common}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_common()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_4d()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_3d()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_2d()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_4d_val}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_4d\_val()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_3d_val}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_3d\_val()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_2d_val}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_2d\_val()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_real()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_string()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_set\_2d()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_set\_3d()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_set\_4d()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_set\_real()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_send_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_send\_diag()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_name()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_alias()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_is_prog}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_is\_prog()}}}}}
&
Is the tracer prognostic?
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_next}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_get\_next()}}}}}
&
get the next tracer in the list
\\
\hline
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_vertdiff_g}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_vertdiff\_g()}}}}}
&
Vertical Diffusion of a tracer node.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/g_tracer_utils:detailed-description}}\label{\detokenize{api/generated/modules/g_tracer_utils:detag-tracer-utils}}
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils()}}}}} module consists of core utility subroutines to be used by all generic tracer modules. These include the lowest level functions for adding, allocating memory, and record keeping of individual generic tracers irrespective of their physical/chemical nature.
module consists of core utility subroutines to be used by all generic tracer modules. These include the lowest level functions for adding, allocating memory, and record keeping of individual generic tracers irrespective of their physical/chemical nature.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/g_tracer_utils:type-documentation}}\index{g\_diag\_type (fortran type in module g\_tracer\_utils)@\spxentry{g\_diag\_type}\spxextra{fortran type in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_diag_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_diag\_type}}}
Unknown.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dummy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: A dummy member, not part of the API.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_common (fortran type in module g\_tracer\_utils)@\spxentry{g\_tracer\_common}\spxextra{fortran type in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_common}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_common}}}
The following type fields are common to ALL generic tracers and hence has to be instantiated only once.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Domain extents.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Start index of the data domain in the j\sphinxhyphen{}direction.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_type (fortran type in module g\_tracer\_utils)@\spxentry{g\_tracer\_type}\spxextra{fortran type in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_type}}}
Each generic tracer node is an instant of a FORTRAN type with the following member variables. These member fields are supposed to uniquely define an individual tracer. One such type shall be instantiated for EACH individual tracer.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{field}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Tracer concentration field in space (and time) MOM keeps the prognostic tracer fields at 3 time levels, hence 4D.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{trunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Tracer concentration in river runoff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{requires\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Unknown.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=fm\_string\_len)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Tracer source filename.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_var\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=fm\_string\_len)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Tracer source variable name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_var\_unit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=fm\_string\_len)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Tracer source variable units.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_var\_gridspec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=fm\_string\_len)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Tracer source grid file name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_var\_record}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Unknown.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{requires\_src\_info}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Unknown.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_var\_unit\_conversion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: This factor depends on the tracer. Ask Jasmin.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{src\_var\_valid\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Unknown.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/g_tracer_utils:function-subroutine-documentation}}\index{g\_tracer\_flux\_init() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_flux\_init()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_flux_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_flux\_init}}}{\emph{g\_tracer}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g\_tracer} :: Pointer to this tracer node

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_set\_csdiag() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_set\_csdiag()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_csdiag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_set\_csdiag}}}{\emph{diag\_CS}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag\_cs} :: {[}in{]} Unknown

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::initialize\_mom\_generic\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_column\_physics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_set\_common() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_set\_common()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_common}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_set\_common}}}{\emph{isc}, \emph{iec}, \emph{jsc}, \emph{jec}, \emph{isd}, \emph{ied}, \emph{jsd}, \emph{jed}, \emph{nk}, \emph{ntau}, \emph{axes}, \emph{grid\_tmask}, \emph{grid\_kmt}, \emph{init\_time}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{isc} :: {[}in{]} Computation start index in i direction

\item {} 
\sphinxstylestrong{iec} :: {[}in{]} Computation end index in i direction

\item {} 
\sphinxstylestrong{jsc} :: {[}in{]} Computation start index in j direction

\item {} 
\sphinxstylestrong{jec} :: {[}in{]} Computation end index in j direction

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Data start index in i direction

\item {} 
\sphinxstylestrong{ied} :: {[}in{]} Data end index in i direction

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Data start index in j direction

\item {} 
\sphinxstylestrong{jed} :: {[}in{]} Data end index in j direction

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels in k direction

\item {} 
\sphinxstylestrong{ntau} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Domain axes?

\item {} 
\sphinxstylestrong{grid\_tmask} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{grid\_kmt} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_common() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_common()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_common}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_common}}}{\emph{isc}, \emph{iec}, \emph{jsc}, \emph{jec}, \emph{isd}, \emph{ied}, \emph{jsd}, \emph{jed}, \emph{nk}, \emph{ntau}, \emph{axes}, \emph{grid\_tmask}, \emph{grid\_mask\_coast}, \emph{grid\_kmt}, \emph{init\_time}, \emph{diag\_CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{isc} :: {[}out{]} Computation start index in i direction

\item {} 
\sphinxstylestrong{iec} :: {[}out{]} Computation end index in i direction

\item {} 
\sphinxstylestrong{jsc} :: {[}out{]} Computation start index in j direction

\item {} 
\sphinxstylestrong{jec} :: {[}out{]} Computation end index in j direction

\item {} 
\sphinxstylestrong{isd} :: {[}out{]} Data start index in i direction

\item {} 
\sphinxstylestrong{ied} :: {[}out{]} Data end index in i direction

\item {} 
\sphinxstylestrong{jsd} :: {[}out{]} Data start index in j direction

\item {} 
\sphinxstylestrong{jed} :: {[}out{]} Data end index in j direction

\item {} 
\sphinxstylestrong{nk} :: {[}out{]} Number of levels in k direction

\item {} 
\sphinxstylestrong{ntau} :: {[}out{]} Unknown

\item {} 
\sphinxstylestrong{axes} :: {[}out{]} Unknown

\item {} 
\sphinxstylestrong{init\_time} :: {[}out{]} Unknown

\item {} 
\sphinxstylestrong{grid\_tmask} :: Unknown

\item {} 
\sphinxstylestrong{grid\_mask\_coast} :: Unknown

\item {} 
\sphinxstylestrong{grid\_kmt} :: Unknown

\item {} 
\sphinxstylestrong{diag\_cs} :: Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_4d() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_4d()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_4d}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array\_ptr}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{array\_ptr} :: Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_3d() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_3d()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_3d}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array\_ptr}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{array\_ptr} :: Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_2d() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_2d()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_2d}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array\_ptr}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{array\_ptr} :: Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_4d\_val() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_4d\_val()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_4d_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_4d\_val}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array}, \emph{isd}, \emph{jsd}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{array} :: {[}out{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_3d\_val() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_3d\_val()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_3d_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_3d\_val}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array}, \emph{isd}, \emph{jsd}, \emph{ntau}, \emph{positive}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{ntau} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{positive} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{array} :: {[}out{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_2d\_val() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_2d\_val()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_2d_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_2d\_val}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array}, \emph{isd}, \emph{jsd}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{array} :: {[}out{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_real() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_real()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_real}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{value}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{value} :: {[}out{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_string() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_string()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_string}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{string}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{string} :: {[}out{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_set\_2d() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_set\_2d()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_set\_2d}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array}, \emph{isd}, \emph{jsd}, \emph{weight}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{array} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{weight} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_set\_3d() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_set\_3d()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_set\_3d}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array}, \emph{isd}, \emph{jsd}, \emph{ntau}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{ntau} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{array} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_set\_4d() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_set\_4d()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_set\_4d}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{array}, \emph{isd}, \emph{jsd}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{array} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_set\_real() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_set\_real()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_set\_real}}}{\emph{g\_tracer\_list}, \emph{name}, \emph{member}, \emph{value}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{member} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{g\_tracer\_list} :: Unknown

\item {} 
\sphinxstylestrong{value} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_send\_diag() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_send\_diag()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_send_diag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_send\_diag}}}{\emph{g\_tracer\_list}, \emph{model\_time}, \emph{tau}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g\_tracer\_list} :: pointer to the head of the generic tracer list

\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} Time

\item {} 
\sphinxstylestrong{tau} :: {[}in{]} The time step for the field 4D field to be reported

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_name() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_name()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_name}}}{\emph{g\_tracer}, \emph{string}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g\_tracer} :: Unknown

\item {} 
\sphinxstylestrong{string} :: {[}out{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_alias() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_alias()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_alias}}}{\emph{g\_tracer}, \emph{string}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g\_tracer} :: Unknown

\item {} 
\sphinxstylestrong{string} :: {[}out{]} Unknown

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::initialize\_mom\_generic\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_min_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_min\_max}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/register_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::register\_mom\_generic\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_is\_prog() (fortran function in module g\_tracer\_utils)@\spxentry{g\_tracer\_is\_prog()}\spxextra{fortran function in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_is_prog}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_is\_prog}}}{\emph{g\_tracer}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Is the tracer prognostic?
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g\_tracer} :: Pointer to tracer node

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_get\_next() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_get\_next()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_next}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_get\_next}}}{\emph{g\_tracer}, \emph{g\_tracer\_next}}{}
get the next tracer in the list
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g\_tracer} :: Pointer to tracer node

\item {} 
\sphinxstylestrong{g\_tracer\_next} :: Pointer to the next tracer node in the list

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{g\_tracer\_vertdiff\_g() (fortran subroutine in module g\_tracer\_utils)@\spxentry{g\_tracer\_vertdiff\_g()}\spxextra{fortran subroutine in module g\_tracer\_utils}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_vertdiff_g}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{g\_tracer\_utils/}}\sphinxbfcode{\sphinxupquote{g\_tracer\_vertdiff\_g}}}{\emph{g\_tracer}, \emph{h\_old}, \emph{ea}, \emph{eb}, \emph{dt}, \emph{kg\_m2\_to\_H}, \emph{m\_to\_H}, \emph{tau}, \emph{mom}}{}
Vertical Diffusion of a tracer node.

This subroutine solves a tridiagonal equation to find and set values of vertically diffused field for a tracer node.This is ported from GOLD (vertdiff) and simplified Since the surface flux from the atmosphere (stf) has the units of mol/m\textasciicircum{}2/sec the resulting tracer concentration has units of mol/Kg
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g\_tracer} :: Unknown

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment, in m or kg m\sphinxhyphen{}2.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} The amount of fluid entrained from the layer above, in H.

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} The amount of fluid entrained from the layer below, in H.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call, in s.

\item {} 
\sphinxstylestrong{kg\_m2\_to\_h} :: {[}in{]} A conversion factor that translates kg m\sphinxhyphen{}2 into the units of h\_old (H)

\item {} 
\sphinxstylestrong{m\_to\_h} :: {[}in{]} A conversion factor that translates m into the units of h\_old (H).

\item {} 
\sphinxstylestrong{tau} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{mom} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{generic\_tracer module reference}
\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer}}\label{\detokenize{api/generated/modules/generic_tracer:generic-tracer-module-reference}}\label{\detokenize{api/generated/modules/generic_tracer::doc}}\index{generic\_tracer (module)@\spxentry{generic\_tracer}\spxextra{module}|spxpagem}
A non\sphinxhyphen{}functioning template of the GFDL ocean BGC.

{\hyperref[\detokenize{api/generated/modules/generic_tracer:detageneric-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/generic_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

\sphinxcode{\sphinxupquote{generic\_tracer\_register()}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_init()}}}}}
&
Initialize generic tracers.
\\
\hline
\sphinxcode{\sphinxupquote{generic\_tracer\_register\_diag()}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_coupler\_get()}}}}}
&
Get coupler values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_coupler\_accumulate()}}}}}
&
Unknown.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_source}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_source()}}}}}
&
Calls the corresponding generic\_X\_update\_from\_source routine for each package X.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_update_from_bottom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_update\_from\_bottom()}}}}}
&
Update the tracers from bottom fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_vertdiff_g}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_vertdiff\_g()}}}}}
&
Vertically diffuse all generic tracers for GOLD ocean.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_coupler\_set()}}}}}
&
Set the coupler values for each generic tracer.
\\
\hline
\sphinxcode{\sphinxupquote{generic\_tracer\_end()}}
&
End this module by calling the corresponding generic\_X\_end for each package X.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_get_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_get\_list()}}}}}
&
Get a pointer to the head of the generic tracers list.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_get_diag_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer\_get\_diag\_list()}}}}}
&
Unknown.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/generic_tracer:detailed-description}}\label{\detokenize{api/generated/modules/generic_tracer:detageneric-tracer}}
A non\sphinxhyphen{}functioning template of the GFDL ocean BGC.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/generic_tracer:function-subroutine-documentation}}\index{generic\_tracer\_registerNone() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_registerNone()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_registerNone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_registerNone}}}{}{}
Unknown.

\end{fulllineitems}

\index{generic\_tracer\_init() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_init()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_init}}}{\emph{isc}, \emph{iec}, \emph{jsc}, \emph{jec}, \emph{isd}, \emph{ied}, \emph{jsd}, \emph{jed}, \emph{nk}, \emph{ntau}, \emph{axes}, \emph{grid\_tmask}, \emph{grid\_kmt}, \emph{init\_time}}{}
Initialize generic tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{isc} :: {[}in{]} Computation start index in i direction

\item {} 
\sphinxstylestrong{iec} :: {[}in{]} Computation end index in i direction

\item {} 
\sphinxstylestrong{jsc} :: {[}in{]} Computation start index in j direction

\item {} 
\sphinxstylestrong{jec} :: {[}in{]} Computation end index in j direction

\item {} 
\sphinxstylestrong{isd} :: {[}in{]} Data start index in i direction

\item {} 
\sphinxstylestrong{ied} :: {[}in{]} Data end index in i direction

\item {} 
\sphinxstylestrong{jsd} :: {[}in{]} Data start index in j direction

\item {} 
\sphinxstylestrong{jed} :: {[}in{]} Data end index in j direction

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels in k direction

\item {} 
\sphinxstylestrong{ntau} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Domain axes?

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time

\item {} 
\sphinxstylestrong{grid\_tmask} :: {[}in{]} Mask

\item {} 
\sphinxstylestrong{grid\_kmt} :: {[}in{]} Number of wet cells in column

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_register\_diagNone() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_register\_diagNone()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_register_diagNone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_register\_diagNone}}}{}{}
Unknown.

\end{fulllineitems}

\index{generic\_tracer\_coupler\_get() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_coupler\_get()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_coupler\_get}}}{\emph{IOB\_struc}}{}
Get coupler values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{iob\_struc} :: {[}in{]} Ice Ocean Boundary flux structure

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_coupler\_accumulate() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_coupler\_accumulate()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_accumulate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_coupler\_accumulate}}}{\emph{IOB\_struc}, \emph{weight}, \emph{model\_time}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iob\_struc} :: {[}in{]} Ice Ocean Boundary flux structure

\item {} 
\sphinxstylestrong{weight} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} Time

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_fluxes_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_fluxes\_accumulate}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_source() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_source()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_source}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_source}}}{\emph{Temp}, \emph{Salt}, \emph{rho\_dzt}, \emph{dzt}, \emph{hblt\_depth}, \emph{ilb}, \emph{jlb}, \emph{tau}, \emph{dtts}, \emph{grid\_dat}, \emph{model\_time}, \emph{nbands}, \emph{max\_wavelength\_band}, \emph{sw\_pen\_band}, \emph{opacity\_band}, \emph{internal\_heat}, \emph{frunoff}, \emph{grid\_ht}, \emph{current\_wave\_stress}, \emph{sosga}}{}
Calls the corresponding generic\_X\_update\_from\_source routine for each package X.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{temp} :: {[}in{]} Potential temperature {[}deg C{]}

\item {} 
\sphinxstylestrong{salt} :: {[}in{]} Salinity {[}psu{]}

\item {} 
\sphinxstylestrong{rho\_dzt} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{dzt} :: {[}in{]} Ocean layer thickness {[}m{]}

\item {} 
\sphinxstylestrong{hblt\_depth} :: {[}in{]} Boundary layer depth

\item {} 
\sphinxstylestrong{ilb} :: {[}in{]} Lower bounds of x extent of input arrays on data domain

\item {} 
\sphinxstylestrong{jlb} :: {[}in{]} Lower bounds of y extent of input arrays on data domain

\item {} 
\sphinxstylestrong{tau} :: {[}in{]} Time step index of field

\item {} 
\sphinxstylestrong{dtts} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{grid\_dat} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} Time

\item {} 
\sphinxstylestrong{nbands} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{max\_wavelength\_band} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{sw\_pen\_band} :: {[}in{]} Shortwave penetration

\item {} 
\sphinxstylestrong{opacity\_band} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{internal\_heat} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{frunoff} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{grid\_ht} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{current\_wave\_stress} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{sosga} :: {[}in{]} Global average sea surface salinity

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_update\_from\_bottom() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_update\_from\_bottom()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_update_from_bottom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_update\_from\_bottom}}}{\emph{dt}, \emph{tau}, \emph{model\_time}}{}
Update the tracers from bottom fluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step increment

\item {} 
\sphinxstylestrong{tau} :: {[}in{]} Time step index used for the concentration field

\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} Time

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_vertdiff\_g() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_vertdiff\_g()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_vertdiff_g}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_vertdiff\_g}}}{\emph{h\_old}, \emph{ea}, \emph{eb}, \emph{dt}, \emph{kg\_m2\_to\_H}, \emph{m\_to\_H}, \emph{tau}}{}
Vertically diffuse all generic tracers for GOLD ocean.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{kg\_m2\_to\_h} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{m\_to\_h} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{tau} :: {[}in{]} Unknown

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_coupler\_set() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_coupler\_set()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_coupler\_set}}}{\emph{IOB\_struc}, \emph{ST}, \emph{SS}, \emph{rho}, \emph{ilb}, \emph{jlb}, \emph{tau}, \emph{dzt}, \emph{sosga}, \emph{model\_time}}{}
Set the coupler values for each generic tracer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iob\_struc} :: {[}inout{]} Ice Ocean Boundary flux structure

\item {} 
\sphinxstylestrong{ilb} :: {[}in{]} Lower bounds of x extent of input arrays on data domain

\item {} 
\sphinxstylestrong{jlb} :: {[}in{]} Lower bounds of y extent of input arrays on data domain

\item {} 
\sphinxstylestrong{tau} :: {[}in{]} Time step index of field

\item {} 
\sphinxstylestrong{st} :: {[}in{]} Sea surface temperature {[}deg C{]}

\item {} 
\sphinxstylestrong{ss} :: {[}in{]} Sea surface salinity {[}psu{]}

\item {} 
\sphinxstylestrong{rho} :: {[}in{]} Ocean density {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{dzt} :: {[}in{]} Layer thickness {[}m{]}

\item {} 
\sphinxstylestrong{sosga} :: {[}in{]} Unknown

\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} Time

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_endNone() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_endNone()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_endNone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_endNone}}}{}{}
End this module by calling the corresponding generic\_X\_end for each package X.

\end{fulllineitems}

\index{generic\_tracer\_get\_list() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_get\_list()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_get_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_get\_list}}}{\emph{list}}{}
Get a pointer to the head of the generic tracers list.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{list} :: Pointer to head of the linked list

\end{description}\end{quote}

\end{fulllineitems}

\index{generic\_tracer\_get\_diag\_list() (fortran subroutine in module generic\_tracer)@\spxentry{generic\_tracer\_get\_diag\_list()}\spxextra{fortran subroutine in module generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_get_diag_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{generic\_tracer/}}\sphinxbfcode{\sphinxupquote{generic\_tracer\_get\_diag\_list}}}{\emph{list}}{}
Unknown.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{list} :: Pointer to head of the linked list

\end{description}\end{quote}

\end{fulllineitems}



\subsection{ideal\_age\_example module reference}
\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example}}\label{\detokenize{api/generated/modules/ideal_age_example:ideal-age-example-module-reference}}\label{\detokenize{api/generated/modules/ideal_age_example::doc}}\index{ideal\_age\_example (module)@\spxentry{ideal\_age\_example}\spxextra{module}|spxpagem}
A tracer package of ideal age tracers.

{\hyperref[\detokenize{api/generated/modules/ideal_age_example:detaideal-age-example}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/ideal_age_example:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_tracer\_cs}}}}}
&
The control structure for the ideal\_age\_tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/ideal_age_example:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_ideal\_age\_tracer()}}}}}
&
Register the ideal age tracer fields to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/initialize_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ideal\_age\_tracer()}}}}}
&
Sets the ideal age traces to their initial values and sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_tracer\_column\_physics()}}}}}
&
Applies diapycnal diffusion, aging and regeneration at the surface to the ideal age tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_stock()}}}}}
&
Calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_example_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example\_end()}}}}}
&
Deallocate any memory associated with this tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/ideal_age_example:detailed-description}}\label{\detokenize{api/generated/modules/ideal_age_example:detaideal-age-example}}
Originally by Robert Hallberg, 2002.

This file contains an example of the code that is needed to set up and use a set (in this case two) of dynamically passive tracers for diagnostic purposes. The tracers here are an ideal age tracer that ages at a rate of 1/year once it is isolated from the surface, and a vintage tracer, whose surface concentration grows exponen\sphinxhyphen{} with time with a 30\sphinxhyphen{}year timescale (similar to CFCs).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/ideal_age_example:type-documentation}}\index{ideal\_age\_tracer\_cs (fortran type in module ideal\_age\_example)@\spxentry{ideal\_age\_tracer\_cs}\spxextra{fortran type in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{ideal\_age\_tracer\_cs}}}
The control structure for the ideal\_age\_tracer package.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of tracers that are actually used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers in the mixed layer. The ideal.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file in which the age\sphinxhyphen{}tracer initial values can be found, or an empty string for internal initialization.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the IC\_file is in Z\sphinxhyphen{}space. The default is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this package, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The (uniform) initial condition value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{young\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The value assigned to tr at the surface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The value of tr used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sfc\_growth\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The exponential growth rate for the surface value {[}year\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_start\_year}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The year in which tracers start aging, or at which the surface value equals young\_val, in years.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracers\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, these tracers be set up via the initialization code if they are not found in the restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ages}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical( ntr\_max )}\sphinxstyleemphasis{{]}} :: Indicates whether each tracer ages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr\_max )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart controls structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr\_max )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/ideal_age_example:function-subroutine-documentation}}\index{register\_ideal\_age\_tracer() (fortran function in module ideal\_age\_example)@\spxentry{register\_ideal\_age\_tracer()}\spxextra{fortran function in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{register\_ideal\_age\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register the ideal age tracer fields to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_ideal\_age\_tracer.

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ideal\_age\_tracer() (fortran subroutine in module ideal\_age\_example)@\spxentry{initialize\_ideal\_age\_tracer()}\spxextra{fortran subroutine in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/initialize_ideal_age_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{initialize\_ideal\_age\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}}{}
Sets the ideal age traces to their initial values and sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_ideal\_age\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: Pointer to the control structure for the sponges.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::tracer\_z\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ideal\_age\_tracer\_column\_physics() (fortran subroutine in module ideal\_age\_example)@\spxentry{ideal\_age\_tracer\_column\_physics()}\spxextra{fortran subroutine in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{ideal\_age\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
Applies diapycnal diffusion, aging and regeneration at the surface to the ideal age tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_ideal\_age\_tracer.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ideal\_age\_stock() (fortran function in module ideal\_age\_example)@\spxentry{ideal\_age\_stock()}\spxextra{fortran function in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{ideal\_age\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated. If stock\_index is present, only the stock corresponding to that coded index is found.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_ideal\_age\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} the names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} the units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} the coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ideal\_age\_tracer\_surface\_state() (fortran subroutine in module ideal\_age\_example)@\spxentry{ideal\_age\_tracer\_surface\_state()}\spxextra{fortran subroutine in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{ideal\_age\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_ideal\_age\_tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ideal\_age\_example\_end() (fortran subroutine in module ideal\_age\_example)@\spxentry{ideal\_age\_example\_end()}\spxextra{fortran subroutine in module ideal\_age\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_example_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ideal\_age\_example/}}\sphinxbfcode{\sphinxupquote{ideal\_age\_example\_end}}}{\emph{CS}}{}
Deallocate any memory associated with this tracer package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_ideal\_age\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{idealized\_hurricane module reference}
\label{\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane}}\label{\detokenize{api/generated/modules/idealized_hurricane:idealized-hurricane-module-reference}}\label{\detokenize{api/generated/modules/idealized_hurricane::doc}}\index{idealized\_hurricane (module)@\spxentry{idealized\_hurricane}\spxextra{module}|spxpagem}
Forcing for the idealized hurricane and SCM\_idealized\_hurricane examples.

{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:detaidealized-hurricane}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/idealized_hurricane:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane\_cs}}}}}
&
Container for parameters describing idealized wind structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/idealized_hurricane:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane\_wind\_init()}}}}}
&
Initializes wind profile for the SCM idealized hurricane example.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane\_wind\_forcing()}}}}}
&
Computes the surface wind for the idealized hurricane test cases.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane\_wind\_profile()}}}}}
&
Calculate the wind speed at a location as a function of time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/scm_idealized_hurricane_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_idealized\_hurricane\_wind\_forcing()}}}}}
&
This subroutine is primarily needed as a legacy for reproducing answers.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/idealized_hurricane:detailed-description}}\label{\detokenize{api/generated/modules/idealized_hurricane:detaidealized-hurricane}}
Forcing for the idealized hurricane and SCM\_idealized\_hurricane examples.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/idealized_hurricane:type-documentation}}\index{idealized\_hurricane\_cs (fortran type in module idealized\_hurricane)@\spxentry{idealized\_hurricane\_cs}\spxextra{fortran type in module idealized\_hurricane}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{idealized\_hurricane/}}\sphinxbfcode{\sphinxupquote{idealized\_hurricane\_cs}}}
Container for parameters describing idealized wind structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_a}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mean air density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressure\_ambient}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Pressure at surface of ambient air {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressure\_central}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Pressure at surface at hurricane center {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rad\_max\_wind}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Radius of maximum winds {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_windspeed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum wind speeds {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hurr\_translation\_spd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Hurricane translation speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hurr\_translation\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Hurricane translation direction {[}radians{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gustiness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Gustiness (optional, used in u*) {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A reference ocean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hurr\_cen\_y0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The initial y position of the hurricane This experiment is conducted in a Cartesian grid and this is assumed to be in meters {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hurr\_cen\_x0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The initial x position of the hurricane This experiment is conducted in a Cartesian grid and this is assumed to be in meters {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{holland\_a}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameter ‘A’ from the Holland formula {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{holland\_b}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameter ‘B’ from the Holland formula {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{holland\_axbxdp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: ‘A’ x ‘B’ x (Pressure Ambient\sphinxhyphen{}Pressure central) for the Holland prorfile calculation {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{relative\_tau}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: A logical to take difference between wind and surface currents to compute the stress.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use expressions driving the idealized hurricane test case that recover the answers from the end of 2018. Otherwise use expressions that are rescalable and respect rotational symmetry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{scm\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true this being used in Single Column Model mode.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{br\_bench}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: A “benchmark” configuration (which is meant to provide identical wind to reproduce a previous experiment, where that wind formula contained an error)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dy\_from\_center}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: (Fixed) distance in y from storm center path {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mathematical constant.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{deg2rad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mathematical constant.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/idealized_hurricane:function-subroutine-documentation}}\index{idealized\_hurricane\_wind\_init() (fortran subroutine in module idealized\_hurricane)@\spxentry{idealized\_hurricane\_wind\_init()}\spxextra{fortran subroutine in module idealized\_hurricane}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{idealized\_hurricane/}}\sphinxbfcode{\sphinxupquote{idealized\_hurricane\_wind\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{CS}}{}
Initializes wind profile for the SCM idealized hurricane example.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Input parameter structure

\item {} 
\sphinxstylestrong{cs} :: Parameter container for this module

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{idealized\_hurricane\_wind\_forcing() (fortran subroutine in module idealized\_hurricane)@\spxentry{idealized\_hurricane\_wind\_forcing()}\spxextra{fortran subroutine in module idealized\_hurricane}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{idealized\_hurricane/}}\sphinxbfcode{\sphinxupquote{idealized\_hurricane\_wind\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Computes the surface wind for the idealized hurricane test cases.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} Surface state structure

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time in days

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Container for idealized hurricane parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane\_wind\_profile}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{idealized\_hurricane\_wind\_profile() (fortran subroutine in module idealized\_hurricane)@\spxentry{idealized\_hurricane\_wind\_profile()}\spxextra{fortran subroutine in module idealized\_hurricane}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_profile}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{idealized\_hurricane/}}\sphinxbfcode{\sphinxupquote{idealized\_hurricane\_wind\_profile}}}{\emph{CS}, \emph{US}, \emph{absf}, \emph{YY}, \emph{XX}, \emph{UOCN}, \emph{VOCN}, \emph{Tx}, \emph{Ty}}{}
Calculate the wind speed at a location as a function of time.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Container for idealized hurricane parameters

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{absf} :: {[}in{]} Input Coriolis magnitude {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{yy} :: {[}in{]} Location in m relative to center y {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{xx} :: {[}in{]} Location in m relative to center x {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{uocn} :: {[}in{]} X surface current {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vocn} :: {[}in{]} Y surface current {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tx} :: {[}out{]} X stress {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{ty} :: {[}out{]} Y stress {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane\_wind\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scm\_idealized\_hurricane\_wind\_forcing() (fortran subroutine in module idealized\_hurricane)@\spxentry{scm\_idealized\_hurricane\_wind\_forcing()}\spxextra{fortran subroutine in module idealized\_hurricane}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/scm_idealized_hurricane_wind_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{idealized\_hurricane/}}\sphinxbfcode{\sphinxupquote{scm\_idealized\_hurricane\_wind\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine is primarily needed as a legacy for reproducing answers. It is included as an additional subroutine rather than padded into the previous routine with flags to ease its eventual removal. Its functionality is replaced with the new routines and it can be deleted when answer changes are acceptable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} Surface state structure

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time in days

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Container for SCM parameters

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{isomip\_initialization module reference}
\label{\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization}}\label{\detokenize{api/generated/modules/isomip_initialization:isomip-initialization-module-reference}}\label{\detokenize{api/generated/modules/isomip_initialization::doc}}\index{isomip\_initialization (module)@\spxentry{isomip\_initialization}\spxextra{module}|spxpagem}
Configures the ISOMIP test case.

{\hyperref[\detokenize{api/generated/modules/isomip_initialization:detaisomip-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/isomip_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialize\_topography()}}}}}
&
Initialization of topography for the ISOMIP configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialize\_thickness()}}}}}
&
Initialization of thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialize\_temperature\_salinity()}}}}}
&
Initial values for temperature and salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialize\_sponges()}}}}}
&
Sets up the the inverse restoration time (Idamp), and.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/isomip_initialization:detailed-description}}\label{\detokenize{api/generated/modules/isomip_initialization:detaisomip-initialization}}
See this paper for details:
\sphinxurl{http://www.geosci-model-dev-discuss.net/8/9859/2015/gmdd-8-9859-2015.pdf}
.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/isomip_initialization:function-subroutine-documentation}}\index{isomip\_initialize\_topography() (fortran subroutine in module isomip\_initialization)@\spxentry{isomip\_initialize\_topography()}\spxextra{fortran subroutine in module isomip\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_initialization/}}\sphinxbfcode{\sphinxupquote{isomip\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
Initialization of topography for the ISOMIP configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isomip\_initialize\_thickness() (fortran subroutine in module isomip\_initialization)@\spxentry{isomip\_initialize\_thickness()}\spxextra{fortran subroutine in module isomip\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_initialization/}}\sphinxbfcode{\sphinxupquote{isomip\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{tv}, \emph{just\_read\_params}}{}
Initialization of thicknesses.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, including the eqn. of state.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma\_shelf\_zstar}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isomip\_initialize\_temperature\_salinity() (fortran subroutine in module isomip\_initialization)@\spxentry{isomip\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module isomip\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_initialization/}}\sphinxbfcode{\sphinxupquote{isomip\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initial values for temperature and salinity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing T \& S.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma\_shelf\_zstar}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isomip\_initialize\_sponges() (fortran subroutine in module isomip\_initialization)@\spxentry{isomip\_initialize\_sponges()}\spxextra{fortran subroutine in module isomip\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_initialization/}}\sphinxbfcode{\sphinxupquote{isomip\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{PF}, \emph{use\_ALE}, \emph{CSp}, \emph{ACSp}}{}
Sets up the the inverse restoration time (Idamp), and.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{use\_ale} :: {[}in{]} If true, indicates model is in ALE mode

\item {} 
\sphinxstylestrong{csp} :: Layer\sphinxhyphen{}mode sponge structure

\item {} 
\sphinxstylestrong{acsp} :: ALE\sphinxhyphen{}mode sponge structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma\_shelf\_zstar}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{isomip\_tracer module reference}
\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer}}\label{\detokenize{api/generated/modules/isomip_tracer:isomip-tracer-module-reference}}\label{\detokenize{api/generated/modules/isomip_tracer::doc}}\index{isomip\_tracer (module)@\spxentry{isomip\_tracer}\spxextra{module}|spxpagem}
Routines used to set up and use a set of (one for now) dynamically passive tracers in the ISOMIP configuration.

{\hyperref[\detokenize{api/generated/modules/isomip_tracer:detaisomip-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/isomip_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer\_cs}}}}}
&
ISOMIP tracer package control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/isomip_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/register_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_isomip\_tracer()}}}}}
&
This subroutine is used to register tracer fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/initialize_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_isomip\_tracer()}}}}}
&
Initializes the NTR tracer fields in tr(:,:,:,:)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion, including the surface boundary conditions and any other column tracer physics or chemistry to the tracers from this file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer\_end()}}}}}
&
Deallocate any memory used by the ISOMIP tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/isomip_tracer:detailed-description}}\label{\detokenize{api/generated/modules/isomip_tracer:detaisomip-tracer}}
For now, just one passive tracer is injected in the sponge layer.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/isomip_tracer:type-documentation}}\index{isomip\_tracer\_cs (fortran type in module isomip\_tracer)@\spxentry{isomip\_tracer\_cs}\spxextra{fortran type in module isomip\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{isomip\_tracer/}}\sphinxbfcode{\sphinxupquote{isomip\_tracer\_cs}}}
ISOMIP tracer package control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The full path to the IC file, or ” ” to initialize internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this package, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr )}\sphinxstyleemphasis{{]}} :: The value of tr used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sponges may be applied somewhere in the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers in this package.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/isomip_tracer:function-subroutine-documentation}}\index{register\_isomip\_tracer() (fortran function in module isomip\_tracer)@\spxentry{register\_isomip\_tracer()}\spxextra{fortran function in module isomip\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/register_isomip_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{isomip\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_isomip\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This subroutine is used to register tracer fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module (in/out).

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer to the tracer registry.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_isomip\_tracer() (fortran subroutine in module isomip\_tracer)@\spxentry{initialize\_isomip\_tracer()}\spxextra{fortran subroutine in module isomip\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/initialize_isomip_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_isomip\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{ALE\_sponge\_CSp}}{}
Initializes the NTR tracer fields in tr(:,:,:,:)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used. This is not being used for now.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to ISOMIP\_register\_tracer.

\item {} 
\sphinxstylestrong{ale\_sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isomip\_tracer\_column\_physics() (fortran subroutine in module isomip\_tracer)@\spxentry{isomip\_tracer\_column\_physics()}\spxextra{fortran subroutine in module isomip\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_tracer/}}\sphinxbfcode{\sphinxupquote{isomip\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine applies diapycnal diffusion, including the surface boundary conditions and any other column tracer physics or chemistry to the tracers from this file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to ISOMIP\_register\_tracer.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isomip\_tracer\_surface\_state() (fortran subroutine in module isomip\_tracer)@\spxentry{isomip\_tracer\_surface\_state()}\spxextra{fortran subroutine in module isomip\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_tracer/}}\sphinxbfcode{\sphinxupquote{isomip\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to ISOMIP\_register\_tracer.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ntr}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isomip\_tracer\_end() (fortran subroutine in module isomip\_tracer)@\spxentry{isomip\_tracer\_end()}\spxextra{fortran subroutine in module isomip\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{isomip\_tracer/}}\sphinxbfcode{\sphinxupquote{isomip\_tracer\_end}}}{\emph{CS}}{}
Deallocate any memory used by the ISOMIP tracer package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to ISOMIP\_register\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{kdtree module reference}
\label{\detokenize{api/generated/modules/kdtree:f/kdtree}}\label{\detokenize{api/generated/modules/kdtree:kdtree-module-reference}}\label{\detokenize{api/generated/modules/kdtree::doc}}\index{kdtree (module)@\spxentry{kdtree}\spxextra{module}|spxpagem}
A null version of K\sphinxhyphen{}d tree from geoKdTree.

{\hyperref[\detokenize{api/generated/modules/kdtree:detakdtree}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/kdtree:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/kdtree:f/kdtree/kd_root}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kd\_root}}}}}
&
A K\sphinxhyphen{}d tree tpe.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/kdtree:detailed-description}}\label{\detokenize{api/generated/modules/kdtree:detakdtree}}
A null version of K\sphinxhyphen{}d tree from geoKdTree.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/kdtree:type-documentation}}\index{kd\_root (fortran type in module kdtree)@\spxentry{kd\_root}\spxextra{fortran type in module kdtree}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/kdtree:f/kdtree/kd_root}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{kdtree/}}\sphinxbfcode{\sphinxupquote{kd\_root}}}
A K\sphinxhyphen{}d tree tpe.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dummy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: To stop a compiler from doing nothing.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{kelvin\_initialization module reference}
\label{\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization}}\label{\detokenize{api/generated/modules/kelvin_initialization:kelvin-initialization-module-reference}}\label{\detokenize{api/generated/modules/kelvin_initialization::doc}}\index{kelvin\_initialization (module)@\spxentry{kelvin\_initialization}\spxextra{module}|spxpagem}
Configures the model for the Kelvin wave experiment.

{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:detakelvin-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/kelvin_initialization:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_obc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_obc\_cs}}}}}
&
Control structure for Kelvin wave open boundaries.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/kelvin_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/register_kelvin_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_kelvin\_obc()}}}}}
&
Add Kelvin wave to OBC registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_obc\_end()}}}}}
&
Clean up the Kelvin wave OBC from registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialize\_topography()}}}}}
&
This subroutine sets up the Kelvin topography and land mask.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_set\_obc\_data()}}}}}
&
This subroutine sets the properties of flow at open boundary conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/kelvin_initialization:detailed-description}}\label{\detokenize{api/generated/modules/kelvin_initialization:detakelvin-initialization}}
Kelvin = coastally\sphinxhyphen{}trapped Kelvin waves from the ROMS examples. Initialize with level surfaces and drive the wave in at the west, radiate out at the east.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/kelvin_initialization:type-documentation}}\index{kelvin\_obc\_cs (fortran type in module kelvin\_initialization)@\spxentry{kelvin\_obc\_cs}\spxextra{fortran type in module kelvin\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_obc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{kelvin\_initialization/}}\sphinxbfcode{\sphinxupquote{kelvin\_obc\_cs}}}
Control structure for Kelvin wave open boundaries.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Vertical mode.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coast\_angle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Angle of coastline.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coast\_offset1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Longshore distance to coastal angle.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coast\_offset2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Longshore distance to coastal angle.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Bottom depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coriolis parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_range}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Density range.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mean density.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/kelvin_initialization:function-subroutine-documentation}}\index{register\_kelvin\_obc() (fortran function in module kelvin\_initialization)@\spxentry{register\_kelvin\_obc()}\spxextra{fortran function in module kelvin\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/register_kelvin_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{kelvin\_initialization/}}\sphinxbfcode{\sphinxupquote{register\_kelvin\_obc}}}{\emph{param\_file}, \emph{CS}, \emph{OBC\_Reg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Add Kelvin wave to OBC registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file.

\item {} 
\sphinxstylestrong{cs} :: Kelvin wave control structure.

\item {} 
\sphinxstylestrong{obc\_reg} :: OBC registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kelvin\_obc\_end() (fortran subroutine in module kelvin\_initialization)@\spxentry{kelvin\_obc\_end()}\spxextra{fortran subroutine in module kelvin\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_obc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{kelvin\_initialization/}}\sphinxbfcode{\sphinxupquote{kelvin\_obc\_end}}}{\emph{CS}}{}
Clean up the Kelvin wave OBC from registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Kelvin wave control structure.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/obc_register_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::obc\_register\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kelvin\_initialize\_topography() (fortran subroutine in module kelvin\_initialization)@\spxentry{kelvin\_initialize\_topography()}\spxextra{fortran subroutine in module kelvin\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{kelvin\_initialization/}}\sphinxbfcode{\sphinxupquote{kelvin\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
This subroutine sets up the Kelvin topography and land mask.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kelvin\_set\_obc\_data() (fortran subroutine in module kelvin\_initialization)@\spxentry{kelvin\_set\_obc\_data()}\spxextra{fortran subroutine in module kelvin\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{kelvin\_initialization/}}\sphinxbfcode{\sphinxupquote{kelvin\_set\_obc\_data}}}{\emph{OBC}, \emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{Time}}{}
This subroutine sets the properties of flow at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: Kelvin wave control structure.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{lock\_exchange\_initialization module reference}
\label{\detokenize{api/generated/modules/lock_exchange_initialization:f/lock_exchange_initialization}}\label{\detokenize{api/generated/modules/lock_exchange_initialization:lock-exchange-initialization-module-reference}}\label{\detokenize{api/generated/modules/lock_exchange_initialization::doc}}\index{lock\_exchange\_initialization (module)@\spxentry{lock\_exchange\_initialization}\spxextra{module}|spxpagem}
Initialization of the “lock exchange” experiment. lock\_exchange = A 2\sphinxhyphen{}d density driven hydraulic exchange flow.

{\hyperref[\detokenize{api/generated/modules/lock_exchange_initialization:detalock-exchange-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/lock_exchange_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/lock_exchange_initialization:f/lock_exchange_initialization/lock_exchange_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lock\_exchange\_initialize\_thickness()}}}}}
&
This subroutine initializes layer thicknesses for the lock\_exchange experiment.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/lock_exchange_initialization:detailed-description}}\label{\detokenize{api/generated/modules/lock_exchange_initialization:detalock-exchange-initialization}}
Initialization of the “lock exchange” experiment. lock\_exchange = A 2\sphinxhyphen{}d density driven hydraulic exchange flow.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/lock_exchange_initialization:function-subroutine-documentation}}\index{lock\_exchange\_initialize\_thickness() (fortran subroutine in module lock\_exchange\_initialization)@\spxentry{lock\_exchange\_initialize\_thickness()}\spxextra{fortran subroutine in module lock\_exchange\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/lock_exchange_initialization:f/lock_exchange_initialization/lock_exchange_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{lock\_exchange\_initialization/}}\sphinxbfcode{\sphinxupquote{lock\_exchange\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
This subroutine initializes layer thicknesses for the lock\_exchange experiment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{meso\_surface\_forcing module reference}
\label{\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing}}\label{\detokenize{api/generated/modules/meso_surface_forcing:meso-surface-forcing-module-reference}}\label{\detokenize{api/generated/modules/meso_surface_forcing::doc}}\index{meso\_surface\_forcing (module)@\spxentry{meso\_surface\_forcing}\spxextra{module}|spxpagem}
Sets forcing for the MESO configuration.

{\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:detameso-surface-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/meso_surface_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_surface_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_surface\_forcing\_cs}}}}}
&
This control structure is used to store parameters associated with the MESO forcing.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/meso_surface_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_buoyancy\_forcing()}}}}}
&
This subroutine sets up the MESO buoyancy forcing, which uses control\sphinxhyphen{}theory style specification restorative buoyancy fluxes at large scales.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_surface\_forcing\_init()}}}}}
&
Initialize the MESO surface forcing module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/meso_surface_forcing:detailed-description}}\label{\detokenize{api/generated/modules/meso_surface_forcing:detameso-surface-forcing}}
Rewritten by Robert Hallberg, June 2009.

This file contains the subroutines that a user should modify to to set the surface wind stresses and fluxes of buoyancy or temperature and fresh water. They are called when the run\sphinxhyphen{}time parameters WIND\_CONFIG or BUOY\_CONFIG are set to “USER”. The standard version has simple examples, along with run\sphinxhyphen{}time error messages that will cause the model to abort if this code has not been modified. This code is intended for use with relatively simple specifications of the forcing. For more complicated forms, it is probably a good idea to read the forcing from input files using “file” for WIND\_CONFIG and BUOY\_CONFIG.

MESO\_buoyancy forcing is used to set the surface buoyancy forcing, which may include a number of fresh water flux fields (evap, liq\_precip, froz\_precip, liq\_runoff, froz\_runoff, and vprec) and the surface heat fluxes (sw, lw, latent and sens) if temperature and salinity are state variables, or it may simply be the buoyancy flux if it is not. This routine also has coded a restoring to surface values of temperature and salinity.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/meso_surface_forcing:type-documentation}}\index{meso\_surface\_forcing\_cs (fortran type in module meso\_surface\_forcing)@\spxentry{meso\_surface\_forcing\_cs}\spxextra{fortran type in module meso\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_surface_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{meso\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{meso\_surface\_forcing\_cs}}}
This control structure is used to store parameters associated with the MESO forcing.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temperature and salinity are used as state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restorebuoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use restoring surface buoyancy forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The restoring rate at the surface {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant unresolved background gustiness that contributes to ustar {[}Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_restore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The temperature to restore the SST toward {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_restore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The salinity to restore the sea surface salnity toward {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The prescribed precip minus evap {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{solar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The shortwave forcing into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The prescribed longwave, latent and sensible heat flux into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The directory where NetCDF input files are.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salinityrestore\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file with the target sea surface salinity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sstrestore\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file with the target sea surface temperature.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{solar\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file with the shortwave forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heating\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file with the longwave, latent, and sensible heating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pme\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file with precipitation minus evaporation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/meso_surface_forcing:function-subroutine-documentation}}\index{meso\_buoyancy\_forcing() (fortran subroutine in module meso\_surface\_forcing)@\spxentry{meso\_buoyancy\_forcing()}\spxextra{fortran subroutine in module meso\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_buoyancy_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{meso\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{meso\_buoyancy\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine sets up the MESO buoyancy forcing, which uses control\sphinxhyphen{}theory style specification restorative buoyancy fluxes at large scales.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to MESO\_surface\_forcing\_init

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meso\_surface\_forcing\_init() (fortran subroutine in module meso\_surface\_forcing)@\spxentry{meso\_surface\_forcing\_init()}\spxextra{fortran subroutine in module meso\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{meso\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{meso\_surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initialize the MESO surface forcing module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom module reference}
\label{\detokenize{api/generated/modules/mom:f/mom}}\label{\detokenize{api/generated/modules/mom:mom-module-reference}}\label{\detokenize{api/generated/modules/mom::doc}}\index{mom (module)@\spxentry{mom}\spxextra{module}|spxpagem}
The central module of the MOM6 ocean model.

{\hyperref[\detokenize{api/generated/modules/mom:detamom}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_control_struct}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_control\_struct}}}}}
&
Control structure for the MOM module, including the variables that describe the state of the ocean.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_diag_ids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_ids}}}}}
&
A structure with diagnostic IDs of the state variables.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom()}}}}}
&
This subroutine orchestrates the time stepping of MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom_dynamics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_dynamics()}}}}}
&
Time step the ocean dynamics, including the momentum and continuity equations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom_tracer_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_tracer\_dyn()}}}}}
&
step\_MOM\_tracer\_dyn does tracer advection and lateral diffusion, bringing the tracers up to date with the changes in state due to the dynamics. Surface sources and sinks and remapping are handled via step\_MOM\_thermo.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom_thermo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_thermo()}}}}}
&
MOM\_step\_thermo orchestrates the thermodynamic time stepping and vertical remapping, via calls to diabatic (or adiabatic) and ALE\_main.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_offline()}}}}}
&
step\_offline is the main driver for running tracers offline in MOM6. This has been primarily developed with ALE configurations in mind. Some work has been done in isopycnal configuration, but the work is very preliminary. Some more detail about this capability along with some of the subroutines called here can be found in tracers/MOM\_offline\_control.F90
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/initialize_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_mom()}}}}}
&
Initialize MOM, including memory allocation, setting up parameters and diagnostics, initializing the ocean state variables, and initializing subsidiary modules.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/finish_mom_initialization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{finish\_mom\_initialization()}}}}}
&
Finishes initializing MOM and writes out the initial conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/register_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diags()}}}}}
&
Register certain diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_timing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_timing\_init()}}}}}
&
Set up CPU clock IDs for timing various subroutines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/set_restart_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_restart\_fields()}}}}}
&
Set the fields that are needed for bitwise identical restarting the time stepping scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/adjust_ssh_for_p_atm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_ssh\_for\_p\_atm()}}}}}
&
Apply a correction to the sea surface height to compensate for the atmospheric pressure (the inverse barometer).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/extract_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_surface\_state()}}}}}
&
Set the surface (return) properties of the ocean model by setting the appropriate fields in sfc\_state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/rotate_initial_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_initial\_state()}}}}}
&
Rotate initialization fields from input to rotated arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_state_is_synchronized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_is\_synchronized()}}}}}
&
Return true if all phases of step\_MOM are at the same point in time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/get_mom_state_elements}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_mom\_state\_elements()}}}}}
&
This subroutine offers access to values or pointers to other types from within the MOM\_control\_struct, allowing the MOM\_control\_struct to be opaque.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/get_ocean_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ocean\_stocks()}}}}}
&
Find the global integrals of various quantities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_end()}}}}}
&
End of ocean model, including memory deallocation.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom:detailed-description}}\label{\detokenize{api/generated/modules/mom:detamom}}
Modular Ocean Model (MOM) Version 6.0 (MOM6)

Additional contributions from:
\begin{itemize}
\item {} 
Whit Anderson

\item {} 
Brian Arbic

\item {} 
Will Cooke

\item {} 
Anand Gnanadesikan

\item {} 
Matthew Harrison

\item {} 
Mehmet Ilicak

\item {} 
Laura Jackson

\item {} 
Jasmine John

\item {} 
John Krasting

\item {} 
Zhi Liang

\item {} 
Bonnie Samuels

\item {} 
Harper Simmons

\item {} 
Laurent White

\item {} 
Niki Zadeh

\end{itemize}

MOM ice\sphinxhyphen{}shelf code was developed by
\begin{itemize}
\item {} 
Daniel Goldberg

\item {} 
Robert Hallberg

\item {} 
Chris Little

\item {} 
Olga Sergienko

\end{itemize}


\paragraph{Overview of MOM}
\label{\detokenize{api/generated/modules/mom:overview-of-mom}}\label{\detokenize{api/generated/modules/mom:namespacemom-1section-overview}}
This program (MOM) simulates the ocean by numerically solving the hydrostatic primitive equations in generalized Lagrangian vertical coordinates, typically tracking stretched pressure (p*) surfaces or following isopycnals in the ocean’s interior, and general orthogonal horizontal coordinates. Unlike earlier versions of MOM, in MOM6 these equations are horizontally discretized on an Arakawa C\sphinxhyphen{}grid. (It remains to be seen whether a B\sphinxhyphen{}grid dynamic core will be revived in MOM6 at a later date; for now applications requiring a B\sphinxhyphen{}grid discretization should use MOM5.1.) MOM6 offers a range of options for the physical parameterizations, from those most appropriate to highly idealized models for geophysical fluid dynamics studies to a rich suite of processes appropriate for realistic ocean simulations. The thermodynamic options typically use conservative temperature and preformed salinity as conservative state variables and a full nonlinear equation of state, but there are also idealized adiabatic configurations of the model that use fixed density layers. Version 6.0 of MOM continues in the long tradition of a commitment to climate\sphinxhyphen{}quality ocean simulations embodied in previous versions of MOM, even as it draws extensively on the lessons learned in the development of the Generalized Ocean Layered Dynamics (GOLD) ocean model, which was also primarily developed at NOAA/GFDL. MOM has also benefited tremendously from the FMS infrastructure, which it utilizes and shares with other component models developed at NOAA/GFDL.

When run is isopycnal\sphinxhyphen{}coordinate mode, the uppermost few layers are often used to describe a bulk mixed layer, including the effects of penetrating shortwave radiation. Either a split\sphinxhyphen{} explicit time stepping scheme or a non\sphinxhyphen{}split scheme may be used for the dynamics, while the time stepping may be split (and use different numbers of steps to cover the same interval) for the forcing, the thermodynamics, and for the dynamics. Most of the numerics are second order accurate in space. MOM can run with an absurdly thin minimum layer thickness. A variety of non\sphinxhyphen{}isopycnal vertical coordinate options are under development, but all exploit the advantages of a Lagrangian vertical coordinate, as discussed in detail by Adcroft and Hallberg (Ocean Modelling, 2006).

Details of the numerics and physical parameterizations are provided in the appropriate source files. All of the available options are selected at run\sphinxhyphen{}time by parsing the input files, usually MOM\_input and MOM\_override, and the options choices are then documented for each run in MOM\_param\_docs.

MOM6 integrates the equations forward in time in three distinct phases. In one phase, the dynamic equations for the velocities and layer thicknesses are advanced, capturing the propagation of external and internal inertia\sphinxhyphen{}gravity waves, Rossby waves, and other strictly adiabatic processes, including lateral stresses, vertical viscosity and momentum forcing, and interface height diffusion (commonly called Gent\sphinxhyphen{}McWilliams diffusion in depth\sphinxhyphen{} coordinate models). In the second phase, all tracers are advected and diffused along the layers. The third phase applies diabatic processes, vertical mixing of water properties, and perhaps vertical remapping to cause the layers to track the desired vertical coordinate.

The present file (\sphinxcode{\sphinxupquote{MOM.F90}}
) orchestrates the main time stepping loops. One time integration option for the dynamics uses a split explicit time stepping scheme to rapidly step the barotropic pressure and velocity fields. The barotropic velocities are averaged over the baroclinic time step before they are used to advect thickness and determine the baroclinic accelerations. As described in Hallberg and Adcroft (2009), a barotropic correction is applied to the time\sphinxhyphen{}mean layer velocities to ensure that the sum of the layer transports agrees with the time\sphinxhyphen{}mean barotropic transport, thereby ensuring that the estimates of the free surface from the sum of the layer thicknesses agrees with the final free surface height as calculated by the barotropic solver. The barotropic and baroclinic velocities are kept consistent by recalculating the barotropic velocities from the baroclinic transports each time step. This scheme is described in Hallberg, 1997, J. Comp. Phys. 135, 54\sphinxhyphen{}65 and in Hallberg and Adcroft, 2009, Ocean Modelling, 29, 15\sphinxhyphen{}26.

The other time integration options use non\sphinxhyphen{}split time stepping schemes based on the 3\sphinxhyphen{}step third order Runge\sphinxhyphen{}Kutta scheme described in Matsuno, 1966, J. Met. Soc. Japan, 44, 85\sphinxhyphen{}88, or on a two\sphinxhyphen{}step quasi\sphinxhyphen{}2nd order Runge\sphinxhyphen{}Kutta scheme. These are much slower than the split time\sphinxhyphen{}stepping scheme, but they are useful for providing a more robust solution for debugging cases where the more complicated split time\sphinxhyphen{}stepping scheme may be giving suspect solutions.

There are a range of closure options available. Horizontal velocities are subject to a combination of horizontal biharmonic and Laplacian friction (based on a stress tensor formalism) and a vertical Fickian viscosity (perhaps using the kinematic viscosity of water). The horizontal viscosities may be constant, spatially varying or may be dynamically calculated using Smagorinsky’s approach. A diapycnal diffusion of density and thermodynamic quantities is also allowed, but not required, as is horizontal diffusion of interface heights (akin to the Gent\sphinxhyphen{}McWilliams closure of geopotential coordinate models). The diapycnal mixing may use a fixed diffusivity or it may use the shear Richardson number dependent closure, like that described in Jackson et al. (JPO, 2008). When there is diapycnal diffusion, it applies to momentum as well. As this is in addition to the vertical viscosity, the vertical Prandtl always exceeds 1. A refined bulk\sphinxhyphen{}mixed layer is often used to describe the planetary boundary layer in realistic ocean simulations.

MOM has a number of noteworthy debugging capabilities. Excessively large velocities are truncated and MOM will stop itself after a number of such instances to keep the model from crashing altogether. This is useful in diagnosing failures, or (by accepting some truncations) it may be useful for getting the model past the adjustment from an ill\sphinxhyphen{}balanced initial condition. In addition, all of the accelerations in the columns with excessively large velocities may be directed to a text file. Parallelization errors may be diagnosed using the DEBUG option, which causes extensive checksums to be written out along with comments indicating where in the algorithm the sums originate and what variable is being summed. The point where these checksums differ between runs is usually a good indication of where in the code the problem lies. All of the test cases provided with MOM are routinely tested to ensure that they give bitwise identical results regardless of the domain decomposition, or whether they use static or dynamic memory allocation.


\paragraph{Structure of MOM}
\label{\detokenize{api/generated/modules/mom:structure-of-mom}}\label{\detokenize{api/generated/modules/mom:namespacemom-1section-structure}}
About 115 other files of source code and 4 header files comprise the MOM code, although there are several hundred more files that make up the FMS infrastructure upon which MOM is built. Each of the MOM files contains comments documenting what it does, and most of the file names are fairly self\sphinxhyphen{}evident. In addition, all subroutines and data types are referenced via a module use, only statement, and the module names are consistent with the file names, so it is not too hard to find the source file for a subroutine.

The typical MOM directory tree is as follows:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
../MOM
|\PYGZhy{}\PYGZhy{} config\PYGZus{}src
|   |\PYGZhy{}\PYGZhy{} coupled\PYGZus{}driver
|   |\PYGZhy{}\PYGZhy{} dynamic
|   `\PYGZhy{}\PYGZhy{} solo\PYGZus{}driver
|\PYGZhy{}\PYGZhy{} examples
|   |\PYGZhy{}\PYGZhy{} CM2G
|   |\PYGZhy{}\PYGZhy{} ...
|   `\PYGZhy{}\PYGZhy{} torus\PYGZus{}advection\PYGZus{}test
`\PYGZhy{}\PYGZhy{} src
    |\PYGZhy{}\PYGZhy{} core
    |\PYGZhy{}\PYGZhy{} diagnostics
    |\PYGZhy{}\PYGZhy{} equation\PYGZus{}of\PYGZus{}state
    |\PYGZhy{}\PYGZhy{} framework
    |\PYGZhy{}\PYGZhy{} ice\PYGZus{}shelf
    |\PYGZhy{}\PYGZhy{} initialization
    |\PYGZhy{}\PYGZhy{} parameterizations
    |   |\PYGZhy{}\PYGZhy{} lateral
    |   `\PYGZhy{}\PYGZhy{} vertical
    |\PYGZhy{}\PYGZhy{} tracer
    `\PYGZhy{}\PYGZhy{} user
\end{sphinxVerbatim}

Rather than describing each file here, each directory contents will be described to give a broad overview of the MOM code structure.

The directories under config\_src contain files that are used for configuring the code, for instance for coupled or ocean\sphinxhyphen{}only runs. Only one or two of these directories are used in compiling any, particular run.
\begin{itemize}
\item {} 
config\_src/coupled\_driver: The files here are used to couple MOM as a component in a larger run driven by the FMS coupler. This includes code that converts various forcing fields into the code structures and flux and unit conventions used by MOM, and converts the MOM surface fields back to the forms used by other FMS components.

\item {} 
config\_src/dynamic: The only file here is the version of \sphinxcode{\sphinxupquote{MOM\_memory.h}} that is used for dynamic memory configurations of MOM.

\item {} 
config\_src/solo\_driver: The files here are include the \_main driver that is used when MOM is configured as an ocean\sphinxhyphen{}only model, as well as the files that specify the surface forcing in this configuration.

\end{itemize}

The directories under examples provide a large number of working configurations of MOM, along with reference solutions for several different compilers on GFDL’s latest large computer. The versions of \sphinxcode{\sphinxupquote{MOM\_memory.h}}
in these directories need not be used if dynamic memory allocation is desired, and the answers should be unchanged.

The directories under src contain most of the MOM files. These files are used in every configuration using MOM.
\begin{itemize}
\item {} 
src/core: The files here constitute the MOM dynamic core. This directory also includes files with the types that describe the model’s lateral grid and have defined types that are shared across various MOM modules to allow for more succinct and flexible subroutine argument lists.

\item {} 
src/diagnostics: The files here calculate various diagnostics that are anciliary to the model itself. While most of these diagnostics do not directly affect the model’s solution, there are some, like the calculation of the deformation radius, that are used in some of the process parameterizations.

\item {} 
src/equation\_of\_state: These files describe the physical properties of sea\sphinxhyphen{}water, including both the equation of state and when it freezes.

\item {} 
src/framework: These files provide infrastructure utilities for MOM. Many are simply wrappers for capabilities provided by FMS, although others provide capabilities (like the file\_parser) that are unique to MOM. When MOM is adapted to use a modeling infrastructure distinct from FMS, most of the required changes are in this directory.

\item {} 
src/initialization: These are the files that are used to initialize the MOM grid or provide the initial physical state for MOM. These files are not intended to be modified, but provide a means for calling user\sphinxhyphen{}specific initialization code like the examples in src/user.

\item {} 
src/parameterizations/lateral: These files implement a number of quasi\sphinxhyphen{}lateral (along\sphinxhyphen{}layer) process parameterizations, including lateral viscosities, parameterizations of eddy effects, and the calculation of tidal forcing.

\item {} 
src/parameterizations/vertical: These files implement a number of vertical mixing or diabatic processes, including the effects of vertical viscosity and code to parameterize the planetary boundary layer. There is a separate driver that orchestrates this portion of the algorithm, and there is a diversity of parameterizations to be found here.

\item {} 
src/tracer: These files handle the lateral transport and diffusion of tracers, or are the code to implement various passive tracer packages. Additional tracer packages are readily accommodated.

\item {} 
src/user: These are either stub routines that a user could use to change the model’s initial conditions or forcing, or are examples that implement specific test cases. These files can easily be hand edited to create new analytically specified configurations.

\end{itemize}

Most simulations can be set up by modifying only the files MOM\_input, and possibly one or two of the files in src/user. In addition, the diag\_table (MOM\_diag\_table) will commonly be modified to tailor the output to the needs of the question at hand. The FMS utility mkmf works with a file called path\_names to build an appropriate makefile, and path\_names should be edited to reflect the actual location of the desired source code.

There are 3 publicly visible subroutines in this file (\sphinxcode{\sphinxupquote{MOM.F90}}
).
\begin{itemize}
\item {} 
step\_MOM steps MOM over a specified interval of time.

\item {} 
MOM\_initialize calls initialize and does other initialization that does not warrant user modification.

\item {} 
extract\_surface\_state determines the surface (bulk mixed layer if traditional isoycnal vertical coordinate) properties of the current model state and packages pointers to these fields into an exported structure.

\end{itemize}

The remaining subroutines in this file (\sphinxcode{\sphinxupquote{src/core/MOM.F90}}
) are:
\begin{itemize}
\item {} 
find\_total\_transport determines the barotropic mass transport.

\item {} 
register\_diags registers many diagnostic fields for the dynamic solver, or of the main model variables.

\item {} 
MOM\_timing\_init initializes various CPU time clocks.

\item {} 
write\_static\_fields writes out various time\sphinxhyphen{}invariant fields.

\item {} 
set\_restart\_fields is used to specify those fields that are written to and read from the restart file.

\end{itemize}


\paragraph{Diagnosing MOM heat budget}
\label{\detokenize{api/generated/modules/mom:diagnosing-mom-heat-budget}}\label{\detokenize{api/generated/modules/mom:namespacemom-1section-heat-budget}}
Here are some example heat budgets for the ALE version of MOM6.


\subparagraph{Depth integrated heat budget}
\label{\detokenize{api/generated/modules/mom:depth-integrated-heat-budget}}\label{\detokenize{api/generated/modules/mom:namespacemom-1subsection-2d-heat-budget}}
Depth integrated heat budget diagnostic for MOM.
\begin{itemize}
\item {} 
OPOTTEMPTEND\_2d = T\_ADVECTION\_XY\_2d + OPOTTEMPPMDIFF\_2d + HFDS + HFGEOU

\item {} 
T\_ADVECTION\_XY\_2d = horizontal advection

\item {} 
OPOTTEMPPMDIFF\_2d = neutral diffusion

\item {} 
HFDS = net surface boundary heat flux

\item {} 
HFGEOU = geothermal heat flux

\item {} 
HFDS = net surface boundary heat flux entering the ocean = rsntds + rlntds + hfls + hfss + heat\_pme + hfsifrazil

\item {} 
More heat flux cross\sphinxhyphen{}checks
\begin{itemize}
\item {} 
hfds = net\_heat\_coupler + hfsifrazil + heat\_pme

\item {} 
heat\_pme = heat\_content\_surfwater = heat\_content\_massin + heat\_content\_massout = heat\_content\_fprec + heat\_content\_cond + heat\_content\_vprec
\begin{itemize}
\item {} 
hfrunoffds + hfevapds + hfrainds

\end{itemize}

\end{itemize}

\end{itemize}


\subparagraph{Depth integrated heat budget}
\label{\detokenize{api/generated/modules/mom:namespacemom-1subsection-3d-heat-budget}}\label{\detokenize{api/generated/modules/mom:id1}}
Here is an example 3d heat budget diagnostic for MOM.
\begin{itemize}
\item {} 
OPOTTEMPTEND = T\_ADVECTION\_XY + TH\_TENDENCY\_VERT\_REMAP + OPOTTEMPDIFF + OPOTTEMPPMDIFF
\begin{itemize}
\item {} 
BOUNDARY\_FORCING\_HEAT\_TENDENCY + FRAZIL\_HEAT\_TENDENCY

\end{itemize}

\item {} 
OPOTTEMPTEND = net tendency of heat as diagnosed in \sphinxcode{\sphinxupquote{MOM.F90}}

\item {} 
T\_ADVECTION\_XY = heating of a cell from lateral advection

\item {} 
TH\_TENDENCY\_VERT\_REMAP = heating of a cell from vertical remapping

\item {} 
OPOTTEMPDIFF = heating of a cell from diabatic diffusion

\item {} 
OPOTTEMPPMDIFF = heating of a cell from neutral diffusion

\item {} 
BOUNDARY\_FORCING\_HEAT\_TENDENCY = heating of cell from boundary fluxes

\item {} 
FRAZIL\_HEAT\_TENDENCY = heating of cell from frazil

\item {} 
TH\_TENDENCY\_VERT\_REMAP has zero vertical sum, as it redistributes heat in vertical.

\item {} 
OPOTTEMPDIFF has zero vertical sum, as it redistributes heat in the vertical.

\item {} 
BOUNDARY\_FORCING\_HEAT\_TENDENCY generally has 3d structure, with k \textgreater{} 1 contributions from penetrative shortwave, and from other fluxes for the case when layers are tiny, in which case MOM6 partitions tendencies into k \textgreater{} 1 layers.

\item {} 
FRAZIL\_HEAT\_TENDENCY generally has 3d structure, since MOM6 frazil calculation checks the full ocean column.

\item {} 
FRAZIL\_HEAT\_TENDENCY{[}\sphinxhref{mailto:k=@sum}{k=@sum}{]} = HFSIFRAZIL = column integrated frazil heating.

\item {} 
HFDS = FRAZIL\_HEAT\_TENDENCY{[}\sphinxhref{mailto:k=@sum}{k=@sum}{]} + BOUNDARY\_FORCING\_HEAT\_TENDENCY{[}\sphinxhref{mailto:k=@sum}{k=@sum}{]}

\end{itemize}

Here is an example 2d heat budget (depth summed) diagnostic for MOM.
\begin{itemize}
\item {} 
OPOTTEMPTEND\_2d = T\_ADVECTION\_XY\_2d + OPOTTEMPPMDIFF\_2d + HFDS

\end{itemize}

Here is an example 3d salt budget diagnostic for MOM.
\begin{itemize}
\item {} 
OSALTTEND = S\_ADVECTION\_XY + SH\_TENDENCY\_VERT\_REMAP + OSALTDIFF + OSALTPMDIFF
\begin{itemize}
\item {} 
BOUNDARY\_FORCING\_SALT\_TENDENCY

\end{itemize}

\item {} 
OSALTTEND = net tendency of salt as diagnosed in \sphinxcode{\sphinxupquote{MOM.F90}}

\item {} 
S\_ADVECTION\_XY = salt convergence to cell from lateral advection

\item {} 
SH\_TENDENCY\_VERT\_REMAP = salt convergence to cell from vertical remapping

\item {} 
OSALTDIFF = salt convergence to cell from diabatic diffusion

\item {} 
OSALTPMDIFF = salt convergence to cell from neutral diffusion

\item {} 
BOUNDARY\_FORCING\_SALT\_TENDENCY = salt convergence to cell from boundary fluxes

\item {} 
SH\_TENDENCY\_VERT\_REMAP has zero vertical sum, as it redistributes salt in vertical.

\item {} 
OSALTDIFF has zero vertical sum, as it redistributes salt in the vertical.

\item {} 
BOUNDARY\_FORCING\_SALT\_TENDENCY generally has 3d structure, with k \textgreater{} 1 contributions from the case when layers are tiny, in which case MOM6 partitions tendencies into k \textgreater{} 1 layers.

\item {} 
SFDSI = BOUNDARY\_FORCING\_SALT\_TENDENCY{[}\sphinxhref{mailto:k=@sum}{k=@sum}{]}

\end{itemize}

Here is an example 2d salt budget (depth summed) diagnostic for MOM.
\begin{itemize}
\item {} 
OSALTTEND\_2d = S\_ADVECTION\_XY\_2d + OSALTPMDIFF\_2d + SFDSI (+ SALT\_FLUX\_RESTORE)

\end{itemize}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom:type-documentation}}\index{mom\_control\_struct (fortran type in module mom)@\spxentry{mom\_control\_struct}\spxextra{fortran type in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/mom_control_struct}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{mom\_control\_struct}}}
Control structure for the MOM module, including the variables that describe the state of the ocean.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* eta\_av\_bc {[}*) :: layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: potential temperature {[}degC{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: salinity {[}ppt{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: zonal velocity component {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: uh = u * h * dy at u grid points {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: accumulated zonal thickness fluxes to advect tracers {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: vh = v * h * dx at v grid points {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: accumulated meridional thickness fluxes to advect tracers {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A running time integral of the sea surface height {[}T m \textasciitilde{}\textgreater{} s m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: time\sphinxhyphen{}averaged (over a forcing time step) sea surface height with a correction for the inverse barometer {[}m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: free surface height or column mass time averaged over the last baroclinic dynamics time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: active mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_in\_cycle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The running time of the current time\sphinxhyphen{}stepping cycle in calls that step the dynamics, and also the length of the time integral of ssh\_rint {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_in\_thermo\_cycle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The running time of the current time\sphinxhyphen{}stepping cycle in calls that step the thermodynamics {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{{]}} :: Input grid metric.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Model grid metric.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rotate\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if index map is rotated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(verticalgrid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure containing vertical grid info

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure containing various unit conversion factors

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(thermo\_var\_ptrs)}\sphinxstyleemphasis{{]}} :: structure containing pointers to available thermodynamic fields

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_dyn\_rel\_adv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time of the dynamics relative to tracer advection and lateral mixing {[}T \textasciitilde{}\textgreater{} s{]}, or equivalently the elapsed time since advectively updating the tracers. t\_dyn\_rel\_adv is invariably positive and may span multiple coupling timesteps.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_dyn\_rel\_thermo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time of the dynamics relative to diabatic processes and remapping {[}T \textasciitilde{}\textgreater{} s{]}. t\_dyn\_rel\_thermo can be negative or positive depending on whether the diabatic processes are applied before or after the dynamics and may span multiple coupling timesteps.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_dyn\_rel\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time of the diagnostics relative to diabatic processes and remapping {[}T \textasciitilde{}\textgreater{} s{]}. t\_dyn\_rel\_diag is always positive, since the diagnostics must lag.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{preadv\_h\_stored}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the thicknesses from before the advective cycle have been stored for use in diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{{]}} :: structure to regulate diagnostic output timing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vertvisc\_type)}\sphinxstyleemphasis{{]}} :: structure containing vertical viscosities, bottom drag viscosities, and related fields

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(meke\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure containing fields related to the Mesoscale Eddy Kinetic Energy

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adiabatic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, there are no diapycnal mass fluxes, and no calls to routines to calculate or apply diapycnal fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_first}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply diabatic and thermodynamic processes before time stepping the dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ale\_algorithm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the ALE algorithm rather than layered isopycnal/stacked shallow water mode. This logical is set by calling the function useRegridding() from the MOM\_regridding module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{offline\_tracer\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true,

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: pointer to the ocean clock

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: (baroclinic) dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_therm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: thermodynamics time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thermo\_spans\_coupling}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, thermodynamic and tracer time steps can span multiple coupled time steps.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstep\_tot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The total number of dynamic timesteps tcaaken so far in this run segment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{count\_calls}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, count the calls to step\_MOM, rather than the number of dynamics steps in nstep\_tot.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntrunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number u,v truncations since last call to write\_energy

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cont\_stencil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The stencil for thickness from the continuity solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_dynamics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If false, does not call step\_MOM\_dyn\_*. This is an undocumented run\sphinxhyphen{}time flag that is fragile.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{split}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the split time stepping scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_rk2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use RK2 instead of RK3 in unsplit mode (i.e., no split between barotropic and baroclinic).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, diffuse interface height w/ a diffusivity KHTH.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_first}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, diffuse thickness before dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use submesoscale mixed layer restratifying scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usemeke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, call the MEKE parameterization.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usewaves}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, update Stokes drift.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_p\_surf\_in\_eos}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, always include the surface pressure contributions in equation of state calculations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtbt\_reset\_period}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time interval between dynamic recalculation of the barotropic time step {[}s{]}. If this is negative dtbt is never calculated, and if it is 0, dtbt is calculated every step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtbt\_reset\_interval}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: A time\_time representation of dtbt\_reset\_period.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtbt\_reset\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The next time DTBT should be calculated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_pre\_dyn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The thickness before the transports {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_pre\_dyn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Temperature before the transports {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_pre\_dyn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Salinity before the transports {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(accel\_diag\_ptrs)}\sphinxstyleemphasis{{]}} :: structure containing pointers to accelerations, for derived diagnostics (e.g., energy budgets)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cont\_diag\_ptrs)}\sphinxstyleemphasis{{]}} :: structure containing pointers to continuity equation terms, for derived diagnostics (e.g., energy budgets)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: previous value of u stored for diagnostics {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: previous value of v stored for diagnostics {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interp\_p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, linearly interpolate surface pressure over the coupling time step, using specified value at the end of the coupling step. False by default.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_prev\_set}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, p\_surf\_prev has been properly set from a previous time\sphinxhyphen{}step or the ocean restart file. This is only valid when interp\_p\_surf is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} at end previous call to step\_MOM

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_begin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} at start of {\color{red}\bfseries{}step\_MOM\_dyn\_}…

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_end}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} at end of {\color{red}\bfseries{}step\_MOM\_dyn\_}…

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{write\_ic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, then the initial conditions will be written to file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=120)}\sphinxstyleemphasis{{]}} :: A file into which the initial conditions are written in a new run if SAVE\_INITIAL\_CONDS is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calc\_rho\_for\_sea\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate rho to convert pressure to sea level.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Diagnostic mixed layer thickness over which to average surface tracer properties when a bulk mixed layer is not used {[}Z \textasciitilde{}\textgreater{} m{]}, or a negative value if a bulk mixed layer is being used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hfrz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If HFrz \textgreater{} 0, the nominal depth over which melt potential is computed {[}Z \textasciitilde{}\textgreater{} m{]}. The actual depth over which melt potential is computed is min(HFrz, OBLD), where OBLD is the boundary layer depth. If HFrz \textless{}= 0 (default), melt potential will not be computed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Depth scale over which to average surface flow to feedback to the coupler/driver {[}Z \textasciitilde{}\textgreater{} m{]} when bulk mixed layer is not used, or a negative value if a bulk mixed layer is being used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{check\_bad\_sfc\_vals}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, scan surface state for ridiculous values.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bad\_val\_ssh\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum SSH before triggering bad value message {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bad\_val\_sst\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum SST before triggering bad value message {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bad\_val\_sst\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum SST before triggering bad value message {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bad\_val\_sss\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum SSS before triggering bad value message {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bad\_val\_col\_thick}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum column thickness before triggering bad value message {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use expressions for the surface properties that recover the answers from the end of 2018. Otherwise, use more appropriate expressions that differ at roundoff for non\sphinxhyphen{}Boussinsq cases.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ids}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( mom\_diag\_ids )}\sphinxstyleemphasis{{]}} :: Handles used for diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{transport\_ids}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(transport\_diag\_ids)}\sphinxstyleemphasis{{]}} :: Handles used for transport diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sfc\_ids}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(surface\_diag\_ids)}\sphinxstyleemphasis{{]}} :: Handles used for surface diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_pre\_sync}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_grid\_storage)}\sphinxstyleemphasis{{]}} :: The grid (thicknesses) before remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_pre\_dyn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_grid\_storage)}\sphinxstyleemphasis{{]}} :: The grid (thicknesses) before dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dyn\_unsplit\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_dyn\_unsplit\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure used for the unsplit dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dyn\_unsplit\_rk2\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_dyn\_unsplit\_rk2\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure used for the unsplit RK2 dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dyn\_split\_rk2\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_dyn\_split\_rk2\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure used for the mode\sphinxhyphen{}split RK2 dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(thickness\_diffuse\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure used for the isopycnal height diffusive transport. This is also common referred to as Gent\sphinxhyphen{}McWilliams diffusion.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mixedlayer\_restrat\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure used for the mixed layer restratification.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{set\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(set\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure used to set viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diabatic\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure for the diabatic driver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(meke\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure for the MEKE updates.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{varmix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(varmix\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure for the variable mixing module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{barotropic\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(barotropic\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure for the barotropic module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the MOM tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_adv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_advect\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the MOM tracer advection control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_diff\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_hor\_diff\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the MOM along\sphinxhyphen{}isopycnal tracer diffusion control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_flow\_control\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure that orchestrates the calling of tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{update\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(update\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the control structure for updating open boundary condition properties.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_obc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the MOM open boundary condition type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sponge\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(sponge\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the layered\sphinxhyphen{}mode sponge control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_sponge\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_sponge\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the ALE\sphinxhyphen{}mode sponge control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the Arbitrary Lagrangian Eulerian (ALE) vertical coordinate control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sum\_output\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(sum\_output\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the globally summed output control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diagnostics\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diagnostics\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the MOM diagnostics control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{offline\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(offline\_transport\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the offline tracer transport control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ensemble\_ocean}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, this run is part of a larger ensemble for the purpose of data assimilation or statistical analysis.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{odacs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(oda\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: a pointer to the control structure for handling ensemble model state vectors and data assimilation increments and priors

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_diag\_ids (fortran type in module mom)@\spxentry{mom\_diag\_ids}\spxextra{fortran type in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/mom_diag_ids}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{mom\_diag\_ids}}}
A structure with diagnostic IDs of the state variables.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: 3\sphinxhyphen{}d state field diagnostic IDs

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: 3\sphinxhyphen{}d state field diagnostic IDs

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: 3\sphinxhyphen{}d state field diagnostic IDs

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ssh\_inst}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: 2\sphinxhyphen{}d state field diagnotic ID

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom:function-subroutine-documentation}}\index{step\_mom() (fortran subroutine in module mom)@\spxentry{step\_mom()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/step_mom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{step\_mom}}}{\emph{forces\_in}, \emph{fluxes\_in}, \emph{sfc\_state}, \emph{Time\_start}, \emph{time\_int\_in}, \emph{CS}, \emph{Waves}, \emph{do\_dynamics}, \emph{do\_thermodynamics}, \emph{start\_cycle}, \emph{end\_cycle}, \emph{cycle\_length}, \emph{reset\_therm}}{}
This subroutine orchestrates the time stepping of MOM. The adiabatic dynamics are stepped by calls to one of the {\color{red}\bfseries{}step\_MOM\_dyn\_}…routines. The action of lateral processes on tracers occur in calls to advect\_tracer and tracer\_hordiff. Vertical mixing and possibly remapping occur inside of diabatic.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces\_in} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{fluxes\_in} :: {[}inout{]} A structure with pointers to themodynamic, tracer and mass exchange forcing fields

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} surface ocean state

\item {} 
\sphinxstylestrong{time\_start} :: {[}in{]} starting time of a segment, as a time type

\item {} 
\sphinxstylestrong{time\_int\_in} :: {[}in{]} time interval covered by this run segment {[}s{]}.

\item {} 
\sphinxstylestrong{cs} :: control structure from initialize\_MOM

\item {} 
\sphinxstylestrong{waves} :: An optional pointer to a wave property CS

\item {} 
\sphinxstylestrong{do\_dynamics} :: {[}in{]} Present and false, do not do updates due to the dynamics.

\item {} 
\sphinxstylestrong{do\_thermodynamics} :: {[}in{]} Present and false, do not do updates due to the thermodynamics or remapping.

\item {} 
\sphinxstylestrong{start\_cycle} :: {[}in{]} This indicates whether this call is to be treated as the first call to step\_MOM in a time\sphinxhyphen{}stepping cycle; missing is like true.

\item {} 
\sphinxstylestrong{end\_cycle} :: {[}in{]} This indicates whether this call is to be treated as the last call to step\_MOM in a time\sphinxhyphen{}stepping cycle; missing is like true.

\item {} 
\sphinxstylestrong{cycle\_length} :: {[}in{]} The amount of time in a coupled time stepping cycle {[}s{]}.

\item {} 
\sphinxstylestrong{reset\_therm} :: {[}in{]} This indicates whether the running sums of thermodynamic quantities should be reset. If missing, this is like start\_cycle.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/adjust_ssh_for_p_atm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_ssh\_for\_p\_atm}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_depth_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_depth\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_resoln_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_resoln\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/complete_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::complete\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/extract_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_surface\_state}}}}} \sphinxcode{\sphinxupquote{id\_clock\_diagnostics}} \sphinxcode{\sphinxupquote{id\_clock\_dynamics}} \sphinxcode{\sphinxupquote{id\_clock\_ocean}} \sphinxcode{\sphinxupquote{id\_clock\_other}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_state_is_synchronized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_is\_synchronized}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::rotate\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::rotate\_mech\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/start_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::start\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom_dynamics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_dynamics}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom_thermo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_thermo}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom_tracer_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_tracer\_dyn}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_stokes_drift}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::update\_stokes\_drift}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{step\_mom\_dynamics() (fortran subroutine in module mom)@\spxentry{step\_mom\_dynamics()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/step_mom_dynamics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{step\_mom\_dynamics}}}{\emph{forces}, \emph{p\_surf\_begin}, \emph{p\_surf\_end}, \emph{dt}, \emph{dt\_thermo}, \emph{bbl\_time\_int}, \emph{CS}, \emph{Time\_local}, \emph{Waves}}{}
Time step the ocean dynamics, including the momentum and continuity equations.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{p\_surf\_begin} :: A pointer (perhaps NULL) to the surface pressure at the beginning of this dynamic step, intent in {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{p\_surf\_end} :: A pointer (perhaps NULL) to the surface pressure at the end of this dynamic step, intent in {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time interval covered by this call {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{dt\_thermo} :: {[}in{]} time interval covered by any updates that may span multiple dynamics steps {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{bbl\_time\_int} :: {[}in{]} time interval over which updates to the bottom boundary layer properties will apply {[}T \textasciitilde{}\textgreater{} s{]}, or zero not to update the properties.

\item {} 
\sphinxstylestrong{cs} :: control structure from initialize\_MOM

\item {} 
\sphinxstylestrong{time\_local} :: {[}in{]} End time of a segment, as a time type

\item {} 
\sphinxstylestrong{waves} :: Container for wave related parameters; the

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_bbl\_visc}} \sphinxcode{\sphinxupquote{id\_clock\_diagnostics}} \sphinxcode{\sphinxupquote{id\_clock\_dynamics}} \sphinxcode{\sphinxupquote{id\_clock\_ml\_restrat}} \sphinxcode{\sphinxupquote{id\_clock\_other}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_thick\_diff}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{step\_mom\_tracer\_dyn() (fortran subroutine in module mom)@\spxentry{step\_mom\_tracer\_dyn()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/step_mom_tracer_dyn}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{step\_mom\_tracer\_dyn}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{Time\_local}}{}
step\_MOM\_tracer\_dyn does tracer advection and lateral diffusion, bringing the tracers up to date with the changes in state due to the dynamics. Surface sources and sinks and remapping are handled via step\_MOM\_thermo.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thicknesses after the transports {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{time\_local} :: {[}in{]} The model time at the end of the time step.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_diagnostics}} \sphinxcode{\sphinxupquote{id\_clock\_other}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_thermo}} \sphinxcode{\sphinxupquote{id\_clock\_tracer}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{step\_mom\_thermo() (fortran subroutine in module mom)@\spxentry{step\_mom\_thermo()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/step_mom_thermo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{step\_mom\_thermo}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{fluxes}, \emph{dtdia}, \emph{Time\_end\_thermo}, \emph{update\_BBL}, \emph{Waves}}{}
MOM\_step\_thermo orchestrates the thermodynamic time stepping and vertical remapping, via calls to diabatic (or adiabatic) and ALE\_main.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Master MOM control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}inout{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} pointers to forcing fields

\item {} 
\sphinxstylestrong{dtdia} :: {[}in{]} The time interval over which to advance {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time\_end\_thermo} :: {[}in{]} End of averaging interval for thermo diags

\item {} 
\sphinxstylestrong{update\_bbl} :: {[}in{]} If true, calculate the bottom boundary layer properties.

\item {} 
\sphinxstylestrong{waves} :: Container for wave related parameters

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_adiabatic}} \sphinxcode{\sphinxupquote{id\_clock\_ale}} \sphinxcode{\sphinxupquote{id\_clock\_bbl\_visc}} \sphinxcode{\sphinxupquote{id\_clock\_diabatic}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_thermo}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{step\_offline() (fortran subroutine in module mom)@\spxentry{step\_offline()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/step_offline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{step\_offline}}}{\emph{forces}, \emph{fluxes}, \emph{sfc\_state}, \emph{Time\_start}, \emph{time\_interval}, \emph{CS}}{}
step\_offline is the main driver for running tracers offline in MOM6. This has been primarily developed with ALE configurations in mind. Some work has been done in isopycnal configuration, but the work is very preliminary. Some more detail about this capability along with some of the subroutines called here can be found in tracers/MOM\_offline\_control.F90
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} pointers to forcing fields

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} surface ocean state

\item {} 
\sphinxstylestrong{time\_start} :: {[}in{]} starting time of a segment, as a time type

\item {} 
\sphinxstylestrong{time\_interval} :: {[}in{]} time interval

\item {} 
\sphinxstylestrong{cs} :: control structure from initialize\_MOM

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/adjust_ssh_for_p_atm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_ssh\_for\_p\_atm}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/extract_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_surface\_state}}}}} \sphinxcode{\sphinxupquote{id\_clock\_ale}} \sphinxcode{\sphinxupquote{id\_clock\_offline\_tracer}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_mom() (fortran subroutine in module mom)@\spxentry{initialize\_mom()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/initialize_mom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{initialize\_mom}}}{\emph{Time}, \emph{Time\_init}, \emph{param\_file}, \emph{dirs}, \emph{CS}, \emph{restart\_CSp}, \emph{Time\_in}, \emph{offline\_tracer\_mode}, \emph{input\_restart\_file}, \emph{diag\_ptr}, \emph{count\_calls}, \emph{tracer\_flow\_CSp}}{}
Initialize MOM, including memory allocation, setting up parameters and diagnostics, initializing the ocean state variables, and initializing subsidiary modules.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}inout{]} model time, set in this routine

\item {} 
\sphinxstylestrong{time\_init} :: {[}in{]} The start time for the coupled model’s calendar

\item {} 
\sphinxstylestrong{param\_file} :: {[}out{]} structure indicating parameter file to parse

\item {} 
\sphinxstylestrong{dirs} :: {[}out{]} structure with directory paths

\item {} 
\sphinxstylestrong{cs} :: pointer set in this routine to MOM control structure

\item {} 
\sphinxstylestrong{restart\_csp} :: pointer set in this routine to the restart control structure that will be used for MOM.

\item {} 
\sphinxstylestrong{time\_in} :: {[}in{]} time passed to MOM\_initialize\_state when model is not being started from a restart file

\item {} 
\sphinxstylestrong{offline\_tracer\_mode} :: {[}out{]} True is returned if tracers are being run offline

\item {} 
\sphinxstylestrong{input\_restart\_file} :: {[}in{]} If present, name of restart file to read

\item {} 
\sphinxstylestrong{diag\_ptr} :: A pointer set in this routine to the diagnostic regulatory structure

\item {} 
\sphinxstylestrong{tracer\_flow\_csp} :: A pointer set in this routine to

\item {} 
\sphinxstylestrong{count\_calls} :: {[}in{]} If true, nstep\_tot counts the number of calls to step\_MOM instead of the number of dynamics timesteps.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_init}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_init}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_init}} \sphinxcode{\sphinxupquote{id\_clock\_unit\_tests}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/mom_timing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_timing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/register_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diags}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/rotate_initial_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_initial\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/set_restart_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_restart\_fields}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{finish\_mom\_initialization() (fortran subroutine in module mom)@\spxentry{finish\_mom\_initialization()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/finish_mom_initialization}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{finish\_mom\_initialization}}}{\emph{Time}, \emph{dirs}, \emph{CS}, \emph{restart\_CSp}}{}
Finishes initializing MOM and writes out the initial conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time, used in this routine

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} structure with directory paths

\item {} 
\sphinxstylestrong{cs} :: pointer to MOM control structure

\item {} 
\sphinxstylestrong{restart\_csp} :: pointer to the restart control structure that will be used for MOM.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_init}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_diags() (fortran subroutine in module mom)@\spxentry{register\_diags()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/register_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{register\_diags}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{IDs}, \emph{diag}}{}
Register certain diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}inout{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ids} :: {[}inout{]} A structure with the diagnostic IDs.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/initialize_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_timing\_init() (fortran subroutine in module mom)@\spxentry{mom\_timing\_init()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/mom_timing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{mom\_timing\_init}}}{\emph{CS}}{}
Set up CPU clock IDs for timing various subroutines.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} control structure set up by initialize\_MOM.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_adiabatic}} \sphinxcode{\sphinxupquote{id\_clock\_ale}} \sphinxcode{\sphinxupquote{id\_clock\_bbl\_visc}} \sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_diabatic}} \sphinxcode{\sphinxupquote{id\_clock\_diagnostics}} \sphinxcode{\sphinxupquote{id\_clock\_dynamics}} \sphinxcode{\sphinxupquote{id\_clock\_ml\_restrat}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_init}} \sphinxcode{\sphinxupquote{id\_clock\_ocean}} \sphinxcode{\sphinxupquote{id\_clock\_offline\_tracer}} \sphinxcode{\sphinxupquote{id\_clock\_other}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_init}} \sphinxcode{\sphinxupquote{id\_clock\_thermo}} \sphinxcode{\sphinxupquote{id\_clock\_thick\_diff}} \sphinxcode{\sphinxupquote{id\_clock\_tracer}} \sphinxcode{\sphinxupquote{id\_clock\_z\_diag}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/initialize_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_restart\_fields() (fortran subroutine in module mom)@\spxentry{set\_restart\_fields()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/set_restart_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{set\_restart\_fields}}}{\emph{GV}, \emph{US}, \emph{param\_file}, \emph{CS}, \emph{restart\_CSp}}{}
Set the fields that are needed for bitwise identical restarting the time stepping scheme. In addition to those specified here directly, there may be fields related to the forcing or to the barotropic solver that are needed; these are specified in sub\sphinxhyphen{} routines that are called from this one.

This routine should be altered if there are any changes to the time stepping scheme. The CHECK\_RESTART facility may be used to confirm that all needed restart fields have been included.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}inout{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}inout{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} opened file for parsing to get parameters

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} control structure set up by initialize\_MOM

\item {} 
\sphinxstylestrong{restart\_csp} :: pointer to the restart control structure that will be used for MOM.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/initialize_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjust\_ssh\_for\_p\_atm() (fortran subroutine in module mom)@\spxentry{adjust\_ssh\_for\_p\_atm()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/adjust_ssh_for_p_atm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{adjust\_ssh\_for\_p\_atm}}}{\emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{ssh}, \emph{p\_atm}, \emph{use\_EOS}}{}
Apply a correction to the sea surface height to compensate for the atmospheric pressure (the inverse barometer).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ssh} :: {[}inout{]} time mean surface height {[}m{]}

\item {} 
\sphinxstylestrong{p\_atm} :: Ocean surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{use\_eos} :: {[}in{]} If true, calculate the density for the SSH correction using the equation of state.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_offline}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_surface\_state() (fortran subroutine in module mom)@\spxentry{extract\_surface\_state()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/extract_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{extract\_surface\_state}}}{\emph{CS}, \emph{sfc\_state\_in}}{}
Set the surface (return) properties of the ocean model by setting the appropriate fields in sfc\_state. Unused fields are set to NULL or are unallocated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Master MOM control structure

\item {} 
\sphinxstylestrong{sfc\_state\_in} :: {[}inout{]} transparent ocean surface state structure shared with the calling routine data in this structure is intent out.

\end{itemize}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_offline}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_initial\_state() (fortran subroutine in module mom)@\spxentry{rotate\_initial\_state()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/rotate_initial_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{rotate\_initial\_state}}}{\emph{u\_in}, \emph{v\_in}, \emph{h\_in}, \emph{T\_in}, \emph{S\_in}, \emph{use\_temperature}, \emph{turns}, \emph{u}, \emph{v}, \emph{h}, \emph{T}, \emph{S}}{}
Rotate initialization fields from input to rotated arrays.
\begin{quote}\begin{description}
\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/initialize_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_state\_is\_synchronized() (fortran function in module mom)@\spxentry{mom\_state\_is\_synchronized()}\spxextra{fortran function in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/mom_state_is_synchronized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{mom\_state\_is\_synchronized}}}{\emph{CS}, \emph{adv\_dyn}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Return true if all phases of step\_MOM are at the same point in time.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: MOM control structure

\item {} 
\sphinxstylestrong{adv\_dyn} :: {[}in{]} If present and true, only check whether the advection is up\sphinxhyphen{}to\sphinxhyphen{}date with the dynamics.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: True if all phases of the update are synchronized.

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_mom\_state\_elements() (fortran subroutine in module mom)@\spxentry{get\_mom\_state\_elements()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/get_mom_state_elements}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{get\_mom\_state\_elements}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{C\_p}, \emph{C\_p\_scaled}, \emph{use\_temp}}{}
This subroutine offers access to values or pointers to other types from within the MOM\_control\_struct, allowing the MOM\_control\_struct to be opaque.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: MOM control structure

\item {} 
\sphinxstylestrong{g} :: structure containing metrics and grid info

\item {} 
\sphinxstylestrong{gv} :: structure containing vertical grid info

\item {} 
\sphinxstylestrong{us} :: A dimensional unit scaling type

\item {} 
\sphinxstylestrong{c\_p} :: {[}out{]} The heat capacity {[}J kg degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{c\_p\_scaled} :: {[}out{]} The heat capacity in scaled units {[}Q degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J kg degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{use\_temp} :: {[}out{]} True if temperature is a state variable

\end{itemize}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_ocean\_stocks() (fortran subroutine in module mom)@\spxentry{get\_ocean\_stocks()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/get_ocean_stocks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{get\_ocean\_stocks}}}{\emph{CS}, \emph{mass}, \emph{heat}, \emph{salt}, \emph{on\_PE\_only}}{}
Find the global integrals of various quantities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: MOM control structure

\item {} 
\sphinxstylestrong{heat} :: {[}out{]} The globally integrated integrated ocean heat {[}J{]}.

\item {} 
\sphinxstylestrong{salt} :: {[}out{]} The globally integrated integrated ocean salt {[}kg{]}.

\item {} 
\sphinxstylestrong{mass} :: {[}out{]} The globally integrated integrated ocean mass {[}kg{]}.

\item {} 
\sphinxstylestrong{on\_pe\_only} :: {[}in{]} If present and true, only sum on the local PE.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_stock_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_stock\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_end() (fortran subroutine in module mom)@\spxentry{mom\_end()}\spxextra{fortran subroutine in module mom}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom:f/mom/mom_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom/}}\sphinxbfcode{\sphinxupquote{mom\_end}}}{\emph{CS}}{}
End of ocean model, including memory deallocation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: MOM control structure

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ale module reference}
\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale}}\label{\detokenize{api/generated/modules/mom_ale:mom-ale-module-reference}}\label{\detokenize{api/generated/modules/mom_ale::doc}}\index{mom\_ale (module)@\spxentry{mom\_ale}\spxextra{module}|spxpagem}
This module contains the main regridding routines.

{\hyperref[\detokenize{api/generated/modules/mom_ale:detamom-ale}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_ale:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_cs}}}}}
&
ALE control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ale:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_init()}}}}}
&
This routine is typically called (from initialize\_MOM in file \sphinxcode{\sphinxupquote{MOM.F90}} ) before the main time integration loop to initialize the regridding stuff.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_register_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_register\_diags()}}}}}
&
Initialize diagnostics for the ALE module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/adjustgridforintegrity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustgridforintegrity()}}}}}
&
Crudely adjust (initial) grid for integrity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_end()}}}}}
&
End of regridding (memory deallocation).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main()}}}}}
&
Takes care of (1) building a new grid and (2) remapping all variables between the old grid and the new grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main\_offline()}}}}}
&
Takes care of (1) building a new grid and (2) remapping all variables between the old grid and the new grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_inputs()}}}}}
&
Regrid/remap stored fields used for offline tracer integrations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_tracer\_final()}}}}}
&
Remaps all tracers from h onto h\_target.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/check_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid()}}}}}
&
Check grid for negative thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_build_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_build\_grid()}}}}}
&
Generates new grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_regrid_accelerated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_regrid\_accelerated()}}}}}
&
For a state\sphinxhyphen{}based coordinate, accelerate the process of regridding by repeatedly applying the grid calculation algorithm.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_all\_state\_vars()}}}}}
&
This routine takes care of remapping all variable between the old and the new grids.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_remap\_scalar()}}}}}
&
Remaps a single scalar between grids described by thicknesses h\_src and h\_dst.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ts\_plm\_edge\_values()}}}}}
&
Calculate edge values (top and bottom of layer) for T and S consistent with a PLM reconstruction in the vertical direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_plm\_edge\_values()}}}}}
&
Calculate edge values (top and bottom of layer) 3d scalar array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ts\_ppm\_edge\_values()}}}}}
&
Calculate edge values (top and bottom of layer) for T and S consistent with a PPM reconstruction in the vertical direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initregridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_initregridding()}}}}}
&
Initializes regridding for the main ALE algorithm.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_getcoordinate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_getcoordinate()}}}}}
&
Query the target coordinate interfaces positions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_getcoordinateunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_getcoordinateunits()}}}}}
&
Query the target coordinate units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_init_conds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_remap\_init\_conds()}}}}}
&
Returns true if initial conditions should be regridded and remapped.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_update_regrid_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_update\_regrid\_weights()}}}}}
&
Updates the weights for time filtering the new grid generated in regridding.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_updateverticalgridtype}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_updateverticalgridtype()}}}}}
&
Update the vertical grid type with ALE information.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_writecoordinatefile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_writecoordinatefile()}}}}}
&
Write the vertical coordinate information into a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initthicknesstocoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_initthicknesstocoord()}}}}}
&
Set h to coordinate values for fixed coordinate systems.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ale:detailed-description}}\label{\detokenize{api/generated/modules/mom_ale:detamom-ale}}
Regridding comprises two steps:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Interpolation and creation of a new grid based on target interface densities (or any other criterion).

\item {} 
Remapping of quantities between old grid and new grid.

\end{enumerate}

Original module written by Laurent White, 2008.06.09


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_ale:type-documentation}}\index{ale\_cs (fortran type in module mom\_ale)@\spxentry{ale\_cs}\spxextra{fortran type in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_cs}}}
ALE control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_uv\_using\_old\_alg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the old “remapping via a delta z” method. If False, uses the new method that remaps between grids described by h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regrid\_time\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time\sphinxhyphen{}scale used in blending between the current (old) grid and the target (new) grid {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regridcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(regridding\_cs)}\sphinxstyleemphasis{{]}} :: Regridding parameters and work arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remapcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: Remapping parameters and work arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Used only for queries, not directly by this module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_after\_initialization}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Indicates whether to regrid/remap after initializing the state.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions for remapping that recover the answers from the end of 2018. Otherwise, use more robust and accurate forms of mathematically equivalent expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{show\_call\_tree}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: For debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure to regulate output

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tracer\_remap\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: diagnostic id

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_htracer\_remap\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: diagnostic id

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_htracer\_remap\_tendency\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: diagnostic id

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_tendency\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: flag for doing diagnostics

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dzregrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u\_preale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for zonal velocity before ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v\_preale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for meridional velocity before ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_preale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for layer thicknesses before ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_t\_preale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for temperatures before ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_s\_preale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for salinities before ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_e\_preale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for interface heights before ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vert\_remap\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for layer thicknesses used for remapping

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vert\_remap\_h\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: diagnostic id for layer thickness tendency due to ALE

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ale:function-subroutine-documentation}}\index{ale\_init() (fortran subroutine in module mom\_ale)@\spxentry{ale\_init()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_init}}}{\emph{param\_file}, \emph{GV}, \emph{US}, \emph{max\_depth}, \emph{CS}}{}
This routine is typically called (from initialize\_MOM in file \sphinxcode{\sphinxupquote{MOM.F90}}
) before the main time integration loop to initialize the regridding stuff. We read the MOM\_input file to register the values of different regridding/remapping parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} The maximum depth of the ocean {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initregridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_initregridding}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_register\_diags() (fortran subroutine in module mom\_ale)@\spxentry{ale\_register\_diags()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_register_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_register\_diags}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{diag}, \emph{CS}}{}
Initialize diagnostics for the ALE module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Time structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_thickness_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::get\_thickness\_units}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjustgridforintegrity() (fortran subroutine in module mom\_ale)@\spxentry{adjustgridforintegrity()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/adjustgridforintegrity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{adjustgridforintegrity}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}}{}
Crudely adjust (initial) grid for integrity. This routine is typically called (from initialize\_MOM in file \sphinxcode{\sphinxupquote{MOM.F90}}
) before the main time integration loop to initialize the regridding stuff. We read the MOM\_input file to register the values of different regridding/remapping parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Regridding parameters and options

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid informations

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Current 3D grid thickness that are to be adjusted {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_end() (fortran subroutine in module mom\_ale)@\spxentry{ale\_end()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_end}}}{\emph{CS}}{}
End of regridding (memory deallocation). This routine is typically called (from MOM\_end in file \sphinxcode{\sphinxupquote{MOM.F90}}
) after the main time integration loop to deallocate the regridding stuff.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_main() (fortran subroutine in module mom\_ale)@\spxentry{ale\_main()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_main}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{u}, \emph{v}, \emph{tv}, \emph{Reg}, \emph{CS}, \emph{OBC}, \emph{dt}, \emph{frac\_shelf\_h}}{}
Takes care of (1) building a new grid and (2) remapping all variables between the old grid and the new grid. The creation of the new grid can be based on z coordinates, target interface densities, sigma coordinates or any arbitrary coordinate system.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid informations

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Current 3D grid obtained after the last time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocity field {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Meridional velocity field {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamic variable structure

\item {} 
\sphinxstylestrong{reg} :: Tracer registry structure

\item {} 
\sphinxstylestrong{cs} :: Regridding parameters and options

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step between calls to ALE\_main {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{frac\_shelf\_h} :: Fractional ice shelf coverage

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_update_regrid_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_update\_regrid\_weights}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/check_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_update\_remap\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_all\_state\_vars}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_main\_offline() (fortran subroutine in module mom\_ale)@\spxentry{ale\_main\_offline()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_main\_offline}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{tv}, \emph{Reg}, \emph{CS}, \emph{OBC}, \emph{dt}}{}
Takes care of (1) building a new grid and (2) remapping all variables between the old grid and the new grid. The creation of the new grid can be based on z coordinates, target interface densities, sigma coordinates or any arbitrary coordinate system.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid informations

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Current 3D grid obtained after the last time step {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamic variable structure

\item {} 
\sphinxstylestrong{reg} :: Tracer registry structure

\item {} 
\sphinxstylestrong{cs} :: Regridding parameters and options

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step between calls to ALE\_main {[}T \textasciitilde{}\textgreater{} s{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_update_regrid_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_update\_regrid\_weights}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/check_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_all\_state\_vars}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_advection\_ale}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_offline\_inputs() (fortran subroutine in module mom\_ale)@\spxentry{ale\_offline\_inputs()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_offline\_inputs}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{tv}, \emph{Reg}, \emph{uhtr}, \emph{vhtr}, \emph{Kd}, \emph{debug}, \emph{OBC}}{}
Regrid/remap stored fields used for offline tracer integrations. These input fields are assumed to have the same layer thicknesses at the end of the last offline interval (which should be a Zstar grid). This routine builds a grid on the runtime specified vertical coordinate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Regridding parameters and options

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid informations

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamic variable structure

\item {} 
\sphinxstylestrong{reg} :: Tracer registry structure

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Zonal mass fluxes

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Meridional mass fluxes

\item {} 
\sphinxstylestrong{kd} :: {[}inout{]} Input diffusivites

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true, then turn checksums

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_remap\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_column_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging::check\_column\_integrals}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/check_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/interpolate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_vkernels::interpolate\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/reintegrate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_vkernels::reintegrate\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_all\_state\_vars}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/update_offline_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::update\_offline\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_offline\_tracer\_final() (fortran subroutine in module mom\_ale)@\spxentry{ale\_offline\_tracer\_final()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_offline\_tracer\_final}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{tv}, \emph{h\_target}, \emph{Reg}, \emph{CS}, \emph{OBC}}{}
Remaps all tracers from h onto h\_target. This is intended to be called when tracers are done offline. In the case where transports don’t quite conserve, we still want to make sure that layer thicknesses offline do not drift too far away from the online model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid informations

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Current 3D grid obtained after the last time step {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamic variable structure

\item {} 
\sphinxstylestrong{h\_target} :: {[}inout{]} Current 3D grid obtained after last time step {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{reg} :: Tracer registry structure

\item {} 
\sphinxstylestrong{cs} :: Regridding parameters and options

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/check_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_all\_state\_vars}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_grid() (fortran subroutine in module mom\_ale)@\spxentry{check\_grid()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/check_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{check\_grid}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{threshold}}{}
Check grid for negative thicknesses.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Current 3D grid obtained after the last time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{threshold} :: {[}in{]} Value below which to flag issues, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_tracer\_final}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_build\_grid() (fortran subroutine in module mom\_ale)@\spxentry{ale\_build\_grid()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_build_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_build\_grid}}}{\emph{G}, \emph{GV}, \emph{regridCS}, \emph{remapCS}, \emph{h}, \emph{tv}, \emph{debug}, \emph{frac\_shelf\_h}}{}
Generates new grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{regridcs} :: {[}in{]} Regridding parameters and options

\item {} 
\sphinxstylestrong{remapcs} :: {[}in{]} Remapping parameters and options

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamical variable structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Current 3D grid obtained after the last time step {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true, show the call tree

\item {} 
\sphinxstylestrong{frac\_shelf\_h} :: Fractional ice shelf coverage

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_regrid\_accelerated() (fortran subroutine in module mom\_ale)@\spxentry{ale\_regrid\_accelerated()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_regrid_accelerated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_regrid\_accelerated}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{tv}, \emph{n}, \emph{u}, \emph{v}, \emph{OBC}, \emph{Reg}, \emph{dt}, \emph{dzRegrid}, \emph{initial}}{}
For a state\sphinxhyphen{}based coordinate, accelerate the process of regridding by repeatedly applying the grid calculation algorithm.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: ALE control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Original thicknesses {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermo vars (T/S/EOS)

\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of times to regrid

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{reg} :: Tracer registry to remap onto new grid

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Model timestep to provide a timescale for regridding {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{dzregrid} :: {[}inout{]} Final change in interface positions

\item {} 
\sphinxstylestrong{initial} :: {[}in{]} Whether we’re being called from an initialization routine (and expect diagnostics to work)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_update_regrid_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_update\_regrid\_weights}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_all\_state\_vars}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remap\_all\_state\_vars() (fortran subroutine in module mom\_ale)@\spxentry{remap\_all\_state\_vars()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{remap\_all\_state\_vars}}}{\emph{CS\_remapping}, \emph{CS\_ALE}, \emph{G}, \emph{GV}, \emph{h\_old}, \emph{h\_new}, \emph{Reg}, \emph{OBC}, \emph{dxInterface}, \emph{u}, \emph{v}, \emph{debug}, \emph{dt}}{}
This routine takes care of remapping all variable between the old and the new grids. When velocity components need to be remapped, thicknesses at velocity points are taken to be arithmetic averages of tracer thicknesses. This routine is called during initialization of the model at time=0, to remap initiali conditions to the model grid. It is also called during a time step to update the state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs\_remapping} :: {[}in{]} Remapping control structure

\item {} 
\sphinxstylestrong{cs\_ale} :: {[}in{]} ALE control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Thickness of source grid {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Thickness of destination grid {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{reg} :: Tracer registry structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{dxinterface} :: {[}in{]} Change in interface position

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true, show the call tree

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step for diagnostics {[}T \textasciitilde{}\textgreater{} s{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_tracer\_final}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_regrid_accelerated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_regrid\_accelerated}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_remap\_scalar() (fortran subroutine in module mom\_ale)@\spxentry{ale\_remap\_scalar()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_remap\_scalar}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{nk\_src}, \emph{h\_src}, \emph{s\_src}, \emph{h\_dst}, \emph{s\_dst}, \emph{all\_cells}, \emph{old\_remap}, \emph{answers\_2018}}{}
Remaps a single scalar between grids described by thicknesses h\_src and h\_dst. h\_dst must be dimensioned as a model array with GVke layers while h\_src can have an arbitrary number of layers specified by nk\_src.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Remapping control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{nk\_src} :: {[}in{]} Number of levels on source grid

\item {} 
\sphinxstylestrong{h\_src} :: {[}in{]} Level thickness of source grid {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{s\_src} :: {[}in{]} Scalar on source grid

\item {} 
\sphinxstylestrong{h\_dst} :: {[}in{]} Level thickness of destination grid {[}H \textasciitilde{}\textgreater{} m or kg\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{s\_dst} :: {[}inout{]} Scalar on destination grid

\item {} 
\sphinxstylestrong{all\_cells} :: {[}in{]} If false, only reconstruct for non\sphinxhyphen{}vanished cells. Use all vanished layers otherwise (default).

\item {} 
\sphinxstylestrong{old\_remap} :: {[}in{]} If true, use the old “remapping\_core\_w” method, otherwise use “remapping\_core\_h”.

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true, use the order of arithmetic and expressions that recover the answers for remapping from the end of 2018. Otherwise, use more robust forms of the same expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dzfromh1h2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::dzfromh1h2}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z::mom\_initialize\_tracer\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ts\_plm\_edge\_values() (fortran subroutine in module mom\_ale)@\spxentry{ts\_plm\_edge\_values()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_plm_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ts\_plm\_edge\_values}}}{\emph{CS}, \emph{S\_t}, \emph{S\_b}, \emph{T\_t}, \emph{T\_b}, \emph{G}, \emph{GV}, \emph{tv}, \emph{h}, \emph{bdry\_extrap}}{}
Calculate edge values (top and bottom of layer) for T and S consistent with a PLM reconstruction in the vertical direction. Boundary reconstructions are PCM unless bdry\_extrap is true.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} module control structure

\item {} 
\sphinxstylestrong{s\_t} :: {[}inout{]} Salinity at the top edge of each layer

\item {} 
\sphinxstylestrong{s\_b} :: {[}inout{]} Salinity at the bottom edge of each layer

\item {} 
\sphinxstylestrong{t\_t} :: {[}inout{]} Temperature at the top edge of each layer

\item {} 
\sphinxstylestrong{t\_b} :: {[}inout{]} Temperature at the bottom edge of each layer

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} thermodynamics structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{bdry\_extrap} :: {[}in{]} If true, use high\sphinxhyphen{}order boundary extrapolation within boundary cells

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_plm\_edge\_values}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_nonbouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/trim_for_ice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::trim\_for\_ice}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_plm\_edge\_values() (fortran subroutine in module mom\_ale)@\spxentry{ale\_plm\_edge\_values()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_plm_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_plm\_edge\_values}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{Q}, \emph{bdry\_extrap}, \emph{Q\_t}, \emph{Q\_b}}{}
Calculate edge values (top and bottom of layer) 3d scalar array. Boundary reconstructions are PCM unless bdry\_extrap is true.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} module control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{q} :: {[}in{]} 3d scalar array

\item {} 
\sphinxstylestrong{bdry\_extrap} :: {[}in{]} If true, use high\sphinxhyphen{}order boundary extrapolation within boundary cells

\item {} 
\sphinxstylestrong{q\_t} :: {[}inout{]} Scalar at the top edge of each layer

\item {} 
\sphinxstylestrong{q\_b} :: {[}inout{]} Scalar at the bottom edge of each layer

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_extrapolate_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_extrapolate\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_monotonized_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_monotonized\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_slope_wa}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_slope\_wa}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ts\_plm\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ts\_ppm\_edge\_values() (fortran subroutine in module mom\_ale)@\spxentry{ts\_ppm\_edge\_values()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ts\_ppm\_edge\_values}}}{\emph{CS}, \emph{S\_t}, \emph{S\_b}, \emph{T\_t}, \emph{T\_b}, \emph{G}, \emph{GV}, \emph{tv}, \emph{h}, \emph{bdry\_extrap}}{}
Calculate edge values (top and bottom of layer) for T and S consistent with a PPM reconstruction in the vertical direction. Boundary reconstructions are PCM unless bdry\_extrap is true.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} module control structure

\item {} 
\sphinxstylestrong{s\_t} :: {[}inout{]} Salinity at the top edge of each layer

\item {} 
\sphinxstylestrong{s\_b} :: {[}inout{]} Salinity at the bottom edge of each layer

\item {} 
\sphinxstylestrong{t\_t} :: {[}inout{]} Temperature at the top edge of each layer

\item {} 
\sphinxstylestrong{t\_b} :: {[}inout{]} Temperature at the bottom edge of each layer

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} thermodynamics structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{bdry\_extrap} :: {[}in{]} If true, use high\sphinxhyphen{}order boundary extrapolation within boundary cells

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_implicit\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_reconstruction}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_nonbouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_initregridding() (fortran subroutine in module mom\_ale)@\spxentry{ale\_initregridding()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initregridding}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_initregridding}}}{\emph{GV}, \emph{US}, \emph{max\_depth}, \emph{param\_file}, \emph{mdl}, \emph{regridCS}}{}
Initializes regridding for the main ALE algorithm.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} The maximum depth of the ocean {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file

\item {} 
\sphinxstylestrong{mdl} :: {[}in{]} Name of calling module

\item {} 
\sphinxstylestrong{regridcs} :: {[}out{]} Regridding parameters and work arrays

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_getcoordinate() (fortran function in module mom\_ale)@\spxentry{ale\_getcoordinate()}\spxextra{fortran function in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_getcoordinate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_getcoordinate}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Query the target coordinate interfaces positions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_getcoordinateunits() (fortran function in module mom\_ale)@\spxentry{ale\_getcoordinateunits()}\spxextra{fortran function in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_getcoordinateunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_getcoordinateunits}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=20)}\sphinxstyleemphasis{{]}}}
Query the target coordinate units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_remap\_init\_conds() (fortran function in module mom\_ale)@\spxentry{ale\_remap\_init\_conds()}\spxextra{fortran function in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_init_conds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_remap\_init\_conds}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if initial conditions should be regridded and remapped.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_update\_regrid\_weights() (fortran subroutine in module mom\_ale)@\spxentry{ale\_update\_regrid\_weights()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_update_regrid_weights}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_update\_regrid\_weights}}}{\emph{dt}, \emph{CS}}{}
Updates the weights for time filtering the new grid generated in regridding.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time\sphinxhyphen{}step used between ALE calls {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: ALE control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_regrid_accelerated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_regrid\_accelerated}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_updateverticalgridtype() (fortran subroutine in module mom\_ale)@\spxentry{ale\_updateverticalgridtype()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_updateverticalgridtype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_updateverticalgridtype}}}{\emph{CS}, \emph{GV}}{}
Update the vertical grid type with ALE information. This subroutine sets information in the verticalGrid\_type to be consistent with the use of ALE mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: ALE control structure

\item {} 
\sphinxstylestrong{gv} :: vertical grid information

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_writecoordinatefile() (fortran subroutine in module mom\_ale)@\spxentry{ale\_writecoordinatefile()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_writecoordinatefile}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_writecoordinatefile}}}{\emph{CS}, \emph{GV}, \emph{directory}}{}
Write the vertical coordinate information into a file. This subroutine writes out a file containing any available data related to the vertical grid used by the MOM ocean model when in ALE mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} directory for writing grid info

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/create_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::create\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_initthicknesstocoord() (fortran subroutine in module mom\_ale)@\spxentry{ale\_initthicknesstocoord()}\spxextra{fortran subroutine in module mom\_ale}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initthicknesstocoord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale/}}\sphinxbfcode{\sphinxupquote{ale\_initthicknesstocoord}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}}{}
Set h to coordinate values for fixed coordinate systems.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} module control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} module grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}out{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getstaticthickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::getstaticthickness}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ale\_sponge module reference}
\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge}}\label{\detokenize{api/generated/modules/mom_ale_sponge:mom-ale-sponge-module-reference}}\label{\detokenize{api/generated/modules/mom_ale_sponge::doc}}\index{mom\_ale\_sponge (module)@\spxentry{mom\_ale\_sponge}\spxextra{module}|spxpagem}
This module contains the routines used to apply sponge layers when using the ALE mode.

{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:detamom-ale-sponge}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_ale_sponge:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/ale_sponge_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_sponge\_cs}}}}}
&
ALE sponge control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/p2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p2d}}}}}
&
A structure for creating arrays of pointers to 2D arrays with extra gridding information.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/p3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3d}}}}}
&
A structure for creating arrays of pointers to 3D arrays with extra gridding information.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ale_sponge:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ale\_sponge\_fixed()}}}}}
&
This subroutine determines the number of points which are within sponges in this computational domain.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/get_ale_sponge_nz_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ale\_sponge\_nz\_data()}}}}}
&
Return the number of layers in the data with a fixed ALE sponge, or 0 if there are no sponge columns on this PE.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/get_ale_sponge_thicknesses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ale\_sponge\_thicknesses()}}}}}
&
Return the thicknesses used for the data with a fixed ALE sponge.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ale\_sponge\_varying()}}}}}
&
This subroutine determines the number of points which are to be restoref in the computational domain.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/init_ale_sponge_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_ale\_sponge\_diags()}}}}}
&
Initialize diagnostics for the ALE\_sponge module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_field_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_ale\_sponge\_field\_fixed()}}}}}
&
This subroutine stores the reference profile at h points for the variable whose address is given by f\_ptr.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_field_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_ale\_sponge\_field\_varying()}}}}}
&
This subroutine stores the reference profile at h points for the variable whose address is given by filename and fieldname.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_vel_field_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_ale\_sponge\_vel\_field\_fixed()}}}}}
&
This subroutine stores the reference profile at u and v points for the variable whose address is given by u\_ptr and v\_ptr.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_vel_field_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_ale\_sponge\_vel\_field\_varying()}}}}}
&
This subroutine stores the reference profile at uand v points for the variable whose address is given by u\_ptr and v\_ptr.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/apply_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_ale\_sponge()}}}}}
&
This subroutine applies damping to the layers thicknesses, temp, salt and a variety of tracers for every column where there is damping.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/rotate_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_ale\_sponge()}}}}}
&
Rotate the ALE sponge fields from the input to the model index map.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/update_ale_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ale\_sponge\_field()}}}}}
&
Scan the ALE sponge variables and replace a prescribed pointer to a new value.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/ale_sponge_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ale\_sponge\_end()}}}}}
&
This subroutine deallocates any memory associated with the ALE\_sponge module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ale_sponge:detailed-description}}\label{\detokenize{api/generated/modules/mom_ale_sponge:detamom-ale-sponge}}
Applying sponges requires the following:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
initialize\_ALE\_sponge

\item {} 
set\_up\_ALE\_sponge\_field (tracers) and set\_up\_ALE\_sponge\_vel\_field (vel)

\item {} 
apply\_ALE\_sponge

\item {} 
init\_ALE\_sponge\_diags (not being used for now)

\item {} 
ALE\_sponge\_end (not being used for now)

\end{enumerate}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_ale_sponge:type-documentation}}\index{ale\_sponge\_cs (fortran type in module mom\_ale\_sponge)@\spxentry{ale\_sponge\_cs}\spxextra{fortran type in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/ale_sponge_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{ale\_sponge\_cs}}}
ALE sponge control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The total number of layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz\_data}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The total number of arbritary layers (used by older code).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting i\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending i\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting j\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending j\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting I\sphinxhyphen{}index of the computational domain at u/v.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending I\sphinxhyphen{}index of the computational domain at u/v.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting J\sphinxhyphen{}index of the computational domain at u/v.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending J\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting i\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending i\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting j\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending j\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_col}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of sponge tracer points within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_col\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of sponge u\sphinxhyphen{}points within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_col\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of sponge v\sphinxhyphen{}points within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fldno}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of fields which have already been registered by calls to set\_up\_sponge\_field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sponge\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Control whether u and v are included in sponge.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the i\sphinxhyphen{}indicies of each tracer columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_j}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the j\sphinxhyphen{}indicies of each tracer columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_i\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the i\sphinxhyphen{}indicies of each u\sphinxhyphen{}columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_j\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the j\sphinxhyphen{}indicies of each u\sphinxhyphen{}columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_i\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the i\sphinxhyphen{}indicies of each v\sphinxhyphen{}columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_j\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the j\sphinxhyphen{}indicies of each v\sphinxhyphen{}columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iresttime\_col}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The inverse restoring time of each tracer column {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iresttime\_col\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The inverse restoring time of each u\sphinxhyphen{}column {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iresttime\_col\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The inverse restoring time of each v\sphinxhyphen{}column {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p3d )(50)}\sphinxstyleemphasis{{]}} :: Pointers to the fields that are being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )(50)}\sphinxstyleemphasis{{]}} :: The values to which the fields are damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_val\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )}\sphinxstyleemphasis{{]}} :: The values to which the u\sphinxhyphen{}velocities are damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_val\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )}\sphinxstyleemphasis{{]}} :: The values to which the v\sphinxhyphen{}velocities are damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p3d )}\sphinxstyleemphasis{{]}} :: Pointer to the u velocities. that are being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p3d )}\sphinxstyleemphasis{{]}} :: Pointer to the v velocities. that are being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )}\sphinxstyleemphasis{{]}} :: Grid on which reference data is provided (older code).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_hu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )}\sphinxstyleemphasis{{]}} :: u\sphinxhyphen{}point grid on which reference data is provided (older code).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_hv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )}\sphinxstyleemphasis{{]}} :: v\sphinxhyphen{}point grid on which reference data is provided (older code).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: Remapping parameters and work arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers for remapping from the end of 2018. Otherwise, use more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hor\_regrid\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic for horizonal regridding that recovers the answers from the end of 2018. Otherwise, use rotationally symmetric forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_varying\_sponges}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if using newer sponge code.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{spongedataongrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the sponge data are on the model horizontal grid.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p2d (fortran type in module mom\_ale\_sponge)@\spxentry{p2d}\spxextra{fortran type in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/p2d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{p2d}}}
A structure for creating arrays of pointers to 2D arrays with extra gridding information.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: id for FMS external time interpolator

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz\_data}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The number of vertical levels in the input field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_tlevs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The number of time records contained in the file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer to the data mask.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer the data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer the data grid.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p3d (fortran type in module mom\_ale\_sponge)@\spxentry{p3d}\spxextra{fortran type in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/p3d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{p3d}}}
A structure for creating arrays of pointers to 3D arrays with extra gridding information.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: id for FMS external time interpolator

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz\_data}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The number of vertical levels in the input field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_tlevs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The number of time records contained in the file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer to the data mask.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer to the data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer to the data grid.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ale_sponge:function-subroutine-documentation}}\index{initialize\_ale\_sponge\_fixed() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{initialize\_ale\_sponge\_fixed()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{initialize\_ale\_sponge\_fixed}}}{\emph{Iresttime}, \emph{G}, \emph{param\_file}, \emph{CS}, \emph{data\_h}, \emph{nz\_data}}{}
This subroutine determines the number of points which are within sponges in this computational domain. Only points that have positive values of Iresttime and which mask2dT indicates are ocean points are included in the sponges. It also stores the target interface heights.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{nz\_data} :: {[}in{]} The total number of sponge input layers.

\item {} 
\sphinxstylestrong{iresttime} :: {[}in{]} The inverse of the restoring time {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module (in/out).

\item {} 
\sphinxstylestrong{data\_h} :: {[}in{]} The thicknesses of the sponge input layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::initialize\_remapping}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/rotate_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_ale\_sponge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_ale\_sponge\_nz\_data() (fortran function in module mom\_ale\_sponge)@\spxentry{get\_ale\_sponge\_nz\_data()}\spxextra{fortran function in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/get_ale_sponge_nz_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{get\_ale\_sponge\_nz\_data}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Return the number of layers in the data with a fixed ALE sponge, or 0 if there are no sponge columns on this PE.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for the ALE\_sponge module.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The number of layers in the fixed sponge data.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/initialize_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::initialize\_rgc\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_ale\_sponge\_thicknesses() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{get\_ale\_sponge\_thicknesses()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/get_ale_sponge_thicknesses}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{get\_ale\_sponge\_thicknesses}}}{\emph{G}, \emph{data\_h}, \emph{sponge\_mask}, \emph{CS}}{}
Return the thicknesses used for the data with a fixed ALE sponge.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure (in).

\item {} 
\sphinxstylestrong{data\_h} :: {[}inout{]} The thicknesses of the sponge input layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sponge\_mask} :: {[}out{]} A logical mask that is true where

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for the ALE\_sponge module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ale\_sponge\_varying() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{initialize\_ale\_sponge\_varying()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_varying}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{initialize\_ale\_sponge\_varying}}}{\emph{Iresttime}, \emph{G}, \emph{param\_file}, \emph{CS}}{}
This subroutine determines the number of points which are to be restoref in the computational domain. Only points that have positive values of Iresttime and which mask2dT indicates are ocean points are included in the sponges.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{iresttime} :: {[}in{]} The inverse of the restoring time {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module (in/out).

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::initialize\_remapping}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/rotate_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_ale\_sponge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{init\_ale\_sponge\_diags() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{init\_ale\_sponge\_diags()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/init_ale_sponge_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{init\_ale\_sponge\_diags}}}{\emph{Time}, \emph{G}, \emph{diag}, \emph{CS}}{}
Initialize diagnostics for the ALE\_sponge module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: ALE sponge control structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_ale\_sponge\_field\_fixed() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{set\_up\_ale\_sponge\_field\_fixed()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_field_fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{set\_up\_ale\_sponge\_field\_fixed}}}{\emph{sp\_val}, \emph{G}, \emph{f\_ptr}, \emph{CS}}{}
This subroutine stores the reference profile at h points for the variable whose address is given by f\_ptr.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{cs} :: ALE sponge control structure (in/out).

\item {} 
\sphinxstylestrong{sp\_val} :: {[}in{]} Field to be used in the sponge, it has arbitrary number of layers.

\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} Pointer to the field to be damped

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_ale\_sponge\_field\_varying() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{set\_up\_ale\_sponge\_field\_varying()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_field_varying}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{set\_up\_ale\_sponge\_field\_varying}}}{\emph{filename}, \emph{fieldname}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{f\_ptr}, \emph{CS}}{}
This subroutine stores the reference profile at h points for the variable whose address is given by filename and fieldname.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file with the time varying field data

\item {} 
\sphinxstylestrong{fieldname} :: {[}in{]} The name of the field in the file with the time varying field data

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure (in).

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} Pointer to the field to be damped (in).

\item {} 
\sphinxstylestrong{cs} :: Sponge control structure (in/out).

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_ale\_sponge\_vel\_field\_fixed() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{set\_up\_ale\_sponge\_vel\_field\_fixed()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_vel_field_fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{set\_up\_ale\_sponge\_vel\_field\_fixed}}}{\emph{u\_val}, \emph{v\_val}, \emph{G}, \emph{u\_ptr}, \emph{v\_ptr}, \emph{CS}}{}
This subroutine stores the reference profile at u and v points for the variable whose address is given by u\_ptr and v\_ptr.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure (in).

\item {} 
\sphinxstylestrong{cs} :: Sponge structure (in/out).

\item {} 
\sphinxstylestrong{u\_val} :: {[}in{]} u field to be used in the sponge, it has arbritary number of layers.

\item {} 
\sphinxstylestrong{v\_val} :: {[}in{]} v field to be used in the sponge, it has arbritary number of layers.

\item {} 
\sphinxstylestrong{u\_ptr} :: {[}in{]} u pointer to the field to be damped

\item {} 
\sphinxstylestrong{v\_ptr} :: {[}in{]} v pointer to the field to be damped

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_ale\_sponge\_vel\_field\_varying() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{set\_up\_ale\_sponge\_vel\_field\_varying()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_vel_field_varying}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{set\_up\_ale\_sponge\_vel\_field\_varying}}}{\emph{filename\_u}, \emph{fieldname\_u}, \emph{filename\_v}, \emph{fieldname\_v}, \emph{Time}, \emph{G}, \emph{US}, \emph{CS}, \emph{u\_ptr}, \emph{v\_ptr}}{}
This subroutine stores the reference profile at uand v points for the variable whose address is given by u\_ptr and v\_ptr.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename\_u} :: {[}in{]} File name for u field

\item {} 
\sphinxstylestrong{fieldname\_u} :: {[}in{]} Name of u variable in file

\item {} 
\sphinxstylestrong{filename\_v} :: {[}in{]} File name for v field

\item {} 
\sphinxstylestrong{fieldname\_v} :: {[}in{]} Name of v variable in file

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid (in)

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Sponge structure (in/out).

\item {} 
\sphinxstylestrong{u\_ptr} :: {[}in{]} u pointer to the field to be damped (in).

\item {} 
\sphinxstylestrong{v\_ptr} :: {[}in{]} v pointer to the field to be damped (in).

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_ale\_sponge() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{apply\_ale\_sponge()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/apply_ale_sponge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{apply\_ale\_sponge}}}{\emph{h}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Time}}{}
This subroutine applies damping to the layers thicknesses, temp, salt and a variety of tracers for every column where there is damping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure (in).

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} (in)

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set by a previous call to initialize\_ALE\_sponge (in).

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model date

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_ale\_sponge() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{rotate\_ale\_sponge()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/rotate_ale_sponge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{rotate\_ale\_sponge}}}{\emph{sponge\_in}, \emph{G\_in}, \emph{sponge}, \emph{G}, \emph{turns}, \emph{param\_file}}{}
Rotate the ALE sponge fields from the input to the model index map.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sponge\_in} :: {[}in{]} The control structure for this module with the original grid rotation

\item {} 
\sphinxstylestrong{g\_in} :: {[}in{]} The ocean’s grid structure with the original rotation.

\item {} 
\sphinxstylestrong{sponge} :: A pointer to the control that will be set up with the new grid rotation

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure with the new rotation.

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} The number of 90\sphinxhyphen{}degree turns between grids

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ale\_sponge\_fixed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ale\_sponge\_varying}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_ale\_sponge\_field() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{update\_ale\_sponge\_field()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/update_ale_sponge_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{update\_ale\_sponge\_field}}}{\emph{sponge}, \emph{p\_old}, \emph{G}, \emph{GV}, \emph{p\_new}}{}
Scan the ALE sponge variables and replace a prescribed pointer to a new value.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sponge} :: A pointer to the control structure for this module that is set by a previous call to initialize\_ALE\_sponge.

\item {} 
\sphinxstylestrong{p\_old} :: {[}in{]} The previous array of target values

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The updated ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{p\_new} :: {[}in{]} The new array of target values

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ale\_sponge\_end() (fortran subroutine in module mom\_ale\_sponge)@\spxentry{ale\_sponge\_end()}\spxextra{fortran subroutine in module mom\_ale\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/ale_sponge_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ale\_sponge/}}\sphinxbfcode{\sphinxupquote{ale\_sponge\_end}}}{\emph{CS}}{}
This subroutine deallocates any memory associated with the ALE\_sponge module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the control structure that is set by a previous call to initialize\_ALE\_sponge.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_array\_transform module reference}
\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform}}\label{\detokenize{api/generated/modules/mom_array_transform:mom-array-transform-module-reference}}\label{\detokenize{api/generated/modules/mom_array_transform::doc}}\index{mom\_array\_transform (module)@\spxentry{mom\_array\_transform}\spxextra{module}|spxpagem}
Module for supporting the rotation of a field’s index map. The implementation of each angle is described below.

{\hyperref[\detokenize{api/generated/modules/mom_array_transform:detamom-array-transform}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_array_transform:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_real_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_real\_2d()}}}}}
&
Rotate the elements of a 2d real array along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_real_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_real\_3d()}}}}}
&
Rotate the elements of a 3d real array along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_real_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_real\_4d()}}}}}
&
Rotate the elements of a 4d real array along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_integer()}}}}}
&
Rotate the elements of a 2d integer array along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_logical()}}}}}
&
Rotate the elements of a 2d logical array along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_pair_real_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_pair\_real\_2d()}}}}}
&
Rotate the elements of a 2d real array pair along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_pair_real_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_pair\_real\_3d()}}}}}
&
Rotate the elements of a 3d real array pair along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_pair_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_array\_pair\_integer()}}}}}
&
Rotate the elements of a 4d real array pair along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_vector_real_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_vector\_real\_2d()}}}}}
&
Rotate the elements of a 2d real vector along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_vector_real_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_vector\_real\_3d()}}}}}
&
Rotate the elements of a 3d real vector along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_vector_real_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_vector\_real\_4d()}}}}}
&
Rotate the elements of a 4d real vector along first and second axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_real_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_rotated\_array\_real\_2d()}}}}}
&
Allocate a 2d real array on the rotated index map of a reference array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_real_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_rotated\_array\_real\_3d()}}}}}
&
Allocate a 3d real array on the rotated index map of a reference array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_real_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_rotated\_array\_real\_4d()}}}}}
&
Allocate a 4d real array on the rotated index map of a reference array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_rotated\_array\_integer()}}}}}
&
Allocate a 2d integer array on the rotated index map of a reference array.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_array_transform:detailed-description}}\label{\detokenize{api/generated/modules/mom_array_transform:detamom-array-transform}}
+90deg: B(i,j) = A(n\sphinxhyphen{}j,i) = transpose, then row reverse 180deg: B(i,j) = A(m\sphinxhyphen{}i,n\sphinxhyphen{}j) = row reversal + column reversal \sphinxhyphen{}90deg: B(i,j) = A(j,m\sphinxhyphen{}i) = row reverse, then transpose

90 degree rotations change the shape of the field, and are handled separately from 180 degree rotations.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_array_transform:function-subroutine-documentation}}\index{rotate\_array\_real\_2d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_real\_2d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_real_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_real\_2d}}}{\emph{A\_in}, \emph{turns}, \emph{A}}{}
Rotate the elements of a 2d real array along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_real\_3d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_real\_3d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_real_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_real\_3d}}}{\emph{A\_in}, \emph{turns}, \emph{A}}{}
Rotate the elements of a 3d real array along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_real\_4d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_real\_4d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_real_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_real\_4d}}}{\emph{A\_in}, \emph{turns}, \emph{A}}{}
Rotate the elements of a 4d real array along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_integer() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_integer()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_integer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_integer}}}{\emph{A\_in}, \emph{turns}, \emph{A}}{}
Rotate the elements of a 2d integer array along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_logical() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_logical()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_logical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_logical}}}{\emph{A\_in}, \emph{turns}, \emph{A}}{}
Rotate the elements of a 2d logical array along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_pair\_real\_2d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_pair\_real\_2d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_pair_real_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_pair\_real\_2d}}}{\emph{A\_in}, \emph{B\_in}, \emph{turns}, \emph{A}, \emph{B}}{}
Rotate the elements of a 2d real array pair along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated scalar array pair

\item {} 
\sphinxstylestrong{b\_in} :: {[}in{]} Unrotated scalar array pair

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated scalar array pair

\item {} 
\sphinxstylestrong{b} :: {[}out{]} Rotated scalar array pair

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_pair\_real\_3d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_pair\_real\_3d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_pair_real_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_pair\_real\_3d}}}{\emph{A\_in}, \emph{B\_in}, \emph{turns}, \emph{A}, \emph{B}}{}
Rotate the elements of a 3d real array pair along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated scalar array pair

\item {} 
\sphinxstylestrong{b\_in} :: {[}in{]} Unrotated scalar array pair

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated scalar array pair

\item {} 
\sphinxstylestrong{b} :: {[}out{]} Rotated scalar array pair

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_array\_pair\_integer() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_array\_pair\_integer()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_array_pair_integer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_array\_pair\_integer}}}{\emph{A\_in}, \emph{B\_in}, \emph{turns}, \emph{A}, \emph{B}}{}
Rotate the elements of a 4d real array pair along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Unrotated scalar array pair

\item {} 
\sphinxstylestrong{b\_in} :: {[}in{]} Unrotated scalar array pair

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} Rotated scalar array pair

\item {} 
\sphinxstylestrong{b} :: {[}out{]} Rotated scalar array pair

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_vector\_real\_2d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_vector\_real\_2d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_vector_real_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_vector\_real\_2d}}}{\emph{A\_in}, \emph{B\_in}, \emph{turns}, \emph{A}, \emph{B}}{}
Rotate the elements of a 2d real vector along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} First component of unrotated vector

\item {} 
\sphinxstylestrong{b\_in} :: {[}in{]} Second component of unrotated vector

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} First component of rotated vector

\item {} 
\sphinxstylestrong{b} :: {[}out{]} Second component of unrotated vector

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_vector\_real\_3d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_vector\_real\_3d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_vector_real_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_vector\_real\_3d}}}{\emph{A\_in}, \emph{B\_in}, \emph{turns}, \emph{A}, \emph{B}}{}
Rotate the elements of a 3d real vector along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} First component of unrotated vector

\item {} 
\sphinxstylestrong{b\_in} :: {[}in{]} Second component of unrotated vector

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} First component of rotated vector

\item {} 
\sphinxstylestrong{b} :: {[}out{]} Second component of unrotated vector

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_vector\_real\_4d() (fortran subroutine in module mom\_array\_transform)@\spxentry{rotate\_vector\_real\_4d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/rotate_vector_real_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{rotate\_vector\_real\_4d}}}{\emph{A\_in}, \emph{B\_in}, \emph{turns}, \emph{A}, \emph{B}}{}
Rotate the elements of a 4d real vector along first and second axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} First component of unrotated vector

\item {} 
\sphinxstylestrong{b\_in} :: {[}in{]} Second component of unrotated vector

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}out{]} First component of rotated vector

\item {} 
\sphinxstylestrong{b} :: {[}out{]} Second component of unrotated vector

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_rotated\_array\_real\_2d() (fortran subroutine in module mom\_array\_transform)@\spxentry{allocate\_rotated\_array\_real\_2d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_real_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{allocate\_rotated\_array\_real\_2d}}}{\emph{A\_in}, \emph{lb}, \emph{turns}, \emph{A}}{}
Allocate a 2d real array on the rotated index map of a reference array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Lower index bounds of A\_in

\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Reference array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} Array on rotated index

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_rotated\_array\_real\_3d() (fortran subroutine in module mom\_array\_transform)@\spxentry{allocate\_rotated\_array\_real\_3d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_real_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{allocate\_rotated\_array\_real\_3d}}}{\emph{A\_in}, \emph{lb}, \emph{turns}, \emph{A}}{}
Allocate a 3d real array on the rotated index map of a reference array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Lower index bounds of A\_in

\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Reference array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} Array on rotated index

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_rotated\_array\_real\_4d() (fortran subroutine in module mom\_array\_transform)@\spxentry{allocate\_rotated\_array\_real\_4d()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_real_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{allocate\_rotated\_array\_real\_4d}}}{\emph{A\_in}, \emph{lb}, \emph{turns}, \emph{A}}{}
Allocate a 4d real array on the rotated index map of a reference array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Lower index bounds of A\_in

\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Reference array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} Array on rotated index

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_rotated\_array\_integer() (fortran subroutine in module mom\_array\_transform)@\spxentry{allocate\_rotated\_array\_integer()}\spxextra{fortran subroutine in module mom\_array\_transform}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_array_transform:f/mom_array_transform/allocate_rotated_array_integer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_array\_transform/}}\sphinxbfcode{\sphinxupquote{allocate\_rotated\_array\_integer}}}{\emph{A\_in}, \emph{lb}, \emph{turns}, \emph{A}}{}
Allocate a 2d integer array on the rotated index map of a reference array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Lower index bounds of A\_in

\item {} 
\sphinxstylestrong{a\_in} :: {[}in{]} Reference array

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} Array on rotated index

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_barotropic module reference}
\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic}}\label{\detokenize{api/generated/modules/mom_barotropic:mom-barotropic-module-reference}}\label{\detokenize{api/generated/modules/mom_barotropic::doc}}\index{mom\_barotropic (module)@\spxentry{mom\_barotropic}\spxextra{module}|spxpagem}
Baropotric solver.

{\hyperref[\detokenize{api/generated/modules/mom_barotropic:detamom-barotropic}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_barotropic:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_cs}}}}}
&
The barotropic stepping control stucture.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_obc_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bt\_obc\_type}}}}}
&
The barotropic stepping open boundary condition type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/local_bt_cont_u_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{local\_bt\_cont\_u\_type}}}}}
&
A desciption of the functional dependence of transport at a u\sphinxhyphen{}point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/local_bt_cont_v_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{local\_bt\_cont\_v\_type}}}}}
&
A desciption of the functional dependence of transport at a v\sphinxhyphen{}point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/memory_size_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{memory\_size\_type}}}}}
&
A container for passing around active tracer point memory limits.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_barotropic:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep()}}}}}
&
This subroutine time steps the barotropic equations explicitly.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dtbt()}}}}}
&
This subroutine automatically determines an optimal value for dtbt based on some state of the ocean.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/apply_velocity_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_velocity\_obcs()}}}}}
&
The following 4 subroutines apply the open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_up_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_bt\_obc()}}}}}
&
This subroutine sets up the private structure used to apply the open boundary conditions, as developed by Mehmet Ilicak.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/destroy_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{destroy\_bt\_obc()}}}}}
&
Clean up the BT\_OBC memory.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btcalc()}}}}}
&
btcalc calculates the barotropic velocities from the full velocity and thickness fields, determines the fraction of the total water column in each layer at velocity points, and determines a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_uhbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_uhbt()}}}}}
&
The function find\_uhbt determines the zonal transport for a given velocity, or with INTEGRAL\_BT\_CONT=True it determines the time\sphinxhyphen{}integrated zonal transport for a given time\sphinxhyphen{}integrated velocity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_duhbt_du}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_duhbt\_du()}}}}}
&
The function find\_duhbt\_du determines the marginal zonal face area for a given velocity, or with INTEGRAL\_BT\_CONT=True for a given time\sphinxhyphen{}integrated velocity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/uhbt_to_ubt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uhbt\_to\_ubt()}}}}}
&
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport, or if INTEGRAL\_BT\_CONT=True this finds the time\sphinxhyphen{}integrated velocity that is consistent with a time\sphinxhyphen{}integrated transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_vhbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_vhbt()}}}}}
&
The function find\_vhbt determines the meridional transport for a given velocity, or with INTEGRAL\_BT\_CONT=True it determines the time\sphinxhyphen{}integrated meridional transport for a given time\sphinxhyphen{}integrated velocity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_dvhbt_dv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_dvhbt\_dv()}}}}}
&
The function find\_dvhbt\_dv determines the marginal meridional face area for a given velocity, or with INTEGRAL\_BT\_CONT=True for a given time\sphinxhyphen{}integrated velocity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/vhbt_to_vbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vhbt\_to\_vbt()}}}}}
&
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport, or if INTEGRAL\_BT\_CONT=True this finds the time\sphinxhyphen{}integrated velocity that is consistent with a time\sphinxhyphen{}integrated transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_local_bt_cont_types}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_local\_bt\_cont\_types()}}}}}
&
This subroutine sets up reordered versions of the BT\_cont type in the local\_BT\_cont types, which have wide halos properly filled in.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/adjust_local_bt_cont_types}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_local\_bt\_cont\_types()}}}}}
&
Adjust\_local\_BT\_cont\_types expands the range of velocities with a cubic curve translating velocities into transports to match the inital values of velocities and summed transports when the velocities are larger than the first guesses of the cubic transition velocities used to set up the local\_BT\_cont types.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_cont_to_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bt\_cont\_to\_face\_areas()}}}}}
&
This subroutine uses the BTCL types to find typical or maximum face areas, which can then be used for finding wave speeds, etc.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/swap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{swap()}}}}}
&
Swap the values of two real variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_face\_areas()}}}}}
&
This subroutine determines the open face areas of cells for calculating the barotropic transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_mass_source}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bt\_mass\_source()}}}}}
&
bt\_mass\_source determines the appropriately limited mass source for the barotropic solver, along with a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_init()}}}}}
&
barotropic\_init initializes a number of time\sphinxhyphen{}invariant fields used in the barotropic calculation and initializes any barotropic fields that have not already been initialized.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_get_tav}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_get\_tav()}}}}}
&
Copies ubtav and vbtav from private type into arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_end()}}}}}
&
Clean up the barotropic control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/register_barotropic_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_barotropic\_restarts()}}}}}
&
This subroutine is used to register any fields from \sphinxcode{\sphinxupquote{MOM\_barotropic.F90}} that should be written to or read from the restart file.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_barotropic:detailed-description}}\label{\detokenize{api/generated/modules/mom_barotropic:detamom-barotropic}}
By Robert Hallberg, April 1994 \sphinxhyphen{} January 2007.

This program contains the subroutines that time steps the linearized barotropic equations. btstep is used to actually time step the barotropic equations, and contains most of the substance of this module.

btstep uses a forwards\sphinxhyphen{}backwards based scheme to time step the barotropic equations, returning the layers’ accelerations due to the barotropic changes in the ocean state, the final free surface height (or column mass), and the volume (or mass) fluxes summed through the layers and averaged over the baroclinic time step. As input, btstep takes the initial 3\sphinxhyphen{}D velocities, the inital free surface height, the 3\sphinxhyphen{}D accelerations of the layers, and the external forcing. Everything in btstep is cast in terms of anomalies, so if everything is in balance, there is explicitly no acceleration due to btstep.

The spatial discretization of the continuity equation is second order accurate. A flux conservative form is used to guarantee global conservation of volume. The spatial discretization of the momentum equation is second order accurate. The Coriolis force is written in a form which does not contribute to the energy tendency and which conserves linearized potential vorticity, f/D. These terms are exactly removed from the baroclinic momentum equations, so the linearization of vorticity advection will not degrade the overall solution.

btcalc calculates the fractional thickness of each layer at the velocity points, for later use in calculating the barotropic velocities and the averaged accelerations. Harmonic mean thicknesses (i.e. 2*h\_L*h\_R/(h\_L + h\_R)) are used to avoid overly strong weighting of overly thin layers. This may later be relaxed to use thicknesses determined from the continuity equations.

bt\_mass\_source determines the real mass sources for the barotropic solver, along with the corrective pseudo\sphinxhyphen{}fluxes that keep the barotropic and baroclinic estimates of the free surface height close to each other. Given the layer thicknesses and the free surface height that correspond to each other, it calculates a corrective mass source that is added to the barotropic continuity* equation, and optionally adjusts a slowly varying correction rate. Newer algorithmic changes have deemphasized the need for this, but it is still here to add net water sources to the barotropic solver.*

barotropic\_init allocates and initializes any barotropic arrays that have not been read from a restart file, reads parameters from the inputfile, and sets up diagnostic fields.

barotropic\_end deallocates anything allocated in barotropic\_init or register\_barotropic\_restarts.

register\_barotropic\_restarts is used to indicate any fields that are private to the barotropic solver that need to be included in the restart files, and to ensure that they are read.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_barotropic:type-documentation}}\index{barotropic\_cs (fortran type in module mom\_barotropic)@\spxentry{barotropic\_cs}\spxextra{fortran type in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{barotropic\_cs}}}
The barotropic stepping control stucture.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfu\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfv\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_coru\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_corv\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ubtforce}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vbtforce}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uaccel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vaccel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_visc\_rem\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_visc\_rem\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_cor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ubt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ubtav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vbtav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ubt\_st}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vbt\_st}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_st}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ubtdt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vbtdt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ubt\_hifreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vbt\_hifreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_hifreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhbt\_hifreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhbt\_hifreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_pred\_hifreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gtotn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gtots}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gtote}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gtotw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frhatu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frhatv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frhatu1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frhatv1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_u\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_u\_e0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_u\_w0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_u\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_ubt\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_ubt\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_v\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_v\_n0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_v\_s0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_v\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_vbt\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_vbt\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_u\_rat0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_v\_rat0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_btc\_fa\_h\_rat0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhbt0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhbt0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* q\_d {[}*) :: The fraction of the total column thickness interpolated to u grid points in each layer {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The fraction of the total column thickness interpolated to v grid points in each layer {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Inverse of the basin depth at u grid points {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A spatially varying linear drag coefficient acting on the zonal barotropic flow {[}H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1 or kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The barotropic solvers estimate of the zonal velocity that will be the initial condition for the next call to btstep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The barotropic zonal velocity averaged over the baroclinic time step {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Inverse of the basin depth at v grid points {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A spatially varying linear drag coefficient acting on the zonal barotropic flow {[}H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1 or kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The barotropic solvers estimate of the zonal velocity that will be the initial condition for the next call to btstep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The barotropic meridional velocity averaged over the baroclinic time step {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The difference between the free surface height from the barotropic calculation and the sum of the layer thicknesses. This difference is imposed as a forcing term in the barotropic calculation over a baroclinic timestep {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A limit on the rate at which eta\_cor can be applied while avoiding instability {[}H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1 or kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}. This is only used if CSbound\_BT\_corr is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Test vector components for checking grid polarity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Test vector components for checking grid polarity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A copy of bathyT (ocean bottom depth) with wide halos {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: This is a copy of GIareaT with wide halos, but will still utilize the macro IareaT when referenced, {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A simply averaged depth at u points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A copy of Gdy\_Cu with wide halos {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A copy of GIdxCu with wide halos {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A simply averaged depth at v points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A copy of Gdx\_Cv with wide halos {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: A copy of GIdyCv with wide halos {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: f / D at PV points {[}Z\sphinxhyphen{}1 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frhatu1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Predictor step values of frhatu stored for diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frhatv1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Predictor step values of frhatv stored for diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( bt\_obc\_type )}\sphinxstyleemphasis{{]}} :: A structure with all of this modules fields for applying open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The barotropic time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtbt\_fraction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of the maximum time\sphinxhyphen{}step that should used. The default is 0.98.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtbt\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum stable barotropic time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_bt\_filter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time\sphinxhyphen{}scale over which the barotropic mode solutions are filtered {[}T \textasciitilde{}\textgreater{} s{]} if positive, or as a fraction of DT if negative {[}nondim{]}. This can never be taken to be longer than 2*dt. Set this to 0 to apply no filtering.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstep\_last}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of barotropic timesteps per baroclinic time step the last time btstep was called.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bebt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional number, from 0 to 1, that determines the gravity wave time stepping scheme. 0.0 gives a forward\sphinxhyphen{}backward scheme, while 1.0 give backward Euler. In practice, bebt should be of order 0.2 or greater.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{split}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the split time stepping scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bound\_bt\_corr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the magnitude of the fake mass source in the barotropic equation that drives the two estimates of the free surface height toward each other is bounded to avoid driving corrective velocities that exceed MAXCFL\_BT\_CONT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gradual\_bt\_ics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, adjust the initial conditions for the barotropic solver to the values from the layered solution over a whole timestep instead of instantly. This is a decent approximation to the inclusion of sum(u dh\_dt) while also correcting for truncation errors.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sadourny}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the Coriolis terms are discretized with Sadourny’s energy conserving scheme, otherwise the Arakawa \& Hsu scheme is used. If the deformation radius is not resolved Sadourny’s scheme should probably be used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{integral\_bt\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the time\sphinxhyphen{}integrated velocity over the barotropic steps to determine the integrated transports used to update the continuity equation. Otherwise the transports are the sum of the transports based on {]}a series of instantaneous velocities and the BT\_CONT\_TYPE for transports. This is only valid if a BT\_CONT\_TYPE is used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonlinear\_continuity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the barotropic continuity equation uses the full ocean thickness for transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonlin\_cont\_update\_period}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of barotropic time steps between updates to the face area, or 0 only to update at the start of a call to btstep. The default is 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_project\_velocity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, step the barotropic velocity first and project out the velocity tendency by 1+BEBT when calculating the transport. The default (false) is to use a predictor continuity step to find the pressure field, and then do a corrector continuity step using a weighted average of the old and new velocities, with weights of (1\sphinxhyphen{}BEBT) and BEBT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonlin\_stress}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the full depth of the ocean at the start of the barotropic step when calculating the surface stress contribution to the barotropic acclerations. Otherwise use the depth based on bathyT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_coriolis\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A factor by which the barotropic Coriolis acceleration anomaly terms are scaled.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use expressions for the barotropic solver that recover the answers from the end of 2018. Otherwise, use more efficient or general expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dynamic\_psurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, add a dynamic pressure due to a viscous ice shelf, for instance.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dmin\_dyn\_psurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum depth to use in limiting the size of the dynamic surface pressure for stability {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ice\_strength\_length}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The length scale at which the damping rate due to the ice strength should be the same as if a Laplacian were applied {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{const\_dyn\_psurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The constant that scales the dynamic surface pressure {[}nondim{]}. Stable values are \textless{} \textasciitilde{}1.0. The default is 0.9.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply tidal momentum forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_extra}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional factor by which gtot is enhanced.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hvel\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer indicating how the thicknesses at velocity points are calculated. Valid values are given by the parameters defined below: HARMONIC, ARITHMETIC, HYBRID, and FROM\_BT\_CONT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{strong\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a stronger estimate of the retarding effects of strong bottom drag.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{linear\_wave\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply a linear drag to the barotropic velocities, using rates set by lin\_drag\_u \& \_v divided by the depth of the ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{linearized\_bt\_pv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the PV and interface thicknesses used in the barotropic Coriolis calculation is time invariant and linearized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_wide\_halos}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use wide halos and march in during the barotropic time stepping for efficiency.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{clip\_velocity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, limit any velocity components that are are large enough for a CFL number to exceed CFL\_trunc. This should only be used as a desperate debugging measure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vel\_underflow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Velocity components smaller than vel\_underflow are set to 0 {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maxvel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Velocity components greater than maxvel are truncated to maxvel {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_trunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If clip\_velocity is true, velocity components will be truncated when they are large enough that the corresponding CFL number exceeds this value, nondim.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maxcfl\_bt\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum permitted CFL number associated with the barotropic accelerations from the summed velocities times the time\sphinxhyphen{}derivatives of thicknesses. The default is 0.1, and there will probably be real problems if this were set close to 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_cont\_bounds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the BT\_cont\_type variables to set limits on the magnitude of the corrective mass fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{visc\_rem\_u\_uh0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the viscous remnants when estimating the barotropic velocities that were used to calculate uh0 and vh0. False is probably the better choice.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adjust\_bt\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, adjust the curve fit to the BT\_cont type that is used by the barotropic solver to match the transport about which the flow is being linearized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_old\_coriolis\_bracket\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, use an order of operations that is not bitwise rotationally symmetric in the meridional Coriolis term of the barotropic solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean models clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_domain\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Barotropic MOM domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug\_bt\_hi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_index\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: debugging copy of horizontal index\_type

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for tides.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{module\_is\_initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, module has been initialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isdw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The lower i\sphinxhyphen{}memory limit for the wide halo arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iedw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The upper i\sphinxhyphen{}memory limit for the wide halo arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsdw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The lower j\sphinxhyphen{}memory limit for the wide halo arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jedw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The upper j\sphinxhyphen{}memory limit for the wide halo arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_q\_dcor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_gtot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_tmp\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_eta\_bt\_rem}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_force\_hbt0\_cor\_ref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_dat\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_eta\_ubt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_etaav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_ubt\_cor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_ubta\_uhbta}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_e\_anom}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Handle for a group halo pass.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{bt\_obc\_type (fortran type in module mom\_barotropic)@\spxentry{bt\_obc\_type}\spxextra{fortran type in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_obc_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{bt\_obc\_type}}}
The barotropic stepping open boundary condition type.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_u\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ie\_u\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{js\_u\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{je\_u\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_v\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ie\_v\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{js\_v\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{je\_v\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Index ranges for the open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The external wave speed at u\sphinxhyphen{}points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The external wave speed at u\sphinxhyphen{}points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The total thickness at the u\sphinxhyphen{}points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The total thickness at the v\sphinxhyphen{}points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uhbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The zonal barotropic thickness fluxes specified for open boundary conditions (if any) {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vhbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The meridional barotropic thickness fluxes specified for open boundary conditions (if any) {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ubt\_outer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The zonal velocities just outside the domain, as set by the open boundary conditions {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vbt\_outer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The meridional velocities just outside the domain, as set by the open boundary conditions {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eta\_outer\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The surface height outside of the domain at a u\sphinxhyphen{}point with an open boundary condition {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eta\_outer\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The surface height outside of the domain at a v\sphinxhyphen{}point with an open boundary condition {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_u\_obcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True if this PE has an open boundary at a u\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_v\_obcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True if this PE has an open boundary at a v\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_alloced}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True if BT\_OBC is in use and has been allocated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_uhvh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_cg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_eta\_outer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{local\_bt\_cont\_u\_type (fortran type in module mom\_barotropic)@\spxentry{local\_bt\_cont\_u\_type}\spxextra{fortran type in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/local_bt_cont_u_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{local\_bt\_cont\_u\_type}}}
A desciption of the functional dependence of transport at a u\sphinxhyphen{}point.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from locations far to the east {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_e0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from nearby to the east {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_w0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from nearby to the west {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from locations far to the west {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ubt\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: uBT\_WW is the barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, or with INTEGRAL\_BT\_CONTINUITY the time\sphinxhyphen{}integrated barotropic velocity {[}L \textasciitilde{}\textgreater{} m{]}, beyond which the marginal open face area is FA\_u\_WW. uBT\_WW must be non\sphinxhyphen{}negative.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ubt\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: uBT\_EE is a barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, or with INTEGRAL\_BT\_CONTINUITY the time\sphinxhyphen{}integrated barotropic velocity {[}L \textasciitilde{}\textgreater{} m{]}, beyond which the marginal open face area is FA\_u\_EE. uBT\_EE must be non\sphinxhyphen{}positive.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh\_crvw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The curvature of face area with velocity for flow from the west {[}H T2 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 or kg s2 m\sphinxhyphen{}3{]} or {[}H L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1 or kg m\sphinxhyphen{}3{]} with INTEGRAL\_BT\_CONTINUITY.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh\_crve}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The curvature of face area with velocity for flow from the east {[}H T2 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 or kg s2 m\sphinxhyphen{}3{]} or {[}H L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1 or kg m\sphinxhyphen{}3{]} with INTEGRAL\_BT\_CONTINUITY.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The zonal transport when ubt=ubt\_WW {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}, or the equivalent time\sphinxhyphen{}integrated transport with INTEGRAL\_BT\_CONTINUITY {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The zonal transport when ubt=ubt\_EE {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}, or the equivalent time\sphinxhyphen{}integrated transport with INTEGRAL\_BT\_CONTINUITY {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{local\_bt\_cont\_v\_type (fortran type in module mom\_barotropic)@\spxentry{local\_bt\_cont\_v\_type}\spxextra{fortran type in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/local_bt_cont_v_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{local\_bt\_cont\_v\_type}}}
A desciption of the functional dependence of transport at a v\sphinxhyphen{}point.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from locations far to the north {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_n0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from nearby to the north {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_s0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from nearby to the south {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from locations far to the south {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vbt\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: vBT\_SS is the barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, or with INTEGRAL\_BT\_CONTINUITY the time\sphinxhyphen{}integrated barotropic velocity {[}L \textasciitilde{}\textgreater{} m{]}, beyond which the marginal open face area is FA\_v\_SS. vBT\_SS must be non\sphinxhyphen{}negative.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vbt\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: vBT\_NN is the barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, or with INTEGRAL\_BT\_CONTINUITY the time\sphinxhyphen{}integrated barotropic velocity {[}L \textasciitilde{}\textgreater{} m{]}, beyond which the marginal open face area is FA\_v\_NN. vBT\_NN must be non\sphinxhyphen{}positive.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh\_crvs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The curvature of face area with velocity for flow from the south {[}H T2 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 or kg s2 m\sphinxhyphen{}3{]} or {[}H L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1 or kg m\sphinxhyphen{}3{]} with INTEGRAL\_BT\_CONTINUITY.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh\_crvn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The curvature of face area with velocity for flow from the north {[}H T2 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 or kg s2 m\sphinxhyphen{}3{]} or {[}H L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1 or kg m\sphinxhyphen{}3{]} with INTEGRAL\_BT\_CONTINUITY.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The meridional transport when vbt=vbt\_SS {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}, or the equivalent time\sphinxhyphen{}integrated transport with INTEGRAL\_BT\_CONTINUITY {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The meridional transport when vbt=vbt\_NN {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}, or the equivalent time\sphinxhyphen{}integrated transport with INTEGRAL\_BT\_CONTINUITY {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{memory\_size\_type (fortran type in module mom\_barotropic)@\spxentry{memory\_size\_type}\spxextra{fortran type in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/memory_size_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{memory\_size\_type}}}
A container for passing around active tracer point memory limits.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isdw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Currently active memory limits.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iedw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Currently active memory limits.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsdw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Currently active memory limits.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jedw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Currently active memory limits.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_barotropic:function-subroutine-documentation}}\index{btstep() (fortran subroutine in module mom\_barotropic)@\spxentry{btstep()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{btstep}}}{\emph{U\_in}, \emph{V\_in}, \emph{eta\_in}, \emph{dt}, \emph{bc\_accel\_u}, \emph{bc\_accel\_v}, \emph{forces}, \emph{pbce}, \emph{eta\_PF\_in}, \emph{U\_Cor}, \emph{V\_Cor}, \emph{accel\_layer\_u}, \emph{accel\_layer\_v}, \emph{eta\_out}, \emph{uhbtav}, \emph{vhbtav}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{visc\_rem\_u}, \emph{visc\_rem\_v}, \emph{etaav}, \emph{ADp}, \emph{OBC}, \emph{BT\_cont}, \emph{eta\_PF\_start}, \emph{taux\_bot}, \emph{tauy\_bot}, \emph{uh0}, \emph{vh0}, \emph{u\_uh0}, \emph{v\_vh0}}{}
This subroutine time steps the barotropic equations explicitly. For gravity waves, anything between a forwards\sphinxhyphen{}backwards scheme and a simulated backwards Euler scheme is used, with bebt between 0.0 and 1.0 determining the scheme. In practice, bebt must be of order 0.2 or greater. A forwards\sphinxhyphen{}backwards treatment of the Coriolis terms is always used.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u\_in} :: {[}in{]} The initial (3\sphinxhyphen{}D) zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_in} :: {[}in{]} The initial (3\sphinxhyphen{}D) meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{eta\_in} :: {[}in{]} The initial barotropic free surface height anomaly or column mass anomaly {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time increment to integrate over {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{bc\_accel\_u} :: {[}in{]} The zonal baroclinic accelerations, {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bc\_accel\_v} :: {[}in{]} The meridional baroclinic accelerations, {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{pbce} :: {[}in{]} The baroclinic pressure anomaly in each layer due to free surface height anomalies {[}L2 H\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}1 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{eta\_pf\_in} :: {[}in{]} The 2\sphinxhyphen{}D eta field (either SSH anomaly or column mass anomaly) that was used to calculate the input pressure gradient accelerations (or its final value if eta\_PF\_start is provided {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Note: eta\_in, pbce, and eta\_PF\_in must have up\sphinxhyphen{}to\sphinxhyphen{}date values in the first point of their halos.

\item {} 
\sphinxstylestrong{u\_cor} :: {[}in{]} The (3\sphinxhyphen{}D) zonal velocities used to calculate the Coriolis terms in bc\_accel\_u {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_cor} :: {[}in{]} The (3\sphinxhyphen{}D) meridional velocities used to calculate the Coriolis terms in bc\_accel\_u {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{accel\_layer\_u} :: {[}out{]} The zonal acceleration of each layer due to the barotropic calculation {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{accel\_layer\_v} :: {[}out{]} The meridional acceleration of each layer due to the barotropic calculation {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{eta\_out} :: {[}out{]} The final barotropic free surface height anomaly or column mass anomaly {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uhbtav} :: {[}out{]} the barotropic zonal volume or mass fluxes averaged through the barotropic steps {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhbtav} :: {[}out{]} the barotropic meridional volume or mass fluxes averaged through the barotropic steps {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to barotropic\_init.

\item {} 
\sphinxstylestrong{visc\_rem\_u} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied, in the zonal direction. Nondimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{visc\_rem\_v} :: {[}in{]} Ditto for meridional direction {[}nondim{]}.

\item {} 
\sphinxstylestrong{etaav} :: {[}out{]} The free surface height or column mass averaged over the barotropic integration {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{adp} :: Acceleration diagnostic pointers

\item {} 
\sphinxstylestrong{obc} :: The open boundary condition structure.

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

\item {} 
\sphinxstylestrong{eta\_pf\_start} :: The eta field consistent with the pressure gradient at the start of the barotropic stepping {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{taux\_bot} :: The zonal bottom frictional stress from ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{tauy\_bot} :: The meridional bottom frictional stress from ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{uh0} :: The zonal layer transports at reference velocities {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{u\_uh0} :: The velocities used to calculate uh0 {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vh0} :: The zonal layer transports at reference velocities {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_vh0} :: The velocities used to calculate vh0 {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/adjust_local_bt_cont_types}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_local\_bt\_cont\_types}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/apply_velocity_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_velocity\_obcs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_cont_to_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bt\_cont\_to\_face\_areas}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/complete_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::complete\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::enable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_duhbt_du}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_duhbt\_du}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_dvhbt_dv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_dvhbt\_dv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_face\_areas}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_uhbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_uhbt}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_vhbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_vhbt}}}}} \sphinxcode{\sphinxupquote{id\_clock\_calc}} \sphinxcode{\sphinxupquote{id\_clock\_calc\_post}} \sphinxcode{\sphinxupquote{id\_clock\_calc\_pre}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_post}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_pre}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_step}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_local_bt_cont_types}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_local\_bt\_cont\_types}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_up_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_bt\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/start_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::start\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/swap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{swap}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_sensitivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_forcing\_sensitivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_dtbt() (fortran subroutine in module mom\_barotropic)@\spxentry{set\_dtbt()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{set\_dtbt}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{eta}, \emph{pbce}, \emph{BT\_cont}, \emph{gtot\_est}, \emph{SSH\_add}}{}
This subroutine automatically determines an optimal value for dtbt based on some state of the ocean.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Barotropic control structure.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} The barotropic free surface height anomaly or column mass anomaly {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{pbce} :: {[}in{]} The baroclinic pressure anomaly in each layer due to free surface height anomalies {[}L2 H\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}1 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

\item {} 
\sphinxstylestrong{gtot\_est} :: {[}in{]} An estimate of the total gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ssh\_add} :: {[}in{]} An additional contribution to SSH to provide a margin of error when calculating the external wave speed {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_cont_to_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bt\_cont\_to\_face\_areas}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_face\_areas}}}}} \sphinxcode{\sphinxupquote{id\_clock\_sync}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_sensitivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_forcing\_sensitivity}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_velocity\_obcs() (fortran subroutine in module mom\_barotropic)@\spxentry{apply\_velocity\_obcs()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/apply_velocity_obcs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{apply\_velocity\_obcs}}}{\emph{OBC}, \emph{ubt}, \emph{vbt}, \emph{uhbt}, \emph{vhbt}, \emph{ubt\_trans}, \emph{vbt\_trans}, \emph{eta}, \emph{ubt\_old}, \emph{vbt\_old}, \emph{BT\_OBC}, \emph{G}, \emph{MS}, \emph{US}, \emph{halo}, \emph{dtbt}, \emph{bebt}, \emph{use\_BT\_cont}, \emph{integral\_BT\_cont}, \emph{dt\_elapsed}, \emph{Datu}, \emph{Datv}, \emph{BTCL\_u}, \emph{BTCL\_v}, \emph{uhbt0}, \emph{vhbt0}, \emph{ubt\_int}, \emph{vbt\_int}, \emph{uhbt\_int}, \emph{vhbt\_int}}{}
The following 4 subroutines apply the open boundary conditions. This subroutine applies the open boundary conditions on barotropic velocities and mass transports, as developed by Mehmet Ilicak.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: An associated pointer to an OBC type.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{ms} :: {[}in{]} A type that describes the memory sizes of the argument arrays.

\item {} 
\sphinxstylestrong{ubt} :: {[}inout{]} the zonal barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{uhbt} :: {[}inout{]} the zonal barotropic transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ubt\_trans} :: {[}inout{]} The zonal barotropic velocity used in transport {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vbt} :: {[}inout{]} The meridional barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhbt} :: {[}inout{]} the meridional barotropic transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vbt\_trans} :: {[}inout{]} the meridional BT velocity used in transports {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} The barotropic free surface height anomaly or column mass anomaly {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ubt\_old} :: {[}in{]} The starting value of ubt in a barotropic step {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vbt\_old} :: {[}in{]} The starting value of vbt in a barotropic step {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{bt\_obc} :: {[}in{]} A structure with the private barotropic arrays related to the open boundary conditions, set by set\_up\_BT\_OBC.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The extra halo size to use here.

\item {} 
\sphinxstylestrong{dtbt} :: {[}in{]} The time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{bebt} :: {[}in{]} The fractional weighting of the future velocity in determining the transport.

\item {} 
\sphinxstylestrong{use\_bt\_cont} :: {[}in{]} If true, use the BT\_cont\_types to calculate transports.

\item {} 
\sphinxstylestrong{integral\_bt\_cont} :: {[}in{]} If true, update the barotropic continuity equation directly from the initial condition using the time\sphinxhyphen{}integrated barotropic velocity.

\item {} 
\sphinxstylestrong{dt\_elapsed} :: {[}in{]} The amount of time in the barotropic stepping that will have elapsed {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{datu} :: {[}in{]} A fixed estimate of the face areas at u points {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{datv} :: {[}in{]} A fixed estimate of the face areas at v points {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{btcl\_u} :: {[}in{]} Structure of information used for a dynamic estimate of the face areas at u\sphinxhyphen{}points.

\item {} 
\sphinxstylestrong{btcl\_v} :: {[}in{]} Structure of information used for a dynamic estimate of the face areas at v\sphinxhyphen{}points.

\item {} 
\sphinxstylestrong{uhbt0} :: {[}in{]} A correction to the zonal transport so that the barotropic functions agree with the sum of the layer transports {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhbt0} :: {[}in{]} A correction to the meridional transport so that the barotropic functions agree with the sum of the layer transports {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ubt\_int} :: {[}in{]} The time\sphinxhyphen{}integrated zonal barotropic velocity before this update {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{uhbt\_int} :: {[}in{]} The time\sphinxhyphen{}integrated zonal barotropic transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vbt\_int} :: {[}in{]} The time\sphinxhyphen{}integrated meridional barotropic velocity before this update {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhbt\_int} :: {[}in{]} The time\sphinxhyphen{}integrated meridional barotropic transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_uhbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_uhbt}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_vhbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_vhbt}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_bt\_obc() (fortran subroutine in module mom\_barotropic)@\spxentry{set\_up\_bt\_obc()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_up_bt_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{set\_up\_bt\_obc}}}{\emph{OBC}, \emph{eta}, \emph{BT\_OBC}, \emph{BT\_Domain}, \emph{G}, \emph{GV}, \emph{US}, \emph{MS}, \emph{halo}, \emph{use\_BT\_cont}, \emph{integral\_BT\_cont}, \emph{dt\_baroclinic}, \emph{Datu}, \emph{Datv}, \emph{BTCL\_u}, \emph{BTCL\_v}}{}
This subroutine sets up the private structure used to apply the open boundary conditions, as developed by Mehmet Ilicak.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: An associated pointer to an OBC type.

\item {} 
\sphinxstylestrong{ms} :: {[}in{]} A type that describes the memory sizes of the argument arrays.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} The barotropic free surface height anomaly or column mass anomaly {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bt\_obc} :: {[}inout{]} A structure with the private barotropic arrays related to the open boundary conditions, set by set\_up\_BT\_OBC.

\item {} 
\sphinxstylestrong{bt\_domain} :: {[}inout{]} MOM\_domain\_type associated with wide arrays

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The extra halo size to use here.

\item {} 
\sphinxstylestrong{use\_bt\_cont} :: {[}in{]} If true, use the BT\_cont\_types to calculate transports.

\item {} 
\sphinxstylestrong{integral\_bt\_cont} :: {[}in{]} If true, update the barotropic continuity equation directly from the initial condition using the time\sphinxhyphen{}integrated barotropic velocity.

\item {} 
\sphinxstylestrong{dt\_baroclinic} :: {[}in{]} The baroclinic timestep for this cycle of updates to the barotropic solver {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{datu} :: {[}in{]} A fixed estimate of the face areas at u points {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{datv} :: {[}in{]} A fixed estimate of the face areas at v points {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{btcl\_u} :: {[}in{]} Structure of information used for a dynamic estimate of the face areas at u\sphinxhyphen{}points.

\item {} 
\sphinxstylestrong{btcl\_v} :: {[}in{]} Structure of information used for a dynamic estimate of the face areas at v\sphinxhyphen{}points.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/uhbt_to_ubt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uhbt\_to\_ubt}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/vhbt_to_vbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vhbt\_to\_vbt}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{destroy\_bt\_obc() (fortran subroutine in module mom\_barotropic)@\spxentry{destroy\_bt\_obc()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/destroy_bt_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{destroy\_bt\_obc}}}{\emph{BT\_OBC}}{}
Clean up the BT\_OBC memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{bt\_obc} :: {[}inout{]} A structure with the private barotropic arrays related to the open boundary conditions, set by set\_up\_BT\_OBC.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{btcalc() (fortran subroutine in module mom\_barotropic)@\spxentry{btcalc()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btcalc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{btcalc}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{CS}, \emph{h\_u}, \emph{h\_v}, \emph{may\_use\_default}, \emph{OBC}}{}
btcalc calculates the barotropic velocities from the full velocity and thickness fields, determines the fraction of the total water column in each layer at velocity points, and determines a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to barotropic\_init.

\item {} 
\sphinxstylestrong{h\_u} :: {[}in{]} The specified thicknesses at u\sphinxhyphen{}points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_v} :: {[}in{]} The specified thicknesses at v\sphinxhyphen{}points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{may\_use\_default} :: {[}in{]} An optional logical argument to indicate that the default velocity point thicknesses may be used for this particular calculation, even though the setting of CShvel\_scheme would usually require that h\_u and h\_v be passed in.

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{arithmetic}} \sphinxcode{\sphinxupquote{harmonic}} \sphinxcode{\sphinxupquote{hybrid}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_uhbt() (fortran function in module mom\_barotropic)@\spxentry{find\_uhbt()}\spxextra{fortran function in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_uhbt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{find\_uhbt}}}{\emph{u}, \emph{BTC}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
The function find\_uhbt determines the zonal transport for a given velocity, or with INTEGRAL\_BT\_CONT=True it determines the time\sphinxhyphen{}integrated zonal transport for a given time\sphinxhyphen{}integrated velocity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u} :: {[}in{]} The local zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or time integrated velocity {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{btc} :: {[}in{]} A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers’ continuity equations. The dimensions of some of the elements in this type vary depending on INTEGRAL\_BT\_CONT.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The zonal barotropic transport {[}L2 H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1{]} or time integrated transport {[}L2 H \textasciitilde{}\textgreater{} m3{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/apply_velocity_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_velocity\_obcs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_duhbt\_du() (fortran function in module mom\_barotropic)@\spxentry{find\_duhbt\_du()}\spxextra{fortran function in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_duhbt_du}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{find\_duhbt\_du}}}{\emph{u}, \emph{BTC}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
The function find\_duhbt\_du determines the marginal zonal face area for a given velocity, or with INTEGRAL\_BT\_CONT=True for a given time\sphinxhyphen{}integrated velocity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u} :: {[}in{]} The local zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or time integrated velocity {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{btc} :: {[}in{]} A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers’ continuity equations. The dimensions of some of the elements in this type vary depending on INTEGRAL\_BT\_CONT.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The zonal barotropic face area {[}L H \textasciitilde{}\textgreater{} m2{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{uhbt\_to\_ubt() (fortran function in module mom\_barotropic)@\spxentry{uhbt\_to\_ubt()}\spxextra{fortran function in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/uhbt_to_ubt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{uhbt\_to\_ubt}}}{\emph{uhbt}, \emph{BTC}, \emph{guess}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport, or if INTEGRAL\_BT\_CONT=True this finds the time\sphinxhyphen{}integrated velocity that is consistent with a time\sphinxhyphen{}integrated transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{uhbt} :: {[}in{]} The barotropic zonal transport that should be inverted for, {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]} or the time\sphinxhyphen{}integrated transport {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{btc} :: {[}in{]} A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers’ continuity equations. The dimensions of some of the elements in this type vary depending on INTEGRAL\_BT\_CONT.

\item {} 
\sphinxstylestrong{guess} :: {[}in{]} A guess at what ubt will be {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or {[}L \textasciitilde{}\textgreater{} m{]}. The result is not allowed to be dramatically larger than guess.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The result \sphinxhyphen{} The velocity that gives uhbt transport {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or the time\sphinxhyphen{}integrated velocity {[}L \textasciitilde{}\textgreater{} m{]}.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_up_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_bt\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_vhbt() (fortran function in module mom\_barotropic)@\spxentry{find\_vhbt()}\spxextra{fortran function in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_vhbt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{find\_vhbt}}}{\emph{v}, \emph{BTC}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
The function find\_vhbt determines the meridional transport for a given velocity, or with INTEGRAL\_BT\_CONT=True it determines the time\sphinxhyphen{}integrated meridional transport for a given time\sphinxhyphen{}integrated velocity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{v} :: {[}in{]} The local meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or time integrated velocity {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{btc} :: {[}in{]} A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers’ continuity equations. The dimensions of some of the elements in this type vary depending on INTEGRAL\_BT\_CONT.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The meridional barotropic transport {[}L2 H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1{]} or time integrated transport {[}L2 H \textasciitilde{}\textgreater{} m3{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/apply_velocity_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_velocity\_obcs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_dvhbt\_dv() (fortran function in module mom\_barotropic)@\spxentry{find\_dvhbt\_dv()}\spxextra{fortran function in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_dvhbt_dv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{find\_dvhbt\_dv}}}{\emph{v}, \emph{BTC}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
The function find\_dvhbt\_dv determines the marginal meridional face area for a given velocity, or with INTEGRAL\_BT\_CONT=True for a given time\sphinxhyphen{}integrated velocity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{v} :: {[}in{]} The local meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or time integrated velocity {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{btc} :: {[}in{]} A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers’ continuity equations. The dimensions of some of the elements in this type vary depending on INTEGRAL\_BT\_CONT.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The meridional barotropic face area {[}L H \textasciitilde{}\textgreater{} m2{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vhbt\_to\_vbt() (fortran function in module mom\_barotropic)@\spxentry{vhbt\_to\_vbt()}\spxextra{fortran function in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/vhbt_to_vbt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{vhbt\_to\_vbt}}}{\emph{vhbt}, \emph{BTC}, \emph{guess}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function inverts the transport function to determine the barotopic velocity that is consistent with a given transport, or if INTEGRAL\_BT\_CONT=True this finds the time\sphinxhyphen{}integrated velocity that is consistent with a time\sphinxhyphen{}integrated transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{vhbt} :: {[}in{]} The barotropic meridional transport that should be inverted for {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]} or the time\sphinxhyphen{}integrated transport {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{btc} :: {[}in{]} A structure containing various fields that allow the barotropic transports to be calculated consistently with the layers’ continuity equations. The dimensions of some of the elements in this type vary depending on INTEGRAL\_BT\_CONT.

\item {} 
\sphinxstylestrong{guess} :: {[}in{]} A guess at what vbt will be {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or {[}L \textasciitilde{}\textgreater{} m{]}. The result is not allowed to be dramatically larger than guess.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The result \sphinxhyphen{} The velocity that gives vhbt transport {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or the time\sphinxhyphen{}integrated velocity {[}L \textasciitilde{}\textgreater{} m{]}.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_up_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_bt\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_local\_bt\_cont\_types() (fortran subroutine in module mom\_barotropic)@\spxentry{set\_local\_bt\_cont\_types()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_local_bt_cont_types}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{set\_local\_bt\_cont\_types}}}{\emph{BT\_cont}, \emph{BTCL\_u}, \emph{BTCL\_v}, \emph{G}, \emph{US}, \emph{MS}, \emph{BT\_Domain}, \emph{halo}, \emph{dt\_baroclinic}}{}
This subroutine sets up reordered versions of the BT\_cont type in the local\_BT\_cont types, which have wide halos properly filled in.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{bt\_cont} :: {[}inout{]} The BT\_cont\_type input to the barotropic solver.

\item {} 
\sphinxstylestrong{ms} :: {[}in{]} A type that describes the memory sizes of the argument arrays.

\item {} 
\sphinxstylestrong{btcl\_u} :: {[}out{]} A structure with the u information from BT\_cont.

\item {} 
\sphinxstylestrong{btcl\_v} :: {[}out{]} A structure with the v information from BT\_cont.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{bt\_domain} :: {[}inout{]} The domain to use for updating the halos of wide arrays.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The extra halo size to use here.

\item {} 
\sphinxstylestrong{dt\_baroclinic} :: {[}in{]} The baroclinic time step {[}T \textasciitilde{}\textgreater{} s{]}, which is provided if INTEGRAL\_BT\_CONTINUITY is true.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_calc\_pre}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_pre}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/swap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{swap}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjust\_local\_bt\_cont\_types() (fortran subroutine in module mom\_barotropic)@\spxentry{adjust\_local\_bt\_cont\_types()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/adjust_local_bt_cont_types}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{adjust\_local\_bt\_cont\_types}}}{\emph{ubt}, \emph{uhbt}, \emph{vbt}, \emph{vhbt}, \emph{BTCL\_u}, \emph{BTCL\_v}, \emph{G}, \emph{US}, \emph{MS}, \emph{halo}, \emph{dt\_baroclinic}}{}
Adjust\_local\_BT\_cont\_types expands the range of velocities with a cubic curve translating velocities into transports to match the inital values of velocities and summed transports when the velocities are larger than the first guesses of the cubic transition velocities used to set up the local\_BT\_cont types.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ms} :: {[}in{]} A type that describes the memory sizes of the argument arrays.

\item {} 
\sphinxstylestrong{ubt} :: {[}in{]} The linearization zonal barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{uhbt} :: {[}in{]} The linearization zonal barotropic transport

\item {} 
\sphinxstylestrong{vbt} :: {[}in{]} The linearization meridional barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhbt} :: {[}in{]} The linearization meridional barotropic transport

\item {} 
\sphinxstylestrong{btcl\_u} :: {[}out{]} A structure with the u information from BT\_cont.

\item {} 
\sphinxstylestrong{btcl\_v} :: {[}out{]} A structure with the v information from BT\_cont.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The extra halo size to use here.

\item {} 
\sphinxstylestrong{dt\_baroclinic} :: {[}in{]} The baroclinic time step {[}T \textasciitilde{}\textgreater{} s{]}, which is provided if INTEGRAL\_BT\_CONTINUITY is true.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bt\_cont\_to\_face\_areas() (fortran subroutine in module mom\_barotropic)@\spxentry{bt\_cont\_to\_face\_areas()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_cont_to_face_areas}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{bt\_cont\_to\_face\_areas}}}{\emph{BT\_cont}, \emph{Datu}, \emph{Datv}, \emph{G}, \emph{US}, \emph{MS}, \emph{halo}, \emph{maximize}}{}
This subroutine uses the BTCL types to find typical or maximum face areas, which can then be used for finding wave speeds, etc.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{bt\_cont} :: {[}inout{]} The BT\_cont\_type input to the barotropic solver.

\item {} 
\sphinxstylestrong{ms} :: {[}in{]} A type that describes the memory sizes of the argument arrays.

\item {} 
\sphinxstylestrong{datu} :: {[}out{]} The effective zonal face area {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{datv} :: {[}out{]} The effective meridional face area {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The extra halo size to use here.

\item {} 
\sphinxstylestrong{maximize} :: {[}in{]} If present and true, find the maximum face area for any velocity.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dtbt}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{swap() (fortran subroutine in module mom\_barotropic)@\spxentry{swap()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/swap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{swap}}}{\emph{a}, \emph{b}}{}
Swap the values of two real variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a} :: {[}inout{]} The first variable to be swapped.

\item {} 
\sphinxstylestrong{b} :: {[}inout{]} The second variable to be swapped.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_local_bt_cont_types}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_local\_bt\_cont\_types}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_face\_areas() (fortran subroutine in module mom\_barotropic)@\spxentry{find\_face\_areas()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_face_areas}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{find\_face\_areas}}}{\emph{Datu}, \emph{Datv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{MS}, \emph{eta}, \emph{halo}, \emph{add\_max}}{}
This subroutine determines the open face areas of cells for calculating the barotropic transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ms} :: {[}in{]} A type that describes the memory sizes of the argument arrays.

\item {} 
\sphinxstylestrong{datu} :: {[}out{]} The open zonal face area {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{datv} :: {[}out{]} The open meridional face area {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to barotropic\_init.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} The barotropic free surface height anomaly

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The halo size to use, default = 1.

\item {} 
\sphinxstylestrong{add\_max} :: {[}in{]} A value to add to the maximum depth (used to overestimate the external wave speed) {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barotropic\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dtbt}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bt\_mass\_source() (fortran subroutine in module mom\_barotropic)@\spxentry{bt\_mass\_source()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_mass_source}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{bt\_mass\_source}}}{\emph{h}, \emph{eta}, \emph{set\_cor}, \emph{G}, \emph{GV}, \emph{CS}}{}
bt\_mass\_source determines the appropriately limited mass source for the barotropic solver, along with a corrective fictitious mass source that will drive the barotropic estimate of the free surface height toward the baroclinic estimate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} The free surface height that is to be corrected {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{set\_cor} :: {[}in{]} A flag to indicate whether to set the corrective fluxes (and update the slowly varying part of eta\_cor) (.true.) or whether to incrementally update the corrective fluxes.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to barotropic\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{barotropic\_init() (fortran subroutine in module mom\_barotropic)@\spxentry{barotropic\_init()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{barotropic\_init}}}{\emph{u}, \emph{v}, \emph{h}, \emph{eta}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{restart\_CS}, \emph{calc\_dtbt}, \emph{BT\_cont}, \emph{tides\_CSp}}{}
barotropic\_init initializes a number of time\sphinxhyphen{}invariant fields used in the barotropic calculation and initializes any barotropic fields that have not already been initialized.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} Free surface height or column mass anomaly

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set in register\_barotropic\_restarts.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\item {} 
\sphinxstylestrong{calc\_dtbt} :: {[}out{]} If true, the barotropic time step must be recalculated before stepping.

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements that describe the

\item {} 
\sphinxstylestrong{tides\_csp} :: A pointer to the control structure of the

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{arithmetic}} \sphinxcode{\sphinxupquote{arithmetic\_string}} \sphinxcode{\sphinxupquote{bt\_cont\_string}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{btcalc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/find_face_areas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_face\_areas}}}}} \sphinxcode{\sphinxupquote{from\_bt\_cont}} \sphinxcode{\sphinxupquote{harmonic}} \sphinxcode{\sphinxupquote{harmonic\_string}} \sphinxcode{\sphinxupquote{hybrid}} \sphinxcode{\sphinxupquote{hybrid\_string}} \sphinxcode{\sphinxupquote{id\_clock\_calc}} \sphinxcode{\sphinxupquote{id\_clock\_calc\_post}} \sphinxcode{\sphinxupquote{id\_clock\_calc\_pre}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_post}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_pre}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_step}} \sphinxcode{\sphinxupquote{id\_clock\_sync}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dtbt}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{barotropic\_get\_tav() (fortran subroutine in module mom\_barotropic)@\spxentry{barotropic\_get\_tav()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_get_tav}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{barotropic\_get\_tav}}}{\emph{CS}, \emph{ubtav}, \emph{vbtav}, \emph{G}, \emph{US}}{}
Copies ubtav and vbtav from private type into arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for this module

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{ubtav} :: {[}inout{]} Zonal barotropic velocity averaged over a baroclinic timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vbtav} :: {[}inout{]} Meridional barotropic velocity averaged over a baroclinic timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc::horizontal\_viscosity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{barotropic\_end() (fortran subroutine in module mom\_barotropic)@\spxentry{barotropic\_end()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{barotropic\_end}}}{\emph{CS}}{}
Clean up the barotropic control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure to clear out.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/destroy_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{destroy\_bt\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_barotropic\_restarts() (fortran subroutine in module mom\_barotropic)@\spxentry{register\_barotropic\_restarts()}\spxextra{fortran subroutine in module mom\_barotropic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/register_barotropic_restarts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_barotropic/}}\sphinxbfcode{\sphinxupquote{register\_barotropic\_restarts}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}}{}
This subroutine is used to register any fields from \sphinxcode{\sphinxupquote{MOM\_barotropic.F90}}
that should be written to or read from the restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_bkgnd\_mixing module reference}
\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing}}\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:mom-bkgnd-mixing-module-reference}}\label{\detokenize{api/generated/modules/mom_bkgnd_mixing::doc}}\index{mom\_bkgnd\_mixing (module)@\spxentry{mom\_bkgnd\_mixing}\spxextra{module}|spxpagem}
Interface to background mixing schemes, including the Bryan and Lewis (1979) which is applied via CVMix.

{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:detamom-bkgnd-mixing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bkgnd\_mixing\_cs}}}}}
&
Control structure including parameters for this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bkgnd\_mixing\_init()}}}}}
&
Initialize the background mixing routine.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/calculate_bkgnd_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_bkgnd\_mixing()}}}}}
&
Calculates the vertical background diffusivities/viscosities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/cvmix_bkgnd_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_bkgnd\_is\_used()}}}}}
&
Reads the parameter “USE\_CVMix\_BACKGROUND” and returns state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/check_bkgnd_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_bkgnd\_scheme()}}}}}
&
Sets CSbkgnd\_scheme\_str to check whether multiple background diffusivity schemes are activated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bkgnd\_mixing\_end()}}}}}
&
Clear pointers and dealocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:detailed-description}}\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:detamom-bkgnd-mixing}}
Interface to background mixing schemes, including the Bryan and Lewis (1979) which is applied via CVMix.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:type-documentation}}\index{bkgnd\_mixing\_cs (fortran type in module mom\_bkgnd\_mixing)@\spxentry{bkgnd\_mixing\_cs}\spxextra{fortran type in module mom\_bkgnd\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing/}}\sphinxbfcode{\sphinxupquote{bkgnd\_mixing\_cs}}}
Control structure including parameters for this module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bryan\_lewis\_c1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The vertical diffusivity values for Bryan\sphinxhyphen{}Lewis profile at {\color{red}\bfseries{}|}z|=D {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bryan\_lewis\_c2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amplitude of variation in diffusivity for the Bryan\sphinxhyphen{}Lewis diffusivity profile {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bryan\_lewis\_c3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The inverse length scale for transition region in the Bryan\sphinxhyphen{}Lewis diffusivity profile {[}m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bryan\_lewis\_c4}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The depth where diffusivity is Bryan\_Lewis\_bl1 in the Bryan\sphinxhyphen{}Lewis profile {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bckgrnd\_vdc1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Background diffusivity (Ledwell) when horiz\_varying\_background=.true. {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bckgrnd\_vdc\_eq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Equatorial diffusivity (Gregg) when horiz\_varying\_background=.true. {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bckgrnd\_vdc\_psim}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Max. PSI induced diffusivity (MacKinnon) when horiz\_varying\_background=.true. {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bckgrnd\_vdc\_banda}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Banda Sea diffusivity (Gordon) when horiz\_varying\_background=.true. {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: minimum diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: interior diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Earth’s rotation rate {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n0\_2omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: ratio of the typical Buoyancy frequency to twice the Earth’s rotation period, used with the Henyey scaling from the mixing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prandtl\_bkgnd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Turbulent Prandtl number used to convert vertical background diffusivity into viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_tanh\_lat\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional scaling for the range of diffusivities with Kd\_tanh\_lat\_fn. Valid values are in the range of \sphinxhyphen{}2 to 2; 0.4 reproduces CM2M.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kdml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: mixed layer diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]} when bulkmixedlayer==.false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: mixed layer thickness {[}Z \textasciitilde{}\textgreater{} m{]} when bulkmixedlayer==.false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_tanh\_lat\_fn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the tanh dependence of Kd\_sfc on latitude, like GFDL CM2.1/CM2M. There is no physical justification for this form, and it can not be used with Henyey\_IGW\_background.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bryan\_lewis\_diffusivity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, background vertical diffusivity uses Bryan\sphinxhyphen{}Lewis (1979) like tanh profile.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{horiz\_varying\_background}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply vertically uniform, latitude\sphinxhyphen{}dependent background diffusivity, as described in Danabasoglu et al., 2012.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{henyey\_igw\_background}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a simplified variant of the Henyey et al, JGR (1986) latitudinal scaling for the background diapycnal diffusivity, which gives a marked decrease in the diffusivity near the equator. The simplification here is to assume that the in\sphinxhyphen{}situ stratification is the same as the reference stratificaiton.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{henyey\_igw\_background\_new}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: same as Henyey\_IGW\_background but incorporate the effect of stratification on TKE dissipation, e = f/f\_0 * acosh(N/f) / acosh(N\_0/f\_0) * e\_0 where e is the TKE dissipation, and N\_0 and f\_0 are the reference buoyancy frequency and inertial frequencies respectively. e\_0 is the reference dissipation at (N\_0,f\_0). In the previous version, N=N\_0. Additionally, the squared inverse relationship between diapycnal diffusivities and stratification is included:

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, a refined bulk mixed layer scheme is used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_via\_kdml\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true and KDML /= KD and a number of other higher precedence options are not used, the background diffusivity is set incorrectly using a bug that was introduced in March, 2018.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, turn on debugging in this module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that regulates diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bkgnd\_scheme\_str}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: Background scheme identifier.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:function-subroutine-documentation}}\index{bkgnd\_mixing\_init() (fortran subroutine in module mom\_bkgnd\_mixing)@\spxentry{bkgnd\_mixing\_init()}\spxextra{fortran subroutine in module mom\_bkgnd\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing/}}\sphinxbfcode{\sphinxupquote{bkgnd\_mixing\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initialize the background mixing routine.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Run\sphinxhyphen{}time parameter file handle

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/check_bkgnd_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_bkgnd\_scheme}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_bkgnd\_mixing() (fortran subroutine in module mom\_bkgnd\_mixing)@\spxentry{calculate\_bkgnd\_mixing()}\spxextra{fortran subroutine in module mom\_bkgnd\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/calculate_bkgnd_mixing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing/}}\sphinxbfcode{\sphinxupquote{calculate\_bkgnd\_mixing}}}{\emph{h}, \emph{tv}, \emph{N2\_lay}, \emph{Kd\_lay}, \emph{Kd\_int}, \emph{Kv\_bkgnd}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calculates the vertical background diffusivities/viscosities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure.

\item {} 
\sphinxstylestrong{n2\_lay} :: {[}in{]} squared buoyancy frequency associated with layers {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}out{]} The background diapycnal diffusivity of each layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}out{]} The background diapycnal diffusivity of each interface {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kv\_bkgnd} :: {[}out{]} The background vertical viscosity at each interface {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Meridional grid index

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to bkgnd\_mixing\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_intrinsic_functions:f/mom_intrinsic_functions/invcosh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_intrinsic\_functions::invcosh}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_bkgnd\_is\_used() (fortran function in module mom\_bkgnd\_mixing)@\spxentry{cvmix\_bkgnd\_is\_used()}\spxextra{fortran function in module mom\_bkgnd\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/cvmix_bkgnd_is_used}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing/}}\sphinxbfcode{\sphinxupquote{cvmix\_bkgnd\_is\_used}}}{\emph{param\_file}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Reads the parameter “USE\_CVMix\_BACKGROUND” and returns state. This function allows other modules to know whether this parameterization will be used without needing to duplicate the log entry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_bkgnd\_scheme() (fortran subroutine in module mom\_bkgnd\_mixing)@\spxentry{check\_bkgnd\_scheme()}\spxextra{fortran subroutine in module mom\_bkgnd\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/check_bkgnd_scheme}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing/}}\sphinxbfcode{\sphinxupquote{check\_bkgnd\_scheme}}}{\emph{CS}, \emph{str}}{}
Sets CSbkgnd\_scheme\_str to check whether multiple background diffusivity schemes are activated. The string is also for error/log messages.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure

\item {} 
\sphinxstylestrong{str} :: {[}in{]} Background scheme identifier deducted from MOM\_input parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bkgnd\_mixing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bkgnd\_mixing\_end() (fortran subroutine in module mom\_bkgnd\_mixing)@\spxentry{bkgnd\_mixing\_end()}\spxextra{fortran subroutine in module mom\_bkgnd\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing/}}\sphinxbfcode{\sphinxupquote{bkgnd\_mixing\_end}}}{\emph{CS}}{}
Clear pointers and dealocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for this module that will be deallocated in this subroutine

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_boundary\_update module reference}
\label{\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update}}\label{\detokenize{api/generated/modules/mom_boundary_update:mom-boundary-update-module-reference}}\label{\detokenize{api/generated/modules/mom_boundary_update::doc}}\index{mom\_boundary\_update (module)@\spxentry{mom\_boundary\_update}\spxextra{module}|spxpagem}
Controls where open boundary conditions are applied.

{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:detamom-boundary-update}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_boundary_update:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_obc\_cs}}}}}
&
The control structure for the MOM\_boundary\_update module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_boundary_update:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/call_obc_register}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_obc\_register()}}}}}
&
The following subroutines and associated definitions provide the machinery to register and call the subroutines that initialize open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_obc\_data()}}}}}
&
Calls appropriate routine to update the open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/obc_register_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_register\_end()}}}}}
&
Clean up the OBC registry.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_boundary_update:detailed-description}}\label{\detokenize{api/generated/modules/mom_boundary_update:detamom-boundary-update}}
This module updates the open boundary arrays when time\sphinxhyphen{}varying. It caused a circular dependency with the tidal\_bay setup when MOM\_open\_boundary.

A small fragment of the grid is shown below:

j+1 x \textasciicircum{} x \textasciicircum{} x At x: q, CoriolisBu j+1 \textgreater{} o \textgreater{} o \textgreater{} At \textasciicircum{}: v, tauy j x \textasciicircum{} x \textasciicircum{} x At \textgreater{}: u, taux j \textgreater{} o \textgreater{} o \textgreater{} At o: h, bathyT, buoy, tr, T, S, Rml, ustar j\sphinxhyphen{}1 x \textasciicircum{} x \textasciicircum{} x i\sphinxhyphen{}1 i i+1 At x \& \textasciicircum{}: i i+1 At \textgreater{} \& o:

The boundaries always run through q grid points (x).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_boundary_update:type-documentation}}\index{update\_obc\_cs (fortran type in module mom\_boundary\_update)@\spxentry{update\_obc\_cs}\spxextra{fortran type in module mom\_boundary\_update}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_boundary\_update/}}\sphinxbfcode{\sphinxupquote{update\_obc\_cs}}}
The control structure for the MOM\_boundary\_update module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{file\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(file\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control structures for named OBC specifications.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kelvin\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(kelvin\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control structures for named OBC specifications.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_bay\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_bay\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control structures for named OBC specifications.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{shelfwave\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(shelfwave\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control structures for named OBC specifications.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dyed\_channel\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(dyed\_channel\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control structures for named OBC specifications.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_files}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use external files for the open boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_kelvin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the Kelvin wave open boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_tidal\_bay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the tidal\_bay open boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_shelfwave}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the shelfwave open boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_dyed\_channel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the dyed channel open boundary.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_boundary_update:function-subroutine-documentation}}\index{call\_obc\_register() (fortran subroutine in module mom\_boundary\_update)@\spxentry{call\_obc\_register()}\spxextra{fortran subroutine in module mom\_boundary\_update}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/call_obc_register}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_boundary\_update/}}\sphinxbfcode{\sphinxupquote{call\_obc\_register}}}{\emph{param\_file}, \emph{CS}, \emph{OBC}}{}
The following subroutines and associated definitions provide the machinery to register and call the subroutines that initialize open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file to parse

\item {} 
\sphinxstylestrong{cs} :: Control structure for OBCs

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_file_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::register\_file\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_obc\_data() (fortran subroutine in module mom\_boundary\_update)@\spxentry{update\_obc\_data()}\spxextra{fortran subroutine in module mom\_boundary\_update}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_boundary\_update/}}\sphinxbfcode{\sphinxupquote{update\_obc\_data}}}{\emph{OBC}, \emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{h}, \emph{CS}, \emph{Time}}{}
Calls appropriate routine to update the open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{cs} :: Control structure for OBCs

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_register\_end() (fortran subroutine in module mom\_boundary\_update)@\spxentry{obc\_register\_end()}\spxextra{fortran subroutine in module mom\_boundary\_update}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/obc_register_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_boundary\_update/}}\sphinxbfcode{\sphinxupquote{obc\_register\_end}}}{\emph{CS}}{}
Clean up the OBC registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for OBCs

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/file_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::file\_obc\_end}}}}} {\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialization::kelvin\_obc\_end}}}}} {\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_bay\_initialization::tidal\_bay\_obc\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_bulk\_mixed\_layer module reference}
\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer}}\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:mom-bulk-mixed-layer-module-reference}}\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer::doc}}\index{mom\_bulk\_mixed\_layer (module)@\spxentry{mom\_bulk\_mixed\_layer}\spxextra{module}|spxpagem}
Build mixed layer parameterization.

{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:detamom-bulk-mixed-layer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer\_cs}}}}}
&
The control structure with parameters for the MOM\_bulk\_mixed\_layer module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer()}}}}}
&
This subroutine partially steps the bulk mixed layer model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/convective_adjustment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convective\_adjustment()}}}}}
&
This subroutine does instantaneous convective entrainment into the buffer layers and mixed layers to remove hydrostatic instabilities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_convection()}}}}}
&
This subroutine causes the mixed layer to entrain to the depth of free convection.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/find_starting_tke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_starting\_tke()}}}}}
&
This subroutine determines the TKE available at the depth of free convection to drive mechanical entrainment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mechanical_entrainment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mechanical\_entrainment()}}}}}
&
This subroutine calculates mechanically driven entrainment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/sort_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sort\_ml()}}}}}
&
This subroutine generates an array of indices that are sorted by layer density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/resort_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{resort\_ml()}}}}}
&
This subroutine actually moves properties between layers to achieve a resorted state, with all of the resorted water either moved into the correct interior layers or in the top nkmb layers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_detrain\_2()}}}}}
&
This subroutine moves any water left in the former mixed layers into the two buffer layers and may also move buffer layer water into the interior isopycnal layers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_detrain\_1()}}}}}
&
This subroutine moves any water left in the former mixed layers into the single buffer layers and may also move buffer layer water into the interior isopycnal layers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer\_init()}}}}}
&
This subroutine initializes the MOM bulk mixed layer module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/ef4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ef4()}}}}}
&
This subroutine returns an approximation to the integral R = exp(\sphinxhyphen{}L*(H+E)) integral(LH to L(H+E)) L/(1\sphinxhyphen{}(1+x)exp(\sphinxhyphen{}x)) dx.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:detailed-description}}\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:detamom-bulk-mixed-layer}}
By Robert Hallberg, 1997 \sphinxhyphen{} 2005.

This file contains the subroutine (bulkmixedlayer) that implements a Kraus\sphinxhyphen{}Turner\sphinxhyphen{}like bulk mixed layer, based on the work of various people, as described in the review paper by Niiler and Kraus (1979), with particular attention to the form proposed by Oberhuber (JPO, 1993, 808\sphinxhyphen{}829), with an extension to a refied bulk mixed layer as described in Hallberg (Aha Huliko’a, 2003). The physical processes portrayed in this subroutine include convective adjustment and mixed layer entrainment and detrainment. Penetrating shortwave radiation and an exponential decay of TKE fluxes are also supported by this subroutine. Several constants can alternately be set to give a traditional Kraus\sphinxhyphen{}Turner mixed layer scheme, although that is not the preferred option. The physical processes and arguments are described in detail below.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:type-documentation}}\index{bulkmixedlayer\_cs (fortran type in module mom\_bulk\_mixed\_layer)@\spxentry{bulkmixedlayer\_cs}\spxextra{fortran type in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer\_cs}}}
The control structure with parameters for the MOM\_bulk\_mixed\_layer module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ml\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_wind}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_ribulk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_pen\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_mech\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_conv\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_conv\_s2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pe\_detrain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pe\_detrain2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_mismatch}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hsfc\_used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hsfc\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hsfc\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers in the mixed layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of buffer layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nsw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of bands of penetrating shortwave radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ratio of the friction velocity cubed to the TKE input to the mixed layer, nondimensional.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of the TKE input to the mixed layer available to drive entrainment {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstar2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of potential energy released by convective adjustment that drives entrainment {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{absorb\_all\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, all shortwave radiation is absorbed by the ocean, instead of passing through to the bottom mud.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ratio of the natural Ekman depth to the TKE decay scale, nondimensional.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulk\_ri\_ml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The efficiency with which mean kinetic energy released by mechanically forced entrainment of the mixed layer is converted to TKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulk\_ri\_convective}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The efficiency with which convectively released mean kinetic energy becomes TKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum mixed layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_limit\_fluxes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: When the total ocean depth is less than this value {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}, scale away all surface forcing to avoid boiling the ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum value of ustar to avoid numerical problems {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. If the value is small enough, this should not affect the solution.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Earth’s rotation rate {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_ds\_wt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: When forced to extrapolate T \& S to match the layer densities, this factor (in degC / ppt) is combined with the derivatives of density with T \& S to determines what direction is orthogonal to density contours. It should be a typical value of (dR/dS) / (dR/dT) in oceanic profiles. 6 degC ppt\sphinxhyphen{}1 might be reasonable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hbuffer\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum buffer layer thickness when the mixed layer is very large {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hbuffer\_rel\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum buffer layer thickness relative to the combined mixed and buffer layer thicknesses when they are thin {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bl\_detrain\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A timescale that characterizes buffer layer detrainment events {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bl\_extrap\_lim}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A limit on the density range over which extrapolation can occur when detraining from the buffer layers, relative to the density range within the mixed and buffer layers, when the detrainment is going into the lightest interior layer {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bl\_split\_rho\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fractional tolerance for matching layer target densities when splitting layers to deal with massive interior layers that are lighter than one of the mixed or buffer layers {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_resort}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, resort the layers by density, rather than doing convective adjustment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_presort\_nz\_conv\_adj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: If ML\_resort is true, do convective adjustment on this many layers (starting from the top) before sorting the remaining layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: When setting the decay scale for turbulence, use this fraction of the absolute rotation rate blended with the local value of f, as sqrt((1\sphinxhyphen{}of)*f\textasciicircum{}2 + of*4*omega\textasciicircum{}2).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{correct\_absorption}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the depth at which penetrating shortwave radiation is absorbed is corrected by moving some of the heating upward in the water column. The default is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{resolve\_ekman}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the nkml layers in the mixed layer are chosen to optimally represent the impact of the Ekman transport on the mixed layer TKE budget.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_diagnostics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate extensive diagnostics of the TKE budget.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_rivermix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Provide additional TKE to mix river runoff at the river mouths to rivermix\_depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rivermix\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The depth of mixing if do\_rivermix is true {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{limit\_det}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, limit the extent of buffer layer detrainment to be consistent with neighbors.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lim\_det\_dh\_sfc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fractional limit in the change between grid points of the surface region (mixed \& buffer layer) thickness {[}nondim{]}. 0.5 by default.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lim\_det\_dh\_bathy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of the total depth by which the thickness of the surface region (mixed \& buffer layer) is allowed to change between grid points. Nondimensional, 0.2 by default.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_river\_heat\_content}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the fluxesrunoff\_Hflx field to set the heat carried by runoff, instead of using SST for temperature of liq\_runoff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_calving\_heat\_content}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use SST for temperature of froz\_runoff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{convect\_mom\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use code with a bug that causes a loss of momentum conservation during mixedlayer convection.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{allowed\_t\_chg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amount by which temperature is allowed to exceed previous values during detrainment, K.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{allowed\_s\_chg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amount by which salinity is allowed to exceed previous values during detrainment, ppt.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The mixed layer depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_wind}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The wind source of TKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_ribulk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The resolved KE source of TKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The convective source of TKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_pen\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The TKE sink required to mix penetrating shortwave heating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_mech\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The decay of mechanical TKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_conv\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The decay of convective TKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The work done by TKE to deepen the mixed layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_conv\_s2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The convective source of TKE due to to mixing in sigma2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_pe\_detrain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The spurious source of potential energy due to mixed layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_pe\_detrain2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The spurious source of potential energy due to mixed layer only.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{allow\_clocks\_in\_omp\_loops}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, clocks can be called from inside loops that can be threaded. To run with multiple threads, set to False.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_h\_sum\_hmbl\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: For group halo pass.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:function-subroutine-documentation}}\index{bulkmixedlayer() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{bulkmixedlayer()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer}}}{\emph{h\_3d}, \emph{u\_3d}, \emph{v\_3d}, \emph{tv}, \emph{fluxes}, \emph{dt}, \emph{ea}, \emph{eb}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{optics}, \emph{Hml}, \emph{aggregate\_FW\_forcing}, \emph{dt\_diag}, \emph{last\_call}}{}
This subroutine partially steps the bulk mixed layer model. The following processes are executed, in the order listed.
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Undergo convective adjustment into mixed layer.

\item {} 
Apply surface heating and cooling.

\item {} 
Starting from the top, entrain whatever fluid the TKE budget permits. Penetrating shortwave radiation is also applied at this point.

\item {} 
If there is any unentrained fluid that was formerly in the mixed layer, detrain this fluid into the buffer layer. This is equivalent to the mixed layer detraining to the Monin\sphinxhyphen{} Obukhov depth.

\item {} 
Divide the fluid in the mixed layer evenly into CSnkml pieces.

\item {} 
Split the buffer layer if appropriate. Layers 1 to nkml are the mixed layer, nkml+1 to nkml+nkbl are the buffer layers. The results of this subroutine are mathematically identical if there are multiple pieces of the mixed layer with the same density or if there is just a single layer. There is no stability limit on the time step.

\end{enumerate}

The key parameters for the mixed layer are found in the control structure. These include mstar, nstar, nstar2, pen\_SW\_frac, pen\_SW\_scale, and TKE\_decay. For the Oberhuber (1993) mixed layer, the values of these are: pen\_SW\_frac = 0.42, pen\_SW\_scale = 15.0 m, mstar = 1.25, nstar = 1, TKE\_decay = 2.5, conv\_decay = 0.5 TKE\_decay is 1/kappa in eq. 28 of Oberhuber (1993), while conv\_decay is 1/mu. Conv\_decay has been eliminated in favor of the well\sphinxhyphen{}calibrated form for the efficiency of penetrating convection from Wang (2003). For a traditional Kraus\sphinxhyphen{}Turner mixed layer, the values are: pen\_SW\_frac = 0.0, pen\_SW\_scale = 0.0 m, mstar = 1.25, nstar = 0.4, TKE\_decay = 0.0, conv\_decay = 0.0
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h\_3d} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{u\_3d} :: {[}in{]} Zonal velocities interpolated to h points

\item {} 
\sphinxstylestrong{v\_3d} :: {[}in{]} Zonal velocities interpolated to h points

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} The amount of fluid moved downward into a

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} The amount of fluid moved upward into a

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to mixedlayer\_init.

\item {} 
\sphinxstylestrong{optics} :: The structure containing the inverse of the vertical absorption decay scale for penetrating shortwave radiation {[}m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hml} :: Active mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{aggregate\_fw\_forcing} :: {[}in{]} If true, the net incoming and outgoing surface freshwater fluxes are combined before being applied, instead of being applied separately.

\item {} 
\sphinxstylestrong{dt\_diag} :: {[}in{]} The diagnostic time step, which may be less than dt if there are two callse to mixedlayer {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{last\_call} :: {[}in{]} if true, this is the last call to mixedlayer in the current time step, so diagnostics will be written. The default is .true.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/absorbremainingsw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::absorbremainingsw}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/convective_adjustment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convective\_adjustment}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_update\_remap\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/extract_optics_slice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::extract\_optics\_slice}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::extractfluxes1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/find_starting_tke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_starting\_tke}}}}} \sphinxcode{\sphinxupquote{id\_clock\_adjustment}} \sphinxcode{\sphinxupquote{id\_clock\_conv}} \sphinxcode{\sphinxupquote{id\_clock\_detrain}} \sphinxcode{\sphinxupquote{id\_clock\_eos}} \sphinxcode{\sphinxupquote{id\_clock\_mech}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_resort}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mechanical_entrainment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mechanical\_entrainment}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_convection}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_detrain\_1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_detrain\_2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/resort_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{resort\_ml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/sort_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sort\_ml}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convective\_adjustment() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{convective\_adjustment()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/convective_adjustment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{convective\_adjustment}}}{\emph{h}, \emph{u}, \emph{v}, \emph{R0}, \emph{Rcv}, \emph{T}, \emph{S}, \emph{eps}, \emph{d\_eb}, \emph{dKE\_CA}, \emph{cTKE}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{nz\_conv}}{}
This subroutine does instantaneous convective entrainment into the buffer layers and mixed layers to remove hydrostatic instabilities. Any water that is lighter than currently in the mixed\sphinxhyphen{} or buffer\sphinxhyphen{} layer is entrained.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. The units of h are referred to as H below.

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Layer temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Layer salinities {[}ppt{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}inout{]} Potential density referenced to surface pressure {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcv} :: {[}inout{]} The coordinate defining potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{d\_eb} :: {[}inout{]} The downward increase across a layer in the entrainment from below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Positive values go with mass gain by a layer.

\item {} 
\sphinxstylestrong{eps} :: {[}in{]} The negligibly small amount of water that will be left in each layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dke\_ca} :: {[}out{]} The vertically integrated change in kinetic energy due to convective adjustment {[}Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ctke} :: {[}out{]} The buoyant turbulent kinetic energy source due to convective adjustment {[}Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module.

\item {} 
\sphinxstylestrong{nz\_conv} :: {[}in{]} If present, the number of layers over which to do convective adjustment (perhaps CSnkml).

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_convection() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{mixedlayer\_convection()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_convection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_convection}}}{\emph{h}, \emph{d\_eb}, \emph{htot}, \emph{Ttot}, \emph{Stot}, \emph{uhtot}, \emph{vhtot}, \emph{R0\_tot}, \emph{Rcv\_tot}, \emph{u}, \emph{v}, \emph{T}, \emph{S}, \emph{R0}, \emph{Rcv}, \emph{eps}, \emph{dR0\_dT}, \emph{dRcv\_dT}, \emph{dR0\_dS}, \emph{dRcv\_dS}, \emph{netMassInOut}, \emph{netMassOut}, \emph{Net\_heat}, \emph{Net\_salt}, \emph{nsw}, \emph{Pen\_SW\_bnd}, \emph{opacity\_band}, \emph{Conv\_En}, \emph{dKE\_FC}, \emph{j}, \emph{ksort}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{tv}, \emph{fluxes}, \emph{dt}, \emph{aggregate\_FW\_forcing}}{}
This subroutine causes the mixed layer to entrain to the depth of free convection. The depth of free convection is the shallowest depth at which the fluid is denser than the average of the fluid above.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{d\_eb} :: {[}inout{]} The downward increase across a layer in the

\item {} 
\sphinxstylestrong{htot} :: {[}out{]} The accumulated mixed layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ttot} :: {[}out{]} The depth integrated mixed layer temperature {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{stot} :: {[}out{]} The depth integrated mixed layer salinity {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uhtot} :: {[}out{]} The depth integrated mixed layer zonal velocity {[}H L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1 or kg m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhtot} :: {[}out{]} The integrated mixed layer meridional velocity {[}H L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1 or kg m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{r0\_tot} :: {[}out{]} The integrated mixed layer potential density referenced to 0 pressure {[}H R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 or kg2 m\sphinxhyphen{}5{]}.

\item {} 
\sphinxstylestrong{rcv\_tot} :: {[}out{]} The integrated mixed layer coordinate variable potential density {[}H R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 or kg2 m\sphinxhyphen{}5{]}.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Layer temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Layer salinities {[}ppt{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}in{]} Potential density referenced to

\item {} 
\sphinxstylestrong{rcv} :: {[}in{]} The coordinate defining potential

\item {} 
\sphinxstylestrong{eps} :: {[}in{]} The negligibly small amount of water

\item {} 
\sphinxstylestrong{dr0\_dt} :: {[}in{]} The partial derivative of R0 with respect to temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_dt} :: {[}in{]} The partial derivative of Rcv with respect to temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dr0\_ds} :: {[}in{]} The partial derivative of R0 with respect to salinity {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_ds} :: {[}in{]} The partial derivative of Rcv with respect to salinity {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{netmassinout} :: {[}in{]} The net mass flux (if non\sphinxhyphen{}Boussinesq) or volume flux (if Boussinesq) into the ocean within a time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. (I.e. P+R\sphinxhyphen{}E.)

\item {} 
\sphinxstylestrong{netmassout} :: {[}in{]} The mass or volume flux out of the ocean within a time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{net\_heat} :: {[}in{]} The net heating at the surface over a time step {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}. Any penetrating shortwave radiation is not included in Net\_heat.

\item {} 
\sphinxstylestrong{net\_salt} :: {[}in{]} The net surface salt flux into the ocean over a time step {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} The number of bands of penetrating shortwave radiation.

\item {} 
\sphinxstylestrong{pen\_sw\_bnd} :: {[}inout{]} The penetrating shortwave heating at the sea surface in each penetrating band {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{opacity\_band} :: {[}in{]} The opacity in each band of penetrating shortwave radiation {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{conv\_en} :: {[}out{]} The buoyant turbulent kinetic energy source due to free convection {[}Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dke\_fc} :: {[}out{]} The vertically integrated change in kinetic energy due to free convection {[}Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{ksort} :: {[}in{]} The density\sphinxhyphen{}sorted k\sphinxhyphen{}indices.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{aggregate\_fw\_forcing} :: {[}in{]} If true, the net incoming and outgoing surface freshwater fluxes are combined before being applied, instead of being applied separately.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_starting\_tke() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{find\_starting\_tke()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/find_starting_tke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{find\_starting\_tke}}}{\emph{htot}, \emph{h\_CA}, \emph{fluxes}, \emph{Conv\_En}, \emph{cTKE}, \emph{dKE\_FC}, \emph{dKE\_CA}, \emph{TKE}, \emph{TKE\_river}, \emph{Idecay\_len\_TKE}, \emph{cMKE}, \emph{dt}, \emph{Idt\_diag}, \emph{j}, \emph{ksort}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine determines the TKE available at the depth of free convection to drive mechanical entrainment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{htot} :: {[}in{]} The accumulated mixed layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_ca} :: {[}in{]} The mixed layer depth after convective adjustment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{conv\_en} :: {[}inout{]} The buoyant turbulent kinetic energy source due to free convection {[}Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dke\_fc} :: {[}in{]} The vertically integrated change in kinetic energy due to free convection {[}Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ctke} :: {[}in{]} The buoyant turbulent kinetic energy

\item {} 
\sphinxstylestrong{dke\_ca} :: {[}in{]} The vertically integrated change in

\item {} 
\sphinxstylestrong{tke} :: {[}out{]} The turbulent kinetic energy available for mixing over a time step {[}Z m2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{idecay\_len\_tke} :: {[}out{]} The inverse of the vertical decay scale for TKE {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tke\_river} :: {[}in{]} The source of turbulent kinetic energy available for driving mixing at river mouths {[}Z L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{cmke} :: {[}out{]} Coefficients of HpE and HpE\textasciicircum{}2 in calculating the denominator of MKE\_rate, {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]} and {[}H\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{idt\_diag} :: {[}in{]} The inverse of the accumulated diagnostic time interval {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{ksort} :: {[}in{]} The density\sphinxhyphen{}sorted k\sphinxhyphen{}indicies.

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mechanical\_entrainment() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{mechanical\_entrainment()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mechanical_entrainment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{mechanical\_entrainment}}}{\emph{h}, \emph{d\_eb}, \emph{htot}, \emph{Ttot}, \emph{Stot}, \emph{uhtot}, \emph{vhtot}, \emph{R0\_tot}, \emph{Rcv\_tot}, \emph{u}, \emph{v}, \emph{T}, \emph{S}, \emph{R0}, \emph{Rcv}, \emph{eps}, \emph{dR0\_dT}, \emph{dRcv\_dT}, \emph{cMKE}, \emph{Idt\_diag}, \emph{nsw}, \emph{Pen\_SW\_bnd}, \emph{opacity\_band}, \emph{TKE}, \emph{Idecay\_len\_TKE}, \emph{j}, \emph{ksort}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine calculates mechanically driven entrainment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{d\_eb} :: {[}inout{]} The downward increase across a layer in the

\item {} 
\sphinxstylestrong{htot} :: {[}inout{]} The accumlated mixed layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ttot} :: {[}inout{]} The depth integrated mixed layer temperature {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{stot} :: {[}inout{]} The depth integrated mixed layer salinity {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uhtot} :: {[}inout{]} The depth integrated mixed layer zonal velocity {[}H L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1 or kg m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vhtot} :: {[}inout{]} The integrated mixed layer meridional velocity {[}H L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1 or kg m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{r0\_tot} :: {[}inout{]} The integrated mixed layer potential density referenced to 0 pressure {[}H R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 or kg2 m\sphinxhyphen{}5{]}.

\item {} 
\sphinxstylestrong{rcv\_tot} :: {[}inout{]} The integrated mixed layer coordinate variable potential density {[}H R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 or kg2 m\sphinxhyphen{}5{]}.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Layer temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Layer salinities {[}ppt{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}in{]} Potential density referenced to

\item {} 
\sphinxstylestrong{rcv} :: {[}in{]} The coordinate defining potential

\item {} 
\sphinxstylestrong{eps} :: {[}in{]} The negligibly small amount of water

\item {} 
\sphinxstylestrong{dr0\_dt} :: {[}in{]} The partial derivative of R0 with respect to temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_dt} :: {[}in{]} The partial derivative of Rcv with respect to temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{cmke} :: {[}in{]} Coefficients of HpE and HpE\textasciicircum{}2 used in calculating the denominator of MKE\_rate; the two elements have differing units of {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]} and {[}H\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{idt\_diag} :: {[}in{]} The inverse of the accumulated diagnostic time interval {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} The number of bands of penetrating shortwave radiation.

\item {} 
\sphinxstylestrong{pen\_sw\_bnd} :: {[}inout{]} The penetrating shortwave heating at the sea surface in each penetrating band {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{opacity\_band} :: {[}in{]} The opacity in each band of penetrating shortwave radiation {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tke} :: {[}inout{]} The turbulent kinetic energy available for mixing over a time step {[}Z m2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{idecay\_len\_tke} :: {[}inout{]} The vertical TKE decay rate {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{ksort} :: {[}in{]} The density\sphinxhyphen{}sorted k\sphinxhyphen{}indicies.

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/ef4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ef4}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sort\_ml() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{sort\_ml()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/sort_ml}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{sort\_ml}}}{\emph{h}, \emph{R0}, \emph{eps}, \emph{G}, \emph{GV}, \emph{CS}, \emph{ksort}}{}
This subroutine generates an array of indices that are sorted by layer density.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}in{]} The potential density used to sort the layers {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{eps} :: {[}in{]} The (small) thickness that must remain in each layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to mixedlayer\_init.

\item {} 
\sphinxstylestrong{ksort} :: {[}out{]} The k\sphinxhyphen{}index to use in the sort.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{resort\_ml() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{resort\_ml()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/resort_ml}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{resort\_ml}}}{\emph{h}, \emph{T}, \emph{S}, \emph{R0}, \emph{Rcv}, \emph{RcvTgt}, \emph{eps}, \emph{d\_ea}, \emph{d\_eb}, \emph{ksort}, \emph{G}, \emph{GV}, \emph{CS}, \emph{dR0\_dT}, \emph{dR0\_dS}, \emph{dRcv\_dT}, \emph{dRcv\_dS}}{}
This subroutine actually moves properties between layers to achieve a resorted state, with all of the resorted water either moved into the correct interior layers or in the top nkmb layers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Layer 0 is the new mixed layer.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Layer temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Layer salinities {[}ppt{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}inout{]} Potential density referenced to surface pressure {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcv} :: {[}inout{]} The coordinate defining potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcvtgt} :: {[}in{]} The target value of Rcv for each layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{eps} :: {[}inout{]} The (small) thickness that must remain in each layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{d\_ea} :: {[}inout{]} The upward increase across a layer in the entrainment from above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Positive d\_ea goes with layer thickness increases.

\item {} 
\sphinxstylestrong{d\_eb} :: {[}inout{]} The downward increase across a layer in the entrainment from below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Positive values go with mass gain by a layer.

\item {} 
\sphinxstylestrong{ksort} :: {[}in{]} The density\sphinxhyphen{}sorted k\sphinxhyphen{}indicies.

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module.

\item {} 
\sphinxstylestrong{dr0\_dt} :: {[}in{]} The partial derivative of potential density referenced to the surface with potential temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dr0\_ds} :: {[}in{]} The partial derivative of cpotential density referenced to the surface with salinity, {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_dt} :: {[}in{]} The partial derivative of coordinate defining potential density with potential temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_ds} :: {[}in{]} The partial derivative of coordinate defining potential density with salinity, {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_detrain\_2() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{mixedlayer\_detrain\_2()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_detrain\_2}}}{\emph{h}, \emph{T}, \emph{S}, \emph{R0}, \emph{Rcv}, \emph{RcvTgt}, \emph{dt}, \emph{dt\_diag}, \emph{d\_ea}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{dR0\_dT}, \emph{dR0\_dS}, \emph{dRcv\_dT}, \emph{dRcv\_dS}, \emph{max\_BL\_det}}{}
This subroutine moves any water left in the former mixed layers into the two buffer layers and may also move buffer layer water into the interior isopycnal layers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Layer 0 is the new mixed layer.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}inout{]} Potential density referenced to surface pressure {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcv} :: {[}inout{]} The coordinate defining potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcvtgt} :: {[}in{]} The target value of Rcv for each layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{dt\_diag} :: {[}in{]} The diagnostic time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{d\_ea} :: {[}inout{]} The upward increase across a layer in the entrainment from above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Positive d\_ea goes with layer thickness increases.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The meridional row to work on.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to mixedlayer\_init.

\item {} 
\sphinxstylestrong{dr0\_dt} :: {[}in{]} The partial derivative of potential density referenced to the surface with potential temperature, {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dr0\_ds} :: {[}in{]} The partial derivative of cpotential density referenced to the surface with salinity {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_dt} :: {[}in{]} The partial derivative of coordinate defining potential density with potential temperature, {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_ds} :: {[}in{]} The partial derivative of coordinate defining potential density with salinity {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{max\_bl\_det} :: {[}in{]} If non\sphinxhyphen{}negative, the maximum detrainment permitted from the buffer layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_detrain\_1() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{mixedlayer\_detrain\_1()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_detrain\_1}}}{\emph{h}, \emph{T}, \emph{S}, \emph{R0}, \emph{Rcv}, \emph{RcvTgt}, \emph{dt}, \emph{dt\_diag}, \emph{d\_ea}, \emph{d\_eb}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{dRcv\_dT}, \emph{dRcv\_dS}, \emph{max\_BL\_det}}{}
This subroutine moves any water left in the former mixed layers into the single buffer layers and may also move buffer layer water into the interior isopycnal layers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Layer 0 is the new mixed layer.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{r0} :: {[}inout{]} Potential density referenced to surface pressure {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcv} :: {[}inout{]} The coordinate defining potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rcvtgt} :: {[}in{]} The target value of Rcv for each layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{dt\_diag} :: {[}in{]} The accumulated time interval for diagnostics {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{d\_ea} :: {[}inout{]} The upward increase across a layer in the entrainment from above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Positive d\_ea goes with layer thickness increases.

\item {} 
\sphinxstylestrong{d\_eb} :: {[}inout{]} The downward increase across a layer in the entrainment from below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Positive values go with mass gain by a layer.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The meridional row to work on.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to mixedlayer\_init.

\item {} 
\sphinxstylestrong{drcv\_dt} :: {[}in{]} The partial derivative of coordinate defining potential density with potential temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drcv\_ds} :: {[}in{]} The partial derivative of coordinate defining potential density with salinity {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{max\_bl\_det} :: {[}in{]} If non\sphinxhyphen{}negative, the maximum detrainment permitted from the buffer layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bulkmixedlayer\_init() (fortran subroutine in module mom\_bulk\_mixed\_layer)@\spxentry{bulkmixedlayer\_init()}\spxextra{fortran subroutine in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
This subroutine initializes the MOM bulk mixed layer module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The model’s clock with the current time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_adjustment}} \sphinxcode{\sphinxupquote{id\_clock\_conv}} \sphinxcode{\sphinxupquote{id\_clock\_detrain}} \sphinxcode{\sphinxupquote{id\_clock\_eos}} \sphinxcode{\sphinxupquote{id\_clock\_mech}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_resort}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ef4() (fortran function in module mom\_bulk\_mixed\_layer)@\spxentry{ef4()}\spxextra{fortran function in module mom\_bulk\_mixed\_layer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/ef4}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer/}}\sphinxbfcode{\sphinxupquote{ef4}}}{\emph{Ht}, \emph{En}, \emph{I\_L}, \emph{dR\_de}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine returns an approximation to the integral R = exp(\sphinxhyphen{}L*(H+E)) integral(LH to L(H+E)) L/(1\sphinxhyphen{}(1+x)exp(\sphinxhyphen{}x)) dx. The approximation to the integrand is good to within \sphinxhyphen{}2\% at x\textasciitilde{}.3 and +25\% at x\textasciitilde{}3.5, but the exponential deemphasizes the importance of large x. When L=0, EF4 returns E/((Ht+E)*Ht).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ht} :: {[}in{]} Total thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{en} :: {[}in{]} Entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{i\_l} :: {[}in{]} The e\sphinxhyphen{}folding scale {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dr\_de} :: {[}inout{]} The partial derivative of the result R with E {[}H\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The integral {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mechanical_entrainment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mechanical\_entrainment}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_checksum\_packages module reference}
\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages}}\label{\detokenize{api/generated/modules/mom_checksum_packages:mom-checksum-packages-module-reference}}\label{\detokenize{api/generated/modules/mom_checksum_packages::doc}}\index{mom\_checksum\_packages (module)@\spxentry{mom\_checksum\_packages}\spxextra{module}|spxpagem}
Provides routines that do checksums of groups of MOM variables.

{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:detamom-checksum-packages}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_checksum_packages:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stats}}}}}
&
A type for storing statistica about a variable.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_checksum_packages:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_chksum_5arg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_chksum\_5arg()}}}}}
&
Write out chksums for the model’s basic state variables, including transports.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_chksum_3arg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_chksum\_3arg()}}}}}
&
Write out chksums for the model’s basic state variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_thermo_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thermo\_chksum()}}}}}
&
Write out chksums for the model’s thermodynamic state variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_surface_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_chksum()}}}}}
&
Write out chksums for the ocean surface variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_accel_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_accel\_chksum()}}}}}
&
Write out chksums for the model’s accelerations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_stats()}}}}}
&
Monitor and write out statistics for the model’s state variables.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_checksum_packages:detailed-description}}\label{\detokenize{api/generated/modules/mom_checksum_packages:detamom-checksum-packages}}
Provides routines that do checksums of groups of MOM variables.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_checksum_packages:type-documentation}}\index{stats (fortran type in module mom\_checksum\_packages)@\spxentry{stats}\spxextra{fortran type in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/stats}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{stats}}}
A type for storing statistica about a variable.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minimum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The minimum value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maximum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The maximum value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{average}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The average value.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_checksum_packages:function-subroutine-documentation}}\index{mom\_state\_chksum\_5arg() (fortran subroutine in module mom\_checksum\_packages)@\spxentry{mom\_state\_chksum\_5arg()}\spxextra{fortran subroutine in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_chksum_5arg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{mom\_state\_chksum\_5arg}}}{\emph{mesg}, \emph{u}, \emph{v}, \emph{h}, \emph{uh}, \emph{vh}, \emph{G}, \emph{GV}, \emph{US}, \emph{haloshift}, \emph{symmetric}, \emph{vel\_scale}}{}
Write out chksums for the model’s basic state variables, including transports.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears on the chksum lines.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or other units.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or other units.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}in{]} Volume flux through zonal faces = u*h*dy

\item {} 
\sphinxstylestrong{vh} :: {[}in{]} Volume flux through meridional faces = v*h*dx

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0).

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do checksums on the fully symmetric computational domain.

\item {} 
\sphinxstylestrong{vel\_scale} :: {[}in{]} The scaling factor to convert velocities to {[}m s\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_state\_chksum\_3arg() (fortran subroutine in module mom\_checksum\_packages)@\spxentry{mom\_state\_chksum\_3arg()}\spxextra{fortran subroutine in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_chksum_3arg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{mom\_state\_chksum\_3arg}}}{\emph{mesg}, \emph{u}, \emph{v}, \emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{haloshift}, \emph{symmetric}}{}
Write out chksums for the model’s basic state variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears on the chksum lines.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or {[}m s\sphinxhyphen{}1{]}..

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type, which is used to rescale u and v if present.

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0).

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do checksums on the fully symmetric computational domain.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_thermo\_chksum() (fortran subroutine in module mom\_checksum\_packages)@\spxentry{mom\_thermo\_chksum()}\spxextra{fortran subroutine in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_thermo_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{mom\_thermo\_chksum}}}{\emph{mesg}, \emph{tv}, \emph{G}, \emph{US}, \emph{haloshift}}{}
Write out chksums for the model’s thermodynamic state variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears on the chksum lines.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0).

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_surface\_chksum() (fortran subroutine in module mom\_checksum\_packages)@\spxentry{mom\_surface\_chksum()}\spxextra{fortran subroutine in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_surface_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{mom\_surface\_chksum}}}{\emph{mesg}, \emph{sfc\_state}, \emph{G}, \emph{US}, \emph{haloshift}, \emph{symmetric}}{}
Write out chksums for the ocean surface variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears on the chksum lines.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} transparent ocean surface state structure shared with the calling routine data in this structure is intent out.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0).

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do checksums on the fully symmetric computational domain.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_accel\_chksum() (fortran subroutine in module mom\_checksum\_packages)@\spxentry{mom\_accel\_chksum()}\spxextra{fortran subroutine in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_accel_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{mom\_accel\_chksum}}}{\emph{mesg}, \emph{CAu}, \emph{CAv}, \emph{PFu}, \emph{PFv}, \emph{diffu}, \emph{diffv}, \emph{G}, \emph{GV}, \emph{US}, \emph{pbce}, \emph{u\_accel\_bt}, \emph{v\_accel\_bt}, \emph{symmetric}}{}
Write out chksums for the model’s accelerations.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears on the chksum lines.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{cau} :: {[}in{]} Zonal acceleration due to Coriolis

\item {} 
\sphinxstylestrong{cav} :: {[}in{]} Meridional acceleration due to Coriolis

\item {} 
\sphinxstylestrong{pfu} :: {[}in{]} Zonal acceleration due to pressure gradients

\item {} 
\sphinxstylestrong{pfv} :: {[}in{]} Meridional acceleration due to pressure gradients

\item {} 
\sphinxstylestrong{diffu} :: {[}in{]} Zonal acceleration due to convergence of the

\item {} 
\sphinxstylestrong{diffv} :: {[}in{]} Meridional acceleration due to convergence of

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{pbce} :: {[}in{]} The baroclinic pressure anomaly in each layer

\item {} 
\sphinxstylestrong{u\_accel\_bt} :: {[}in{]} The zonal acceleration from terms in the

\item {} 
\sphinxstylestrong{v\_accel\_bt} :: {[}in{]} The meridional acceleration from terms in

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do checksums on the fully symmetric computational domain.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_state\_stats() (fortran subroutine in module mom\_checksum\_packages)@\spxentry{mom\_state\_stats()}\spxextra{fortran subroutine in module mom\_checksum\_packages}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksum\_packages/}}\sphinxbfcode{\sphinxupquote{mom\_state\_stats}}}{\emph{mesg}, \emph{u}, \emph{v}, \emph{h}, \emph{Temp}, \emph{Salt}, \emph{G}, \emph{GV}, \emph{US}, \emph{allowChange}, \emph{permitDiminishing}}{}
Monitor and write out statistics for the model’s state variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears on the chksum lines.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{temp} :: {[}in{]} Temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{salt} :: {[}in{]} Salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{allowchange} :: {[}in{]} do not flag an error if the statistics change.

\item {} 
\sphinxstylestrong{permitdiminishing} :: {[}in{]} do not flag error if the extrema are diminishing.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_checksums module reference}
\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums}}\label{\detokenize{api/generated/modules/mom_checksums:mom-checksums-module-reference}}\label{\detokenize{api/generated/modules/mom_checksums::doc}}\index{mom\_checksums (module)@\spxentry{mom\_checksums}\spxextra{module}|spxpagem}
Routines to calculate checksums of various array and vector types.

{\hyperref[\detokenize{api/generated/modules/mom_checksums:detamom-checksums}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_checksums:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum0()}}}}}
&
Checksum a scalar field (consistent with array checksums)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/zchksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zchksum()}}}}}
&
Checksum a 1d array (typically a column).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_h\_2d()}}}}}
&
Checksums on a pair of 2d arrays staggered at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_h\_3d()}}}}}
&
Checksums on a pair of 3d arrays staggered at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_2d()}}}}}
&
Checksums a 2d array staggered at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_b\_2d()}}}}}
&
Checksums on a pair of 2d arrays staggered at q\sphinxhyphen{}points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_b\_3d()}}}}}
&
Checksums on a pair of 3d arrays staggered at q\sphinxhyphen{}points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_2d()}}}}}
&
Checksums a 2d array staggered at corner points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_uv\_2d()}}}}}
&
Checksums a pair of 2d velocity arrays staggered at C\sphinxhyphen{}grid locations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_uv\_3d()}}}}}
&
Checksums a pair of 3d velocity arrays staggered at C\sphinxhyphen{}grid locations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_2d()}}}}}
&
Checksums a 2d array staggered at C\sphinxhyphen{}grid u points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_2d()}}}}}
&
Checksums a 2d array staggered at C\sphinxhyphen{}grid v points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_3d()}}}}}
&
Checksums a 3d array staggered at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_3d()}}}}}
&
Checksums a 3d array staggered at corner points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_3d()}}}}}
&
Checksums a 3d array staggered at C\sphinxhyphen{}grid u points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_3d()}}}}}
&
Checksums a 3d array staggered at C\sphinxhyphen{}grid v points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum1d()}}}}}
&
chksum1d does a checksum of a 1\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum2d()}}}}}
&
chksum2d does a checksum of all data in a 2\sphinxhyphen{}d array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum3d()}}}}}
&
chksum3d does a checksum of all data in a 2\sphinxhyphen{}d array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_0d()}}}}}
&
This function returns .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_1d()}}}}}
&
Returns .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_2d()}}}}}
&
Returns .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_3d()}}}}}
&
Returns .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg1()}}}}}
&
Write a message including the checksum of the non\sphinxhyphen{}shifted array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg5()}}}}}
&
Write a message including checksums of non\sphinxhyphen{}shifted and diagonally shifted arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew()}}}}}
&
Write a message including checksums of non\sphinxhyphen{}shifted and laterally shifted arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_s()}}}}}
&
Write a message including checksums of non\sphinxhyphen{}shifted and southward shifted arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_w()}}}}}
&
Write a message including checksums of non\sphinxhyphen{}shifted and westward shifted arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg2()}}}}}
&
Write a message including checksums of non\sphinxhyphen{}shifted and southwestward shifted arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg3()}}}}}
&
Write a message including the global mean, maximum and minimum of an array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/mom_checksums_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums\_init()}}}}}
&
MOM\_checksums\_init initializes the MOM\_checksums module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error()}}}}}
&
A wrapper for MOM\_error used in the checksum code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/bitcount}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bitcount()}}}}}
&
Does a bitcount of a number by first casting to an integer and then using BTEST to check bit by bit.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_checksums:detailed-description}}\label{\detokenize{api/generated/modules/mom_checksums:detamom-checksums}}
Routines to calculate checksums of various array and vector types.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_checksums:function-subroutine-documentation}}\index{chksum0() (fortran subroutine in module mom\_checksums)@\spxentry{chksum0()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum0}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum0}}}{\emph{scalar}, \emph{mesg}, \emph{scale}, \emph{logunit}}{}
Checksum a scalar field (consistent with array checksums)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{scalar} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{bc\_modulus}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/bitcount}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bitcount}}}}} \sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{writechksums}}

\end{description}\end{quote}

\end{fulllineitems}

\index{zchksum() (fortran subroutine in module mom\_checksums)@\spxentry{zchksum()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/zchksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{zchksum}}}{\emph{array}, \emph{mesg}, \emph{scale}, \emph{logunit}}{}
Checksum a 1d array (typically a column).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_pair\_h\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_pair\_h\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_pair\_h\_2d}}}{\emph{mesg}, \emph{arrayA}, \emph{arrayB}, \emph{HI}, \emph{haloshift}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}, \emph{scalar\_pair}}{}
Checksums on a pair of 2d arrays staggered at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Identifying messages

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{arraya} :: {[}in{]} The first array to be checksummed

\item {} 
\sphinxstylestrong{arrayb} :: {[}in{]} The second array to be checksummed

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, then the arrays describe a scalar, rather than vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_pair\_h\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_pair\_h\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_pair\_h\_3d}}}{\emph{mesg}, \emph{arrayA}, \emph{arrayB}, \emph{HI}, \emph{haloshift}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}, \emph{scalar\_pair}}{}
Checksums on a pair of 3d arrays staggered at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Identifying messages

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{arraya} :: {[}in{]} The first array to be checksummed

\item {} 
\sphinxstylestrong{arrayb} :: {[}in{]} The second array to be checksummed

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, then the arrays describe a scalar, rather than vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_h\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_h\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_h\_2d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 2d array staggered at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} Horizontal index bounds of the model grid

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} Field array on the model grid

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_h\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_pair\_b\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_pair\_b\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_pair\_b\_2d}}}{\emph{mesg}, \emph{arrayA}, \emph{arrayB}, \emph{HI}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}, \emph{scalar\_pair}}{}
Checksums on a pair of 2d arrays staggered at q\sphinxhyphen{}points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Identifying messages

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{arraya} :: {[}in{]} The first array to be checksummed

\item {} 
\sphinxstylestrong{arrayb} :: {[}in{]} The second array to be checksummed

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, then the arrays describe a scalar, rather than vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_pair\_b\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_pair\_b\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_pair\_b\_3d}}}{\emph{mesg}, \emph{arrayA}, \emph{arrayB}, \emph{HI}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}, \emph{scalar\_pair}}{}
Checksums on a pair of 3d arrays staggered at q\sphinxhyphen{}points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Identifying messages

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{arraya} :: {[}in{]} The first array to be checksummed

\item {} 
\sphinxstylestrong{arrayb} :: {[}in{]} The second array to be checksummed

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, then the arrays describe a scalar, rather than vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_b\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_b\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_b\_2d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 2d array staggered at corner points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_b\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_uv\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_uv\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_uv\_2d}}}{\emph{mesg}, \emph{arrayU}, \emph{arrayV}, \emph{HI}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}, \emph{scalar\_pair}}{}
Checksums a pair of 2d velocity arrays staggered at C\sphinxhyphen{}grid locations.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Identifying messages

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{arrayu} :: {[}in{]} The u\sphinxhyphen{}component array to be checksummed

\item {} 
\sphinxstylestrong{arrayv} :: {[}in{]} The v\sphinxhyphen{}component array to be checksummed

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for these arrays.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, then the arrays describe a a scalar, rather than vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_uv\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_uv\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_uv\_3d}}}{\emph{mesg}, \emph{arrayU}, \emph{arrayV}, \emph{HI}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}, \emph{scalar\_pair}}{}
Checksums a pair of 3d velocity arrays staggered at C\sphinxhyphen{}grid locations.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Identifying messages

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{arrayu} :: {[}in{]} The u\sphinxhyphen{}component array to be checksummed

\item {} 
\sphinxstylestrong{arrayv} :: {[}in{]} The v\sphinxhyphen{}component array to be checksummed

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for these arrays.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, then the arrays describe a a scalar, rather than vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_u\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_u\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_u\_2d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 2d array staggered at C\sphinxhyphen{}grid u points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_w}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_uv\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_v\_2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_v\_2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_v\_2d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 2d array staggered at C\sphinxhyphen{}grid v points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_s}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_uv\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_h\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_h\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_h\_3d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 3d array staggered at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_h\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_b\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_b\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_b\_3d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 3d array staggered at corner points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_pair\_b\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_u\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_u\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_u\_3d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 3d array staggered at C\sphinxhyphen{}grid u points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_w}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_uv\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_v\_3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_v\_3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_v\_3d}}}{\emph{array\_m}, \emph{mesg}, \emph{HI\_m}, \emph{haloshift}, \emph{symmetric}, \emph{omit\_corners}, \emph{scale}, \emph{logunit}}{}
Checksums a 3d array staggered at C\sphinxhyphen{}grid v points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_m} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{array\_m} :: {[}in{]} The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\item {} 
\sphinxstylestrong{omit\_corners} :: {[}in{]} If true, avoid checking diagonal shifts

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for this array.

\item {} 
\sphinxstylestrong{logunit} :: {[}in{]} IO unit for checksum logging

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calculatestatistics}} \sphinxcode{\sphinxupquote{checkfornans}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chk\_sum\_msg\_s}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_error}}}}} \sphinxcode{\sphinxupquote{default\_shift}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::rotate\_hor\_index}}}}} \sphinxcode{\sphinxupquote{subchk}} \sphinxcode{\sphinxupquote{substats}} \sphinxcode{\sphinxupquote{writechksums}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_uv\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum1d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum1d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum1d}}}{\emph{array}, \emph{mesg}, \emph{start\_i}, \emph{end\_i}, \emph{compare\_PEs}}{}
chksum1d does a checksum of a 1\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be summed (index starts at 1).

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message.

\item {} 
\sphinxstylestrong{start\_i} :: {[}in{]} The starting index for the sum (default 1)

\item {} 
\sphinxstylestrong{end\_i} :: {[}in{]} The ending index for the sum (default all)

\item {} 
\sphinxstylestrong{compare\_pes} :: {[}in{]} If true, compare across PEs instead of summing and list the root\_PE value (default true)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/bitcount}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bitcount}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum2d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum2d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum2d}}}{\emph{array}, \emph{mesg}}{}
chksum2d does a checksum of all data in a 2\sphinxhyphen{}d array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: An identifying message

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/bitcount}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bitcount}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum3d() (fortran subroutine in module mom\_checksums)@\spxentry{chksum3d()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum3d}}}{\emph{array}, \emph{mesg}}{}
chksum3d does a checksum of all data in a 2\sphinxhyphen{}d array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: The array to be checksummed

\item {} 
\sphinxstylestrong{mesg} :: An identifying message

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/bitcount}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bitcount}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_nan\_0d() (fortran function in module mom\_checksums)@\spxentry{is\_nan\_0d()}\spxextra{fortran function in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{is\_nan\_0d}}}{\emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This function returns .true. if x is a NaN, and .false. otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{x} :: {[}in{]} The value to be checked for NaNs.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_nan\_1d() (fortran function in module mom\_checksums)@\spxentry{is\_nan\_1d()}\spxextra{fortran function in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{is\_nan\_1d}}}{\emph{x}, \emph{skip\_mpp}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns .true. if any element of x is a NaN, and .false. otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The array to be checked for NaNs.

\item {} 
\sphinxstylestrong{skip\_mpp} :: {[}in{]} If true, only check this array only on the local PE (default false).

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_0d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_nan\_2d() (fortran function in module mom\_checksums)@\spxentry{is\_nan\_2d()}\spxextra{fortran function in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{is\_nan\_2d}}}{\emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns .true. if any element of x is a NaN, and .false. otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{x} :: {[}in{]} The array to be checked for NaNs.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_0d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_nan\_3d() (fortran function in module mom\_checksums)@\spxentry{is\_nan\_3d()}\spxextra{fortran function in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{is\_nan\_3d}}}{\emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns .true. if any element of x is a NaN, and .false. otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{x} :: {[}in{]} The array to be checked for NaNs.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/is_nan_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_nan\_0d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg1() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg1()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg1}}}{\emph{fmsg}, \emph{bc0}, \emph{mesg}, \emph{iounit}}{}
Write a message including the checksum of the non\sphinxhyphen{}shifted array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{bc0} :: {[}in{]} The bitcount of the non\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg5() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg5()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg5}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg5}}}{\emph{fmsg}, \emph{bc0}, \emph{bcSW}, \emph{bcSE}, \emph{bcNW}, \emph{bcNE}, \emph{mesg}, \emph{iounit}}{}
Write a message including checksums of non\sphinxhyphen{}shifted and diagonally shifted arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{bc0} :: {[}in{]} The bitcount of the non\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{bcsw} :: {[}in{]} The bitcount for SW shifted array

\item {} 
\sphinxstylestrong{bcse} :: {[}in{]} The bitcount for SE shifted array

\item {} 
\sphinxstylestrong{bcnw} :: {[}in{]} The bitcount for NW shifted array

\item {} 
\sphinxstylestrong{bcne} :: {[}in{]} The bitcount for NE shifted array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg\_nsew() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg\_nsew()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg\_nsew}}}{\emph{fmsg}, \emph{bc0}, \emph{bcN}, \emph{bcS}, \emph{bcE}, \emph{bcW}, \emph{mesg}, \emph{iounit}}{}
Write a message including checksums of non\sphinxhyphen{}shifted and laterally shifted arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{bc0} :: {[}in{]} The bitcount of the non\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{bcn} :: {[}in{]} The bitcount for N shifted array

\item {} 
\sphinxstylestrong{bcs} :: {[}in{]} The bitcount for S shifted array

\item {} 
\sphinxstylestrong{bce} :: {[}in{]} The bitcount for E shifted array

\item {} 
\sphinxstylestrong{bcw} :: {[}in{]} The bitcount for W shifted array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg\_s() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg\_s()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_s}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg\_s}}}{\emph{fmsg}, \emph{bc0}, \emph{bcS}, \emph{mesg}, \emph{iounit}}{}
Write a message including checksums of non\sphinxhyphen{}shifted and southward shifted arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{bc0} :: {[}in{]} The bitcount of the non\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{bcs} :: {[}in{]} The bitcount of the south\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg\_w() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg\_w()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_w}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg\_w}}}{\emph{fmsg}, \emph{bc0}, \emph{bcW}, \emph{mesg}, \emph{iounit}}{}
Write a message including checksums of non\sphinxhyphen{}shifted and westward shifted arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{bc0} :: {[}in{]} The bitcount of the non\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{bcw} :: {[}in{]} The bitcount of the west\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg2() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg2()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg2}}}{\emph{fmsg}, \emph{bc0}, \emph{bcSW}, \emph{mesg}, \emph{iounit}}{}
Write a message including checksums of non\sphinxhyphen{}shifted and southwestward shifted arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{bc0} :: {[}in{]} The bitcount of the non\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{bcsw} :: {[}in{]} The bitcount of the southwest\sphinxhyphen{}shifted array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chk\_sum\_msg3() (fortran subroutine in module mom\_checksums)@\spxentry{chk\_sum\_msg3()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg3}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chk\_sum\_msg3}}}{\emph{fmsg}, \emph{aMean}, \emph{aMin}, \emph{aMax}, \emph{mesg}, \emph{iounit}}{}
Write a message including the global mean, maximum and minimum of an array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fmsg} :: {[}in{]} A checksum code\sphinxhyphen{}location specific preamble

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message supplied by top\sphinxhyphen{}level caller

\item {} 
\sphinxstylestrong{amean} :: {[}in{]} The mean value of the array

\item {} 
\sphinxstylestrong{amin} :: {[}in{]} The minimum value of the array

\item {} 
\sphinxstylestrong{amax} :: {[}in{]} The maximum value of the array

\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} Checksum logger IO unit

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_checksums\_init() (fortran subroutine in module mom\_checksums)@\spxentry{mom\_checksums\_init()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/mom_checksums_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{mom\_checksums\_init}}}{\emph{param\_file}}{}
MOM\_checksums\_init initializes the MOM\_checksums module. As it happens, the only thing that it does is to log the version of this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/mom_debugging_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging::mom\_debugging\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_error() (fortran subroutine in module mom\_checksums)@\spxentry{chksum\_error()}\spxextra{fortran subroutine in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{chksum\_error}}}{\emph{signal}, \emph{message}}{}
A wrapper for MOM\_error used in the checksum code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{signal} :: {[}in{]} An error severity level, such as FATAL or WARNING

\item {} 
\sphinxstylestrong{message} :: {[}in{]} An error message

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum0}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_b\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_h\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_u\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_v\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/zchksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zchksum}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bitcount() (fortran function in module mom\_checksums)@\spxentry{bitcount()}\spxextra{fortran function in module mom\_checksums}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/bitcount}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_checksums/}}\sphinxbfcode{\sphinxupquote{bitcount}}}{\emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Does a bitcount of a number by first casting to an integer and then using BTEST to check bit by bit.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{x} :: {[}in{]} Number to be bitcount

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum0}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum3d}}}}} \sphinxcode{\sphinxupquote{subchk}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_coms module reference}
\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms}}\label{\detokenize{api/generated/modules/mom_coms:mom-coms-module-reference}}\label{\detokenize{api/generated/modules/mom_coms::doc}}\index{mom\_coms (module)@\spxentry{mom\_coms}\spxextra{module}|spxpagem}
Interfaces to non\sphinxhyphen{}domain\sphinxhyphen{}oriented communication subroutines, including the MOM6 reproducing sums facility.

{\hyperref[\detokenize{api/generated/modules/mom_coms:detamom-coms}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_coms:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_type}}}}}
&
The Extended Fixed Point (EFP) type provides a public interface for doing sums and taking differences with this type.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_coms:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d()}}}}}
&
This subroutine uses a conversion to an integer representation of real numbers to give an order\sphinxhyphen{}invariant sum of distributed 2\sphinxhyphen{}D arrays that reproduces across domain decomposition, with the result returned as an extended fixed point type that can be converted back to a real number using EFP\_to\_real.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_2d()}}}}}
&
This subroutine uses a conversion to an integer representation of real numbers to give an order\sphinxhyphen{}invariant sum of distributed 2\sphinxhyphen{}D arrays that reproduces across domain decomposition.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d()}}}}}
&
This subroutine uses a conversion to an integer representation of real numbers to give an order\sphinxhyphen{}invariant sum of distributed 3\sphinxhyphen{}D arrays that reproduces across domain decomposition.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_ints()}}}}}
&
Convert a real number into the array of integers constitute its extended\sphinxhyphen{}fixed\sphinxhyphen{}point representation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/ints_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ints\_to\_real()}}}}}
&
Convert the array of integers that constitute an extended\sphinxhyphen{}fixed\sphinxhyphen{}point representation into a real number.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints()}}}}}
&
Increment an array of integers that constitutes an extended\sphinxhyphen{}fixed\sphinxhyphen{}point representation with a another EFP number.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints_faster}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints\_faster()}}}}}
&
Increment an EFP number with a real number without doing any carrying of of overflows and using only minimal error checking.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/carry_overflow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{carry\_overflow()}}}}}
&
This subroutine handles carrying of the overflow.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/regularize_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_ints()}}}}}
&
This subroutine carries the overflow, and then makes sure that all integers are of the same sign as the overall value.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/query_efp_overflow_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_efp\_overflow\_error()}}}}}
&
Returns the status of the module’s error flag.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reset_efp_overflow_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reset\_efp\_overflow\_error()}}}}}
&
Reset the module’s error flag to false.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_plus}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_plus()}}}}}
&
Add two extended\sphinxhyphen{}fixed\sphinxhyphen{}point numbers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_minus}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_minus()}}}}}
&
Subract one extended\sphinxhyphen{}fixed\sphinxhyphen{}point number from another.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_assign}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_assign()}}}}}
&
Copy one extended\sphinxhyphen{}fixed\sphinxhyphen{}point number into another.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_to\_real()}}}}}
&
Return the real number that an extended\sphinxhyphen{}fixed\sphinxhyphen{}point number corresponds with.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_real_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_real\_diff()}}}}}
&
Take the difference between two extended\sphinxhyphen{}fixed\sphinxhyphen{}point numbers (EFP1 \sphinxhyphen{} EFP2) and return the result as a real number.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_efp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_efp()}}}}}
&
Return the extended\sphinxhyphen{}fixed\sphinxhyphen{}point number that a real number corresponds with.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_list_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_list\_sum\_across\_pes()}}}}}
&
This subroutine does a sum across PEs of a list of EFP variables, returning the sums in place, with all overflows carried.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_val_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_val\_sum\_across\_pes()}}}}}
&
This subroutine does a sum across PEs of an EFP variable, returning the sums in place, with all overflows carried.
\\
\hline
\sphinxcode{\sphinxupquote{mom\_infra\_end()}}
&
This subroutine carries out all of the calls required to close out the infrastructure cleanly.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_coms:detailed-description}}\label{\detokenize{api/generated/modules/mom_coms:detamom-coms}}
Interfaces to non\sphinxhyphen{}domain\sphinxhyphen{}oriented communication subroutines, including the MOM6 reproducing sums facility.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_coms:type-documentation}}\index{efp\_type (fortran type in module mom\_coms)@\spxentry{efp\_type}\spxextra{fortran type in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_type}}}
The Extended Fixed Point (EFP) type provides a public interface for doing sums and taking differences with this type.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(kind=8)( ni )}\sphinxstyleemphasis{{]}} :: The value in this type.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_coms:function-subroutine-documentation}}\index{reproducing\_efp\_sum\_2d() (fortran function in module mom\_coms)@\spxentry{reproducing\_efp\_sum\_2d()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}{\emph{array}, \emph{isr}, \emph{ier}, \emph{jsr}, \emph{jer}, \emph{overflow\_check}, \emph{err}, \emph{only\_on\_PE}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}}}
This subroutine uses a conversion to an integer representation of real numbers to give an order\sphinxhyphen{}invariant sum of distributed 2\sphinxhyphen{}D arrays that reproduces across domain decomposition, with the result returned as an extended fixed point type that can be converted back to a real number using EFP\_to\_real. This technique is described in Hallberg \& Adcroft, 2014, Parallel Computing, doi:10.1016/j.parco.2014.04.007.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be summed

\item {} 
\sphinxstylestrong{isr} :: {[}in{]} The starting i\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{ier} :: {[}in{]} The ending i\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{jsr} :: {[}in{]} The starting j\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{jer} :: {[}in{]} The ending j\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{overflow\_check} :: {[}in{]} If present and false, disable checking for overflows in incremental results. This can speed up calculations if the number of values being summed is small enough

\item {} 
\sphinxstylestrong{err} :: {[}out{]} If present, return an error code instead of triggering any fatal errors directly from this routine.

\item {} 
\sphinxstylestrong{only\_on\_pe} :: {[}in{]} If present and true, do not do the sum across processors, only reporting the local sum

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The result in extended fixed point format

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/carry_overflow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{carry\_overflow}}}}} \sphinxcode{\sphinxupquote{i\_pr}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints_faster}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints\_faster}}}}} \sphinxcode{\sphinxupquote{max\_count\_prec}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{nan\_error}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}} \sphinxcode{\sphinxupquote{pr}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/regularize_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_ints}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reproducing\_sum\_2d() (fortran function in module mom\_coms)@\spxentry{reproducing\_sum\_2d()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{reproducing\_sum\_2d}}}{\emph{array}, \emph{isr}, \emph{ier}, \emph{jsr}, \emph{jer}, \emph{EFP\_sum}, \emph{reproducing}, \emph{overflow\_check}, \emph{err}, \emph{only\_on\_PE}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine uses a conversion to an integer representation of real numbers to give an order\sphinxhyphen{}invariant sum of distributed 2\sphinxhyphen{}D arrays that reproduces across domain decomposition. This technique is described in Hallberg \& Adcroft, 2014, Parallel Computing, doi:10.1016/j.parco.2014.04.007.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be summed

\item {} 
\sphinxstylestrong{isr} :: {[}in{]} The starting i\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{ier} :: {[}in{]} The ending i\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{jsr} :: {[}in{]} The starting j\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{jer} :: {[}in{]} The ending j\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{efp\_sum} :: {[}out{]} The result in extended fixed point format

\item {} 
\sphinxstylestrong{reproducing} :: {[}in{]} If present and false, do the sum using the naive non\sphinxhyphen{}reproducing approach

\item {} 
\sphinxstylestrong{overflow\_check} :: {[}in{]} If present and false, disable checking for overflows in incremental results. This can speed up calculations if the number of values being summed is small enough

\item {} 
\sphinxstylestrong{err} :: {[}out{]} If present, return an error code instead of triggering any fatal errors directly from this routine.

\item {} 
\sphinxstylestrong{only\_on\_pe} :: {[}in{]} If present and true, do not do the sum across processors, only reporting the local sum

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Result

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/ints_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ints\_to\_real}}}}} \sphinxcode{\sphinxupquote{max\_count\_prec}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reproducing\_sum\_3d() (fortran function in module mom\_coms)@\spxentry{reproducing\_sum\_3d()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{reproducing\_sum\_3d}}}{\emph{array}, \emph{isr}, \emph{ier}, \emph{jsr}, \emph{jer}, \emph{sums}, \emph{EFP\_sum}, \emph{EFP\_lay\_sums}, \emph{err}, \emph{only\_on\_PE}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine uses a conversion to an integer representation of real numbers to give an order\sphinxhyphen{}invariant sum of distributed 3\sphinxhyphen{}D arrays that reproduces across domain decomposition. This technique is described in Hallberg \& Adcroft, 2014, Parallel Computing, doi:10.1016/j.parco.2014.04.007.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be summed

\item {} 
\sphinxstylestrong{isr} :: {[}in{]} The starting i\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{ier} :: {[}in{]} The ending i\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{jsr} :: {[}in{]} The starting j\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{jer} :: {[}in{]} The ending j\sphinxhyphen{}index of the sum, noting that the array indices starts at 1

\item {} 
\sphinxstylestrong{sums} :: {[}out{]} The sums by vertical layer

\item {} 
\sphinxstylestrong{efp\_sum} :: {[}out{]} The result in extended fixed point format

\item {} 
\sphinxstylestrong{efp\_lay\_sums} :: {[}out{]} The sums by vertical layer in EFP format

\item {} 
\sphinxstylestrong{err} :: {[}out{]} If present, return an error code instead of triggering any fatal errors directly from this routine.

\item {} 
\sphinxstylestrong{only\_on\_pe} :: {[}in{]} If present and true, do not do the sum across processors, only reporting the local sum

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Result

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/carry_overflow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{carry\_overflow}}}}} \sphinxcode{\sphinxupquote{debug}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints_faster}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints\_faster}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/ints_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ints\_to\_real}}}}} \sphinxcode{\sphinxupquote{max\_count\_prec}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{nan\_error}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}} \sphinxcode{\sphinxupquote{pr}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/regularize_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_ints}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{real\_to\_ints() (fortran function in module mom\_coms)@\spxentry{real\_to\_ints()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{real\_to\_ints}}}{\emph{r}, \emph{prec\_error}, \emph{overflow}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(kind=8)}\sphinxstyleemphasis{{]}}}
Convert a real number into the array of integers constitute its extended\sphinxhyphen{}fixed\sphinxhyphen{}point representation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{r} :: {[}in{]} The real number being converted

\item {} 
\sphinxstylestrong{prec\_error} :: {[}in{]} The PE\sphinxhyphen{}count dependent precision of the integers that is safe from overflows during global sums. This will be larger than the compile\sphinxhyphen{}time precision parameter, and is used to detect overflows.

\item {} 
\sphinxstylestrong{overflow} :: {[}inout{]} Returns true if the conversion is being done on a value that is too large to be represented

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{i\_pr}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{nan\_error}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{pr}} \sphinxcode{\sphinxupquote{prec}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_efp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_efp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ints\_to\_real() (fortran function in module mom\_coms)@\spxentry{ints\_to\_real()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/ints_to_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{ints\_to\_real}}}{\emph{ints}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Convert the array of integers that constitute an extended\sphinxhyphen{}fixed\sphinxhyphen{}point representation into a real number.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{ints} :: {[}in{]} The array of EFP integers

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{pr}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_to\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{increment\_ints() (fortran subroutine in module mom\_coms)@\spxentry{increment\_ints()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{increment\_ints}}}{\emph{int\_sum}, \emph{int2}, \emph{prec\_error}}{}
Increment an array of integers that constitutes an extended\sphinxhyphen{}fixed\sphinxhyphen{}point representation with a another EFP number.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{int\_sum} :: {[}inout{]} The array of EFP integers being incremented

\item {} 
\sphinxstylestrong{int2} :: {[}in{]} The array of EFP integers being added

\item {} 
\sphinxstylestrong{prec\_error} :: {[}in{]} The PE\sphinxhyphen{}count dependent precision of the integers that is safe from overflows during global sums. This will be larger than the compile\sphinxhyphen{}time precision parameter, and is used to detect overflows.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}} \sphinxcode{\sphinxupquote{prec}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_minus}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_minus}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_plus}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_plus}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{increment\_ints\_faster() (fortran subroutine in module mom\_coms)@\spxentry{increment\_ints\_faster()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints_faster}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{increment\_ints\_faster}}}{\emph{int\_sum}, \emph{r}, \emph{max\_mag\_term}}{}
Increment an EFP number with a real number without doing any carrying of of overflows and using only minimal error checking.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{int\_sum} :: {[}inout{]} The array of EFP integers being incremented

\item {} 
\sphinxstylestrong{r} :: {[}in{]} The real number being added.

\item {} 
\sphinxstylestrong{max\_mag\_term} :: {[}inout{]} A running maximum magnitude of the r’s.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{i\_pr}} \sphinxcode{\sphinxupquote{max\_efp\_float}} \sphinxcode{\sphinxupquote{nan\_error}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}} \sphinxcode{\sphinxupquote{pr}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{carry\_overflow() (fortran subroutine in module mom\_coms)@\spxentry{carry\_overflow()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/carry_overflow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{carry\_overflow}}}{\emph{int\_sum}, \emph{prec\_error}}{}
This subroutine handles carrying of the overflow.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{int\_sum} :: {[}inout{]} The array of EFP integers being modified by carries, but without changing value.

\item {} 
\sphinxstylestrong{prec\_error} :: {[}in{]} The PE\sphinxhyphen{}count dependent precision of the integers that is safe from overflows during global sums. This will be larger than the compile\sphinxhyphen{}time precision parameter, and is used to detect overflows.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{i\_prec}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}} \sphinxcode{\sphinxupquote{prec}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_list_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_list\_sum\_across\_pes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_val_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_val\_sum\_across\_pes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{regularize\_ints() (fortran subroutine in module mom\_coms)@\spxentry{regularize\_ints()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/regularize_ints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{regularize\_ints}}}{\emph{int\_sum}}{}
This subroutine carries the overflow, and then makes sure that all integers are of the same sign as the overall value.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{int\_sum} :: {[}inout{]} The array of integers being modified to take a

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{i\_prec}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{prec}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_to\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_efp\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reproducing\_sum\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_efp\_overflow\_error() (fortran function in module mom\_coms)@\spxentry{query\_efp\_overflow\_error()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/query_efp_overflow_error}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{query\_efp\_overflow\_error}}}{}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns the status of the module’s error flag.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{overflow\_error}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_i_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_i\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_j_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_j\_mean}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reset\_efp\_overflow\_error() (fortran subroutine in module mom\_coms)@\spxentry{reset\_efp\_overflow\_error()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/reset_efp_overflow_error}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{reset\_efp\_overflow\_error}}}{}{}
Reset the module’s error flag to false.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{overflow\_error}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_i_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_i\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_j_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_j\_mean}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_plus() (fortran function in module mom\_coms)@\spxentry{efp\_plus()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_plus}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_plus}}}{\emph{EFP1}, \emph{EFP2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}}}
Add two extended\sphinxhyphen{}fixed\sphinxhyphen{}point numbers.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The result in extended fixed point format

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{efp1} :: {[}in{]} The first extended fixed point number

\item {} 
\sphinxstylestrong{efp2} :: {[}in{]} The second extended fixed point number

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_minus() (fortran function in module mom\_coms)@\spxentry{efp\_minus()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_minus}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_minus}}}{\emph{EFP1}, \emph{EFP2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}}}
Subract one extended\sphinxhyphen{}fixed\sphinxhyphen{}point number from another.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The result in extended fixed point format

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{efp1} :: {[}in{]} The first extended fixed point number

\item {} 
\sphinxstylestrong{efp2} :: {[}in{]} The extended fixed point number being subtracted from the first extended fixed point number

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/increment_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_ints}}}}} \sphinxcode{\sphinxupquote{ni}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_assign() (fortran subroutine in module mom\_coms)@\spxentry{efp\_assign()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_assign}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_assign}}}{\emph{EFP1}, \emph{EFP2}}{}
Copy one extended\sphinxhyphen{}fixed\sphinxhyphen{}point number into another.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{efp1} :: {[}out{]} The recipient extended fixed point number

\item {} 
\sphinxstylestrong{efp2} :: {[}in{]} The source extended fixed point number

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ni}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_to\_real() (fortran function in module mom\_coms)@\spxentry{efp\_to\_real()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_to\_real}}}{\emph{EFP1}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the real number that an extended\sphinxhyphen{}fixed\sphinxhyphen{}point number corresponds with.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{efp1} :: {[}inout{]} The extended fixed point number being converted

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/ints_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ints\_to\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/regularize_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_ints}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_list_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_list\_sum\_across\_pes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_real_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_real\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_val_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_val\_sum\_across\_pes}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_real\_diff() (fortran function in module mom\_coms)@\spxentry{efp\_real\_diff()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_real_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_real\_diff}}}{\emph{EFP1}, \emph{EFP2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Take the difference between two extended\sphinxhyphen{}fixed\sphinxhyphen{}point numbers (EFP1 \sphinxhyphen{} EFP2) and return the result as a real number.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{efp1} :: {[}in{]} The first extended fixed point number

\item {} 
\sphinxstylestrong{efp2} :: {[}in{]} The extended fixed point number being subtracted from the first extended fixed point number

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The real result

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_to\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{real\_to\_efp() (fortran function in module mom\_coms)@\spxentry{real\_to\_efp()}\spxextra{fortran function in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_efp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{real\_to\_efp}}}{\emph{val}, \emph{overflow}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}}}
Return the extended\sphinxhyphen{}fixed\sphinxhyphen{}point number that a real number corresponds with.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{val} :: {[}in{]} The real number being converted

\item {} 
\sphinxstylestrong{overflow} :: {[}inout{]} Returns true if the conversion is being done on a value that is too large to be represented

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_ints}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::epbl\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_list\_sum\_across\_pes() (fortran subroutine in module mom\_coms)@\spxentry{efp\_list\_sum\_across\_pes()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_list_sum_across_pes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_list\_sum\_across\_pes}}}{\emph{EFPs}, \emph{nval}, \emph{errors}}{}
This subroutine does a sum across PEs of a list of EFP variables, returning the sums in place, with all overflows carried.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{efps} :: {[}inout{]} The list of extended fixed point numbers

\item {} 
\sphinxstylestrong{nval} :: {[}in{]} The number of values being summed.

\item {} 
\sphinxstylestrong{errors} :: {[}out{]} A list of error flags for each sum

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/carry_overflow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{carry\_overflow}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_to\_real}}}}} \sphinxcode{\sphinxupquote{max\_count\_prec}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}}

\end{description}\end{quote}

\end{fulllineitems}

\index{efp\_val\_sum\_across\_pes() (fortran subroutine in module mom\_coms)@\spxentry{efp\_val\_sum\_across\_pes()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_val_sum_across_pes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{efp\_val\_sum\_across\_pes}}}{\emph{EFP}, \emph{error}}{}
This subroutine does a sum across PEs of an EFP variable, returning the sums in place, with all overflows carried.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{efp} :: {[}inout{]} The extended fixed point numbers being summed across PEs.

\item {} 
\sphinxstylestrong{error} :: {[}out{]} An error flag for this sum

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/carry_overflow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{carry\_overflow}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_to_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{efp\_to\_real}}}}} \sphinxcode{\sphinxupquote{max\_count\_prec}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ni}} \sphinxcode{\sphinxupquote{overflow\_error}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_infra\_endNone() (fortran subroutine in module mom\_coms)@\spxentry{mom\_infra\_endNone()}\spxextra{fortran subroutine in module mom\_coms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coms:f/mom_coms/mom_infra_endNone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coms/}}\sphinxbfcode{\sphinxupquote{mom\_infra\_endNone}}}{}{}
This subroutine carries out all of the calls required to close out the infrastructure cleanly. This should only be called in ocean\sphinxhyphen{}only runs, as the coupler takes care of this in coupled runs.

\end{fulllineitems}



\subsection{mom\_constants module reference}
\label{\detokenize{api/generated/modules/mom_constants:f/mom_constants}}\label{\detokenize{api/generated/modules/mom_constants:mom-constants-module-reference}}\label{\detokenize{api/generated/modules/mom_constants::doc}}\index{mom\_constants (module)@\spxentry{mom\_constants}\spxextra{module}|spxpagem}
Provides a few physical constants.

{\hyperref[\detokenize{api/generated/modules/mom_constants:detamom-constants}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_constants:detailed-description}}\label{\detokenize{api/generated/modules/mom_constants:detamom-constants}}
Provides a few physical constants.


\subsection{mom\_continuity module reference}
\label{\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}}\label{\detokenize{api/generated/modules/mom_continuity:mom-continuity-module-reference}}\label{\detokenize{api/generated/modules/mom_continuity::doc}}\index{mom\_continuity (module)@\spxentry{mom\_continuity}\spxextra{module}|spxpagem}
Solve the layer continuity equation.

{\hyperref[\detokenize{api/generated/modules/mom_continuity:detamom-continuity}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_continuity:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_cs}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_continuity:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity()}}}}}
&
Time steps the layer thicknesses, using a monotonically limited, directionally split PPM scheme, based on Lin (1994).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_init()}}}}}
&
Initializes {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_cs()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_stencil}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_stencil()}}}}}
&
continuity\_stencil returns the continuity solver stencil size
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_end()}}}}}
&
Destructor for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_cs()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_continuity:detailed-description}}\label{\detokenize{api/generated/modules/mom_continuity:detamom-continuity}}
Solve the layer continuity equation.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_continuity:type-documentation}}\index{continuity\_cs (fortran type in module mom\_continuity)@\spxentry{continuity\_cs}\spxextra{fortran type in module mom\_continuity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_continuity/}}\sphinxbfcode{\sphinxupquote{continuity\_cs}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity()}}}}}.
.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{continuity\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Selects the discretization for the continuity solver. Valid values are:

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ppm\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(continuity\_ppm\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_continuity:function-subroutine-documentation}}\index{continuity() (fortran subroutine in module mom\_continuity)@\spxentry{continuity()}\spxextra{fortran subroutine in module mom\_continuity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity/}}\sphinxbfcode{\sphinxupquote{continuity}}}{\emph{u}, \emph{v}, \emph{hin}, \emph{h}, \emph{uh}, \emph{vh}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{uhbt}, \emph{vhbt}, \emph{OBC}, \emph{visc\_rem\_u}, \emph{visc\_rem\_v}, \emph{u\_cor}, \emph{v\_cor}, \emph{BT\_cont}}{}
Time steps the layer thicknesses, using a monotonically limited, directionally split PPM scheme, based on Lin (1994).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hin} :: {[}in{]} Initial layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Final layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}out{]} Volume flux through zonal faces =

\item {} 
\sphinxstylestrong{vh} :: {[}out{]} Volume flux through meridional faces =

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity()}}}}}..

\item {} 
\sphinxstylestrong{uhbt} :: {[}in{]} The vertically summed volume

\item {} 
\sphinxstylestrong{vhbt} :: {[}in{]} The vertically summed volume

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\item {} 
\sphinxstylestrong{visc\_rem\_u} :: {[}in{]} Both the fraction of

\item {} 
\sphinxstylestrong{visc\_rem\_v} :: {[}in{]} Both the fraction of

\item {} 
\sphinxstylestrong{u\_cor} :: {[}out{]} The zonal velocities that

\item {} 
\sphinxstylestrong{v\_cor} :: {[}out{]} The meridional velocities that

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ppm\_scheme}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{continuity\_init() (fortran subroutine in module mom\_continuity)@\spxentry{continuity\_init()}\spxextra{fortran subroutine in module mom\_continuity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity/}}\sphinxbfcode{\sphinxupquote{continuity\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initializes {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_cs()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handles.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure.

\item {} 
\sphinxstylestrong{cs} :: Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity()}}}}}. .

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{ppm\_scheme}} \sphinxcode{\sphinxupquote{ppm\_string}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{continuity\_stencil() (fortran function in module mom\_continuity)@\spxentry{continuity\_stencil()}\spxextra{fortran function in module mom\_continuity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_stencil}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_continuity/}}\sphinxbfcode{\sphinxupquote{continuity\_stencil}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
continuity\_stencil returns the continuity solver stencil size
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Module’s control structure.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The continuity solver stencil size with the current settings.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ppm\_scheme}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{continuity\_end() (fortran subroutine in module mom\_continuity)@\spxentry{continuity\_end()}\spxextra{fortran subroutine in module mom\_continuity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity/}}\sphinxbfcode{\sphinxupquote{continuity\_end}}}{\emph{CS}}{}
Destructor for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_cs()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity()}}}}}. .

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm::continuity\_ppm\_end}}}}} \sphinxcode{\sphinxupquote{ppm\_scheme}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_continuity\_ppm module reference}
\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm}}\label{\detokenize{api/generated/modules/mom_continuity_ppm:mom-continuity-ppm-module-reference}}\label{\detokenize{api/generated/modules/mom_continuity_ppm::doc}}\index{mom\_continuity\_ppm (module)@\spxentry{mom\_continuity\_ppm}\spxextra{module}|spxpagem}
Solve the layer continuity equation using the PPM method for layer fluxes.

{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:detamom-continuity-ppm}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_continuity_ppm:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_cs}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/loop_bounds_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{loop\_bounds\_type}}}}}
&
A container for loop bounds.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_continuity_ppm:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm()}}}}}
&
Time steps the layer thicknesses, using a monotonically limit, directionally split PPM scheme, based on Lin (1994).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux()}}}}}
&
Calculates the mass or volume fluxes through the zonal faces, and other related quantities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_layer()}}}}}
&
Evaluates the zonal mass or volume fluxes in a layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_face_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_face\_thickness()}}}}}
&
Sets the effective interface thickness at each zonal velocity point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_adjust()}}}}}
&
Returns the barotropic velocity adjustment that gives the desired barotropic (layer\sphinxhyphen{}summed) transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_zonal_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zonal\_bt\_cont()}}}}}
&
Sets a structure that describes the zonal barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux()}}}}}
&
Calculates the mass or volume fluxes through the meridional faces, and other related quantities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_flux\_layer()}}}}}
&
Evaluates the meridional mass or volume fluxes in a layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_face_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_face\_thickness()}}}}}
&
Sets the effective interface thickness at each meridional velocity point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_flux\_adjust()}}}}}
&
Returns the barotropic velocity adjustment that gives the desired barotropic (layer\sphinxhyphen{}summed) transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_merid_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_merid\_bt\_cont()}}}}}
&
Sets of a structure that describes the meridional barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x()}}}}}
&
Calculates left/right edge values for PPM reconstruction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y()}}}}}
&
Calculates left/right edge values for PPM reconstruction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_pos()}}}}}
&
This subroutine limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive\sphinxhyphen{}definite.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_cw84}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_cw84()}}}}}
&
This subroutine limits the left/right edge values of the PPM reconstruction according to the monotonic prescription of Colella and Woodward, 1984.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ratio_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ratio\_max()}}}}}
&
Return the maximum ratio of a/b or maxrat.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_init()}}}}}
&
Initializes {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_cs()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_stencil}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_stencil()}}}}}
&
continuity\_PPM\_stencil returns the continuity solver stencil size
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_end()}}}}}
&
Destructor for {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_cs()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_continuity_ppm:detailed-description}}\label{\detokenize{api/generated/modules/mom_continuity_ppm:detamom-continuity-ppm}}
This module contains the subroutines that advect layer thickness. The scheme here uses a Piecewise\sphinxhyphen{}Parabolic method with a positive definite limiter.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_continuity_ppm:type-documentation}}\index{continuity\_ppm\_cs (fortran type in module mom\_continuity\_ppm)@\spxentry{continuity\_ppm\_cs}\spxextra{fortran type in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{continuity\_ppm\_cs}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm()}}}}}.
.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Diagnostics control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{upwind\_1st}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a first\sphinxhyphen{}order upwind scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{monotonic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the Colella \& Woodward monotonic limiter; otherwise use a simple positive definite limiter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{simple\_2nd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a simple second order (arithmetic mean) interpolation of the edge values instead of the higher order interpolation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tol\_eta}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The tolerance for free\sphinxhyphen{}surface height discrepancies between the barotropic solution and the sum of the layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tol\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The tolerance for barotropic velocity discrepancies between the barotropic solution and the sum of the layer thicknesses {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tol\_eta\_aux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The tolerance for free\sphinxhyphen{}surface height discrepancies between the barotropic solution and the sum of the layer thicknesses when calculating the auxiliary corrected velocities {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_limit\_adjust}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum CFL of the adjusted velocities {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{aggress\_adjust}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, allow the adjusted velocities to have a relative CFL change up to 0.5. False by default.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vol\_cfl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the ratio of the open face lengths to the tracer cell areas when estimating CFL numbers. Without aggress\_adjust, the default is false; it is always true with.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{better\_iter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, stop corrective iterations using a velocity\sphinxhyphen{}based criterion and only stop if the iteration is better than all predecessors.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_visc\_rem\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use more appropriate limiting bounds for corrections in strongly viscous columns.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{marginal\_faces}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the marginal face areas from the continuity solver for use as the weights in the barotropic solver. Otherwise use the transport averaged areas.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{loop\_bounds\_type (fortran type in module mom\_continuity\_ppm)@\spxentry{loop\_bounds\_type}\spxextra{fortran type in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/loop_bounds_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{loop\_bounds\_type}}}
A container for loop bounds.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ish}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_continuity_ppm:function-subroutine-documentation}}\index{continuity\_ppm() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{continuity\_ppm()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{continuity\_ppm}}}{\emph{u}, \emph{v}, \emph{hin}, \emph{h}, \emph{uh}, \emph{vh}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{uhbt}, \emph{vhbt}, \emph{OBC}, \emph{visc\_rem\_u}, \emph{visc\_rem\_v}, \emph{u\_cor}, \emph{v\_cor}, \emph{BT\_cont}}{}
Time steps the layer thicknesses, using a monotonically limit, directionally split PPM scheme, based on Lin (1994).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: Module’s control structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hin} :: {[}in{]} Initial layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Final layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}out{]} Zonal volume flux, u*h*dy {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vh} :: {[}out{]} Meridional volume flux, v*h*dx {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{uhbt} :: {[}in{]} The summed volume flux through zonal faces

\item {} 
\sphinxstylestrong{vhbt} :: {[}in{]} The summed volume flux through meridional faces

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\item {} 
\sphinxstylestrong{visc\_rem\_u} :: {[}in{]} The fraction of zonal momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{visc\_rem\_v} :: {[}in{]} The fraction of meridional momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{u\_cor} :: {[}out{]} The zonal velocities that give uhbt as the depth\sphinxhyphen{}integrated transport {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_cor} :: {[}out{]} The meridional velocities that give vhbt as the depth\sphinxhyphen{}integrated transport {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_update}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{zonal\_mass\_flux() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{zonal\_mass\_flux()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{zonal\_mass\_flux}}}{\emph{u}, \emph{h\_in}, \emph{uh}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{LB}, \emph{uhbt}, \emph{OBC}, \emph{visc\_rem\_u}, \emph{u\_cor}, \emph{BT\_cont}}{}
Calculates the mass or volume fluxes through the zonal faces, and other related quantities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness used to calculate fluxes {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}out{]} Volume flux through zonal faces = u*h*dy

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Loop bounds structure.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\item {} 
\sphinxstylestrong{visc\_rem\_u} :: {[}in{]} The fraction of zonal momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{uhbt} :: {[}in{]} The summed volume flux through zonal faces

\item {} 
\sphinxstylestrong{u\_cor} :: {[}out{]} The zonal velocitiess (u with a barotropic correction) that give uhbt as the depth\sphinxhyphen{}integrated transport, m s\sphinxhyphen{}1.

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_correct}} \sphinxcode{\sphinxupquote{id\_clock\_update}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_e}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ratio_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ratio\_max}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_zonal_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zonal\_bt\_cont}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_face_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_face\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_adjust}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_layer}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{zonal\_flux\_layer() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{zonal\_flux\_layer()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_layer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{zonal\_flux\_layer}}}{\emph{u}, \emph{h}, \emph{h\_L}, \emph{h\_R}, \emph{uh}, \emph{duhdu}, \emph{visc\_rem}, \emph{dt}, \emph{G}, \emph{US}, \emph{j}, \emph{ish}, \emph{ieh}, \emph{do\_I}, \emph{vol\_CFL}, \emph{OBC}}{}
Evaluates the zonal mass or volume fluxes in a layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{visc\_rem} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} Zonal mass or volume transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{duhdu} :: {[}inout{]} Partial derivative of uh with u {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Spatial index.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} Start of index range.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} End of index range.

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} Which i values to work on.

\item {} 
\sphinxstylestrong{vol\_cfl} :: {[}in{]} If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_e}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_zonal_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zonal\_bt\_cont}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_adjust}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{zonal\_face\_thickness() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{zonal\_face\_thickness()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_face_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{zonal\_face\_thickness}}}{\emph{u}, \emph{h}, \emph{h\_L}, \emph{h\_R}, \emph{h\_u}, \emph{dt}, \emph{G}, \emph{US}, \emph{LB}, \emph{vol\_CFL}, \emph{marginal}, \emph{visc\_rem\_u}, \emph{OBC}}{}
Sets the effective interface thickness at each zonal velocity point.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness used to calculate fluxes {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_u} :: {[}inout{]} Thickness at zonal faces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Loop bounds structure.

\item {} 
\sphinxstylestrong{vol\_cfl} :: {[}in{]} If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

\item {} 
\sphinxstylestrong{marginal} :: {[}in{]} If true, report the marginal face thicknesses; otherwise report transport\sphinxhyphen{}averaged thicknesses.

\item {} 
\sphinxstylestrong{visc\_rem\_u} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_e}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{zonal\_flux\_adjust() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{zonal\_flux\_adjust()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_adjust}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{zonal\_flux\_adjust}}}{\emph{u}, \emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{uhbt}, \emph{uh\_tot\_0}, \emph{duhdu\_tot\_0}, \emph{du}, \emph{du\_max\_CFL}, \emph{du\_min\_CFL}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}, \emph{visc\_rem}, \emph{j}, \emph{ish}, \emph{ieh}, \emph{do\_I\_in}, \emph{full\_precision}, \emph{uh\_3d}, \emph{OBC}}{}
Returns the barotropic velocity adjustment that gives the desired barotropic (layer\sphinxhyphen{}summed) transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness used to calculate fluxes {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{visc\_rem} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{uhbt} :: {[}in{]} The summed volume flux through zonal faces {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{du\_max\_cfl} :: {[}in{]} Maximum acceptable value of du {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{du\_min\_cfl} :: {[}in{]} Minimum acceptable value of du {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{uh\_tot\_0} :: {[}in{]} The summed transport with 0 adjustment {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{duhdu\_tot\_0} :: {[}in{]} The partial derivative of du\_err with du at 0 adjustment {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{du} :: {[}out{]} The barotropic velocity adjustment {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Spatial index.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} Start of index range.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} End of index range.

\item {} 
\sphinxstylestrong{do\_i\_in} :: {[}in{]} A logical flag indicating which I values to work on.

\item {} 
\sphinxstylestrong{full\_precision} :: {[}in{]} A flag indicating how carefully to iterate. The default is .true. (more accurate).

\item {} 
\sphinxstylestrong{uh\_3d} :: {[}inout{]} Volume flux through zonal faces = u*h*dy {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_layer}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_zonal_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zonal\_bt\_cont}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_zonal\_bt\_cont() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{set\_zonal\_bt\_cont()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_zonal_bt_cont}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{set\_zonal\_bt\_cont}}}{\emph{u}, \emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{BT\_cont}, \emph{uh\_tot\_0}, \emph{duhdu\_tot\_0}, \emph{du\_max\_CFL}, \emph{du\_min\_CFL}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}, \emph{visc\_rem}, \emph{visc\_rem\_max}, \emph{j}, \emph{ish}, \emph{ieh}, \emph{do\_I}}{}
Sets a structure that describes the zonal barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness used to calculate fluxes {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bt\_cont} :: {[}inout{]} A structure with elements that describe the effective open face areas as a function of barotropic flow.

\item {} 
\sphinxstylestrong{uh\_tot\_0} :: {[}in{]} The summed transport with 0 adjustment {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{duhdu\_tot\_0} :: {[}in{]} The partial derivative of du\_err with du at 0 adjustment {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{du\_max\_cfl} :: {[}in{]} Maximum acceptable value of du {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{du\_min\_cfl} :: {[}in{]} Minimum acceptable value of du {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{visc\_rem} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{visc\_rem\_max} :: {[}in{]} Maximum allowable visc\_rem.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Spatial index.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} Start of index range.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} End of index range.

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} A logical flag indicating which I values to work on.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_adjust}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_layer}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meridional\_mass\_flux() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{meridional\_mass\_flux()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{meridional\_mass\_flux}}}{\emph{v}, \emph{h\_in}, \emph{vh}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{LB}, \emph{vhbt}, \emph{OBC}, \emph{visc\_rem\_v}, \emph{v\_cor}, \emph{BT\_cont}}{}
Calculates the mass or volume fluxes through the meridional faces, and other related quantities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness used to calculate fluxes {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{vh} :: {[}out{]} Volume flux through meridional faces = v*h*dx {[}H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.G

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Loop bounds structure.

\item {} 
\sphinxstylestrong{obc} :: Open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{visc\_rem\_v} :: {[}in{]} Both the fraction of the momentum

\item {} 
\sphinxstylestrong{vhbt} :: {[}in{]} The summed volume flux through meridional faces {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_cor} :: {[}out{]} The meridional velocitiess (v with a barotropic correction) that give vhbt as the depth\sphinxhyphen{}integrated transport {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{bt\_cont} :: A structure with elements that describe the effective open face areas as a function of barotropic flow.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_correct}} \sphinxcode{\sphinxupquote{id\_clock\_update}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_face_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_face\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_flux\_layer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_flux\_adjust}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ratio_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ratio\_max}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_merid_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_merid\_bt\_cont}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{merid\_flux\_layer() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{merid\_flux\_layer()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_flux_layer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{merid\_flux\_layer}}}{\emph{v}, \emph{h}, \emph{h\_L}, \emph{h\_R}, \emph{vh}, \emph{dvhdv}, \emph{visc\_rem}, \emph{dt}, \emph{G}, \emph{US}, \emph{J}, \emph{ish}, \emph{ieh}, \emph{do\_I}, \emph{vol\_CFL}, \emph{OBC}}{}
Evaluates the meridional mass or volume fluxes in a layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{visc\_rem} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness used to calculate fluxes, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} Meridional mass or volume transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dvhdv} :: {[}inout{]} Partial derivative of vh with v {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Spatial index.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} Start of index range.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} End of index range.

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} Which i values to work on.

\item {} 
\sphinxstylestrong{vol\_cfl} :: {[}in{]} If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_flux\_adjust}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_merid_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_merid\_bt\_cont}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{merid\_face\_thickness() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{merid\_face\_thickness()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_face_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{merid\_face\_thickness}}}{\emph{v}, \emph{h}, \emph{h\_L}, \emph{h\_R}, \emph{h\_v}, \emph{dt}, \emph{G}, \emph{US}, \emph{LB}, \emph{vol\_CFL}, \emph{marginal}, \emph{visc\_rem\_v}, \emph{OBC}}{}
Sets the effective interface thickness at each meridional velocity point.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness used to calculate fluxes, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_v} :: {[}inout{]} Thickness at meridional faces, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Loop bounds structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{vol\_cfl} :: {[}in{]} If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

\item {} 
\sphinxstylestrong{marginal} :: {[}in{]} If true, report the marginal face thicknesses; otherwise report transport\sphinxhyphen{}averaged thicknesses.

\item {} 
\sphinxstylestrong{visc\_rem\_v} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meridional\_flux\_adjust() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{meridional\_flux\_adjust()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_flux_adjust}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{meridional\_flux\_adjust}}}{\emph{v}, \emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{vhbt}, \emph{vh\_tot\_0}, \emph{dvhdv\_tot\_0}, \emph{dv}, \emph{dv\_max\_CFL}, \emph{dv\_min\_CFL}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}, \emph{visc\_rem}, \emph{j}, \emph{ish}, \emph{ieh}, \emph{do\_I\_in}, \emph{full\_precision}, \emph{vh\_3d}, \emph{OBC}}{}
Returns the barotropic velocity adjustment that gives the desired barotropic (layer\sphinxhyphen{}summed) transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness used to calculate fluxes {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{visc\_rem} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{vhbt} :: {[}in{]} The summed volume flux through meridional faces

\item {} 
\sphinxstylestrong{dv\_max\_cfl} :: {[}in{]} Maximum acceptable value of dv {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dv\_min\_cfl} :: {[}in{]} Minimum acceptable value of dv {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vh\_tot\_0} :: {[}in{]} The summed transport with 0 adjustment {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dvhdv\_tot\_0} :: {[}in{]} The partial derivative of dv\_err with dv at 0 adjustment {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dv} :: {[}out{]} The barotropic velocity adjustment {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Spatial index.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} Start of index range.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} End of index range.

\item {} 
\sphinxstylestrong{do\_i\_in} :: {[}in{]} A flag indicating which I values to work on.

\item {} 
\sphinxstylestrong{full\_precision} :: {[}in{]} A flag indicating how carefully to iterate. The default is .true. (more accurate).

\item {} 
\sphinxstylestrong{vh\_3d} :: {[}inout{]} Volume flux through meridional

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_flux\_layer}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_merid_bt_cont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_merid\_bt\_cont}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_merid\_bt\_cont() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{set\_merid\_bt\_cont()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/set_merid_bt_cont}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{set\_merid\_bt\_cont}}}{\emph{v}, \emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{BT\_cont}, \emph{vh\_tot\_0}, \emph{dvhdv\_tot\_0}, \emph{dv\_max\_CFL}, \emph{dv\_min\_CFL}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}, \emph{visc\_rem}, \emph{visc\_rem\_max}, \emph{j}, \emph{ish}, \emph{ieh}, \emph{do\_I}}{}
Sets of a structure that describes the meridional barotropic volume or mass fluxes as a function of barotropic flow to agree closely with the sum of the layer’s transports.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness used to calculate fluxes, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Left thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Right thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bt\_cont} :: {[}inout{]} A structure with elements that describe the effective open face areas as a function of barotropic flow.

\item {} 
\sphinxstylestrong{vh\_tot\_0} :: {[}in{]} The summed transport with 0 adjustment {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dvhdv\_tot\_0} :: {[}in{]} The partial derivative of du\_err with dv at 0 adjustment {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dv\_max\_cfl} :: {[}in{]} Maximum acceptable value of dv {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dv\_min\_cfl} :: {[}in{]} Minimum acceptable value of dv {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{visc\_rem} :: {[}in{]} Both the fraction of the momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of a barotropic acceleration that a layer experiences after viscosity is applied. Non\sphinxhyphen{}dimensional between 0 (at the bottom) and 1 (far above the bottom).

\item {} 
\sphinxstylestrong{visc\_rem\_max} :: {[}in{]} Maximum allowable visc\_rem.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Spatial index.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} Start of index range.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} End of index range.

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} A logical flag indicating which I values to work on.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/merid_flux_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_flux\_layer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_flux_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_flux\_adjust}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_reconstruction\_x() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{ppm\_reconstruction\_x()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{ppm\_reconstruction\_x}}}{\emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{G}, \emph{LB}, \emph{h\_min}, \emph{monotonic}, \emph{simple\_2nd}, \emph{OBC}}{}
Calculates left/right edge values for PPM reconstruction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}out{]} Left thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}out{]} Right thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Active loop bounds structure.

\item {} 
\sphinxstylestrong{h\_min} :: {[}in{]} The minimum thickness that can be obtained by a concave parabolic fit.

\item {} 
\sphinxstylestrong{monotonic} :: {[}in{]} If true, use the Colella \& Woodward monotonic limiter. Otherwise use a simple positive\sphinxhyphen{}definite limiter.

\item {} 
\sphinxstylestrong{simple\_2nd} :: {[}in{]} If true, use the arithmetic mean thicknesses as the default edge values for a simple 2nd order scheme.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_e}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_w}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_cw84}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_cw84}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_pos}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_reconstruction\_y() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{ppm\_reconstruction\_y()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{ppm\_reconstruction\_y}}}{\emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{G}, \emph{LB}, \emph{h\_min}, \emph{monotonic}, \emph{simple\_2nd}, \emph{OBC}}{}
Calculates left/right edge values for PPM reconstruction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}out{]} Left thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}out{]} Right thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Active loop bounds structure.

\item {} 
\sphinxstylestrong{h\_min} :: {[}in{]} The minimum thickness that can be obtained by a concave parabolic fit.

\item {} 
\sphinxstylestrong{monotonic} :: {[}in{]} If true, use the Colella \& Woodward monotonic limiter. Otherwise use a simple positive\sphinxhyphen{}definite limiter.

\item {} 
\sphinxstylestrong{simple\_2nd} :: {[}in{]} If true, use the arithmetic mean thicknesses as the default edge values for a simple 2nd order scheme.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_cw84}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_cw84}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_pos}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_limit\_pos() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{ppm\_limit\_pos()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_pos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{ppm\_limit\_pos}}}{\emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{h\_min}, \emph{G}, \emph{iis}, \emph{iie}, \emph{jis}, \emph{jie}}{}
This subroutine limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive\sphinxhyphen{}definite. Here this is reinterpreted as giving a constant thickness if the mean thickness is less than h\_min, with a minimum of h\_min otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}inout{]} Left thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}inout{]} Right thickness in the reconstruction {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_min} :: {[}in{]} The minimum thickness that can be obtained by a concave parabolic fit.

\item {} 
\sphinxstylestrong{iis} :: {[}in{]} Start of i index range.

\item {} 
\sphinxstylestrong{iie} :: {[}in{]} End of i index range.

\item {} 
\sphinxstylestrong{jis} :: {[}in{]} Start of j index range.

\item {} 
\sphinxstylestrong{jie} :: {[}in{]} End of j index range.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_limit\_cw84() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{ppm\_limit\_cw84()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_limit_cw84}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{ppm\_limit\_cw84}}}{\emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{G}, \emph{iis}, \emph{iie}, \emph{jis}, \emph{jie}}{}
This subroutine limits the left/right edge values of the PPM reconstruction according to the monotonic prescription of Colella and Woodward, 1984.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_l} :: {[}inout{]} Left thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_r} :: {[}inout{]} Right thickness in the reconstruction, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{iis} :: {[}in{]} Start of i index range.

\item {} 
\sphinxstylestrong{iie} :: {[}in{]} End of i index range.

\item {} 
\sphinxstylestrong{jis} :: {[}in{]} Start of j index range.

\item {} 
\sphinxstylestrong{jie} :: {[}in{]} End of j index range.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ratio\_max() (fortran function in module mom\_continuity\_ppm)@\spxentry{ratio\_max()}\spxextra{fortran function in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ratio_max}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{ratio\_max}}}{\emph{a}, \emph{b}, \emph{maxrat}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the maximum ratio of a/b or maxrat.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a} :: {[}in{]} Numerator

\item {} 
\sphinxstylestrong{b} :: {[}in{]} Denominator

\item {} 
\sphinxstylestrong{maxrat} :: {[}in{]} Maximum value of ratio.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/meridional_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meridional\_mass\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/zonal_mass_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_mass\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{continuity\_ppm\_init() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{continuity\_ppm\_init()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{continuity\_ppm\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initializes {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_cs()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: Module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}} \sphinxcode{\sphinxupquote{id\_clock\_correct}} \sphinxcode{\sphinxupquote{id\_clock\_update}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{continuity\_ppm\_stencil() (fortran function in module mom\_continuity\_ppm)@\spxentry{continuity\_ppm\_stencil()}\spxextra{fortran function in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_stencil}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{continuity\_ppm\_stencil}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
continuity\_PPM\_stencil returns the continuity solver stencil size
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Module’s control structure.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The continuity solver stencil size with the current settings.

\end{description}\end{quote}

\end{fulllineitems}

\index{continuity\_ppm\_end() (fortran subroutine in module mom\_continuity\_ppm)@\spxentry{continuity\_ppm\_end()}\spxextra{fortran subroutine in module mom\_continuity\_ppm}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_continuity\_ppm/}}\sphinxbfcode{\sphinxupquote{continuity\_ppm\_end}}}{\emph{CS}}{}
Destructor for {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{continuity\_ppm\_cs()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Module’s control structure.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_controlled\_forcing module reference}
\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing}}\label{\detokenize{api/generated/modules/mom_controlled_forcing:mom-controlled-forcing-module-reference}}\label{\detokenize{api/generated/modules/mom_controlled_forcing::doc}}\index{mom\_controlled\_forcing (module)@\spxentry{mom\_controlled\_forcing}\spxextra{module}|spxpagem}
Use control\sphinxhyphen{}theory to adjust the surface heat flux and precipitation.

{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:detamom-controlled-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_controlled_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/ctrl_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ctrl\_forcing\_cs}}}}}
&
Control structure for MOM\_controlled\_forcing.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_controlled_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/apply_ctrl_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_ctrl\_forcing()}}}}}
&
This subroutine calls any of the other subroutines in this file that are needed to specify the current surface forcing fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/periodic_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{periodic\_int()}}}}}
&
This function maps rval into an integer in the range from 1 to num\_period.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/periodic_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{periodic\_real()}}}}}
&
This function shifts rval by an integer multiple of num\_period so that 0 \textless{}= val\_out \textless{} num\_period.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/register_ctrl_forcing_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_ctrl\_forcing\_restarts()}}}}}
&
This subroutine is used to allocate and register any fields in this module that should be written to or read from the restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/controlled_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{controlled\_forcing\_init()}}}}}
&
Set up this modules control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/controlled_forcing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{controlled\_forcing\_end()}}}}}
&
Clean up this modules control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_controlled_forcing:detailed-description}}\label{\detokenize{api/generated/modules/mom_controlled_forcing:detamom-controlled-forcing}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{o}{*}
\end{sphinxVerbatim}

By Robert Hallberg, July 2011 *
\begin{itemize}
\item {} 
This program contains the subroutines that use control\sphinxhyphen{}theory * to adjust the surface heat flux and precipitation, based on the * time\sphinxhyphen{}mean or periodically (seasonally) varying anomalies from the * observed state. The techniques behind this are described in * Hallberg and Adcroft (2011, in prep.). *

\item {} 
Macros written all in capital letters are defined in \sphinxcode{\sphinxupquote{MOM\_memory.h}} . *

\item {} 
A small fragment of the grid is shown below: *

\item {} 
j+1 x \textasciicircum{} x \textasciicircum{} x At x: q * j+1 \textgreater{} o \textgreater{} o \textgreater{} At \textasciicircum{}: v, tauy * j x \textasciicircum{} x \textasciicircum{} x At \textgreater{}: u, taux * j \textgreater{} o \textgreater{} o \textgreater{} At o: h, fluxes. * j\sphinxhyphen{}1 x \textasciicircum{} x \textasciicircum{} x * i\sphinxhyphen{}1 i i+1 At x \& \textasciicircum{}: * i i+1 At \textgreater{} \& o: *

\item {} 
The boundaries always run through q grid points (x). *

\end{itemize}

Adjustments are based on the time\sphinxhyphen{}mean or periodically (seasonally) varying anomalies from the observed state.

The techniques behind this are described in Hallberg and Adcroft (2018, in prep.).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_controlled_forcing:type-documentation}}\index{ctrl\_forcing\_cs (fortran type in module mom\_controlled\_forcing)@\spxentry{ctrl\_forcing\_cs}\spxextra{fortran type in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/ctrl_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{ctrl\_forcing\_cs}}}
Control structure for MOM\_controlled\_forcing.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{avg\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{precip\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_cyc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{precip\_cyc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{avg\_sst\_anom}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{avg\_sss\_anom}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{avg\_sss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers for data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temperature and salinity are used as state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_integrated}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use time\sphinxhyphen{}integrated anomalies to control the surface state.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_cycle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of elements in the forcing cycle.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_int\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The rate at which heating anomalies accumulate {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prec\_int\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The rate at which precipitation anomalies accumulate {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_cyc\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The rate at which cyclical heating anomaliess accumulate {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prec\_cyc\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The rate at which cyclical precipitation anomaliess accumulate {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The square of the length scale over which the anomalies are smoothed via a Laplacian filter {[}m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lam\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant of proportionality between SST anomalies and heat fluxes {[}W m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lam\_prec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant of proportionality between SSS anomalies (normalised by mean SSS) and precipitation {[}kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lam\_cyc\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant of proportionality between cyclical SST anomalies and corrective heat fluxes {[}W m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lam\_cyc\_prec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant of proportionality between cyclical SSS anomalies (normalised by mean SSS) and corrective precipitation {[}kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handle.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_controlled_forcing:function-subroutine-documentation}}\index{apply\_ctrl\_forcing() (fortran subroutine in module mom\_controlled\_forcing)@\spxentry{apply\_ctrl\_forcing()}\spxextra{fortran subroutine in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/apply_ctrl_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{apply\_ctrl\_forcing}}}{\emph{SST\_anom}, \emph{SSS\_anom}, \emph{SSS\_mean}, \emph{virt\_heat}, \emph{virt\_precip}, \emph{day\_start}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine calls any of the other subroutines in this file that are needed to specify the current surface forcing fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sst\_anom} :: {[}in{]} The sea surface temperature anomalies {[}degC{]}.

\item {} 
\sphinxstylestrong{sss\_anom} :: {[}in{]} The sea surface salinity anomlies {[}ppt{]}.

\item {} 
\sphinxstylestrong{sss\_mean} :: {[}in{]} The mean sea surface salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{virt\_heat} :: {[}inout{]} Virtual (corrective) heat fluxes that are augmented in this subroutine {[}W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{virt\_precip} :: {[}inout{]} Virtual (corrective) precipitation fluxes that are augmented in this subroutine {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{day\_start} :: {[}in{]} Start time of the fluxes.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Length of time over which these fluxes will be applied {[}s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to ctrl\_forcing\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/periodic_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{periodic\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/periodic_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{periodic\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{periodic\_int() (fortran function in module mom\_controlled\_forcing)@\spxentry{periodic\_int()}\spxextra{fortran function in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/periodic_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{periodic\_int}}}{\emph{rval}, \emph{num\_period}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This function maps rval into an integer in the range from 1 to num\_period.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{rval} :: {[}in{]} Input for mapping.

\item {} 
\sphinxstylestrong{num\_period} :: {[}in{]} Maximum output.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/apply_ctrl_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_ctrl\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{periodic\_real() (fortran function in module mom\_controlled\_forcing)@\spxentry{periodic\_real()}\spxextra{fortran function in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/periodic_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{periodic\_real}}}{\emph{rval}, \emph{num\_period}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function shifts rval by an integer multiple of num\_period so that 0 \textless{}= val\_out \textless{} num\_period.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{rval} :: {[}in{]} Input to be shifted into valid range.

\item {} 
\sphinxstylestrong{num\_period} :: {[}in{]} Maximum valid value.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/apply_ctrl_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_ctrl\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_ctrl\_forcing\_restarts() (fortran subroutine in module mom\_controlled\_forcing)@\spxentry{register\_ctrl\_forcing\_restarts()}\spxextra{fortran subroutine in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/register_ctrl_forcing_restarts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{register\_ctrl\_forcing\_restarts}}}{\emph{G}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}}{}
This subroutine is used to allocate and register any fields in this module that should be written to or read from the restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{controlled\_forcing\_init() (fortran subroutine in module mom\_controlled\_forcing)@\spxentry{controlled\_forcing\_init()}\spxextra{fortran subroutine in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/controlled_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{controlled\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Set up this modules control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{controlled\_forcing\_end() (fortran subroutine in module mom\_controlled\_forcing)@\spxentry{controlled\_forcing\_end()}\spxextra{fortran subroutine in module mom\_controlled\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/controlled_forcing_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_controlled\_forcing/}}\sphinxbfcode{\sphinxupquote{controlled\_forcing\_end}}}{\emph{CS}}{}
Clean up this modules control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to controlled\_forcing\_init, it will be deallocated here.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_coord\_initialization module reference}
\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization}}\label{\detokenize{api/generated/modules/mom_coord_initialization:mom-coord-initialization-module-reference}}\label{\detokenize{api/generated/modules/mom_coord_initialization::doc}}\index{mom\_coord\_initialization (module)@\spxentry{mom\_coord\_initialization}\spxextra{module}|spxpagem}
Initializes fixed aspects of the related to its vertical coordinate.

{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:detamom-coord-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_coord_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord()}}}}}
&
MOM\_initialize\_coord sets up time\sphinxhyphen{}invariant quantities related to MOM6’s vertical coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_gprime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_gprime()}}}}}
&
Sets the layer densities (Rlay) and the interface reduced gravities (g).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_layer_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_layer\_density()}}}}}
&
Sets the layer densities (Rlay) and the interface reduced gravities (g).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_ts\_ref()}}}}}
&
Sets the layer densities (Rlay) and the interface reduced gravities (g) from a profile of g’.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_ts\_profile()}}}}}
&
Sets the layer densities (Rlay) and the interface reduced gravities (g) from a T\sphinxhyphen{}S profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_ts\_range()}}}}}
&
Sets the layer densities (Rlay) and the interface reduced gravities (g) from a linear T\sphinxhyphen{}S profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_file()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_linear()}}}}}
&
Sets the layer densities (Rlay) and the interface reduced gravities (g) according to a linear profile starting at a reference surface layer density and spanning a range of densities to the bottom defined by the parameter RLAY\_RANGE (defaulting to 2.0 if not defined)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_to_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_to\_none()}}}}}
&
Sets Rlay to Rho0 and g\_prime to zero except for the free surface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/write_vertgrid_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_vertgrid\_file()}}}}}
&
Writes out a file containing any available data related to the vertical grid used by the MOM ocean model.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_coord_initialization:detailed-description}}\label{\detokenize{api/generated/modules/mom_coord_initialization:detamom-coord-initialization}}
Initializes fixed aspects of the related to its vertical coordinate.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_coord_initialization:function-subroutine-documentation}}\index{mom\_initialize\_coord() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{mom\_initialize\_coord()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_initialize\_coord}}}{\emph{GV}, \emph{US}, \emph{PF}, \emph{write\_geom}, \emph{output\_dir}, \emph{tv}, \emph{max\_depth}}{}
MOM\_initialize\_coord sets up time\sphinxhyphen{}invariant quantities related to MOM6’s vertical coordinate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}inout{]} Ocean vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{write\_geom} :: {[}in{]} If true, write grid geometry files.

\item {} 
\sphinxstylestrong{output\_dir} :: {[}in{]} The directory into which to write files.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} The thermodynamic variable structure.

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} The ocean’s maximum depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_initialization::bfb\_set\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_gprime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_gprime}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_layer_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_layer\_density}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_ts\_profile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_ts\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_from\_ts\_ref}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_to_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_coord\_to\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/setverticalgridaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::setverticalgridaxes}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_set\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/write_vertgrid_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_vertgrid\_file}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_from\_gprime() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_from\_gprime()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_gprime}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_from\_gprime}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}}{}
Sets the layer densities (Rlay) and the interface reduced gravities (g).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} The layers’ target coordinate values (potential density) {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity across the interfaces {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_from\_layer\_density() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_from\_layer\_density()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_layer_density}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_from\_layer\_density}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}}{}
Sets the layer densities (Rlay) and the interface reduced gravities (g).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} The layers’ target coordinate values (potential density) {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity across the interfaces {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_from\_ts\_ref() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_from\_ts\_ref()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_ref}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_from\_ts\_ref}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_Ref}}{}
Sets the layer densities (Rlay) and the interface reduced gravities (g) from a profile of g’.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} The layers’ target coordinate values (potential density) {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity across the interfaces {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_from\_ts\_profile() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_from\_ts\_profile()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_profile}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_from\_ts\_profile}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_Ref}}{}
Sets the layer densities (Rlay) and the interface reduced gravities (g) from a T\sphinxhyphen{}S profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_from\_ts\_range() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_from\_ts\_range()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_range}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_from\_ts\_range}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_Ref}}{}
Sets the layer densities (Rlay) and the interface reduced gravities (g) from a linear T\sphinxhyphen{}S profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_from\_file() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_from\_file()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_from\_file}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_linear() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_linear()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_linear}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}}{}
Sets the layer densities (Rlay) and the interface reduced gravities (g) according to a linear profile starting at a reference surface layer density and spanning a range of densities to the bottom defined by the parameter RLAY\_RANGE (defaulting to 2.0 if not defined)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_coord\_to\_none() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{set\_coord\_to\_none()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_to_none}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_coord\_to\_none}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}}{}
Sets Rlay to Rho0 and g\_prime to zero except for the free surface. This is for use only in ALE mode where Rlay should not be used and g\_prime(1) alone might be used.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_vertgrid\_file() (fortran subroutine in module mom\_coord\_initialization)@\spxentry{write\_vertgrid\_file()}\spxextra{fortran subroutine in module mom\_coord\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/write_vertgrid_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coord\_initialization/}}\sphinxbfcode{\sphinxupquote{write\_vertgrid\_file}}}{\emph{GV}, \emph{US}, \emph{param\_file}, \emph{directory}}{}
Writes out a file containing any available data related to the vertical grid used by the MOM ocean model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory into which to place the file.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_coriolisadv module reference}
\label{\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv}}\label{\detokenize{api/generated/modules/mom_coriolisadv:mom-coriolisadv-module-reference}}\label{\detokenize{api/generated/modules/mom_coriolisadv::doc}}\index{mom\_coriolisadv (module)@\spxentry{mom\_coriolisadv}\spxextra{module}|spxpagem}
Accelerations due to the Coriolis force and momentum advection.

{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:detamom-coriolisadv}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_coriolisadv:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_cs}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_coriolisadv:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coradcalc()}}}}}
&
Calculates the Coriolis and momentum advection contributions to the acceleration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/gradke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gradke()}}}}}
&
Calculates the acceleration due to the gradient of kinetic energy.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_init()}}}}}
&
Initializes the control structure for {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_cs()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_end()}}}}}
&
Destructor for {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_cs()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_coriolisadv:detailed-description}}\label{\detokenize{api/generated/modules/mom_coriolisadv:detamom-coriolisadv}}
This file contains the subroutine that calculates the time derivatives of the velocities due to Coriolis acceleration and momentum advection. This subroutine uses either a vorticity advection scheme from Arakawa and Hsu, Mon. Wea. Rev. 1990, or Sadourny’s (JAS 1975) energy conserving scheme. Both have been modified to use general orthogonal coordinates as described in Arakawa and Lamb, Mon. Wea. Rev. 1981. Both schemes are second order accurate, and allow for vanishingly small layer thicknesses. The Arakawa and Hsu scheme globally conserves both total energy and potential enstrophy in the limit of nondivergent flow. Sadourny’s energy conserving scheme conserves energy if the flow is nondivergent or centered difference thickness fluxes are used.

A small fragment of the grid is shown below:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}  \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x}   \PYG{n}{At} \PYG{n}{x}\PYG{p}{:}  \PYG{n}{q}\PYG{p}{,} \PYG{n}{CoriolisBu}
\PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}  \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}}   \PYG{n}{At} \PYG{o}{\PYGZca{}}\PYG{p}{:}  \PYG{n}{v}\PYG{p}{,} \PYG{n}{CAv}\PYG{p}{,} \PYG{n}{vh}
\PYG{n}{j}    \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x}   \PYG{n}{At} \PYG{o}{\PYGZgt{}}\PYG{p}{:}  \PYG{n}{u}\PYG{p}{,} \PYG{n}{CAu}\PYG{p}{,} \PYG{n}{uh}\PYG{p}{,} \PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{,} \PYG{n}{c}\PYG{p}{,} \PYG{n}{d}
\PYG{n}{j}    \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}}   \PYG{n}{At} \PYG{n}{o}\PYG{p}{:}  \PYG{n}{h}\PYG{p}{,} \PYG{n}{KE}
\PYG{n}{j}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}  \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x}
    \PYG{n}{i}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}  \PYG{n}{i}  \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}  \PYG{n}{At} \PYG{n}{x} \PYG{o}{\PYGZam{}} \PYG{o}{\PYGZca{}}\PYG{p}{:}
       \PYG{n}{i}  \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}    \PYG{n}{At} \PYG{o}{\PYGZgt{}} \PYG{o}{\PYGZam{}} \PYG{n}{o}\PYG{p}{:}
\end{sphinxVerbatim}

The boundaries always run through q grid points (x).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_coriolisadv:type-documentation}}\index{coriolisadv\_cs (fortran type in module mom\_coriolisadv)@\spxentry{coriolisadv\_cs}\spxextra{fortran type in module mom\_coriolisadv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_coriolisadv/}}\sphinxbfcode{\sphinxupquote{coriolisadv\_cs}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv()}}}}}.
.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gkeu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gkev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rvxu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rvxv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_gkeu\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_gkev\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_rvxu\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_rvxv\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolis\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Selects the discretization for the Coriolis terms. Valid values are:

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: KE\_SCHEME selects the discretization for the kinetic energy. Valid values are: KE\_ARAKAWA, KE\_SIMPLE\_GUDONOV, KE\_GUDONOV.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pv\_adv\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: PV\_ADV\_SCHEME selects the discretization for PV advection Valid values are:

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f\_eff\_max\_blend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The factor by which the maximum effective Coriolis acceleration from any point can be increased when blending different discretizations with the ARAKAWA\_LAMB\_BLEND Coriolis scheme. This must be greater than 2.0, and is 4.0 by default.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wt\_lin\_blend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A weighting value beyond which the blending between Sadourny and Arakawa \& Hsu goes linearly to 0. This must be between 1 and 1e\sphinxhyphen{}15, often 1/8.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{no\_slip}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, no slip boundary conditions are used. Otherwise free slip boundary conditions are assumed. The implementation of the free slip boundary conditions on a C\sphinxhyphen{}grid is much cleaner than the no slip boundary conditions. The use of free slip b.c.s is strongly encouraged. The no slip b.c.s are not implemented with the biharmonic viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bound\_coriolis}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the Coriolis terms at u points are bounded by the four estimates of (f+rv)v from the four neighboring v points, and similarly at v points. This option would have no effect on the SADOURNY75\_ENERGY scheme if it were possible to use centered difference thickness fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolis\_en\_dis}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If CORIOLIS\_EN\_DIS is defined, two estimates of the thickness fluxes are used to estimate the Coriolis term, and the one that dissipates energy relative to the other one is used. This is only available at present if Coriolis scheme is SADOURNY75\_ENERGY.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_coriolisadv:function-subroutine-documentation}}\index{coradcalc() (fortran subroutine in module mom\_coriolisadv)@\spxentry{coradcalc()}\spxextra{fortran subroutine in module mom\_coriolisadv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coriolisadv/}}\sphinxbfcode{\sphinxupquote{coradcalc}}}{\emph{u}, \emph{v}, \emph{h}, \emph{uh}, \emph{vh}, \emph{CAu}, \emph{CAv}, \emph{OBC}, \emph{AD}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calculates the Coriolis and momentum advection contributions to the acceleration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocen grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uh} :: {[}in{]} Zonal transport u*h*dy {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vh} :: {[}in{]} Meridional transport v*h*dx {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{cau} :: {[}out{]} Zonal acceleration due to Coriolis and momentum advection {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cav} :: {[}out{]} Meridional acceleration due to Coriolis and momentum advection {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{ad} :: {[}inout{]} Storage for acceleration diagnostics

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Control structure for MOM\_CoriolisAdv

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{al\_blend}} \sphinxcode{\sphinxupquote{arakawa\_hsu90}} \sphinxcode{\sphinxupquote{arakawa\_lamb81}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/gradke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gradke}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{pv\_adv\_centered}} \sphinxcode{\sphinxupquote{pv\_adv\_upwind1}} \sphinxcode{\sphinxupquote{robust\_enstro}} \sphinxcode{\sphinxupquote{sadourny75\_energy}} \sphinxcode{\sphinxupquote{sadourny75\_enstro}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{gradke() (fortran subroutine in module mom\_coriolisadv)@\spxentry{gradke()}\spxextra{fortran subroutine in module mom\_coriolisadv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/gradke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coriolisadv/}}\sphinxbfcode{\sphinxupquote{gradke}}}{\emph{u}, \emph{v}, \emph{h}, \emph{KE}, \emph{KEx}, \emph{KEy}, \emph{k}, \emph{OBC}, \emph{G}, \emph{US}, \emph{CS}}{}
Calculates the acceleration due to the gradient of kinetic energy.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocen grid structure

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ke} :: {[}out{]} Kinetic energy per unit mass {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{kex} :: {[}out{]} Zonal acceleration due to kinetic energy gradient {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{key} :: {[}out{]} Meridional acceleration due to kinetic energy gradient {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{k} :: {[}in{]} Layer number to calculate for

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Control structure for MOM\_CoriolisAdv

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ke\_arakawa}} \sphinxcode{\sphinxupquote{ke\_gudonov}} \sphinxcode{\sphinxupquote{ke\_simple\_gudonov}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coradcalc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{coriolisadv\_init() (fortran subroutine in module mom\_coriolisadv)@\spxentry{coriolisadv\_init()}\spxextra{fortran subroutine in module mom\_coriolisadv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coriolisadv/}}\sphinxbfcode{\sphinxupquote{coriolisadv\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{AD}, \emph{CS}}{}
Initializes the control structure for {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_cs()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Runtime parameter handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{ad} :: {[}inout{]} Strorage for acceleration diagnostics

\item {} 
\sphinxstylestrong{cs} :: Control structure fro MOM\_CoriolisAdv

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{al\_blend}} \sphinxcode{\sphinxupquote{al\_blend\_string}} \sphinxcode{\sphinxupquote{arakawa\_hsu90}} \sphinxcode{\sphinxupquote{arakawa\_hsu\_string}} \sphinxcode{\sphinxupquote{arakawa\_lamb81}} \sphinxcode{\sphinxupquote{arakawa\_lamb\_string}} \sphinxcode{\sphinxupquote{ke\_arakawa}} \sphinxcode{\sphinxupquote{ke\_arakawa\_string}} \sphinxcode{\sphinxupquote{ke\_gudonov}} \sphinxcode{\sphinxupquote{ke\_gudonov\_string}} \sphinxcode{\sphinxupquote{ke\_simple\_gudonov}} \sphinxcode{\sphinxupquote{ke\_simple\_gudonov\_string}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{pv\_adv\_centered}} \sphinxcode{\sphinxupquote{pv\_adv\_centered\_string}} \sphinxcode{\sphinxupquote{pv\_adv\_upwind1}} \sphinxcode{\sphinxupquote{pv\_adv\_upwind1\_string}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}} \sphinxcode{\sphinxupquote{robust\_enstro}} \sphinxcode{\sphinxupquote{robust\_enstro\_string}} \sphinxcode{\sphinxupquote{sadourny75\_energy}} \sphinxcode{\sphinxupquote{sadourny75\_energy\_string}} \sphinxcode{\sphinxupquote{sadourny75\_enstro}} \sphinxcode{\sphinxupquote{sadourny75\_enstro\_string}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{coriolisadv\_end() (fortran subroutine in module mom\_coriolisadv)@\spxentry{coriolisadv\_end()}\spxextra{fortran subroutine in module mom\_coriolisadv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_coriolisadv/}}\sphinxbfcode{\sphinxupquote{coriolisadv\_end}}}{\emph{CS}}{}
Destructor for {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisadv\_cs()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure fro MOM\_CoriolisAdv

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_cpu\_clock module reference}
\label{\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock}}\label{\detokenize{api/generated/modules/mom_cpu_clock:mom-cpu-clock-module-reference}}\label{\detokenize{api/generated/modules/mom_cpu_clock::doc}}\index{mom\_cpu\_clock (module)@\spxentry{mom\_cpu\_clock}\spxextra{module}|spxpagem}
Wraps the MPP cpu clock functions.

{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:detamom-cpu-clock}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_cpu_clock:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cpu\_clock\_id()}}}}}
&
cpu\_clock\_id returns the integer handle for a named CPU clock.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_cpu_clock:detailed-description}}\label{\detokenize{api/generated/modules/mom_cpu_clock:detamom-cpu-clock}}
Wraps the MPP cpu clock functions.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_cpu_clock:function-subroutine-documentation}}\index{cpu\_clock\_id() (fortran function in module mom\_cpu\_clock)@\spxentry{cpu\_clock\_id()}\spxextra{fortran function in module mom\_cpu\_clock}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cpu\_clock/}}\sphinxbfcode{\sphinxupquote{cpu\_clock\_id}}}{\emph{name}, \emph{synchro\_flag}, \emph{grain}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
cpu\_clock\_id returns the integer handle for a named CPU clock.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} The unique name of the CPU clock

\item {} 
\sphinxstylestrong{synchro\_flag} :: {[}in{]} An integer flag that controls whether the PEs are synchronized before the cpu clocks start counting. Synchronization occurs before the start of a clock if this is odd, while additional (expensive) statistics can set for other values. If absent, the default is taken from the settings for FMS.

\item {} 
\sphinxstylestrong{grain} :: {[}in{]} The timing granularity for this clock, usually set to the values of CLOCK\_COMPONENT, CLOCK\_ROUTINE, CLOCK\_LOOP, etc.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The integer CPU clock handle.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::barotropic\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm::continuity\_ppm\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_init}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/register_forcing_type_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::register\_forcing\_type\_diags}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_layers\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_cvmix\_conv module reference}
\label{\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv}}\label{\detokenize{api/generated/modules/mom_cvmix_conv:mom-cvmix-conv-module-reference}}\label{\detokenize{api/generated/modules/mom_cvmix_conv::doc}}\index{mom\_cvmix\_conv (module)@\spxentry{mom\_cvmix\_conv}\spxextra{module}|spxpagem}
Interface to CVMix convection scheme.

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:detamom-cvmix-conv}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_cvmix_conv:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_conv\_cs}}}}}
&
Control structure including parameters for CVMix convection.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_cvmix_conv:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_conv\_init()}}}}}
&
Initialized the CVMix convection mixing routine.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/calculate_cvmix_conv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_cvmix\_conv()}}}}}
&
Subroutine for calculating enhanced diffusivity/viscosity due to convection via CVMix.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_conv\_is\_used()}}}}}
&
Reads the parameter “USE\_CVMix\_CONVECTION” and returns state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_conv\_end()}}}}}
&
Clear pointers and dealocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_cvmix_conv:detailed-description}}\label{\detokenize{api/generated/modules/mom_cvmix_conv:detamom-cvmix-conv}}
Interface to CVMix convection scheme.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_conv:type-documentation}}\index{cvmix\_conv\_cs (fortran type in module mom\_cvmix\_conv)@\spxentry{cvmix\_conv\_cs}\spxextra{fortran type in module mom\_cvmix\_conv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_cvmix\_conv/}}\sphinxbfcode{\sphinxupquote{cvmix\_conv\_cs}}}
Control structure including parameters for CVMix convection.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_conv\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: diffusivity constant used in convective regime {[}m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_conv\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: viscosity constant used in convective regime {[}m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bv\_sqr\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Threshold for squared buoyancy frequency needed to trigger Brunt\sphinxhyphen{}Vaisala parameterization {[}s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, turn on debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to diagnostics control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Squared Brunt\sphinxhyphen{}Vaisala frequency {[}s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diffusivity added by convection {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Viscosity added by convection {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_conv:function-subroutine-documentation}}\index{cvmix\_conv\_init() (fortran function in module mom\_cvmix\_conv)@\spxentry{cvmix\_conv\_init()}\spxextra{fortran function in module mom\_cvmix\_conv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_conv/}}\sphinxbfcode{\sphinxupquote{cvmix\_conv\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initialized the CVMix convection mixing routine.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Run\sphinxhyphen{}time parameter file handle

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_cvmix\_conv() (fortran subroutine in module mom\_cvmix\_conv)@\spxentry{calculate\_cvmix\_conv()}\spxextra{fortran subroutine in module mom\_cvmix\_conv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/calculate_cvmix_conv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_conv/}}\sphinxbfcode{\sphinxupquote{calculate\_cvmix\_conv}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{hbl}}{}
Subroutine for calculating enhanced diffusivity/viscosity due to convection via CVMix.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to CVMix\_conv\_init.

\item {} 
\sphinxstylestrong{hbl} :: {[}in{]} Depth of ocean boundary layer {[}Z \textasciitilde{}\textgreater{} m{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_conv\_is\_used() (fortran function in module mom\_cvmix\_conv)@\spxentry{cvmix\_conv\_is\_used()}\spxextra{fortran function in module mom\_cvmix\_conv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_is_used}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_conv/}}\sphinxbfcode{\sphinxupquote{cvmix\_conv\_is\_used}}}{\emph{param\_file}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Reads the parameter “USE\_CVMix\_CONVECTION” and returns state. This function allows other modules to know whether this parameterization will be used without needing to duplicate the log entry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_register\_restarts}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_conv\_end() (fortran subroutine in module mom\_cvmix\_conv)@\spxentry{cvmix\_conv\_end()}\spxextra{fortran subroutine in module mom\_cvmix\_conv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_conv/}}\sphinxbfcode{\sphinxupquote{cvmix\_conv\_end}}}{\emph{CS}}{}
Clear pointers and dealocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for this module that will be deallocated in this subroutine

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_cvmix\_ddiff module reference}
\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff}}\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:mom-cvmix-ddiff-module-reference}}\label{\detokenize{api/generated/modules/mom_cvmix_ddiff::doc}}\index{mom\_cvmix\_ddiff (module)@\spxentry{mom\_cvmix\_ddiff}\spxextra{module}|spxpagem}
Interface to CVMix double diffusion scheme.

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:detamom-cvmix-ddiff}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_ddiff\_cs}}}}}
&
Control structure including parameters for CVMix double diffusion.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_ddiff\_init()}}}}}
&
Initialized the CVMix double diffusion module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/compute_ddiff_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{compute\_ddiff\_coeffs()}}}}}
&
Subroutine for computing vertical diffusion coefficients for the double diffusion mixing parameterization.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_ddiff\_is\_used()}}}}}
&
Reads the parameter “USE\_CVMIX\_DDIFF” and returns state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_ddiff\_end()}}}}}
&
Clear pointers and dealocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:detailed-description}}\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:detamom-cvmix-ddiff}}
Interface to CVMix double diffusion scheme.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:type-documentation}}\index{cvmix\_ddiff\_cs (fortran type in module mom\_cvmix\_ddiff)@\spxentry{cvmix\_ddiff\_cs}\spxextra{fortran type in module mom\_cvmix\_ddiff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff/}}\sphinxbfcode{\sphinxupquote{cvmix\_ddiff\_cs}}}
Control structure including parameters for CVMix double diffusion.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{strat\_param\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: maximum value for the stratification parameter {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_ddiff\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: leading coefficient in formula for salt\sphinxhyphen{}fingering regime for salinity diffusion {[}m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ddiff\_exp1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: interior exponent in salt\sphinxhyphen{}fingering regime formula {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ddiff\_exp2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: exterior exponent in salt\sphinxhyphen{}fingering regime formula {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mol\_diff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: molecular diffusivity {[}m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_ddiff\_param1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: exterior coefficient in diffusive convection regime {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_ddiff\_param2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: middle coefficient in diffusive convection regime {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_ddiff\_param3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: interior coefficient in diffusive convection regime {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diff\_conv\_type}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=4)}\sphinxstyleemphasis{{]}} :: type of diffusive convection to use. Options are Marmorino \& Caldwell 1976 (“MC76”; default) and Kelley 1988, 1990 (“K90”)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, turn on debugging.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:function-subroutine-documentation}}\index{cvmix\_ddiff\_init() (fortran function in module mom\_cvmix\_ddiff)@\spxentry{cvmix\_ddiff\_init()}\spxextra{fortran function in module mom\_cvmix\_ddiff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff/}}\sphinxbfcode{\sphinxupquote{cvmix\_ddiff\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initialized the CVMix double diffusion module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Run\sphinxhyphen{}time parameter file handle

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{compute\_ddiff\_coeffs() (fortran subroutine in module mom\_cvmix\_ddiff)@\spxentry{compute\_ddiff\_coeffs()}\spxextra{fortran subroutine in module mom\_cvmix\_ddiff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/compute_ddiff_coeffs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff/}}\sphinxbfcode{\sphinxupquote{compute\_ddiff\_coeffs}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{j}, \emph{Kd\_T}, \emph{Kd\_S}, \emph{CS}, \emph{R\_rho}}{}
Subroutine for computing vertical diffusion coefficients for the double diffusion mixing parameterization.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Meridional grid index to work on.

\item {} 
\sphinxstylestrong{kd\_t} :: {[}inout{]} Interface double diffusion diapycnal diffusivity for temp {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_s} :: {[}inout{]} Interface double diffusion diapycnal diffusivity for salt {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to CVMix\_ddiff\_init.

\item {} 
\sphinxstylestrong{r\_rho} :: {[}inout{]} The density ratios at interfaces {[}nondim{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_ddiff\_is\_used() (fortran function in module mom\_cvmix\_ddiff)@\spxentry{cvmix\_ddiff\_is\_used()}\spxextra{fortran function in module mom\_cvmix\_ddiff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_is_used}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff/}}\sphinxbfcode{\sphinxupquote{cvmix\_ddiff\_is\_used}}}{\emph{param\_file}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Reads the parameter “USE\_CVMIX\_DDIFF” and returns state. This function allows other modules to know whether this parameterization will be used without needing to duplicate the log entry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_ddiff\_end() (fortran subroutine in module mom\_cvmix\_ddiff)@\spxentry{cvmix\_ddiff\_end()}\spxextra{fortran subroutine in module mom\_cvmix\_ddiff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff/}}\sphinxbfcode{\sphinxupquote{cvmix\_ddiff\_end}}}{\emph{CS}}{}
Clear pointers and dealocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for this module that will be deallocated in this subroutine

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_cvmix\_kpp module reference}
\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp}}\label{\detokenize{api/generated/modules/mom_cvmix_kpp:mom-cvmix-kpp-module-reference}}\label{\detokenize{api/generated/modules/mom_cvmix_kpp::doc}}\index{mom\_cvmix\_kpp (module)@\spxentry{mom\_cvmix\_kpp}\spxextra{module}|spxpagem}
Provides the K\sphinxhyphen{}Profile Parameterization (KPP) of Large et al., 1994, via CVMix.

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:detamom-cvmix-kpp}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_cvmix_kpp:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_cs}}}}}
&
Control structure for containing KPP parameters/data.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_cvmix_kpp:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_init()}}}}}
&
Initialize the CVMix KPP module and set up diagnostics Returns True if KPP is to be used, False otherwise.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_calculate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_calculate()}}}}}
&
KPP vertical diffusivity/viscosity and non\sphinxhyphen{}local tracer transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_compute_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_compute\_bld()}}}}}
&
Compute OBL depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_smooth_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_smooth\_bld()}}}}}
&
Apply a 1\sphinxhyphen{}1\sphinxhyphen{}4\sphinxhyphen{}1\sphinxhyphen{}1 Laplacian filter one time on BLD to reduce any horizontal two\sphinxhyphen{}grid\sphinxhyphen{}point noise.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_get_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_get\_bld()}}}}}
&
Copies KPP surface boundary layer depth into BLD, in units of {[}Z \textasciitilde{}\textgreater{} m{]} unless other units are specified.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_nonlocaltransport\_temp()}}}}}
&
Apply KPP non\sphinxhyphen{}local transport of surface fluxes for temperature.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_saln}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_nonlocaltransport\_saln()}}}}}
&
Apply KPP non\sphinxhyphen{}local transport of surface fluxes for salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_end()}}}}}
&
Clear pointers, deallocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_cvmix_kpp:detailed-description}}\label{\detokenize{api/generated/modules/mom_cvmix_kpp:detamom-cvmix-kpp}}
Provides the K\sphinxhyphen{}Profile Parameterization (KPP) of Large et al., 1994, via CVMix.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_kpp:type-documentation}}\index{kpp\_cs (fortran type in module mom\_cvmix\_kpp)@\spxentry{kpp\_cs}\spxextra{fortran type in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_cs}}}
Control structure for containing KPP parameters/data.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_obldepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bulkri}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ws}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vt2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bulkuz2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bulkdrho}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ustar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_buoyflux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_qminussw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nets}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sigma}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kt\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ks\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tsurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ssurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_usurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vsurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nltt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nlts}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nlt\_dsdt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nlt\_dtdt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nlt\_temp\_budget}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nlt\_saln\_budget}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_enhk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_enhvt2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_enhw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_la\_sl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_obldepth\_original}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ri\_crit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Critical bulk Richardson number (defines OBL depth)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vonkarman}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: von Karman constant (dimensionless)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameter for computing velocity scale function (dimensionless)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cs2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameter for multiplying by non\sphinxhyphen{}local term.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{enhance\_diffusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, add enhanced diffusivity at base of boundary layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interptype}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=10)}\sphinxstyleemphasis{{]}} :: Type of interpolation to compute bulk Richardson number.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interptype2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=10)}\sphinxstyleemphasis{{]}} :: Type of interpolation to compute diff and visc at OBL\_depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{computeekman}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, compute Ekman depth limit for OBLdepth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{computemoninobukhov}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, compute Monin\sphinxhyphen{}Obukhov limit for OBLdepth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{passivemode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, makes KPP passive meaning it does NOT alter the diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{deepobloffset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If non\sphinxhyphen{}zero, is a distance from the bottom that the OBL can not penetrate through {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minobldepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If non\sphinxhyphen{}zero, is a minimum depth for the OBL {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{surf\_layer\_ext}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fraction of OBL depth considered in the surface layer {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minvtsqr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Min for the squared unresolved velocity used in Rib CVMix calculation {[}m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fixedobldepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, will fix the OBL depth at fixedOBLdepth\_value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fixedobldepth\_value}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: value for the fixed OBL depth when fixedOBLdepth==True.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, calculate checksums and write debugging information.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{matchtechnique}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=30)}\sphinxstyleemphasis{{]}} :: Method used in CVMix for setting diffusivity and NLT profile functions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nlt\_shape}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: MOM6 over\sphinxhyphen{}ride of CVMix NLT shape function.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{applynonlocaltrans}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, apply non\sphinxhyphen{}local transport to heat and scalars.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n\_smooth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of times smoothing operator is applied on OBLdepth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{deepen\_only}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply OBLdepth smoothing at a cell only if the OBLdepth gets deeper.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kppzerodiffusivity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, will set diffusivity and viscosity from KPP to zero for testing purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kppisadditive}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, will add KPP diffusivity to initial diffusivity. If False, will replace initial diffusivity wherever KPP diffusivity is non\sphinxhyphen{}zero.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum thickness used to avoid division by small numbers in the vicinity of vanished layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{correctsurflayeravg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, applies a correction to the averaging of surface layer properties.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{surflayerdepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A guess at the depth of the surface layer (which should 0.1 of OBLdepth) {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Sets method for using shortwave radiation in surface buoyancy flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_k\_enhancement}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Flags if enhancing mixing coefficients due to LT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_k\_shape}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Integer for constant or shape function enhancement.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_k\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Integer for mixing coefficients LT method.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_k\_enh\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Factor to multiply by K if Method is CONSTANT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_vt2\_enhancement}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Flags if enhancing Vt2 due to LT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_vt2\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Integer for Vt2 LT method.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_vt2\_enh\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Factor to multiply by VT2 if Method is CONSTANT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stokes\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Flag if model is mixing down Stokes gradient This is relavent for which current to use in RiB.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_params}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cvmix\_kpp\_params\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: CVMix parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to diagnostics control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obldepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Depth (positive) of OBL {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obldepth\_original}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Depth (positive) of OBL {[}m{]} without smoothing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kobl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Level (+fraction) of OBL extent.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obldepthprev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: previous Depth (positive) of OBL {[}m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la\_sl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Langmuir number used in KPP.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drho}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Bulk difference in density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uz2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Square of bulk difference in resolved velocity {[}m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkri}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Bulk Richardson number for each layer (dimensionless)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sigma}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Sigma coordinate (dimensionless)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ws}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Turbulent velocity scale for scalars {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Brunt\sphinxhyphen{}Vaisala frequency {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Squared Brunt\sphinxhyphen{}Vaisala frequency {[}s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vt2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Unresolved squared turbulence velocity for bulk Ri {[}m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kt\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Temp diffusivity from KPP {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ks\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Scalar diffusivity from KPP {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Viscosity due to KPP {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tsurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Temperature of surface layer {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ssurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Salinity of surface layer {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}velocity of surface layer {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vsurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}velocity of surface layer {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{enhk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Enhancement for mixing coefficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{enhvt2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Enhancement for Vt2.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_kpp:function-subroutine-documentation}}\index{kpp\_init() (fortran function in module mom\_cvmix\_kpp)@\spxentry{kpp\_init()}\spxextra{fortran function in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_init}}}{\emph{paramFile}, \emph{G}, \emph{GV}, \emph{US}, \emph{diag}, \emph{Time}, \emph{CS}, \emph{passive}, \emph{Waves}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initialize the CVMix KPP module and set up diagnostics Returns True if KPP is to be used, False otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{paramfile} :: {[}in{]} File parser

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Diagnostics

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\item {} 
\sphinxstylestrong{cs} :: Control structure

\item {} 
\sphinxstylestrong{passive} :: {[}out{]} Copy of passiveMode

\item {} 
\sphinxstylestrong{waves} :: Wave CS

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::closeparameterblock}}}}} \sphinxcode{\sphinxupquote{id\_clock\_kpp\_calc}} \sphinxcode{\sphinxupquote{id\_clock\_kpp\_compute\_bld}} \sphinxcode{\sphinxupquote{id\_clock\_kpp\_smoothing}} \sphinxcode{\sphinxupquote{lt\_k\_constant}} \sphinxcode{\sphinxupquote{lt\_k\_mode\_constant}} \sphinxcode{\sphinxupquote{lt\_k\_mode\_rw16}} \sphinxcode{\sphinxupquote{lt\_k\_mode\_vr12}} \sphinxcode{\sphinxupquote{lt\_k\_scaled}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_constant}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_lf17}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_rw16}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_vr12}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{nlt\_shape\_cubic}} \sphinxcode{\sphinxupquote{nlt\_shape\_cubic\_lmd}} \sphinxcode{\sphinxupquote{nlt\_shape\_cvmix}} \sphinxcode{\sphinxupquote{nlt\_shape\_linear}} \sphinxcode{\sphinxupquote{nlt\_shape\_parabolic}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::openparameterblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}} \sphinxcode{\sphinxupquote{sw\_method\_all\_sw}} \sphinxcode{\sphinxupquote{sw\_method\_lv1\_sw}} \sphinxcode{\sphinxupquote{sw\_method\_mxl\_sw}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_calculate() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_calculate()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_calculate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_calculate}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{uStar}, \emph{buoyFlux}, \emph{Kt}, \emph{Ks}, \emph{Kv}, \emph{nonLocalTransHeat}, \emph{nonLocalTransScalar}, \emph{waves}}{}
KPP vertical diffusivity/viscosity and non\sphinxhyphen{}local tracer transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{waves} :: Wave CS

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer/level thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} Surface friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{buoyflux} :: {[}in{]} Surface buoyancy flux {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{kt} :: {[}inout{]} (in) Vertical diffusivity of heat w/o KPP (out) Vertical diffusivity including KPP {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ks} :: {[}inout{]} (in) Vertical diffusivity of salt w/o KPP (out) Vertical diffusivity including KPP {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kv} :: {[}inout{]} (in) Vertical viscosity w/o KPP (out) Vertical viscosity including KPP {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{nonlocaltransheat} :: {[}inout{]} Temp non\sphinxhyphen{}local transport {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{nonlocaltransscalar} :: {[}inout{]} scalar non\sphinxhyphen{}local transport {[}m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_kpp\_calc}} \sphinxcode{\sphinxupquote{lt\_k\_constant}} \sphinxcode{\sphinxupquote{lt\_k\_mode\_constant}} \sphinxcode{\sphinxupquote{lt\_k\_mode\_rw16}} \sphinxcode{\sphinxupquote{lt\_k\_mode\_vr12}} \sphinxcode{\sphinxupquote{lt\_k\_scaled}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{nlt\_shape\_cubic}} \sphinxcode{\sphinxupquote{nlt\_shape\_cubic\_lmd}} \sphinxcode{\sphinxupquote{nlt\_shape\_linear}} \sphinxcode{\sphinxupquote{nlt\_shape\_parabolic}} \sphinxcode{\sphinxupquote{sw\_method\_all\_sw}} \sphinxcode{\sphinxupquote{sw\_method\_lv1\_sw}} \sphinxcode{\sphinxupquote{sw\_method\_mxl\_sw}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_compute\_bld() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_compute\_bld()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_compute_bld}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_compute\_bld}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{Temp}, \emph{Salt}, \emph{u}, \emph{v}, \emph{tv}, \emph{uStar}, \emph{buoyFlux}, \emph{Waves}}{}
Compute OBL depth.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer/level thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp} :: {[}in{]} potential/cons temp {[}degC{]}

\item {} 
\sphinxstylestrong{salt} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Velocity i\sphinxhyphen{}component {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Velocity j\sphinxhyphen{}component {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure.

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} Surface friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{buoyflux} :: {[}in{]} Surface buoyancy flux {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{waves} :: Wave CS

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::get\_langmuir\_number}}}}} \sphinxcode{\sphinxupquote{id\_clock\_kpp\_compute\_bld}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_smooth_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_smooth\_bld}}}}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_constant}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_lf17}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_rw16}} \sphinxcode{\sphinxupquote{lt\_vt2\_mode\_vr12}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_smooth\_bld() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_smooth\_bld()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_smooth_bld}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_smooth\_bld}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}}{}
Apply a 1\sphinxhyphen{}1\sphinxhyphen{}4\sphinxhyphen{}1\sphinxhyphen{}1 Laplacian filter one time on BLD to reduce any horizontal two\sphinxhyphen{}grid\sphinxhyphen{}point noise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer/level thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_kpp\_smoothing}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_compute_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kpp\_compute\_bld}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_get\_bld() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_get\_bld()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_get_bld}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_get\_bld}}}{\emph{CS}, \emph{BLD}, \emph{G}, \emph{US}, \emph{m\_to\_BLD\_units}}{}
Copies KPP surface boundary layer depth into BLD, in units of {[}Z \textasciitilde{}\textgreater{} m{]} unless other units are specified.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for this module

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{bld} :: {[}inout{]} Boundary layer depth {[}Z \textasciitilde{}\textgreater{} m{]} or other units

\item {} 
\sphinxstylestrong{m\_to\_bld\_units} :: {[}in{]} A conversion factor from meters to the desired units for BLD

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::lateral\_boundary\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_nonlocaltransport\_temp() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_nonlocaltransport\_temp()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_temp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_nonlocaltransport\_temp}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{nonLocalTrans}, \emph{surfFlux}, \emph{dt}, \emph{scalar}, \emph{C\_p}}{}
Apply KPP non\sphinxhyphen{}local transport of surface fluxes for temperature.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer/level thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nonlocaltrans} :: {[}in{]} Non\sphinxhyphen{}local transport {[}nondim{]}

\item {} 
\sphinxstylestrong{surfflux} :: {[}in{]} Surface flux of scalar {[}conc H s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m s\sphinxhyphen{}1 or conc kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time\sphinxhyphen{}step {[}s{]}

\item {} 
\sphinxstylestrong{scalar} :: {[}inout{]} temperature

\item {} 
\sphinxstylestrong{c\_p} :: {[}in{]} Seawater specific heat capacity {[}J kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_nonlocaltransport\_saln() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_nonlocaltransport\_saln()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_saln}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_nonlocaltransport\_saln}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{nonLocalTrans}, \emph{surfFlux}, \emph{dt}, \emph{scalar}}{}
Apply KPP non\sphinxhyphen{}local transport of surface fluxes for salinity. This routine is a useful prototype for other material tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer/level thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nonlocaltrans} :: {[}in{]} Non\sphinxhyphen{}local transport {[}nondim{]}

\item {} 
\sphinxstylestrong{surfflux} :: {[}in{]} Surface flux of scalar {[}conc H s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m s\sphinxhyphen{}1 or conc kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time\sphinxhyphen{}step {[}s{]}

\item {} 
\sphinxstylestrong{scalar} :: {[}inout{]} Scalar (scalar units {[}conc{]})

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kpp\_end() (fortran subroutine in module mom\_cvmix\_kpp)@\spxentry{kpp\_end()}\spxextra{fortran subroutine in module mom\_cvmix\_kpp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp/}}\sphinxbfcode{\sphinxupquote{kpp\_end}}}{\emph{CS}}{}
Clear pointers, deallocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_cvmix\_shear module reference}
\label{\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear}}\label{\detokenize{api/generated/modules/mom_cvmix_shear:mom-cvmix-shear-module-reference}}\label{\detokenize{api/generated/modules/mom_cvmix_shear::doc}}\index{mom\_cvmix\_shear (module)@\spxentry{mom\_cvmix\_shear}\spxextra{module}|spxpagem}
Interface to CVMix interior shear schemes.

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:detamom-cvmix-shear}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_cvmix_shear:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_shear\_cs}}}}}
&
Control structure including parameters for CVMix interior shear schemes.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_cvmix_shear:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/calculate_cvmix_shear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_cvmix\_shear()}}}}}
&
Subroutine for calculating (internal) vertical diffusivities/viscosities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_shear\_init()}}}}}
&
Initialized the CVMix internal shear mixing routine.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_shear\_is\_used()}}}}}
&
Reads the parameters “LMD94” and “PP81” and returns state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cvmix\_shear\_end()}}}}}
&
Clear pointers and dealocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_cvmix_shear:detailed-description}}\label{\detokenize{api/generated/modules/mom_cvmix_shear:detamom-cvmix-shear}}
Interface to CVMix interior shear schemes.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_shear:type-documentation}}\index{cvmix\_shear\_cs (fortran type in module mom\_cvmix\_shear)@\spxentry{cvmix\_shear\_cs}\spxextra{fortran type in module mom\_cvmix\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_cvmix\_shear/}}\sphinxbfcode{\sphinxupquote{cvmix\_shear\_cs}}}
Control structure including parameters for CVMix interior shear schemes.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_s2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ri\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ri\_grad\_smooth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_lmd94}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Flags to use the LMD94 scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_pp81}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Flags to use Pacanowski and Philander (JPO 1981)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{smooth\_ri}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, smooth Ri using a 1\sphinxhyphen{}2\sphinxhyphen{}1 filter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ri\_zero}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: LMD94 critical Richardson number.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nu\_zero}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: LMD94 maximum interior diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_exp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Exponent of unitless factor of diff. for KPP internal shear mixing scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Squared Brunt\sphinxhyphen{}Vaisala frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Squared shear frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ri\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Gradient Richardson number.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ri\_grad\_smooth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Gradient Richardson number after smoothing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mix\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (10)}\sphinxstyleemphasis{{]}} :: Mixing scheme name (string)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the diagnostics control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_cvmix_shear:function-subroutine-documentation}}\index{calculate\_cvmix\_shear() (fortran subroutine in module mom\_cvmix\_shear)@\spxentry{calculate\_cvmix\_shear()}\spxextra{fortran subroutine in module mom\_cvmix\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/calculate_cvmix_shear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_shear/}}\sphinxbfcode{\sphinxupquote{calculate\_cvmix\_shear}}}{\emph{u\_H}, \emph{v\_H}, \emph{h}, \emph{tv}, \emph{kd}, \emph{kv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Subroutine for calculating (internal) vertical diffusivities/viscosities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u\_h} :: {[}in{]} Initial zonal velocity on T points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v\_h} :: {[}in{]} Initial meridional velocity on T points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure.

\item {} 
\sphinxstylestrong{kd} :: {[}out{]} The vertical diffusivity at each interface (not layer!) {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kv} :: {[}out{]} The vertical viscosity at each interface (not layer!) {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to CVMix\_shear\_init.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_shear\_init() (fortran function in module mom\_cvmix\_shear)@\spxentry{cvmix\_shear\_init()}\spxextra{fortran function in module mom\_cvmix\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_shear/}}\sphinxbfcode{\sphinxupquote{cvmix\_shear\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initialized the CVMix internal shear mixing routine.

\begin{sphinxadmonition}{note}{Todo}

Does this note require emphasis?
\end{sphinxadmonition}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Run\sphinxhyphen{}time parameter file handle

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_is\_used}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_shear\_is\_used() (fortran function in module mom\_cvmix\_shear)@\spxentry{cvmix\_shear\_is\_used()}\spxextra{fortran function in module mom\_cvmix\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_is_used}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_cvmix\_shear/}}\sphinxbfcode{\sphinxupquote{cvmix\_shear\_is\_used}}}{\emph{param\_file}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Reads the parameters “LMD94” and “PP81” and returns state. This function allows other modules to know whether this parameterization will be used without needing to duplicate the log entry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} Run\sphinxhyphen{}time parameter files handle.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_register\_restarts}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cvmix\_shear\_end() (fortran subroutine in module mom\_cvmix\_shear)@\spxentry{cvmix\_shear\_end()}\spxextra{fortran subroutine in module mom\_cvmix\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_cvmix\_shear/}}\sphinxbfcode{\sphinxupquote{cvmix\_shear\_end}}}{\emph{CS}}{}
Clear pointers and dealocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for this module that will be deallocated in this subroutine

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_debugging module reference}
\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging}}\label{\detokenize{api/generated/modules/mom_debugging:mom-debugging-module-reference}}\label{\detokenize{api/generated/modules/mom_debugging::doc}}\index{mom\_debugging (module)@\spxentry{mom\_debugging}\spxextra{module}|spxpagem}
Provides checksumming functions for debugging.

{\hyperref[\detokenize{api/generated/modules/mom_debugging:detamom-debugging}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_debugging:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/mom_debugging_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging\_init()}}}}}
&
MOM\_debugging\_init initializes the MOM\_debugging module, and sets the parameterts that control which checks are active for MOM6.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vc3d()}}}}}
&
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D C\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vc2d()}}}}}
&
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D C\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_sb3d()}}}}}
&
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D scalar at corner points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_sb2d()}}}}}
&
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D scalar at corner points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vb3d()}}}}}
&
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D B\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vb2d()}}}}}
&
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D B\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_st3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_st3d()}}}}}
&
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D scalar at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_st2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_st2d()}}}}}
&
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D scalar at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vt3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vt3d()}}}}}
&
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D A\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vt2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vt2d()}}}}}
&
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D A\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_c3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_vec\_c3d()}}}}}
&
Do a checksum and redundant point check on a 3d C\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_c2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_vec\_c2d()}}}}}
&
Do a checksum and redundant point check on a 2d C\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_b3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_vec\_b3d()}}}}}
&
Do a checksum and redundant point check on a 3d B\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_b2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_vec\_b2d()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_a3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_vec\_a3d()}}}}}
&
Do a checksum and redundant point check on a 3d C\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_a2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{chksum\_vec\_a2d()}}}}}
&
Do a checksum and redundant point check on a 2d C\sphinxhyphen{}grid vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totalstuff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{totalstuff()}}}}}
&
This function returns the sum over computational domain of all processors of hThick*stuff, where stuff is a 3\sphinxhyphen{}d array at tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totaltands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{totaltands()}}}}}
&
This subroutine display the total thickness, temperature and salinity as well as the change since the last call.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_column_integral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_column\_integral()}}}}}
&
Returns false if the column integral of a given quantity is within roundoff.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_column_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_column\_integrals()}}}}}
&
Returns false if the column integrals of two given quantities are within roundoff of each other.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_debugging:detailed-description}}\label{\detokenize{api/generated/modules/mom_debugging:detamom-debugging}}
This module contains subroutines that perform various error checking and debugging functions for MOM6. This routine is similar to it counterpart in the SIS2 code, except for the use of the ocean\_grid\_type and by keeping them separate we retain the ability to set up MOM6 and SIS2 debugging separately.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_debugging:function-subroutine-documentation}}\index{mom\_debugging\_init() (fortran subroutine in module mom\_debugging)@\spxentry{mom\_debugging\_init()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/mom_debugging_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{mom\_debugging\_init}}}{\emph{param\_file}}{}
MOM\_debugging\_init initializes the MOM\_debugging module, and sets the parameterts that control which checks are active for MOM6.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug}} \sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/mom_checksums_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::mom\_checksums\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_vc3d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_vc3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_vc3d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{direction}}{}
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D C\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} the direction flag to be passed to pass\_vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vc2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_vc2d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_vc2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_vc2d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{direction}}{}
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D C\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} the direction flag to be passed to pass\_vector

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{max\_redundant\_prints}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{redundant\_prints}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vc3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_sb3d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_sb3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_sb3d}}}{\emph{mesg}, \emph{array}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}}{}
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D scalar at corner points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_sb2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_sb2d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_sb2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_sb2d}}}{\emph{mesg}, \emph{array}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}}{}
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D scalar at corner points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{max\_redundant\_prints}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{redundant\_prints}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_sb3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_vb3d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_vb3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_vb3d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{direction}}{}
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D B\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} the direction flag to be passed to pass\_vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vb2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_vb2d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_vb2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_vb2d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{direction}}{}
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D B\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} the direction flag to be passed to pass\_vector

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{max\_redundant\_prints}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{redundant\_prints}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vb3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_st3d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_st3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_st3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_st3d}}}{\emph{mesg}, \emph{array}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}}{}
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D scalar at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_st2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_st2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_st2d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_st2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_st2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_st2d}}}{\emph{mesg}, \emph{array}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}}{}
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D scalar at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}in{]} The array to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{max\_redundant\_prints}} \sphinxcode{\sphinxupquote{redundant\_prints}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_st3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_st3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_vt3d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_vt3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vt3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_vt3d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{direction}}{}
Check for consistency between the duplicated points of a 3\sphinxhyphen{}D A\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} the direction flag to be passed to pass\_vector

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vt2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vt2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_redundant\_vt2d() (fortran subroutine in module mom\_debugging)@\spxentry{check\_redundant\_vt2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vt2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_redundant\_vt2d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{direction}}{}
Check for consistency between the duplicated points of a 2\sphinxhyphen{}D A\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector to be checked for consistency

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to check

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} the direction flag to be passed to pass\_vector

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{max\_redundant\_prints}} \sphinxcode{\sphinxupquote{redundant\_prints}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vt3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_redundant\_vt3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_vec\_c3d() (fortran subroutine in module mom\_debugging)@\spxentry{chksum\_vec\_c3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_c3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{chksum\_vec\_c3d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{halos}, \emph{scalars}}{}
Do a checksum and redundant point check on a 3d C\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{halos} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{scalars} :: {[}in{]} If true this is a pair of scalars that are being checked.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_vec\_c2d() (fortran subroutine in module mom\_debugging)@\spxentry{chksum\_vec\_c2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_c2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{chksum\_vec\_c2d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{halos}, \emph{scalars}}{}
Do a checksum and redundant point check on a 2d C\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{halos} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{scalars} :: {[}in{]} If true this is a pair of scalars that are being checked.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_vec\_b3d() (fortran subroutine in module mom\_debugging)@\spxentry{chksum\_vec\_b3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_b3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{chksum\_vec\_b3d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{halos}, \emph{scalars}}{}
Do a checksum and redundant point check on a 3d B\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{halos} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{scalars} :: {[}in{]} If true this is a pair of scalars that are being checked.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_vec\_b2d() (fortran subroutine in module mom\_debugging)@\spxentry{chksum\_vec\_b2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_b2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{chksum\_vec\_b2d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{halos}, \emph{scalars}, \emph{symmetric}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{halos} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{scalars} :: {[}in{]} If true this is a pair of scalars that are being checked.

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If true, do the checksums on the full symmetric computational domain.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_vec\_a3d() (fortran subroutine in module mom\_debugging)@\spxentry{chksum\_vec\_a3d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_a3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{chksum\_vec\_a3d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{halos}, \emph{scalars}}{}
Do a checksum and redundant point check on a 3d C\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{halos} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{scalars} :: {[}in{]} If true this is a pair of scalars that are being checked.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{chksum\_vec\_a2d() (fortran subroutine in module mom\_debugging)@\spxentry{chksum\_vec\_a2d()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/chksum_vec_a2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{chksum\_vec\_a2d}}}{\emph{mesg}, \emph{u\_comp}, \emph{v\_comp}, \emph{G}, \emph{halos}, \emph{scalars}}{}
Do a checksum and redundant point check on a 2d C\sphinxhyphen{}grid vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u\_comp} :: {[}in{]} The u\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{v\_comp} :: {[}in{]} The v\sphinxhyphen{}component of the vector

\item {} 
\sphinxstylestrong{halos} :: {[}in{]} The width of halos to check (default 0)

\item {} 
\sphinxstylestrong{scalars} :: {[}in{]} If true this is a pair of scalars that are being checked.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{debug\_chksums}} \sphinxcode{\sphinxupquote{debug\_redundant}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{totalstuff() (fortran function in module mom\_debugging)@\spxentry{totalstuff()}\spxextra{fortran function in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totalstuff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{totalstuff}}}{\emph{HI}, \emph{hThick}, \emph{areaT}, \emph{stuff}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function returns the sum over computational domain of all processors of hThick*stuff, where stuff is a 3\sphinxhyphen{}d array at tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{hthick} :: {[}in{]} The array of thicknesses to use as weights

\item {} 
\sphinxstylestrong{areat} :: {[}in{]} The array of cell areas {[}m2{]}

\item {} 
\sphinxstylestrong{stuff} :: {[}in{]} The array of stuff to be summed

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: the globally integrated amoutn of stuff

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totaltands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{totaltands}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{totaltands() (fortran subroutine in module mom\_debugging)@\spxentry{totaltands()}\spxextra{fortran subroutine in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totaltands}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{totaltands}}}{\emph{HI}, \emph{hThick}, \emph{areaT}, \emph{temperature}, \emph{salinity}, \emph{mesg}}{}
This subroutine display the total thickness, temperature and salinity as well as the change since the last call.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type

\item {} 
\sphinxstylestrong{hthick} :: {[}in{]} The array of thicknesses to use as weights

\item {} 
\sphinxstylestrong{areat} :: {[}in{]} The array of cell areas {[}m2{]}

\item {} 
\sphinxstylestrong{temperature} :: {[}in{]} The temperature field to sum

\item {} 
\sphinxstylestrong{salinity} :: {[}in{]} The salinity field to sum

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} An identifying message

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totalstuff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{totalstuff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_column\_integral() (fortran function in module mom\_debugging)@\spxentry{check\_column\_integral()}\spxextra{fortran function in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_column_integral}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_column\_integral}}}{\emph{nk}, \emph{field}, \emph{known\_answer}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns false if the column integral of a given quantity is within roundoff.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels in column

\item {} 
\sphinxstylestrong{field} :: {[}in{]} Field to be summed

\item {} 
\sphinxstylestrong{known\_answer} :: {[}in{]} If present is the expected sum, If missing, assumed zero

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_column\_integrals() (fortran function in module mom\_debugging)@\spxentry{check\_column\_integrals()}\spxextra{fortran function in module mom\_debugging}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_column_integrals}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_debugging/}}\sphinxbfcode{\sphinxupquote{check\_column\_integrals}}}{\emph{nk\_1}, \emph{field\_1}, \emph{nk\_2}, \emph{field\_2}, \emph{missing\_value}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns false if the column integrals of two given quantities are within roundoff of each other.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk\_1} :: {[}in{]} Number of levels in field 1

\item {} 
\sphinxstylestrong{nk\_2} :: {[}in{]} Number of levels in field 2

\item {} 
\sphinxstylestrong{field\_1} :: {[}in{]} First field to be summed

\item {} 
\sphinxstylestrong{field\_2} :: {[}in{]} Second field to be summed

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} If column contains missing values, mask them from the sum

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_density\_integrals module reference}
\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals}}\label{\detokenize{api/generated/modules/mom_density_integrals:mom-density-integrals-module-reference}}\label{\detokenize{api/generated/modules/mom_density_integrals::doc}}\index{mom\_density\_integrals (module)@\spxentry{mom\_density\_integrals}\spxextra{module}|spxpagem}
Provides integrals of density.

{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:detamom-density-integrals}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_density_integrals:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz()}}}}}
&
Calls the appropriate subroutine to calculate analytical and nearly\sphinxhyphen{}analytical integrals in z across layers of pressure anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_pcm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz\_generic\_pcm()}}}}}
&
Calculates (by numerical quadrature) integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_plm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz\_generic\_plm()}}}}}
&
Compute pressure gradient force integrals by quadrature for the case where T and S are linear profiles.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz\_generic\_ppm()}}}}}
&
Compute pressure gradient force integrals for layer “k” and the case where T and S are parabolic profiles.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_specific\_vol\_dp()}}}}}
&
Calls the appropriate subroutine to calculate analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_spec_vol_dp_generic_pcm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_spec\_vol\_dp\_generic\_pcm()}}}}}
&
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_spec_vol_dp_generic_plm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_spec\_vol\_dp\_generic\_plm()}}}}}
&
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/find_depth_of_pressure_in_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_depth\_of\_pressure\_in\_cell()}}}}}
&
Find the depth at which the reconstructed pressure matches P\_tgt.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/frac_dp_at_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frac\_dp\_at\_pos()}}}}}
&
Returns change in anomalous pressure change from top to non\sphinxhyphen{}dimensional position pos between z\_t and z\_b.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_density_integrals:detailed-description}}\label{\detokenize{api/generated/modules/mom_density_integrals:detamom-density-integrals}}
Provides integrals of density.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_density_integrals:function-subroutine-documentation}}\index{int\_density\_dz() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_density\_dz()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_density\_dz}}}{\emph{T}, \emph{S}, \emph{z\_t}, \emph{z\_b}, \emph{rho\_ref}, \emph{rho\_0}, \emph{G\_e}, \emph{HI}, \emph{EOS}, \emph{US}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{bathyT}, \emph{dz\_neglect}, \emph{useMassWghtInterp}}{}
Calls the appropriate subroutine to calculate analytical and nearly\sphinxhyphen{}analytical integrals in z across layers of pressure anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Ocean horizontal index structures for the arrays

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} Height at the top of the layer in depth units {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} Height at the bottom of the layer {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} A density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e) used in the equation of state.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]} or {[}m2 Z\sphinxhyphen{}1 s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dpa} :: {[}inout{]} The change in the pressure anomaly

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}inout{]} The integral through the thickness of the

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}inout{]} The integral in x of the difference between

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}inout{]} The integral in y of the difference between

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{dz\_neglect} :: {[}in{]} A minuscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_pcm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz\_generic\_pcm}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_vertical_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_vertical\_integrals}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_density\_dz\_generic\_pcm() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_density\_dz\_generic\_pcm()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_pcm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_density\_dz\_generic\_pcm}}}{\emph{T}, \emph{S}, \emph{z\_t}, \emph{z\_b}, \emph{rho\_ref}, \emph{rho\_0}, \emph{G\_e}, \emph{HI}, \emph{EOS}, \emph{US}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{bathyT}, \emph{dz\_neglect}, \emph{useMassWghtInterp}}{}
Calculates (by numerical quadrature) integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index type for input variables.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature of the layer {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity of the layer {[}ppt{]}

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} Height at the top of the layer in depth units {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} Height at the bottom of the layer {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} A density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e) used in the equation of state.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]} or {[}m2 Z\sphinxhyphen{}1 s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dpa} :: {[}inout{]} The change in the pressure anomaly

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}inout{]} The integral through the thickness of the

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}inout{]} The integral in x of the difference between

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}inout{]} The integral in y of the difference between

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{dz\_neglect} :: {[}in{]} A minuscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_density\_dz\_generic\_plm() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_density\_dz\_generic\_plm()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_plm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_density\_dz\_generic\_plm}}}{\emph{k}, \emph{tv}, \emph{T\_t}, \emph{T\_b}, \emph{S\_t}, \emph{S\_b}, \emph{e}, \emph{rho\_ref}, \emph{rho\_0}, \emph{G\_e}, \emph{dz\_subroundoff}, \emph{bathyT}, \emph{HI}, \emph{GV}, \emph{EOS}, \emph{US}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{useMassWghtInterp}}{}
Compute pressure gradient force integrals by quadrature for the case where T and S are linear profiles.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{k} :: {[}in{]} Layer index to calculate integrals for

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Ocean horizontal index structures for the input arrays

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{t\_t} :: {[}in{]} Potential temperature at the cell top {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} Potential temperature at the cell bottom {[}degC{]}

\item {} 
\sphinxstylestrong{s\_t} :: {[}in{]} Salinity at the cell top {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} Salinity at the cell bottom {[}ppt{]}

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Height of interfaces {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} A density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e) used in the equation of state.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dz\_subroundoff} :: {[}in{]} A minuscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dpa} :: {[}inout{]} The change in the pressure anomaly across the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}inout{]} The integral through the thickness of the layer of

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}inout{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}inout{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_density\_dz\_generic\_ppm() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_density\_dz\_generic\_ppm()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_ppm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_density\_dz\_generic\_ppm}}}{\emph{k}, \emph{tv}, \emph{T\_t}, \emph{T\_b}, \emph{S\_t}, \emph{S\_b}, \emph{e}, \emph{rho\_ref}, \emph{rho\_0}, \emph{G\_e}, \emph{dz\_subroundoff}, \emph{bathyT}, \emph{HI}, \emph{GV}, \emph{EOS}, \emph{US}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{useMassWghtInterp}}{}
Compute pressure gradient force integrals for layer “k” and the case where T and S are parabolic profiles.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{k} :: {[}in{]} Layer index to calculate integrals for

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Ocean horizontal index structures for the input arrays

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{t\_t} :: {[}in{]} Potential temperature at the cell top {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} Potential temperature at the cell bottom {[}degC{]}

\item {} 
\sphinxstylestrong{s\_t} :: {[}in{]} Salinity at the cell top {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} Salinity at the cell bottom {[}ppt{]}

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Height of interfaces {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} A density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e) used in the equation of state.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dz\_subroundoff} :: {[}in{]} A minuscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dpa} :: {[}inout{]} The change in the pressure anomaly across the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}inout{]} The integral through the thickness of the layer of

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}inout{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}inout{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_specific\_vol\_dp() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_specific\_vol\_dp()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_specific_vol_dp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_specific\_vol\_dp}}}{\emph{T}, \emph{S}, \emph{p\_t}, \emph{p\_b}, \emph{alpha\_ref}, \emph{HI}, \emph{EOS}, \emph{US}, \emph{dza}, \emph{intp\_dza}, \emph{intx\_dza}, \emph{inty\_dza}, \emph{halo\_size}, \emph{bathyP}, \emph{dP\_tiny}, \emph{useMassWghtInterp}}{}
Calls the appropriate subroutine to calculate analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model. There are essentially no free assumptions, apart from the use of Boole’s rule to do the horizontal integrals, and from a truncation in the series for log(1\sphinxhyphen{}eps/1+eps) that assumes that {\color{red}\bfseries{}|eps|} \textless{} 0.34.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The horizontal index structure

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Pressure at the top of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{p\_b} :: {[}in{]} Pressure at the bottom of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{alpha\_ref} :: {[}in{]} A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]} The calculation is mathematically identical with different values of alpha\_ref, but this reduces the effects of roundoff.

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dza} :: {[}inout{]} The change in the geopotential anomaly across

\item {} 
\sphinxstylestrong{intp\_dza} :: {[}inout{]} The integral in pressure through the layer of the

\item {} 
\sphinxstylestrong{intx\_dza} :: {[}inout{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dza} :: {[}inout{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} The width of halo points on which to calculate dza.

\item {} 
\sphinxstylestrong{bathyp} :: {[}in{]} The pressure at the bathymetry {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{dp\_tiny} :: {[}in{]} A minuscule pressure change with the same units as p\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_spec_vol_dp_generic_pcm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_spec\_vol\_dp\_generic\_pcm}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_interface\_heights::find\_eta\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_interface\_heights::find\_eta\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_nonbouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_spec\_vol\_dp\_generic\_pcm() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_spec\_vol\_dp\_generic\_pcm()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_spec_vol_dp_generic_pcm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_spec\_vol\_dp\_generic\_pcm}}}{\emph{T}, \emph{S}, \emph{p\_t}, \emph{p\_b}, \emph{alpha\_ref}, \emph{HI}, \emph{EOS}, \emph{US}, \emph{dza}, \emph{intp\_dza}, \emph{intx\_dza}, \emph{inty\_dza}, \emph{halo\_size}, \emph{bathyP}, \emph{dP\_neglect}, \emph{useMassWghtInterp}}{}
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model. There are essentially no free assumptions, apart from the use of Boole’s rule quadrature to do the integrals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature of the layer {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity of the layer {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Pressure atop the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{p\_b} :: {[}in{]} Pressure below the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{alpha\_ref} :: {[}in{]} A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]} The calculation is mathematically identical with different values of alpha\_ref, but alpha\_ref alters the effects of roundoff, and answers do change.

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dza} :: {[}inout{]} The change in the geopotential anomaly

\item {} 
\sphinxstylestrong{intp\_dza} :: {[}inout{]} The integral in pressure through the layer of

\item {} 
\sphinxstylestrong{intx\_dza} :: {[}inout{]} The integral in x of the difference between

\item {} 
\sphinxstylestrong{inty\_dza} :: {[}inout{]} The integral in y of the difference between

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} The width of halo points on which to calculate dza.

\item {} 
\sphinxstylestrong{bathyp} :: {[}in{]} The pressure at the bathymetry {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{dp\_neglect} :: {[}in{]} A minuscule pressure change with the same units as p\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_specific\_vol\_dp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_spec\_vol\_dp\_generic\_plm() (fortran subroutine in module mom\_density\_integrals)@\spxentry{int\_spec\_vol\_dp\_generic\_plm()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_spec_vol_dp_generic_plm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{int\_spec\_vol\_dp\_generic\_plm}}}{\emph{T\_t}, \emph{T\_b}, \emph{S\_t}, \emph{S\_b}, \emph{p\_t}, \emph{p\_b}, \emph{alpha\_ref}, \emph{dP\_neglect}, \emph{bathyP}, \emph{HI}, \emph{EOS}, \emph{US}, \emph{dza}, \emph{intp\_dza}, \emph{intx\_dza}, \emph{inty\_dza}, \emph{useMassWghtInterp}}{}
This subroutine calculates integrals of specific volume anomalies in pressure across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model. There are essentially no free assumptions, apart from the use of Boole’s rule quadrature to do the integrals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{t\_t} :: {[}in{]} Potential temperature at the top of the layer {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} Potential temperature at the bottom of the layer {[}degC{]}

\item {} 
\sphinxstylestrong{s\_t} :: {[}in{]} Salinity at the top the layer {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} Salinity at the bottom the layer {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Pressure atop the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{p\_b} :: {[}in{]} Pressure below the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{alpha\_ref} :: {[}in{]} A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]} The calculation is mathematically identical with different values of alpha\_ref, but alpha\_ref alters the effects of roundoff, and answers do change.

\item {} 
\sphinxstylestrong{dp\_neglect} :: {[}in{]} !\textless{} A miniscule pressure change with the same units as p\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{bathyp} :: {[}in{]} The pressure at the bathymetry {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dza} :: {[}inout{]} The change in the geopotential anomaly

\item {} 
\sphinxstylestrong{intp\_dza} :: {[}inout{]} The integral in pressure through the layer of

\item {} 
\sphinxstylestrong{intx\_dza} :: {[}inout{]} The integral in x of the difference between

\item {} 
\sphinxstylestrong{inty\_dza} :: {[}inout{]} The integral in y of the difference between

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_depth\_of\_pressure\_in\_cell() (fortran subroutine in module mom\_density\_integrals)@\spxentry{find\_depth\_of\_pressure\_in\_cell()}\spxextra{fortran subroutine in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/find_depth_of_pressure_in_cell}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{find\_depth\_of\_pressure\_in\_cell}}}{\emph{T\_t}, \emph{T\_b}, \emph{S\_t}, \emph{S\_b}, \emph{z\_t}, \emph{z\_b}, \emph{P\_t}, \emph{P\_tgt}, \emph{rho\_ref}, \emph{G\_e}, \emph{EOS}, \emph{US}, \emph{P\_b}, \emph{z\_out}, \emph{z\_tol}}{}
Find the depth at which the reconstructed pressure matches P\_tgt.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t\_t} :: {[}in{]} Potential temperature at the cell top {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} Potential temperature at the cell bottom {[}degC{]}

\item {} 
\sphinxstylestrong{s\_t} :: {[}in{]} Salinity at the cell top {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} Salinity at the cell bottom {[}ppt{]}

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} Absolute height of top of cell {[}Z \textasciitilde{}\textgreater{} m{]} (Boussinesq ????)

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} Absolute height of bottom of cell {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Anomalous pressure of top of cell, relative to g*rho\_ref*z\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{p\_tgt} :: {[}in{]} Target pressure at height z\_out, relative to g*rho\_ref*z\_out {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} Reference density with which calculation are anomalous to {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} Gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{p\_b} :: {[}out{]} Pressure at the bottom of the cell {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{z\_out} :: {[}out{]} Absolute depth at which anomalous pressure = p\_tgt {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{z\_tol} :: {[}in{]} The tolerance in finding z\_out {[}Z \textasciitilde{}\textgreater{} m{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/frac_dp_at_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frac\_dp\_at\_pos}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/cut_off_column_top}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::cut\_off\_column\_top}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_state_init_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_state\_init\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{frac\_dp\_at\_pos() (fortran function in module mom\_density\_integrals)@\spxentry{frac\_dp\_at\_pos()}\spxextra{fortran function in module mom\_density\_integrals}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/frac_dp_at_pos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_density\_integrals/}}\sphinxbfcode{\sphinxupquote{frac\_dp\_at\_pos}}}{\emph{T\_t}, \emph{T\_b}, \emph{S\_t}, \emph{S\_b}, \emph{z\_t}, \emph{z\_b}, \emph{rho\_ref}, \emph{G\_e}, \emph{pos}, \emph{EOS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns change in anomalous pressure change from top to non\sphinxhyphen{}dimensional position pos between z\_t and z\_b.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t\_t} :: {[}in{]} Potential temperature at the cell top {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} Potential temperature at the cell bottom {[}degC{]}

\item {} 
\sphinxstylestrong{s\_t} :: {[}in{]} Salinity at the cell top {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} Salinity at the cell bottom {[}ppt{]}

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} The geometric height at the top of the layer {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} The geometric height at the bottom of the layer {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{pos} :: {[}in{]} The fractional vertical position, 0 to 1 {[}nondim{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/find_depth_of_pressure_in_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_depth\_of\_pressure\_in\_cell}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diabatic\_aux module reference}
\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux}}\label{\detokenize{api/generated/modules/mom_diabatic_aux:mom-diabatic-aux-module-reference}}\label{\detokenize{api/generated/modules/mom_diabatic_aux::doc}}\index{mom\_diabatic\_aux (module)@\spxentry{mom\_diabatic\_aux}\spxextra{module}|spxpagem}
Provides functions for some diabatic processes such as fraxil, brine rejection, tendency due to surface flux divergence.

{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:detamom-diabatic-aux}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_diabatic_aux:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diabatic_aux_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_aux\_cs}}}}}
&
Control structure for diabatic\_aux.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diabatic_aux:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/make_frazil}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_frazil()}}}}}
&
Frazil formation keeps the temperature above the freezing point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/differential_diffuse_t_s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{differential\_diffuse\_t\_s()}}}}}
&
This subroutine applies double diffusion to T \& S, assuming no diapycal mass fluxes, using a simple triadiagonal solver.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/adjust_salt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_salt()}}}}}
&
This subroutine keeps salinity from falling below a small but positive threshold.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/tridiagts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tridiagts()}}}}}
&
This is a simple tri\sphinxhyphen{}diagonal solver for T and S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/find_uv_at_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_uv\_at\_h()}}}}}
&
This subroutine calculates u\_h and v\_h (velocities at thickness points), optionally using the entrainment amounts passed in as arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/set_pen_shortwave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_pen\_shortwave()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diagnosemldbydensitydifference}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnosemldbydensitydifference()}}}}}
&
Diagnose a mixed layer depth (MLD) determined by a given density difference with the surface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diagnosemldbyenergy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnosemldbyenergy()}}}}}
&
Diagnose a mixed layer depth (MLD) determined by the depth a given energy value would mix.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/applyboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{applyboundaryfluxesinout()}}}}}
&
Update the thickness, temperature, and salinity due to thermodynamic boundary forcing (contained in fluxes type) applied to h, tvT and tvS, and calculate the TKE implications of this heating.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diabatic_aux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_aux\_init()}}}}}
&
This subroutine initializes the parameters and control structure of the diabatic\_aux module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diabatic_aux_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_aux\_end()}}}}}
&
This subroutine initializes the control structure and any related memory for the diabatic\_aux module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diabatic_aux:detailed-description}}\label{\detokenize{api/generated/modules/mom_diabatic_aux:detamom-diabatic-aux}}
This module contains the subroutines that, along with the subroutines that it calls, implements diapycnal mass and momentum fluxes and a bulk mixed layer. The diapycnal diffusion can be used without the bulk mixed layer.

diabatic first determines the (diffusive) diapycnal mass fluxes based on the convergence of the buoyancy fluxes within each layer. The dual\sphinxhyphen{}stream entrainment scheme of MacDougall and Dewar (JPO, 1997) is used for combined diapycnal advection and diffusion, calculated implicitly and potentially with the Richardson number dependent mixing, as described by Hallberg (MWR, 2000). Diapycnal advection is fundamentally the residual of diapycnal diffusion, so the fully implicit upwind differencing scheme that is used is entirely appropriate. The downward buoyancy flux in each layer is determined from an implicit calculation based on the previously calculated flux of the layer above and an estimated flux in the layer below. This flux is subject to the following conditions: (1) the flux in the top and bottom layers are set by the boundary conditions, and (2) no layer may be driven below an Angstrom thick\sphinxhyphen{} ness. If there is a bulk mixed layer, the buffer layer is treat\sphinxhyphen{} ed as a fixed density layer with vanishingly small diffusivity.

diabatic takes 5 arguments: the two velocities (u and v), the thicknesses (h), a structure containing the forcing fields, and the length of time over which to act (dt). The velocities and thickness are taken as inputs and modified within the subroutine. There is no limit on the time step.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_diabatic_aux:type-documentation}}\index{diabatic\_aux\_cs (fortran type in module mom\_diabatic\_aux)@\spxentry{diabatic\_aux\_cs}\spxextra{fortran type in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diabatic_aux_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{diabatic\_aux\_cs}}}
Control structure for diabatic\_aux.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_rivermix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Provide additional TKE to mix river runoff at the river mouths to a depth of “rivermix\_depth”.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rivermix\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The depth to which rivers are mixed if do\_rivermix = T {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{reclaim\_frazil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, try to use any frazil heat deficit to to cool the topmost layer down to the freezing point. The default is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressure\_dependent\_frazil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a pressure dependent freezing temperature when making frazil. The default is false, which will be faster but is inappropriate with ice\sphinxhyphen{}shelf cavities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ignore\_fluxes\_over\_land}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the model does not check if fluxes are applied over land points. This flag must be used when the ocean is coupled with sea ice and ice shelves and use\_ePBL = true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_river\_heat\_content}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, assumes that ice\sphinxhyphen{}ocean boundary has provided a river heat content. Otherwise, runoff is added with a temperature of the local SST.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_calving\_heat\_content}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, assumes that ice\sphinxhyphen{}ocean boundary has provided a calving heat content. Otherwise, calving is added with a temperature of the local SST.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_pen\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use one of the CHL\_A schemes to determine the e\sphinxhyphen{}folding depth of incoming shortwave radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sbc\_chl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer handle used in time interpolation of chlorophyll read from a file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{chl\_from\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, chl\_a is read from a file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Structure used to regulate timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_createdh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID of mass added to avoid grounding.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_brine\_lay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID of which layer receives the brine.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pensw\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID of Penetrative shortwave heating (flux convergence)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_penswflux\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID of Penetrative shortwave flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nonpensw\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID of Non\sphinxhyphen{}penetrative shortwave heating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_chl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID of chlorophyll\sphinxhyphen{}A handles for opacity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{createdh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The amount of volume added in order to avoid grounding {[}H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pensw\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Heating in a layer from convergence of penetrative SW {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{penswflux\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Penetrative SW flux at base of grid layer {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonpensw\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}downwelling SW radiation at ocean surface {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diabatic_aux:function-subroutine-documentation}}\index{make\_frazil() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{make\_frazil()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/make_frazil}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{make\_frazil}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{p\_surf}, \emph{halo}}{}
Frazil formation keeps the temperature above the freezing point. This subroutine warms any water that is colder than the (currently surface) freezing point up to the freezing point and accumulates the required heat (in {[}Q R Z \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}) in tvfrazil.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure returned by a previous call to diabatic\_aux\_init.

\item {} 
\sphinxstylestrong{p\_surf} :: {[}in{]} The pressure at the ocean surface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to calculate frazil

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_frazil}}

\end{description}\end{quote}

\end{fulllineitems}

\index{differential\_diffuse\_t\_s() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{differential\_diffuse\_t\_s()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/differential_diffuse_t_s}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{differential\_diffuse\_t\_s}}}{\emph{h}, \emph{tv}, \emph{visc}, \emph{dt}, \emph{G}, \emph{GV}}{}
This subroutine applies double diffusion to T \& S, assuming no diapycal mass fluxes, using a simple triadiagonal solver.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Structure containing vertical viscosities, bottom boundary layer properies, and related fields.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjust\_salt() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{adjust\_salt()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/adjust_salt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{adjust\_salt}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{CS}, \emph{halo}}{}
This subroutine keeps salinity from falling below a small but positive threshold. This usually occurs when the ice model attempts to extract more salt then is actually available to it from the ocean.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure returned by a previous call to diabatic\_aux\_init.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to work

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{tridiagts() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{tridiagts()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/tridiagts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{tridiagts}}}{\emph{G}, \emph{GV}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{hold}, \emph{ea}, \emph{eb}, \emph{T}, \emph{S}}{}
This is a simple tri\sphinxhyphen{}diagonal solver for T and S. “Simple” means it only uses arrays hold, ea and eb.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start i\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end i\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{hold} :: {[}in{]} The layer thicknesses before entrainment, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} The amount of fluid entrained from the layer above within this time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} The amount of fluid entrained from the layer below within this time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Layer potential temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Layer salinities {[}ppt{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_uv\_at\_h() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{find\_uv\_at\_h()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/find_uv_at_h}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{find\_uv\_at\_h}}}{\emph{u}, \emph{v}, \emph{h}, \emph{u\_h}, \emph{v\_h}, \emph{G}, \emph{GV}, \emph{US}, \emph{ea}, \emph{eb}}{}
This subroutine calculates u\_h and v\_h (velocities at thickness points), optionally using the entrainment amounts passed in as arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{u\_h} :: {[}out{]} Zonal velocity interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_h} :: {[}out{]} Meridional velocity interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} The amount of fluid entrained from the layer

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_uv\_at\_h}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_pen\_shortwave() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{set\_pen\_shortwave()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/set_pen_shortwave}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{set\_pen\_shortwave}}}{\emph{optics}, \emph{fluxes}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{opacity\_CSp}, \emph{tracer\_flow\_CSp}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{optics} :: An optics structure that has will contain information about shortwave fluxes and absorption.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} points to forcing fields unused fields have NULL ptrs

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Control structure for diabatic\_aux

\item {} 
\sphinxstylestrong{opacity\_csp} :: The control structure for the opacity module.

\item {} 
\sphinxstylestrong{tracer\_flow\_csp} :: A pointer to the control structure organizing the tracer modules.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/get_chl_from_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::get\_chl\_from\_model}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagnosemldbydensitydifference() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{diagnosemldbydensitydifference()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diagnosemldbydensitydifference}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{diagnosemldbydensitydifference}}}{\emph{id\_MLD}, \emph{h}, \emph{tv}, \emph{densityDiff}, \emph{G}, \emph{GV}, \emph{US}, \emph{diagPtr}, \emph{id\_N2subML}, \emph{id\_MLDsq}, \emph{dz\_subML}}{}
Diagnose a mixed layer depth (MLD) determined by a given density difference with the surface. This routine is appropriate in MOM\_diabatic\_driver due to its position within the time stepping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{id\_mld} :: {[}in{]} Handle (ID) of MLD diagnostic

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{densitydiff} :: {[}in{]} Density difference to determine MLD {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{diagptr} :: Diagnostics structure

\item {} 
\sphinxstylestrong{id\_n2subml} :: {[}in{]} Optional handle (ID) of subML stratification

\item {} 
\sphinxstylestrong{id\_mldsq} :: {[}in{]} Optional handle (ID) of squared MLD

\item {} 
\sphinxstylestrong{dz\_subml} :: {[}in{]} The distance over which to calculate N2subML or 50 m if missing {[}Z \textasciitilde{}\textgreater{} m{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagnosemldbyenergy() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{diagnosemldbyenergy()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diagnosemldbyenergy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{diagnosemldbyenergy}}}{\emph{id\_MLD}, \emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{Mixing\_Energy}, \emph{diagPtr}}{}
Diagnose a mixed layer depth (MLD) determined by the depth a given energy value would mix. This routine is appropriate in MOM\_diabatic\_driver due to its position within the time stepping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id\_mld} :: {[}in{]} Energy output diag IDs

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{mixing\_energy} :: {[}in{]} Energy values for up to 3 MLDs

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{diagptr} :: Diagnostics structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{applyboundaryfluxesinout() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{applyboundaryfluxesinout()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/applyboundaryfluxesinout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{applyboundaryfluxesinout}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{dt}, \emph{fluxes}, \emph{optics}, \emph{nsw}, \emph{h}, \emph{tv}, \emph{aggregate\_FW\_forcing}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}, \emph{cTKE}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{SkinBuoyFlux}}{}
Update the thickness, temperature, and salinity due to thermodynamic boundary forcing (contained in fluxes type) applied to h, tvT and tvS, and calculate the TKE implications of this heating.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for diabatic\_aux

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time\sphinxhyphen{}step over which forcing is applied {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Surface fluxes container

\item {} 
\sphinxstylestrong{optics} :: Optical properties container

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} The number of frequency bands of penetrating shortwave radiation

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{aggregate\_fw\_forcing} :: {[}in{]} If False, treat in/out fluxes separately.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} The largest fraction of a layer that can be evaporated in one time\sphinxhyphen{}step {[}nondim{]}.

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which heat and freshwater fluxes is applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ctke} :: {[}out{]} Turbulent kinetic energy requirement to mix

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}out{]} Partial derivative of specific volume with

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}out{]} Partial derivative of specific volume with

\item {} 
\sphinxstylestrong{skinbuoyflux} :: {[}out{]} Buoyancy flux at surface {[}Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/absorbremainingsw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::absorbremainingsw}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::extractfluxes1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_singlepointprint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::forcing\_singlepointprint}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diabatic\_aux\_init() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{diabatic\_aux\_init()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diabatic_aux_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{diabatic\_aux\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{useALEalgorithm}, \emph{use\_ePBL}}{}
This subroutine initializes the parameters and control structure of the diabatic\_aux module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for the diabatic\_aux module, which is initialized here.

\item {} 
\sphinxstylestrong{usealealgorithm} :: {[}in{]} If true, use the ALE algorithm rather than layered mode.

\item {} 
\sphinxstylestrong{use\_epbl} :: {[}in{]} If true, use the implicit energetics planetary boundary layer scheme to determine the diffusivity in the surface boundary layer.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_frazil}} \sphinxcode{\sphinxupquote{id\_clock\_uv\_at\_h}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diabatic\_aux\_end() (fortran subroutine in module mom\_diabatic\_aux)@\spxentry{diabatic\_aux\_end()}\spxextra{fortran subroutine in module mom\_diabatic\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/diabatic_aux_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_aux/}}\sphinxbfcode{\sphinxupquote{diabatic\_aux\_end}}}{\emph{CS}}{}
This subroutine initializes the control structure and any related memory for the diabatic\_aux module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to diabatic\_aux\_init; it is deallocated here.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diabatic\_driver module reference}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver}}\label{\detokenize{api/generated/modules/mom_diabatic_driver:mom-diabatic-driver-module-reference}}\label{\detokenize{api/generated/modules/mom_diabatic_driver::doc}}\index{mom\_diabatic\_driver (module)@\spxentry{mom\_diabatic\_driver}\spxextra{module}|spxpagem}
This routine drives the diabatic/dianeutral physics for MOM.

{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:detamom-diabatic-driver}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_cs}}}}}
&
Control structure for this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic()}}}}}
&
This subroutine imposes the diapycnal mass fluxes and the accompanying diapycnal advection of momentum and tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale\_legacy()}}}}}
&
Applies diabatic forcing and diapycnal mixing of temperature, salinity and other tracers for use with an ALE algorithm.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale()}}}}}
&
This subroutine imposes the diapycnal mass fluxes and the accompanying diapycnal advection of momentum and tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{layered\_diabatic()}}}}}
&
Imposes the diapycnal mass fluxes and the accompanying diapycnal advection of momentum and tracers using the original MOM6 algorithms.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/extract_diabatic_member}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_diabatic\_member()}}}}}
&
Returns pointers or values of members within the diabatic\_CS type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/adiabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adiabatic()}}}}}
&
Routine called for adiabatic physics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_diabatic_diff_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_diabatic\_diff\_tendency()}}}}}
&
This routine diagnoses tendencies from application of diabatic diffusion using ALE algorithm.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_boundary_forcing_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_boundary\_forcing\_tendency()}}}}}
&
This routine diagnoses tendencies from application of boundary fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_frazil_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_frazil\_tendency()}}}}}
&
This routine diagnoses tendencies for temperature and heat from frazil formation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/adiabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adiabatic\_driver\_init()}}}}}
&
A simplified version of diabatic\_driver\_init that will allow tracer column functions to be called without allowing any of the diabatic processes to be used.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_driver\_init()}}}}}
&
This routine initializes the diabatic driver module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_driver\_end()}}}}}
&
Routine to close the diabatic driver module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:detailed-description}}\label{\detokenize{api/generated/modules/mom_diabatic_driver:detamom-diabatic-driver}}
By Robert Hallberg, Alistair Adcroft, and Stephen Griffies.

This program contains the subroutine that, along with the subroutines that it calls, implements diapycnal mass and momentum fluxes and a bulk mixed layer. The diapycnal diffusion can be used without the bulk mixed layer.


\paragraph{Outline of MOM diabatic}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:outline-of-mom-diabatic}}\label{\detokenize{api/generated/modules/mom_diabatic_driver:namespacemom-diabatic-driver-1section-diabatic}}\begin{itemize}
\item {} 
diabatic first determines the (diffusive) diapycnal mass fluxes based on the convergence of the buoyancy fluxes within each layer.

\item {} 
The dual\sphinxhyphen{}stream entrainment scheme of MacDougall and Dewar (JPO, 1997) is used for combined diapycnal advection and diffusion, calculated implicitly and potentially with the Richardson number dependent mixing, as described by Hallberg (MWR, 2000).

\item {} 
Diapycnal advection is the residual of diapycnal diffusion, so the fully implicit upwind differencing scheme that is used is entirely appropriate.

\item {} 
The downward buoyancy flux in each layer is determined from an implicit calculation based on the previously calculated flux of the layer above and an estimated flux in the layer below. This flux is subject to the following conditions: (1) the flux in the top and bottom layers are set by the boundary conditions, and (2) no layer may be driven below an Angstrom thick\sphinxhyphen{} ness. If there is a bulk mixed layer, the buffer layer is treated as a fixed density layer with vanishingly small diffusivity.

\end{itemize}

diabatic takes 5 arguments: the two velocities (u and v), the thicknesses (h), a structure containing the forcing fields, and the length of time over which to act (dt). The velocities and thickness are taken as inputs and modified within the subroutine. There is no limit on the time step.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:type-documentation}}\index{diabatic\_cs (fortran type in module mom\_diabatic\_driver)@\spxentry{diabatic\_cs}\spxextra{fortran type in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diabatic\_cs}}}
Control structure for this module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_wd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ea}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dudt\_dia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dvdt\_dia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ea\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eb\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ea\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eb\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_salt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_interface}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_epbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tdif}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tadv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sdif}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sadv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld\_003}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld\_0125}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld\_user}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mlotstsq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld\_en1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld\_en2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld\_en3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_submln2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_dudt\_dia\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_dvdt\_dia\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u\_predia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v\_predia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_predia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_t\_predia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_s\_predia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_e\_predia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_temp\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_saln\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_heat\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_salt\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_heat\_tend\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_salt\_tend\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diabatic\_diff\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_h\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_temp\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_saln\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_heat\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_salt\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_heat\_tend\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_boundary\_forcing\_salt\_tend\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frazil\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frazil\_temp\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frazil\_heat\_tend}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frazil\_heat\_tend\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_legacy\_diabatic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true (default), use the a legacy version of the diabatic algorithm. This is temporary and is needed to avoid change in answers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, a refined bulk mixed layer is used with nkml sublayers (and additional buffer layers).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_energetic\_pbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the implicit energetics planetary boundary layer scheme to determine the diffusivity in the surface boundary layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_kpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use CVMix/KPP boundary layer scheme to determine the OBLD and the diffusivities within this layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_kappa\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the kappa\_shear module to find the shear\sphinxhyphen{}driven diapycnal diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_cvmix\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the CVMix module to find the shear\sphinxhyphen{}driven diapycnal diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_cvmix\_ddiff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the CVMix double diffusion module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_cvmix\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the CVMix module to get enhanced mixing due to convection.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sponges may be applied anywhere in the domain. The exact location and properties of those sponges are set by calls to initialize\_sponge and set\_up\_sponge\_field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_geothermal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply geothermal heating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_int\_tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the code that advances a separate set of equations for the internal tide energy density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{epbl\_is\_additive}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the diffusivity from ePBL is added to all other diffusivities. Otherwise, the larger of kappa\sphinxhyphen{} shear and ePBL diffusivities are used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{epbl\_prandtl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Prandtl number used by ePBL to convert vertical diffusivities into viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of baroclinic modes to consider.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uniform\_test\_cg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Uniform group velocity of internal tide for testing internal tides {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usealealgorithm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the ALE algorithm rather than layered isopycnal/stacked shallow water mode. This logical passed by argument to diabatic\_driver\_init.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{aggregate\_fw\_forcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Determines whether net incoming/outgoing surface FW fluxes are applied separately or combined before being applied.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_mix\_first}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The nondimensional fraction of the mixed layer algorithm that is applied before diffusive mixing. The default is 0, while 0.5 gives Strang splitting and 1 is a sensible value too. Note that if there are convective instabilities in the initial state, the first call may do much more than the second.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of buffer layers (if bulk\_mixed\_layer)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{massless\_match\_targets}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true (the default), keep the T \& S consistent with the target values.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mix\_boundary\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, mix the passive tracers in massless layers at the bottom into the interior as though a diffusivity of Kd\_min\_tr (see below) were operating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_bbl\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A bottom boundary layer tracer diffusivity that will allow for explicitly specified bottom fluxes {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. The entrainment at the bottom is at least sqrt(Kd\_BBL\_tr*dt) over the same distance.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_min\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimal diffusivity that should always be applied to tracers, especially in massless layers near the bottom {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minimum\_forcing\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The smallest depth over which heat and freshwater fluxes are applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evap\_cfl\_limit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The largest fraction of a layer that can be evaporated in one time\sphinxhyphen{}step {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{halo\_ts\_diff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The temperature, salinity and thickness halo size that must be valid for the diffusivity calculations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usekpp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: use CVMix/KPP diffusivities and non\sphinxhyphen{}local transport

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kppispassive}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, KPP is in passive mode, not changing answers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debugconservation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, monitor conservation and extrema.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_tridiag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use tracer\_vertdiff instead of tridiagTS for vertical diffusion of T and S.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug\_energy\_req}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, test the mixing energy requirement code.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure used to regulate timing of diagnostic output

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mlddensitydifference}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Density difference used to determine MLD\_user {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dz\_subml\_n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The distance over which to calculate a diagnostic of the average stratification at the base of the mixed layer {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_en\_vals}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(3)}\sphinxstyleemphasis{{]}} :: Energy values for energy mixed layer diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_diff\_tendency\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true calculate diffusive tendency diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{boundary\_forcing\_tendency\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true calculate frazil diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frazil\_tendency\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true calculate frazil tendency diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frazil\_heat\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: diagnose 3d heat tendency from frazil

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frazil\_temp\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: diagnose 3d temp tendency from frazil

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_aux\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diabatic\_aux\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{entrain\_diffusive\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(entrain\_diffusive\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(bulkmixedlayer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(energetic\_pbl\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regularize\_layers\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(regularize\_layers\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geothermal\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(geothermal\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(int\_tide\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_input\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(int\_tide\_input\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_input}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(int\_tide\_input\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{opacity\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(opacity\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{set\_diff\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(set\_diffusivity\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sponge\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(sponge\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_sponge\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_sponge\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_flow\_control\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{optics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(optics\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(kpp\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cvmix\_conv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cvmix\_conv\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diapyc\_en\_rec\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diapyc\_energy\_req\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_hold\_eb\_ea}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: For group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_kv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: For group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_grids\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_grid\_storage)}\sphinxstyleemphasis{{]}} :: Stores diagnostic grids at some previous point in the algorithm.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_nltheat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: KPP non\sphinxhyphen{}local transport for heat {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_nltscalar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: KPP non\sphinxhyphen{}local transport for scalars {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_buoy\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: KPP forcing buoyancy flux {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_temp\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: KPP effective temperature flux {[}degC m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_salt\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: KPP effective salt flux {[}ppt m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to model time (needed for sponges)

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diabatic_driver:function-subroutine-documentation}}\index{diabatic() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diabatic()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diabatic}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{Hml}, \emph{fluxes}, \emph{visc}, \emph{ADp}, \emph{CDp}, \emph{dt}, \emph{Time\_end}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{OBC}, \emph{WAVES}}{}
This subroutine imposes the diapycnal mass fluxes and the accompanying diapycnal advection of momentum and tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} points to thermodynamic fields unused have NULL ptrs

\item {} 
\sphinxstylestrong{hml} :: Active mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} points to forcing fields unused fields have NULL ptrs

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} vertical viscosities, BBL properies, and

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} related points to accelerations in momentum equations, to enable the later derived diagnostics, like energy budgets

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} points to terms in continuity equations

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} Time at the end of the interval

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\item {} 
\sphinxstylestrong{waves} :: Surface gravity waves

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_frazil_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_frazil\_tendency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_test}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req::diapyc\_energy\_req\_test}}}}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_set\_diffusivity}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_state\_stats}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speeds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speeds}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diabatic\_ale\_legacy() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diabatic\_ale\_legacy()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diabatic\_ale\_legacy}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{Hml}, \emph{fluxes}, \emph{visc}, \emph{ADp}, \emph{CDp}, \emph{dt}, \emph{Time\_end}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Waves}}{}
Applies diabatic forcing and diapycnal mixing of temperature, salinity and other tracers for use with an ALE algorithm. This version uses an older set of algorithms compared with diabatic\_ALE.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} points to thermodynamic fields unused have NULL ptrs

\item {} 
\sphinxstylestrong{hml} :: Active mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} points to forcing fields unused fields have NULL ptrs

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} vertical viscosities, BBL properies, and

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} related points to accelerations in momentum equations, to enable the later derived diagnostics, like energy budgets

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} points to terms in continuity equations

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} Time at the end of the interval

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{waves} :: Surface gravity waves

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/apply_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::apply\_ale\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/calculate_cvmix_conv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv::calculate\_cvmix\_conv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_boundary_forcing_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_boundary\_forcing\_tendency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_diabatic_diff_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_diabatic\_diff\_tendency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_get_mld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_get\_mld}}}}} \sphinxcode{\sphinxupquote{id\_clock\_differential\_diff}} \sphinxcode{\sphinxupquote{id\_clock\_geothermal}} \sphinxcode{\sphinxupquote{id\_clock\_kpp}} \sphinxcode{\sphinxupquote{id\_clock\_remap}} \sphinxcode{\sphinxupquote{id\_clock\_set\_diffusivity}} \sphinxcode{\sphinxupquote{id\_clock\_sponge}} \sphinxcode{\sphinxupquote{id\_clock\_tracers}} \sphinxcode{\sphinxupquote{id\_clock\_tridiag}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_saln}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_nonlocaltransport\_saln}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_nonlocaltransport\_temp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_state\_stats}}}}} {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/mom_thermovar_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_variables::mom\_thermovar\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::optics\_nbands}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/set_pen_shortwave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::set\_pen\_shortwave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diabatic\_ale() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diabatic\_ale()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diabatic\_ale}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{Hml}, \emph{fluxes}, \emph{visc}, \emph{ADp}, \emph{CDp}, \emph{dt}, \emph{Time\_end}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Waves}}{}
This subroutine imposes the diapycnal mass fluxes and the accompanying diapycnal advection of momentum and tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} points to thermodynamic fields unused have NULL ptrs

\item {} 
\sphinxstylestrong{hml} :: Active mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} points to forcing fields unused fields have NULL ptrs

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} vertical viscosities, BBL properies, and

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} related points to accelerations in momentum equations, to enable the later derived diagnostics, like energy budgets

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} points to terms in continuity equations

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} Time at the end of the interval

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{waves} :: Surface gravity waves

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/apply_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::apply\_ale\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/calculate_cvmix_conv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv::calculate\_cvmix\_conv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_boundary_forcing_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_boundary\_forcing\_tendency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_diabatic_diff_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_diabatic\_diff\_tendency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_get_mld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_get\_mld}}}}} \sphinxcode{\sphinxupquote{id\_clock\_differential\_diff}} \sphinxcode{\sphinxupquote{id\_clock\_geothermal}} \sphinxcode{\sphinxupquote{id\_clock\_kpp}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_remap}} \sphinxcode{\sphinxupquote{id\_clock\_set\_diffusivity}} \sphinxcode{\sphinxupquote{id\_clock\_sponge}} \sphinxcode{\sphinxupquote{id\_clock\_tracers}} \sphinxcode{\sphinxupquote{id\_clock\_tridiag}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_saln}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_nonlocaltransport\_saln}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_nonlocaltransport\_temp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_state\_stats}}}}} {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/mom_thermovar_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_variables::mom\_thermovar\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::optics\_nbands}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/set_pen_shortwave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::set\_pen\_shortwave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{layered\_diabatic() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{layered\_diabatic()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{layered\_diabatic}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{Hml}, \emph{fluxes}, \emph{visc}, \emph{ADp}, \emph{CDp}, \emph{dt}, \emph{Time\_end}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{WAVES}}{}
Imposes the diapycnal mass fluxes and the accompanying diapycnal advection of momentum and tracers using the original MOM6 algorithms.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} points to thermodynamic fields unused have NULL ptrs

\item {} 
\sphinxstylestrong{hml} :: Active mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} points to forcing fields unused fields have NULL ptrs

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} vertical viscosities, BBL properies, and

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} related points to accelerations in momentum equations, to enable the later derived diagnostics, like energy budgets

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} points to terms in continuity equations

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} Time at the end of the interval

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{waves} :: Surface gravity waves

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/apply_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::apply\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/calculate_cvmix_conv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv::calculate\_cvmix\_conv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_diabatic_diff_tendency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnose\_diabatic\_diff\_tendency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} \sphinxcode{\sphinxupquote{id\_clock\_differential\_diff}} \sphinxcode{\sphinxupquote{id\_clock\_entrain}} \sphinxcode{\sphinxupquote{id\_clock\_geothermal}} \sphinxcode{\sphinxupquote{id\_clock\_kpp}} \sphinxcode{\sphinxupquote{id\_clock\_mixedlayer}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_remap}} \sphinxcode{\sphinxupquote{id\_clock\_set\_diffusivity}} \sphinxcode{\sphinxupquote{id\_clock\_sponge}} \sphinxcode{\sphinxupquote{id\_clock\_tracers}} \sphinxcode{\sphinxupquote{id\_clock\_tridiag}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_saln}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_nonlocaltransport\_saln}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_nonlocaltransport_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_nonlocaltransport\_temp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_state\_stats}}}}} {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/mom_thermovar_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_variables::mom\_thermovar\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_layers}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/set_pen_shortwave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::set\_pen\_shortwave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_diabatic\_member() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{extract\_diabatic\_member()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/extract_diabatic_member}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{extract\_diabatic\_member}}}{\emph{CS}, \emph{opacity\_CSp}, \emph{optics\_CSp}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}, \emph{KPP\_CSp}, \emph{energetic\_PBL\_CSp}, \emph{diabatic\_aux\_CSp}, \emph{diabatic\_halo}}{}
Returns pointers or values of members within the diabatic\_CS type. For extensibility, each returned argument is an optional argument.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} module control structure

\item {} 
\sphinxstylestrong{opacity\_csp} :: A pointer to be set to the opacity control structure

\item {} 
\sphinxstylestrong{optics\_csp} :: A pointer to be set to the optics control structure

\item {} 
\sphinxstylestrong{kpp\_csp} :: A pointer to be set to the KPP CS

\item {} 
\sphinxstylestrong{energetic\_pbl\_csp} :: A pointer to be set to the ePBL CS

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}out{]} The largest fraction of a layer that can be evaporated in one time\sphinxhyphen{}step {[}nondim{]}.

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}out{]} The smallest depth over which heat and freshwater fluxes are applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{diabatic\_aux\_csp} :: A pointer to be set to the diabatic\_aux control structure

\item {} 
\sphinxstylestrong{diabatic\_halo} :: {[}out{]} The halo size where the diabatic algorithms assume thermodynamics properties are valid.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::lateral\_boundary\_diffusion\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_transport\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adiabatic() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{adiabatic()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/adiabatic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{adiabatic}}}{\emph{h}, \emph{tv}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Routine called for adiabatic physics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} points to thermodynamic fields

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} boundary fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagnose\_diabatic\_diff\_tendency() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diagnose\_diabatic\_diff\_tendency()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_diabatic_diff_tendency}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diagnose\_diabatic\_diff\_tendency}}}{\emph{tv}, \emph{h}, \emph{temp\_old}, \emph{saln\_old}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This routine diagnoses tendencies from application of diabatic diffusion using ALE algorithm. Note that layer thickness is not altered by diabatic diffusion.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} points to updated thermodynamic fields

\item {} 
\sphinxstylestrong{h} :: {[}in{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp\_old} :: {[}in{]} temperature prior to diabatic physics

\item {} 
\sphinxstylestrong{saln\_old} :: {[}in{]} salinity prior to diabatic physics {[}ppt{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: module control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagnose\_boundary\_forcing\_tendency() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diagnose\_boundary\_forcing\_tendency()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_boundary_forcing_tendency}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diagnose\_boundary\_forcing\_tendency}}}{\emph{tv}, \emph{h}, \emph{temp\_old}, \emph{saln\_old}, \emph{h\_old}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This routine diagnoses tendencies from application of boundary fluxes. These impacts are generally 3d, in particular for penetrative shortwave. Other fluxes contribute 3d in cases when the layers vanish or are very thin, in which case we distribute the flux into k \textgreater{} 1 layers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} points to updated thermodynamic fields

\item {} 
\sphinxstylestrong{h} :: {[}in{]} thickness after boundary flux application {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp\_old} :: {[}in{]} temperature prior to boundary flux application {[}degC{]}

\item {} 
\sphinxstylestrong{saln\_old} :: {[}in{]} salinity prior to boundary flux application {[}ppt{]}

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} thickness prior to boundary flux application {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: module control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic\_ale\_legacy}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagnose\_frazil\_tendency() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diagnose\_frazil\_tendency()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diagnose_frazil_tendency}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diagnose\_frazil\_tendency}}}{\emph{tv}, \emph{h}, \emph{temp\_old}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This routine diagnoses tendencies for temperature and heat from frazil formation. This routine is called twice from within subroutine diabatic; at start and at end of the diabatic processes. The impacts from frazil are generally a function of depth. Hence, when checking heat budget, be sure to remove HFSIFRAZIL from HFDS in k=1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} points to updated thermodynamic fields

\item {} 
\sphinxstylestrong{h} :: {[}in{]} thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp\_old} :: {[}in{]} temperature prior to frazil formation {[}degC{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: module control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adiabatic\_driver\_init() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{adiabatic\_driver\_init()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/adiabatic_driver_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{adiabatic\_driver\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{tracer\_flow\_CSp}}{}
A simplified version of diabatic\_driver\_init that will allow tracer column functions to be called without allowing any of the diabatic processes to be used.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} model grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} the file to parse for parameter values

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{tracer\_flow\_csp} :: pointer to control structure of the tracer flow control module

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diabatic\_driver\_init() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diabatic\_driver\_init()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diabatic\_driver\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{useALEalgorithm}, \emph{diag}, \emph{ADp}, \emph{CDp}, \emph{CS}, \emph{tracer\_flow\_CSp}, \emph{sponge\_CSp}, \emph{ALE\_sponge\_CSp}}{}
This routine initializes the diabatic driver module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} model grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} model vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} file to parse for parameter values

\item {} 
\sphinxstylestrong{usealealgorithm} :: {[}in{]} logical for whether to use ALE remapping

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} structure to regulate diagnostic output

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} pointers to accelerations in momentum equations, to enable diagnostics, like energy budgets

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} pointers to terms in continuity equations

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{tracer\_flow\_csp} :: pointer to control structure of the tracer flow control module

\item {} 
\sphinxstylestrong{sponge\_csp} :: pointer to the sponge module control structure

\item {} 
\sphinxstylestrong{ale\_sponge\_csp} :: pointer to the ALE sponge module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff::cvmix\_ddiff\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_shear::cvmix\_shear\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_geothermal::geothermal\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_thickness_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::get\_thickness\_units}}}}} \sphinxcode{\sphinxupquote{id\_clock\_differential\_diff}} \sphinxcode{\sphinxupquote{id\_clock\_entrain}} \sphinxcode{\sphinxupquote{id\_clock\_geothermal}} \sphinxcode{\sphinxupquote{id\_clock\_kpp}} \sphinxcode{\sphinxupquote{id\_clock\_mixedlayer}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_remap}} \sphinxcode{\sphinxupquote{id\_clock\_set\_diffusivity}} \sphinxcode{\sphinxupquote{id\_clock\_sponge}} \sphinxcode{\sphinxupquote{id\_clock\_tracers}} \sphinxcode{\sphinxupquote{id\_clock\_tridiag}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::internal\_tides\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_layers\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diabatic\_driver\_end() (fortran subroutine in module mom\_diabatic\_driver)@\spxentry{diabatic\_driver\_end()}\spxextra{fortran subroutine in module mom\_diabatic\_driver}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diabatic\_driver/}}\sphinxbfcode{\sphinxupquote{diabatic\_driver\_end}}}{\emph{CS}}{}
Routine to close the diabatic driver module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv::cvmix\_conv\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::entrain\_diffusive\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diag\_manager\_wrapper module reference}
\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:f/mom_diag_manager_wrapper}}\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:mom-diag-manager-wrapper-module-reference}}\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper::doc}}\index{mom\_diag\_manager\_wrapper (module)@\spxentry{mom\_diag\_manager\_wrapper}\spxextra{module}|spxpagem}
A simple (very thin) wrapper for register\_diag\_field to avoid a compiler bug with PGI.

{\hyperref[\detokenize{api/generated/modules/mom_diag_manager_wrapper:detamom-diag-manager-wrapper}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diag_manager_wrapper:f/mom_diag_manager_wrapper/register_diag_field_array_fms}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_array\_fms()}}}}}
&
An integer handle for a diagnostic array returned by \sphinxcode{\sphinxupquote{register\_diag\_field()}}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_manager_wrapper:f/mom_diag_manager_wrapper/register_diag_field_scalar_fms}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_scalar\_fms()}}}}}
&
An integer handle for a diagnostic scalar array returned by \sphinxcode{\sphinxupquote{register\_diag\_field()}}
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:detailed-description}}\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:detamom-diag-manager-wrapper}}
This module simply wraps \sphinxcode{\sphinxupquote{register\_diag\_field()}} from FMS’s diag\_manager\_mod. We used to be able to import register\_diag\_field and rename it to
from FMS’s diag\_manager\_mod. We used to be able to import register\_diag\_field and rename it to \sphinxcode{\sphinxupquote{register\_diag\_field\_fms()}} with a simple “use, only : register\_diag\_field\_fms =\textgreater{} register\_diag\_field” but PGI 16.5 has a bug that refuses to compile this \sphinxhyphen{} earlier versions did work. with a simple “use, only : register\_diag\_field\_fms =\textgreater{} register\_diag\_field” but PGI 16.5 has a bug that refuses to compile this \sphinxhyphen{} earlier versions did work.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:function-subroutine-documentation}}\index{register\_diag\_field\_array\_fms() (fortran function in module mom\_diag\_manager\_wrapper)@\spxentry{register\_diag\_field\_array\_fms()}\spxextra{fortran function in module mom\_diag\_manager\_wrapper}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:f/mom_diag_manager_wrapper/register_diag_field_array_fms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_manager\_wrapper/}}\sphinxbfcode{\sphinxupquote{register\_diag\_field\_array\_fms}}}{\emph{module\_name}, \emph{field\_name}, \emph{axes}, \emph{init\_time}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{mask\_variant}, \emph{standard\_name}, \emph{verbose}, \emph{do\_not\_log}, \emph{err\_msg}, \emph{interp\_method}, \emph{tile\_count}, \emph{area}, \emph{volume}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
An integer handle for a diagnostic array returned by \sphinxcode{\sphinxupquote{register\_diag\_field()}}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time at which a field is first available?

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{mask\_variant} :: {[}in{]} If true a logical mask must be provided with post\_data calls (not used in MOM?)

\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, FMS is verbose (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} String into which an error message might be placed (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{tile\_count} :: {[}in{]} no clue (not used in MOM?)

\item {} 
\sphinxstylestrong{area} :: {[}in{]} The FMS id of cell area

\item {} 
\sphinxstylestrong{volume} :: {[}in{]} The FMS id of cell volume

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_diag\_field\_scalar\_fms() (fortran function in module mom\_diag\_manager\_wrapper)@\spxentry{register\_diag\_field\_scalar\_fms()}\spxextra{fortran function in module mom\_diag\_manager\_wrapper}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_manager_wrapper:f/mom_diag_manager_wrapper/register_diag_field_scalar_fms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_manager\_wrapper/}}\sphinxbfcode{\sphinxupquote{register\_diag\_field\_scalar\_fms}}}{\emph{module\_name}, \emph{field\_name}, \emph{init\_time}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{mask\_variant}, \emph{standard\_name}, \emph{verbose}, \emph{do\_not\_log}, \emph{err\_msg}, \emph{interp\_method}, \emph{tile\_count}, \emph{area}, \emph{volume}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
An integer handle for a diagnostic scalar array returned by \sphinxcode{\sphinxupquote{register\_diag\_field()}}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time at which a field is first available?

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{mask\_variant} :: {[}in{]} If true a logical mask must be provided with post\_data calls (not used in MOM?)

\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, FMS is verbose (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} String into which an error message might be placed (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{tile\_count} :: {[}in{]} no clue (not used in MOM?)

\item {} 
\sphinxstylestrong{area} :: {[}in{]} The FMS id of cell area (not used for scalars)

\item {} 
\sphinxstylestrong{volume} :: {[}in{]} The FMS id of cell volume (not used for scalars)

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diag\_mediator module reference}
\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator}}\label{\detokenize{api/generated/modules/mom_diag_mediator:mom-diag-mediator-module-reference}}\label{\detokenize{api/generated/modules/mom_diag_mediator::doc}}\index{mom\_diag\_mediator (module)@\spxentry{mom\_diag\_mediator}\spxextra{module}|spxpagem}
The subroutines here provide convenient wrappers to the fms diag\_manager interfaces with additional diagnostic capabilies.

{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:detamom-diag-mediator}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_diag_mediator:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/axes_grp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grp}}}}}
&
A group of 1D axes that comprise a 1D/2D/3D mesh.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_ctrl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_ctrl}}}}}
&
The following data type a list of diagnostic fields an their variants, as well as variables that control the handling of model output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_dsamp}}}}}
&
Contained for down sampled masks.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_grid\_storage}}}}}
&
Stores all the remapping grids and the model’s native space thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grids_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_grids\_type}}}}}
&
Contains an array to store a diagnostic target grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type}}}}}
&
This type is used to represent a diagnostic at the diag\_mediator level.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diagcs_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagcs\_dsamp}}}}}
&
Container for down sampling information.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diag_mediator:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info()}}}}}
&
Sets up diagnostics axes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info\_dsamp()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_masks\_for\_axes()}}}}}
&
set\_masks\_for\_axes sets up the 2d and 3d masks for diagnostics using the current grid recorded after calling \sphinxcode{\sphinxupquote{diag\_update\_remap\_grids()}}
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_masks\_for\_axes\_dsamp()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_register_area_ids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_register\_area\_ids()}}}}}
&
Attaches the id of cell areas to axes groups for use with cell\_measures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_cell_measure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_cell\_measure()}}}}}
&
Sets a handle inside diagnostics mediator to associate 3d cell measures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_associate_volume_cell_measure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_associate\_volume\_cell\_measure()}}}}}
&
Attaches the id of cell volumes to axes groups for use with cell\_measures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_get_volume_cell_measure_dm_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_get\_volume\_cell\_measure\_dm\_id()}}}}}
&
Returns diag\_manager id for cell measure of h\sphinxhyphen{}cells.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_axes\_group()}}}}}
&
Defines a group of “axes” from list of handles.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_axes\_group\_dsamp()}}}}}
&
Defines a group of downsampled “axes” from list of handles.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_diag_mediator_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diag\_mediator\_grid()}}}}}
&
Set up the array extents for doing diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_0d()}}}}}
&
Make a real scalar diagnostic available for averaging or output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_1d_k}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_1d\_k()}}}}}
&
Make a real 1\sphinxhyphen{}d array diagnostic available for averaging or output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_2d()}}}}}
&
Make a real 2\sphinxhyphen{}d array diagnostic available for averaging or output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_2d\_low()}}}}}
&
Make a real 2\sphinxhyphen{}d array diagnostic available for averaging or output using a {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} instead of an integer id.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_3d()}}}}}
&
Make a real 3\sphinxhyphen{}d array diagnostic available for averaging or output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_3d\_low()}}}}}
&
Make a real 3\sphinxhyphen{}d array diagnostic available for averaging or output using a {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} instead of an integer id.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_xy_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_xy\_average()}}}}}
&
Post the horizontally area\sphinxhyphen{}averaged diagnostic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{enable\_averaging()}}}}}
&
This subroutine enables the accumulation of time averages over the specified time interval.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{enable\_averages()}}}}}
&
Enable the accumulation of time averages over the specified time interval in time units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{disable\_averaging()}}}}}
&
Call this subroutine to avoid averaging any offered fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/query_averaging_enabled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_averaging\_enabled()}}}}}
&
Call this subroutine to determine whether the averaging is currently enabled.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_diag_time_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_diag\_time\_end()}}}}}
&
This function returns the valid end time for use with diagnostics that are handled outside of the MOM6 diagnostics infrastructure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field()}}}}}
&
Returns the “diag\_mediator” handle for a group (native, CMOR, z\sphinxhyphen{}coord, …) of diagnostics derived from one field.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor()}}}}}
&
Returns True if either the native or CMOr version of the diagnostic were registered.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_axes()}}}}}
&
Returns an FMS id from register\_diag\_field\_fms (the diag\_manager routine) after expanding axes (axes\sphinxhyphen{}group) into handles and conditionally adding an FMS area\_id for cell\_measures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_diag_to_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_diag\_to\_list()}}}}}
&
Create a diagnostic type and attached to list.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_xyz_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_xyz\_method()}}}}}
&
Adds the encoded “cell\_methods” for a diagnostics as a diag\% property This allows access to the cell\_method for a given diagnostics at the time of sending.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/attach_cell_methods}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{attach\_cell\_methods()}}}}}
&
Attaches “cell\_methods” attribute to a variable based on defaults for {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/axes_grp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grp()}}}}} or optional arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_scalar\_field()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_static\_field()}}}}}
&
Registers a static diagnostic, returning an integer handle.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/describe_option}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{describe\_option()}}}}}
&
Describe an option setting in the diagnostic files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/ocean_register_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_register\_diag()}}}}}
&
Registers a diagnostic using the information encapsulated in the vardesc type argument and returns an integer handle to this diagostic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_infrastructure_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_mediator\_infrastructure\_init()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_mediator\_init()}}}}}
&
diag\_mediator\_init initializes the MOM diag\_mediator and opens the available diagnostics file, if appropriate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_set_state_ptrs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_set\_state\_ptrs()}}}}}
&
Set pointers to the default state fields used to remap diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_update\_remap\_grids()}}}}}
&
Build/update vertical grids for diagnostic remapping.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_masks_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_masks\_set()}}}}}
&
Sets up the 2d and 3d masks for native diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_close_registration}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_mediator\_close\_registration()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_mediator\_end()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/i2s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{i2s()}}}}}
&
Convert the first n elements (up to 3) of an integer array to an underscore delimited string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_new\_diag\_id()}}}}}
&
Returns a new diagnostic id, it may be necessary to expand the diagnostics array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/initialize_diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_diag\_type()}}}}}
&
Initializes a {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} (used after allocating new memory)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/alloc_diag_with_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alloc\_diag\_with\_id()}}}}}
&
Make a new diagnostic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_available_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_available\_diag()}}}}}
&
Log a diagnostic to the available diagnostics file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_chksum_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_chksum\_diag()}}}}}
&
Log the diagnostic chksum to the chksum diag file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_grid\_storage\_init()}}}}}
&
Allocates fields necessary to store diagnostic remapping fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_diag_to_storage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_copy\_diag\_to\_storage()}}}}}
&
Copy from the main diagnostic arrays to the grid storage as well as the native thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_storage_to_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_copy\_storage\_to\_diag()}}}}}
&
Copy from the stored diagnostic arrays to the main diagnostic grids.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_save_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_save\_grids()}}}}}
&
Save the current diagnostic grids in the temporary structure within diag.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_restore_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_restore\_grids()}}}}}
&
Restore the diagnostic grids from the temporary structure within diag.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_grid\_storage\_end()}}}}}
&
Deallocates the fields in the remapping fields container.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_masks_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_masks\_set()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_indices_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_indices\_get()}}}}}
&
Get the diagnostics\sphinxhyphen{}compute indices (to be passed to send\_data) based on the shape of the diag field (the same way they are deduced for non\sphinxhyphen{}downsampled fields)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_field\_3d()}}}}}
&
This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics\sphinxhyphen{}compurte indices for the downsampled array 3d interface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_field\_2d()}}}}}
&
This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics\sphinxhyphen{}compurte indices for the downsampled array 2d interface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_field\_3d()}}}}}
&
This subroutine allocates and computes a down sampled 3d array given an input array The down sample method is based on the “cell\_methods” for the diagnostics as explained in the above table.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_field\_2d()}}}}}
&
This subroutine allocates and computes a down sampled 2d array given an input array The down sample method is based on the “cell\_methods” for the diagnostics as explained in the above table.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_mask_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_mask\_2d()}}}}}
&
Allocate and compute the 2d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub\sphinxhyphen{}cells are open, otherwise it’s closed (0)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_mask_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_mask\_3d()}}}}}
&
Allocate and compute the 3d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub\sphinxhyphen{}cells are open, otherwise it’s closed (0)
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diag_mediator:detailed-description}}\label{\detokenize{api/generated/modules/mom_diag_mediator:detamom-diag-mediator}}
The subroutines here provide convenient wrappers to the fms diag\_manager interfaces with additional diagnostic capabilies.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_diag_mediator:type-documentation}}\index{axes\_grp (fortran type in module mom\_diag\_mediator)@\spxentry{axes\_grp}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/axes_grp}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{axes\_grp}}}
A group of 1D axes that comprise a 1D/2D/3D mesh.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=15)}\sphinxstyleemphasis{{]}} :: The id string for this particular combination of handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rank}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of dimensions in the list of axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{handles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Handles to 1D axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diag\_ctrl )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Circular link back to the main diagnostics control structure (Used to avoid passing said structure into every possible call).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_cell\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=9)}\sphinxstyleemphasis{{]}} :: Default nature of data representation, if axes group includes x\sphinxhyphen{}direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y\_cell\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=9)}\sphinxstyleemphasis{{]}} :: Default nature of data representation, if axes group includes y\sphinxhyphen{}direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_cell\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=9)}\sphinxstyleemphasis{{]}} :: Default nature of data representation, if axes group includes vertical direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Vertical dimension of diagnostic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertical\_coordinate\_number}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Index of the corresponding diag\_remap\_ctrl for this axis group.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_h\_point}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for an h\sphinxhyphen{}point located field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_q\_point}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a q\sphinxhyphen{}point located field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_u\_point}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a u\sphinxhyphen{}point located field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_v\_point}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a v\sphinxhyphen{}point located field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_layer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a layer vertically\sphinxhyphen{}located field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_interface}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for an interface vertically\sphinxhyphen{}located field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_native}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a native model grid. False for any other grid. Used for rank\textgreater{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{needs\_remapping}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a intensive layer\sphinxhyphen{}located field that must be remapped to these axes. Used for rank\textgreater{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{needs\_interpolating}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, indicates that this axes group is for a sampled interface\sphinxhyphen{}located field that must be interpolated to these axes. Used for rank\textgreater{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{downsample\_level}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: If greater than 1, the factor by which this diagnostic/axes/masks be downsampled.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{xyave\_axes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The associated 1d axes for horizontall area\sphinxhyphen{}averaged diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_area}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The diag\_manager id for area to be used for cell\_measure of variables with this

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_volume}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The diag\_manager id for volume to be used for cell\_measure of variables with this

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Mask for 2d (x\sphinxhyphen{}y) axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Mask for 3d axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dsamp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diag\_dsamp )(2:2)}\sphinxstyleemphasis{{]}} :: Downsample container.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_ctrl (fortran type in module mom\_diag\_mediator)@\spxentry{diag\_ctrl}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_ctrl}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_ctrl}}}
The following data type a list of diagnostic fields an their variants, as well as variables that control the handling of model output.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axestl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescul}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescvl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesbi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesti}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescui}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescvi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesb1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axest1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescu1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescv1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: The following are 3D and 2D axis groups defined for output. The names indicate the horizontal (B, T, Cu, or Cv) and vertical (L, i, or 1) locations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dtl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcul}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcvl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dti}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dbi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcui}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcvi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dsamp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diagcs\_dsamp )(2:max\_dsamp\_lev)}\sphinxstyleemphasis{{]}} :: Downsample control container.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axestl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axesbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescul}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescvl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axesti}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axesbi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescui}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescvi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Axes used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{available\_diag\_doc\_unit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number of a diagnostic documentation file. This file is open if available\_diag\_doc\_unit is \textgreater{} 0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{chksum\_iounit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number of a diagnostic documentation file. This file is open if available\_diag\_doc\_unit is \textgreater{} 0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_as\_chksum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, log chksums in a text file instead of posting diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grid\_space\_axes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, diagnostic horizontal coordinates axes are in grid space.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ie}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{js}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{je}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_int}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time interval for any fields that are offered for averaging {[}s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_end}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The end time of the valid interval for any offered field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ave\_enabled}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if averaging is enabled.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axeszi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: A 1\sphinxhyphen{}D z\sphinxhyphen{}space axis at interfaces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axeszl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: A 1\sphinxhyphen{}D z\sphinxhyphen{}space axis at layer centers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesnull}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{{]}} :: An axis group for scalars.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 2D mask array for cell\sphinxhyphen{}center points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 2D mask array for cell\sphinxhyphen{}corner points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dcu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 2D mask array for east\sphinxhyphen{}face points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: 2D mask array for north\sphinxhyphen{}face points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diags}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diag\_type )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The list of diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{next\_free\_diag\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The next unused diagnostic ID.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{missing\_value}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: default missing value to be sent to ALL diagnostics registrations

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_diag\_coords}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of diagnostic vertical coordinates (remapped)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_remap\_ctrl)(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Control structure for each possible coordinate.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_grid\_temp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diag\_grid\_storage )}\sphinxstyleemphasis{{]}} :: Stores the remapped diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_grid\_overridden}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the diagnostic grids have been overriden.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axeszl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The 1\sphinxhyphen{}D z\sphinxhyphen{}space cell\sphinxhyphen{}centered axis for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axeszi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The 1\sphinxhyphen{}D z\sphinxhyphen{}space interface axis for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The thicknesses needed for remapping {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The temperatures needed for remapping {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The salinities needed for remapping {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eqn\_of\_state}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(eos\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The equation of state type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The ocean grid type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(verticalgrid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The model’s vertical ocean grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A dimensional unit scaling type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{volume\_cell\_measure\_dm\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The volume cell measure (special diagnostic) manager id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_chksum\_diags}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of checksum\sphinxhyphen{}only diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_begin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Layer thicknesses at the beginning of the timestep used for remapping of extensive variables.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_dsamp (fortran type in module mom\_diag\_mediator)@\spxentry{diag\_dsamp}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_dsamp}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_dsamp}}}
Contained for down sampled masks.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Mask for 2d (x\sphinxhyphen{}y) axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Mask for 3d axes.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_grid\_storage (fortran type in module mom\_diag\_mediator)@\spxentry{diag\_grid\_storage}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_grid\_storage}}}
Stores all the remapping grids and the model’s native space thicknesses.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_diag\_coords}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of target coordinates.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_state}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Layer thicknesses in native space {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_grids}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diag\_grids\_type )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Primarily empty, except h field.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_grids\_type (fortran type in module mom\_diag\_mediator)@\spxentry{diag\_grids\_type}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grids_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_grids\_type}}}
Contains an array to store a diagnostic target grid.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Target grid for remapped coordinate.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_type (fortran type in module mom\_diag\_mediator)@\spxentry{diag\_type}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_type}}}
This type is used to represent a diagnostic at the diag\_mediator level.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{in\_use}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True if this entry is being used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fms\_diag\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Underlying FMS diag\_manager id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fms\_xyave\_diag\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: For a horizontally area\sphinxhyphen{}averaged diagnostic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{downsample\_diag\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: For a horizontally area\sphinxhyphen{}downsampled diagnostic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug\_str}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (64)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: For FATAL errors and debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The axis group for this diagnostic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{next}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( diag\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Pointer to the next diagnostic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{conversion\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: A factor to multiply data by before posting to FMS, if non\sphinxhyphen{}zero.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_extensive}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True for vertically extensive fields (vertically integrated). False for intensive (concentrations).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{xyz\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: A 3 digit integer encoding the diagnostics cell method It can be used to determine the downsample algorithm.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagcs\_dsamp (fortran type in module mom\_diag\_mediator)@\spxentry{diagcs\_dsamp}\spxextra{fortran type in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diagcs_dsamp}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diagcs\_dsamp}}}
Container for down sampling information.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axestl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescul}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescvl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesbi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesti}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescui}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescvi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axesb1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axest1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescu1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axescv1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axestl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axesbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescul}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescvl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axesti}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axesbi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescui}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_axescvi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( axes\_grp )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Axes for each location on a diagnostic grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dtl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcul}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcvl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dti}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dbi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcui}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask3dcvi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 3D mask arrays for diagnostics at layers (mask…L) and interfaces (mask…i)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell corners within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell corners within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell corners within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell corners within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 2D mask array for cell\sphinxhyphen{}center points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 2D mask array for cell\sphinxhyphen{}corner points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dcu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 2D mask array for east\sphinxhyphen{}face points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: 2D mask array for north\sphinxhyphen{}face points

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diag_mediator:function-subroutine-documentation}}\index{set\_axes\_info() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{set\_axes\_info()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{set\_axes\_info}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag\_cs}, \emph{set\_vertical}}{}
Sets up diagnostics axes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{set\_vertical} :: {[}in{]} If true or missing, set up vertical axes

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_axes\_group}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_grid\_storage\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info\_dsamp}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_axes\_info\_dsamp() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{set\_axes\_info\_dsamp()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info_dsamp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{set\_axes\_info\_dsamp}}}{\emph{G}, \emph{GV}, \emph{param\_file}, \emph{diag\_cs}, \emph{id\_zl\_native}, \emph{id\_zi\_native}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{id\_zl\_native} :: {[}in{]} ID of native layers

\item {} 
\sphinxstylestrong{id\_zi\_native} :: {[}in{]} ID of native interfaces

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_axes\_group\_dsamp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_masks\_for\_axes() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{set\_masks\_for\_axes()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{set\_masks\_for\_axes}}}{\emph{G}, \emph{diag\_cs}}{}
set\_masks\_for\_axes sets up the 2d and 3d masks for diagnostics using the current grid recorded after calling \sphinxcode{\sphinxupquote{diag\_update\_remap\_grids()}}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean grid type.

\item {} 
\sphinxstylestrong{diag\_cs} :: A pointer to a type with many variables used for diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_masks\_for\_axes\_dsamp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_masks\_for\_axes\_dsamp() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{set\_masks\_for\_axes\_dsamp()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes_dsamp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{set\_masks\_for\_axes\_dsamp}}}{\emph{G}, \emph{diag\_cs}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean grid type.

\item {} 
\sphinxstylestrong{diag\_cs} :: A pointer to a type with many variables used for diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_masks\_for\_axes}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_register\_area\_ids() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_register\_area\_ids()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_register_area_ids}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_register\_area\_ids}}}{\emph{diag\_cs}, \emph{id\_area\_t}, \emph{id\_area\_q}}{}
Attaches the id of cell areas to axes groups for use with cell\_measures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{id\_area\_t} :: {[}in{]} Diag\_mediator id for area of h\sphinxhyphen{}cells

\item {} 
\sphinxstylestrong{id\_area\_q} :: {[}in{]} Diag\_mediator id for area of q\sphinxhyphen{}cells

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_cell\_measure() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{register\_cell\_measure()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_cell_measure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{register\_cell\_measure}}}{\emph{G}, \emph{diag}, \emph{Time}}{}
Sets a handle inside diagnostics mediator to associate 3d cell measures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Regulates diagnostic output

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_associate_volume_cell_measure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_associate\_volume\_cell\_measure}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_associate\_volume\_cell\_measure() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_associate\_volume\_cell\_measure()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_associate_volume_cell_measure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_associate\_volume\_cell\_measure}}}{\emph{diag\_cs}, \emph{id\_h\_volume}}{}
Attaches the id of cell volumes to axes groups for use with cell\_measures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{id\_h\_volume} :: {[}in{]} Diag\_manager id for volume of h\sphinxhyphen{}cells

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_cell_measure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_cell\_measure}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_get\_volume\_cell\_measure\_dm\_id() (fortran function in module mom\_diag\_mediator)@\spxentry{diag\_get\_volume\_cell\_measure\_dm\_id()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_get_volume_cell_measure_dm_id}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_get\_volume\_cell\_measure\_dm\_id}}}{\emph{diag\_cs}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Returns diag\_manager id for cell measure of h\sphinxhyphen{}cells.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag\_cs} :: {[}in{]} Diagnostics control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{define\_axes\_group() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{define\_axes\_group()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{define\_axes\_group}}}{\emph{diag\_cs}, \emph{handles}, \emph{axes}, \emph{nz}, \emph{vertical\_coordinate\_number}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{v\_cell\_method}, \emph{is\_h\_point}, \emph{is\_q\_point}, \emph{is\_u\_point}, \emph{is\_v\_point}, \emph{is\_layer}, \emph{is\_interface}, \emph{is\_native}, \emph{needs\_remapping}, \emph{needs\_interpolating}, \emph{xyave\_axes}}{}
Defines a group of “axes” from list of handles.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{handles} :: {[}in{]} A list of 1D axis handles

\item {} 
\sphinxstylestrong{axes} :: {[}out{]} The group of 1D axes

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of layers in this diagnostic grid

\item {} 
\sphinxstylestrong{vertical\_coordinate\_number} :: {[}in{]} Index number for vertical coordinate

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} A x\sphinxhyphen{}direction cell method used to construct the “cell\_methods” attribute in CF convention

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} A y\sphinxhyphen{}direction cell method used to construct the “cell\_methods” attribute in CF convention

\item {} 
\sphinxstylestrong{v\_cell\_method} :: {[}in{]} A vertical direction cell method used to construct the “cell\_methods” attribute in CF convention

\item {} 
\sphinxstylestrong{is\_h\_point} :: {[}in{]} If true, indicates this axes group for h\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_q\_point} :: {[}in{]} If true, indicates this axes group for q\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_u\_point} :: {[}in{]} If true, indicates this axes group for u\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_v\_point} :: {[}in{]} If true, indicates this axes group for v\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_layer} :: {[}in{]} If true, indicates that this axes group is for a layer vertically\sphinxhyphen{}located field.

\item {} 
\sphinxstylestrong{is\_interface} :: {[}in{]} If true, indicates that this axes group is for an interface vertically\sphinxhyphen{}located field.

\item {} 
\sphinxstylestrong{is\_native} :: {[}in{]} If true, indicates that this axes group is for a native model grid. False for any other grid.

\item {} 
\sphinxstylestrong{needs\_remapping} :: {[}in{]} If true, indicates that this axes group is for a intensive layer\sphinxhyphen{}located field that must be remapped to these axes. Used for rank\textgreater{}2.

\item {} 
\sphinxstylestrong{needs\_interpolating} :: {[}in{]} If true, indicates that this axes group is for a sampled interface\sphinxhyphen{}located field that must be interpolated to these axes. Used for rank\textgreater{}2.

\item {} 
\sphinxstylestrong{xyave\_axes} :: The corresponding axes group for horizontally area\sphinxhyphen{}average diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/i2s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{i2s}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::internal\_tides\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{define\_axes\_group\_dsamp() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{define\_axes\_group\_dsamp()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group_dsamp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{define\_axes\_group\_dsamp}}}{\emph{diag\_cs}, \emph{handles}, \emph{axes}, \emph{dl}, \emph{nz}, \emph{vertical\_coordinate\_number}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{v\_cell\_method}, \emph{is\_h\_point}, \emph{is\_q\_point}, \emph{is\_u\_point}, \emph{is\_v\_point}, \emph{is\_layer}, \emph{is\_interface}, \emph{is\_native}, \emph{needs\_remapping}, \emph{needs\_interpolating}, \emph{xyave\_axes}}{}
Defines a group of downsampled “axes” from list of handles.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{handles} :: {[}in{]} A list of 1D axis handles

\item {} 
\sphinxstylestrong{axes} :: {[}out{]} The group of 1D axes

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Downsample level

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of layers in this diagnostic grid

\item {} 
\sphinxstylestrong{vertical\_coordinate\_number} :: {[}in{]} Index number for vertical coordinate

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} A x\sphinxhyphen{}direction cell method used to construct the “cell\_methods” attribute in CF convention

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} A y\sphinxhyphen{}direction cell method used to construct the “cell\_methods” attribute in CF convention

\item {} 
\sphinxstylestrong{v\_cell\_method} :: {[}in{]} A vertical direction cell method used to construct the “cell\_methods” attribute in CF convention

\item {} 
\sphinxstylestrong{is\_h\_point} :: {[}in{]} If true, indicates this axes group for h\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_q\_point} :: {[}in{]} If true, indicates this axes group for q\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_u\_point} :: {[}in{]} If true, indicates this axes group for u\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_v\_point} :: {[}in{]} If true, indicates this axes group for v\sphinxhyphen{}point located fields

\item {} 
\sphinxstylestrong{is\_layer} :: {[}in{]} If true, indicates that this axes group is for a layer vertically\sphinxhyphen{}located field.

\item {} 
\sphinxstylestrong{is\_interface} :: {[}in{]} If true, indicates that this axes group is for an interface vertically\sphinxhyphen{}located field.

\item {} 
\sphinxstylestrong{is\_native} :: {[}in{]} If true, indicates that this axes group is for a native model grid. False for any other grid.

\item {} 
\sphinxstylestrong{needs\_remapping} :: {[}in{]} If true, indicates that this axes group is for a intensive layer\sphinxhyphen{}located field that must be remapped to these axes. Used for rank\textgreater{}2.

\item {} 
\sphinxstylestrong{needs\_interpolating} :: {[}in{]} If true, indicates that this axes group is for a sampled interface\sphinxhyphen{}located field that must be interpolated to these axes. Used for rank\textgreater{}2.

\item {} 
\sphinxstylestrong{xyave\_axes} :: The corresponding axes group for horizontally area\sphinxhyphen{}average diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/i2s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{i2s}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info\_dsamp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_diag\_mediator\_grid() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{set\_diag\_mediator\_grid()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_diag_mediator_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{set\_diag\_mediator\_grid}}}{\emph{G}, \emph{diag\_cs}}{}
Set up the array extents for doing diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Structure used to regulate diagnostic output

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_data\_0d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_data\_0d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_data\_0d}}}{\emph{diag\_field\_id}, \emph{field}, \emph{diag\_cs}, \emph{is\_static}}{}
Make a real scalar diagnostic available for averaging or output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_field\_id} :: {[}in{]} The id for an output variable returned by a previous call to register\_diag\_field.

\item {} 
\sphinxstylestrong{field} :: {[}in{]} real value being offered for output or averaging

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{is\_static} :: {[}in{]} If true, this is a static field that is always offered.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_mediator}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_data\_1d\_k() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_data\_1d\_k()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_1d_k}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_data\_1d\_k}}}{\emph{diag\_field\_id}, \emph{field}, \emph{diag\_cs}, \emph{is\_static}}{}
Make a real 1\sphinxhyphen{}d array diagnostic available for averaging or output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_field\_id} :: {[}in{]} The id for an output variable returned by a previous call to register\_diag\_field.

\item {} 
\sphinxstylestrong{field} :: {[}in{]} 1\sphinxhyphen{}d array being offered for output or averaging

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{is\_static} :: {[}in{]} If true, this is a static field that is always offered.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_mediator}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_data\_2d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_data\_2d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_data\_2d}}}{\emph{diag\_field\_id}, \emph{field}, \emph{diag\_cs}, \emph{is\_static}, \emph{mask}}{}
Make a real 2\sphinxhyphen{}d array diagnostic available for averaging or output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_field\_id} :: {[}in{]} The id for an output variable returned by a previous call to register\_diag\_field.

\item {} 
\sphinxstylestrong{field} :: {[}in{]} 2\sphinxhyphen{}d array being offered for output or averaging

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{is\_static} :: {[}in{]} If true, this is a static field that is always offered.

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} If present, use this real array as the data mask.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_mediator}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_2d\_low}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_data\_2d\_low() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_data\_2d\_low()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d_low}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_data\_2d\_low}}}{\emph{diag}, \emph{field}, \emph{diag\_cs}, \emph{is\_static}, \emph{mask}}{}
Make a real 2\sphinxhyphen{}d array diagnostic available for averaging or output using a {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} instead of an integer id.
instead of an integer id.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure describing the diagnostic to post

\item {} 
\sphinxstylestrong{field} :: {[}in{]} 2\sphinxhyphen{}d array being offered for output or averaging

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{is\_static} :: {[}in{]} If true, this is a static field that is always offered.

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} If present, use this real array as the data mask.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_field\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{msk}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_data\_3d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_data\_3d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_data\_3d}}}{\emph{diag\_field\_id}, \emph{field}, \emph{diag\_cs}, \emph{is\_static}, \emph{mask}, \emph{alt\_h}}{}
Make a real 3\sphinxhyphen{}d array diagnostic available for averaging or output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_field\_id} :: {[}in{]} The id for an output variable returned by a previous call to register\_diag\_field.

\item {} 
\sphinxstylestrong{field} :: {[}in{]} 3\sphinxhyphen{}d array being offered for output or averaging

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{is\_static} :: {[}in{]} If true, this is a static field that is always offered.

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} If present, use this real array as the data mask.

\item {} 
\sphinxstylestrong{alt\_h} :: {[}in{]} An alternate thickness to use for vertically

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_mediator}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_remap}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_3d\_low}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_data\_3d\_low() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_data\_3d\_low()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_data\_3d\_low}}}{\emph{diag}, \emph{field}, \emph{diag\_cs}, \emph{is\_static}, \emph{mask}}{}
Make a real 3\sphinxhyphen{}d array diagnostic available for averaging or output using a {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} instead of an integer id.
instead of an integer id.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure describing the diagnostic to post

\item {} 
\sphinxstylestrong{field} :: {[}in{]} 3\sphinxhyphen{}d array being offered for output or averaging

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{is\_static} :: {[}in{]} If true, this is a static field that is always offered.

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} If present, use this real array as the data mask.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_field\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{msk}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_xy_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_xy\_average}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_xy\_average() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{post\_xy\_average()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_xy_average}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{post\_xy\_average}}}{\emph{diag\_cs}, \emph{diag}, \emph{field}}{}
Post the horizontally area\sphinxhyphen{}averaged diagnostic.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag} :: {[}in{]} This diagnostic

\item {} 
\sphinxstylestrong{field} :: {[}in{]} Diagnostic field

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Diagnostics mediator control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/horizontally_average_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::horizontally\_average\_diag\_field}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_3d\_low}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{enable\_averaging() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{enable\_averaging()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averaging}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{enable\_averaging}}}{\emph{time\_int\_in}, \emph{time\_end\_in}, \emph{diag\_cs}}{}
This subroutine enables the accumulation of time averages over the specified time interval.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time\_int\_in} :: {[}in{]} The time interval {[}s{]} over which any values that are offered are valid.

\item {} 
\sphinxstylestrong{time\_end\_in} :: {[}in{]} The end time of the valid interval

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Structure used to regulate diagnostic output

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::mech\_forcing\_diags}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::shelf\_calc\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{enable\_averages() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{enable\_averages()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averages}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{enable\_averages}}}{\emph{time\_int}, \emph{time\_end}, \emph{diag\_CS}, \emph{T\_to\_s}}{}
Enable the accumulation of time averages over the specified time interval in time units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time\_int} :: {[}in{]} The time interval over which any values that are offered are valid {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} The end time of the valid interval.

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} A structure that is used to regulate diagnostic output

\item {} 
\sphinxstylestrong{t\_to\_s} :: {[}in{]} A conversion factor for time\_int to {[}s{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::forcing\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::solo\_step\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{disable\_averaging() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{disable\_averaging()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{disable\_averaging}}}{\emph{diag\_cs}}{}
Call this subroutine to avoid averaging any offered fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Structure used to regulate diagnostic output

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::forcing\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::mech\_forcing\_diags}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::shelf\_calc\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::solo\_step\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_averaging\_enabled() (fortran function in module mom\_diag\_mediator)@\spxentry{query\_averaging\_enabled()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/query_averaging_enabled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{query\_averaging\_enabled}}}{\emph{diag\_cs}, \emph{time\_int}, \emph{time\_end}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Call this subroutine to determine whether the averaging is currently enabled. .true. is returned if it is.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{time\_int} :: {[}out{]} Current setting of diagtime\_int {[}s{]}

\item {} 
\sphinxstylestrong{time\_end} :: {[}out{]} Current setting of diagtime\_end

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_resoln_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_resoln\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_slope\_functions}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_visbeck_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_visbeck\_coeffs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/set_opacity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::set\_opacity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_diag\_time\_end() (fortran function in module mom\_diag\_mediator)@\spxentry{get\_diag\_time\_end()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_diag_time_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{get\_diag\_time\_end}}}{\emph{diag\_cs}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}}}
This function returns the valid end time for use with diagnostics that are handled outside of the MOM6 diagnostics infrastructure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_surface\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_diag\_field() (fortran function in module mom\_diag\_mediator)@\spxentry{register\_diag\_field()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{register\_diag\_field}}}{\emph{module\_name}, \emph{field\_name}, \emph{axes\_in}, \emph{init\_time}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{mask\_variant}, \emph{standard\_name}, \emph{verbose}, \emph{do\_not\_log}, \emph{err\_msg}, \emph{interp\_method}, \emph{tile\_count}, \emph{cmor\_field\_name}, \emph{cmor\_long\_name}, \emph{cmor\_units}, \emph{cmor\_standard\_name}, \emph{cell\_methods}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{v\_cell\_method}, \emph{conversion}, \emph{v\_extensive}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Returns the “diag\_mediator” handle for a group (native, CMOR, z\sphinxhyphen{}coord, …) of diagnostics derived from one field.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{axes\_in} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time at which a field is first available?

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{mask\_variant} :: {[}in{]} If true a logical mask must be provided with \sphinxcode{\sphinxupquote{post\_data()}} calls (not used in MOM?)calls (not used in MOM?)

\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, FMS is verbose (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} String into which an error message might be placed (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{tile\_count} :: {[}in{]} no clue (not used in MOM?)

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}in{]} CMOR name of a field

\item {} 
\sphinxstylestrong{cmor\_long\_name} :: {[}in{]} CMOR long name of a field

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR units of a field

\item {} 
\sphinxstylestrong{cmor\_standard\_name} :: {[}in{]} CMOR standardized name associated with a field

\item {} 
\sphinxstylestrong{cell\_methods} :: {[}in{]} String to append as cell\_methods attribute. Use ‘’ to have no attribute. If present, this overrides the default constructed from the default for each individual axis direction.

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} Specifies the cell method for the x\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} Specifies the cell method for the y\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{v\_cell\_method} :: {[}in{]} Specifies the cell method for the vertical direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} A value to multiply data by before writing to file

\item {} 
\sphinxstylestrong{v\_extensive} :: {[}in{]} True for vertically extensive fields (vertically integrated). Default/absent for intensive.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coriolisadv\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req::diapyc\_energy\_req\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_int\_tide\_input::int\_tide\_input\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/ocean_register_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_register\_diag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::opacity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_cell_measure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_cell\_measure}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/register_diags_offline_transport}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::register\_diags\_offline\_transport}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hor\_diff\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_diag\_field\_expand\_cmor() (fortran function in module mom\_diag\_mediator)@\spxentry{register\_diag\_field\_expand\_cmor()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}{\emph{dm\_id}, \emph{module\_name}, \emph{field\_name}, \emph{axes}, \emph{init\_time}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{mask\_variant}, \emph{standard\_name}, \emph{verbose}, \emph{do\_not\_log}, \emph{err\_msg}, \emph{interp\_method}, \emph{tile\_count}, \emph{cmor\_field\_name}, \emph{cmor\_long\_name}, \emph{cmor\_units}, \emph{cmor\_standard\_name}, \emph{cell\_methods}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{v\_cell\_method}, \emph{conversion}, \emph{v\_extensive}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns True if either the native or CMOr version of the diagnostic were registered. Updates ‘dm\_id’ after calling \sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_axes()}} for both native and CMOR variants of the field.
for both native and CMOR variants of the field.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dm\_id} :: {[}inout{]} The diag\_mediator ID for this diagnostic group

\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time at which a field is first available?

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{mask\_variant} :: {[}in{]} If true a logical mask must be provided with \sphinxcode{\sphinxupquote{post\_data()}} calls (not used in MOM?)calls (not used in MOM?)

\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, FMS is verbose (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} String into which an error message might be placed (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{tile\_count} :: {[}in{]} no clue (not used in MOM?)

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}in{]} CMOR name of a field

\item {} 
\sphinxstylestrong{cmor\_long\_name} :: {[}in{]} CMOR long name of a field

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR units of a field

\item {} 
\sphinxstylestrong{cmor\_standard\_name} :: {[}in{]} CMOR standardized name associated with a field

\item {} 
\sphinxstylestrong{cell\_methods} :: {[}in{]} String to append as cell\_methods attribute. Use ‘’ to have no attribute. If present, this overrides the default constructed from the default for each individual axis direction.

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} Specifies the cell method for the x\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} Specifies the cell method for the y\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{v\_cell\_method} :: {[}in{]} Specifies the cell method for the vertical direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} A value to multiply data by before writing to file

\item {} 
\sphinxstylestrong{v\_extensive} :: {[}in{]} True for vertically extensive fields (vertically integrated). Default/absent for intensive.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_diag_to_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_diag\_to\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_xyz_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_xyz\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/attach_cell_methods}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{attach\_cell\_methods}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_available_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_available\_diag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_axes}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_diag\_field\_expand\_axes() (fortran function in module mom\_diag\_mediator)@\spxentry{register\_diag\_field\_expand\_axes()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{register\_diag\_field\_expand\_axes}}}{\emph{module\_name}, \emph{field\_name}, \emph{axes}, \emph{init\_time}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{mask\_variant}, \emph{standard\_name}, \emph{verbose}, \emph{do\_not\_log}, \emph{err\_msg}, \emph{interp\_method}, \emph{tile\_count}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Returns an FMS id from register\_diag\_field\_fms (the diag\_manager routine) after expanding axes (axes\sphinxhyphen{}group) into handles and conditionally adding an FMS area\_id for cell\_measures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time at which a field is first available?

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{mask\_variant} :: {[}in{]} If true a logical mask must be provided with \sphinxcode{\sphinxupquote{post\_data()}} calls (not used in MOM?)calls (not used in MOM?)

\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, FMS is verbose (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} String into which an error message might be placed (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{tile\_count} :: {[}in{]} no clue (not used in MOM?)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_diag\_to\_list() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{add\_diag\_to\_list()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_diag_to_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{add\_diag\_to\_list}}}{\emph{diag\_cs}, \emph{dm\_id}, \emph{fms\_id}, \emph{this\_diag}, \emph{axes}, \emph{module\_name}, \emph{field\_name}, \emph{msg}}{}
Create a diagnostic type and attached to list.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: Diagnostics mediator control structure

\item {} 
\sphinxstylestrong{dm\_id} :: {[}inout{]} The diag\_mediator ID for this diagnostic group

\item {} 
\sphinxstylestrong{fms\_id} :: {[}in{]} The FMS diag\_manager ID for this diagnostic

\item {} 
\sphinxstylestrong{this\_diag} :: This diagnostic

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of diagnostic

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} Message for errors

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/alloc_diag_with_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alloc\_diag\_with\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_new\_diag\_id}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_xyz\_method() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{add\_xyz\_method()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_xyz_method}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{add\_xyz\_method}}}{\emph{diag}, \emph{axes}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{v\_cell\_method}, \emph{v\_extensive}}{}
Adds the encoded “cell\_methods” for a diagnostics as a diag\% property This allows access to the cell\_method for a given diagnostics at the time of sending.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag} :: This diagnostic

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} Specifies the cell method for the x\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} Specifies the cell method for the y\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{v\_cell\_method} :: {[}in{]} Specifies the cell method for the vertical direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{v\_extensive} :: {[}in{]} True for vertically extensive fields (vertically integrated). Default/absent for intensive.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{attach\_cell\_methods() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{attach\_cell\_methods()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/attach_cell_methods}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{attach\_cell\_methods}}}{\emph{id}, \emph{axes}, \emph{ostring}, \emph{cell\_methods}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{v\_cell\_method}, \emph{v\_extensive}}{}
Attaches “cell\_methods” attribute to a variable based on defaults for {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/axes_grp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grp()}}}}} or optional arguments.
or optional arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id} :: {[}in{]} Handle to diagnostic

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{ostring} :: {[}out{]} The cell\_methods strings that would appear in the file

\item {} 
\sphinxstylestrong{cell\_methods} :: {[}in{]} String to append as cell\_methods attribute. Use ‘’ to have no attribute. If present, this overrides the default constructed from the default for each individual axis direction.

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} Specifies the cell method for the x\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} Specifies the cell method for the y\sphinxhyphen{}direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{v\_cell\_method} :: {[}in{]} Specifies the cell method for the vertical direction. Use ‘’ have no method.

\item {} 
\sphinxstylestrong{v\_extensive} :: {[}in{]} True for vertically extensive fields (vertically integrated). Default/absent for intensive.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_scalar\_field() (fortran function in module mom\_diag\_mediator)@\spxentry{register\_scalar\_field()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{register\_scalar\_field}}}{\emph{module\_name}, \emph{field\_name}, \emph{init\_time}, \emph{diag\_cs}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{standard\_name}, \emph{do\_not\_log}, \emph{err\_msg}, \emph{interp\_method}, \emph{cmor\_field\_name}, \emph{cmor\_long\_name}, \emph{cmor\_units}, \emph{cmor\_standard\_name}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}~\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: An integer handle for a diagnostic array.

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{init\_time} :: {[}in{]} Time at which a field is first available?

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} String into which an error message might be placed (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}in{]} CMOR name of a field

\item {} 
\sphinxstylestrong{cmor\_long\_name} :: {[}in{]} CMOR long name of a field

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR units of a field

\item {} 
\sphinxstylestrong{cmor\_standard\_name} :: {[}in{]} CMOR standardized name associated with a field

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/alloc_diag_with_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alloc\_diag\_with\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_new\_diag\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_available_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_available\_diag}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_static\_field() (fortran function in module mom\_diag\_mediator)@\spxentry{register\_static\_field()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{register\_static\_field}}}{\emph{module\_name}, \emph{field\_name}, \emph{axes}, \emph{long\_name}, \emph{units}, \emph{missing\_value}, \emph{range}, \emph{mask\_variant}, \emph{standard\_name}, \emph{do\_not\_log}, \emph{interp\_method}, \emph{tile\_count}, \emph{cmor\_field\_name}, \emph{cmor\_long\_name}, \emph{cmor\_units}, \emph{cmor\_standard\_name}, \emph{area}, \emph{x\_cell\_method}, \emph{y\_cell\_method}, \emph{area\_cell\_method}, \emph{conversion}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Registers a static diagnostic, returning an integer handle.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: An integer handle for a diagnostic array.

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of this module, usually “ocean\_model” or “ice\_shelf\_model”

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of the diagnostic field

\item {} 
\sphinxstylestrong{axes} :: {[}in{]} Container w/ up to 3 integer handles that indicates axes for this field

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} Long name of a field.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units of a field.

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} Standardized name associated with a field

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} A value that indicates missing values.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Valid range of a variable (not used in MOM?)

\item {} 
\sphinxstylestrong{mask\_variant} :: {[}in{]} If true a logical mask must be provided with \sphinxcode{\sphinxupquote{post\_data()}} calls (not used in MOM?)calls (not used in MOM?)

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If true, do not log something (not used in MOM?)

\item {} 
\sphinxstylestrong{interp\_method} :: {[}in{]} If ‘none’ indicates the field should not be interpolated as a scalar

\item {} 
\sphinxstylestrong{tile\_count} :: {[}in{]} no clue (not used in MOM?)

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}in{]} CMOR name of a field

\item {} 
\sphinxstylestrong{cmor\_long\_name} :: {[}in{]} CMOR long name of a field

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR units of a field

\item {} 
\sphinxstylestrong{cmor\_standard\_name} :: {[}in{]} CMOR standardized name associated with a field

\item {} 
\sphinxstylestrong{area} :: {[}in{]} fms\_id for area\_t

\item {} 
\sphinxstylestrong{x\_cell\_method} :: {[}in{]} Specifies the cell method for the x\sphinxhyphen{}direction.

\item {} 
\sphinxstylestrong{y\_cell\_method} :: {[}in{]} Specifies the cell method for the y\sphinxhyphen{}direction.

\item {} 
\sphinxstylestrong{area\_cell\_method} :: {[}in{]} Specifies the cell method for area

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} A value to multiply data by before writing to file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/alloc_diag_with_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alloc\_diag\_with\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_new\_diag\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_available_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_available\_diag}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{describe\_option() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{describe\_option()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/describe_option}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{describe\_option}}}{\emph{opt\_name}, \emph{value}, \emph{diag\_CS}}{}
Describe an option setting in the diagnostic files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{opt\_name} :: {[}in{]} The name of the option

\item {} 
\sphinxstylestrong{value} :: {[}in{]} A character string with the setting of the option.

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_available_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_available\_diag}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_register\_diag() (fortran function in module mom\_diag\_mediator)@\spxentry{ocean\_register\_diag()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/ocean_register_diag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{ocean\_register\_diag}}}{\emph{var\_desc}, \emph{G}, \emph{diag\_CS}, \emph{day}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Registers a diagnostic using the information encapsulated in the vardesc type argument and returns an integer handle to this diagostic. That integer handle is negative if the diagnostic is unused.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: An integer handle to this diagnostic.

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{var\_desc} :: {[}in{]} The vardesc type describing the diagnostic

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid type

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} The diagnotic control structure

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The current model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_mediator\_infrastructure\_init() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_mediator\_infrastructure\_init()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_infrastructure_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_mediator\_infrastructure\_init}}}{\emph{err\_msg}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{err\_msg} :: {[}out{]} An error message

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_mediator\_init() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_mediator\_init()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_mediator\_init}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{nz}, \emph{param\_file}, \emph{diag\_cs}, \emph{doc\_file\_dir}}{}
diag\_mediator\_init initializes the MOM diag\_mediator and opens the available diagnostics file, if appropriate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean grid type.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} The number of layers in the model’s native grid.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} A pointer to a type with many variables used for diagnostics

\item {} 
\sphinxstylestrong{doc\_file\_dir} :: {[}in{]} A directory in which to create the file

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_diag\_grid\_updates}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_mediator}} \sphinxcode{\sphinxupquote{id\_clock\_diag\_remap}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/initialize_diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_diag\_type}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_set\_state\_ptrs() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_set\_state\_ptrs()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_set_state_ptrs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_set\_state\_ptrs}}}{\emph{h}, \emph{T}, \emph{S}, \emph{eqn\_of\_state}, \emph{diag\_cs}}{}
Set pointers to the default state fields used to remap diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h} :: {[}in{]} the model thickness array {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} the model temperature array

\item {} 
\sphinxstylestrong{s} :: {[}in{]} the model salinity array

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: {[}in{]} Equation of state structure

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} diag mediator control structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_update\_remap\_grids() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_update\_remap\_grids()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_update\_remap\_grids}}}{\emph{diag\_cs}, \emph{alt\_h}, \emph{alt\_T}, \emph{alt\_S}, \emph{update\_intensive}, \emph{update\_extensive}}{}
Build/update vertical grids for diagnostic remapping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{alt\_h} :: {[}in{]} Used if remapped grids should be something other than the current thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{alt\_t} :: {[}in{]} Used if remapped grids should be something other than the current temperatures

\item {} 
\sphinxstylestrong{alt\_s} :: {[}in{]} Used if remapped grids should be something other than the current salinity

\item {} 
\sphinxstylestrong{update\_intensive} :: {[}in{]} If true (default), update the grids used for intensive diagnostics

\item {} 
\sphinxstylestrong{update\_extensive} :: {[}in{]} If true (not default), update the grids used for intensive diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_diag\_grid\_updates}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_general}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat::mixedlayer\_restrat\_general}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse::thickness\_diffuse}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_masks\_set() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_masks\_set()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_masks_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_masks\_set}}}{\emph{G}, \emph{nz}, \emph{diag\_cs}}{}
Sets up the 2d and 3d masks for native diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean grid type.

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} The number of layers in the model’s native grid.

\item {} 
\sphinxstylestrong{diag\_cs} :: A pointer to a type with many variables used for diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_masks_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_masks\_set}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_mediator\_close\_registration() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_mediator\_close\_registration()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_close_registration}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_mediator\_close\_registration}}}{\emph{diag\_CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Structure used to regulate diagnostic output

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_mediator\_end() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_mediator\_end()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_mediator\_end}}}{\emph{time}, \emph{diag\_CS}, \emph{end\_diag\_manager}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{end\_diag\_manager} :: {[}in{]} If true, call diag\_manager\_end()

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_grid\_storage\_end}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{i2s() (fortran function in module mom\_diag\_mediator)@\spxentry{i2s()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/i2s}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{i2s}}}{\emph{a}, \emph{n\_in}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=15)}\sphinxstyleemphasis{{]}}}
Convert the first n elements (up to 3) of an integer array to an underscore delimited string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a} :: {[}in{]} The array of integers to translate

\item {} 
\sphinxstylestrong{n\_in} :: {[}in{]} The number of elements to translate, by default all

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned string

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_axes\_group}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_axes\_group\_dsamp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_new\_diag\_id() (fortran function in module mom\_diag\_mediator)@\spxentry{get\_new\_diag\_id()}\spxextra{fortran function in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{get\_new\_diag\_id}}}{\emph{diag\_cs}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Returns a new diagnostic id, it may be necessary to expand the diagnostics array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag\_cs} :: {[}inout{]} Diagnostics control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/initialize_diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_diag\_type}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_diag_to_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_diag\_to\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_scalar\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_static\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_diag\_type() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{initialize\_diag\_type()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/initialize_diag_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{initialize\_diag\_type}}}{\emph{diag}}{}
Initializes a {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} (used after allocating new memory)
(used after allocating new memory)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag} :: {[}inout{]} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_type()}}}}} to be initialized to be initialized

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_mediator\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_new\_diag\_id}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{alloc\_diag\_with\_id() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{alloc\_diag\_with\_id()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/alloc_diag_with_id}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{alloc\_diag\_with\_id}}}{\emph{diag\_id}, \emph{diag\_cs}, \emph{diag}}{}
Make a new diagnostic. Either use memory which is in the array of ‘primary’ diagnostics, or if that is in use, insert it to the list of secondary diags.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag\_id} :: {[}in{]} id for the diagnostic

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}inout{]} structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{diag} :: structure representing a diagnostic (inout)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_diag_to_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_diag\_to\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_scalar\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_static\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_available\_diag() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{log\_available\_diag()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_available_diag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{log\_available\_diag}}}{\emph{used}, \emph{module\_name}, \emph{field\_name}, \emph{cell\_methods\_string}, \emph{comment}, \emph{diag\_CS}, \emph{long\_name}, \emph{units}, \emph{standard\_name}}{}
Log a diagnostic to the available diagnostics file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{used} :: {[}in{]} Whether this diagnostic was in the diag\_table or not

\item {} 
\sphinxstylestrong{module\_name} :: {[}in{]} Name of the diagnostic module

\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of this diagnostic field

\item {} 
\sphinxstylestrong{cell\_methods\_string} :: {[}in{]} The spatial component of the CF cell\_methods attribute

\item {} 
\sphinxstylestrong{comment} :: {[}in{]} A comment to append after {[}Used|Unused{]}

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} The diagnotics control structure

\item {} 
\sphinxstylestrong{long\_name} :: {[}in{]} CF long name of diagnostic

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units for diagnostic

\item {} 
\sphinxstylestrong{standard\_name} :: {[}in{]} CF standardized name of diagnostic

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/describe_option}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{describe\_option}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diag\_field\_expand\_cmor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_scalar\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_static\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_chksum\_diag() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{log\_chksum\_diag()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/log_chksum_diag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{log\_chksum\_diag}}}{\emph{docunit}, \emph{description}, \emph{chksum}}{}
Log the diagnostic chksum to the chksum diag file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{docunit} :: {[}in{]} Handle of the log file

\item {} 
\sphinxstylestrong{description} :: {[}in{]} Name of the diagnostic module

\item {} 
\sphinxstylestrong{chksum} :: {[}in{]} chksum of the diagnostic

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_grid\_storage\_init() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_grid\_storage\_init()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_grid\_storage\_init}}}{\emph{grid\_storage}, \emph{G}, \emph{diag}}{}
Allocates fields necessary to store diagnostic remapping fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{grid\_storage} :: {[}inout{]} Structure containing a snapshot of the target grids

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Horizontal grid

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Diagnostic control structure used as the contructor template for this routine

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axes\_info}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_copy\_diag\_to\_storage() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_copy\_diag\_to\_storage()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_diag_to_storage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_copy\_diag\_to\_storage}}}{\emph{grid\_storage}, \emph{h\_state}, \emph{diag}}{}
Copy from the main diagnostic arrays to the grid storage as well as the native thicknesses.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{grid\_storage} :: {[}inout{]} Structure containing a snapshot of the target grids

\item {} 
\sphinxstylestrong{h\_state} :: {[}in{]} Current model thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Diagnostic control structure used as the contructor

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_copy\_storage\_to\_diag() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_copy\_storage\_to\_diag()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_storage_to_diag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_copy\_storage\_to\_diag}}}{\emph{diag}, \emph{grid\_storage}}{}
Copy from the stored diagnostic arrays to the main diagnostic grids.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostic control structure used as the contructor

\item {} 
\sphinxstylestrong{grid\_storage} :: {[}in{]} Structure containing a snapshot of the target grids

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_diagnostic\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_diagnostics_at_sync}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::post\_tracer\_diagnostics\_at\_sync}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::post\_transport\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_save\_grids() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_save\_grids()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_save_grids}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_save\_grids}}}{\emph{diag}}{}
Save the current diagnostic grids in the temporary structure within diag.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostic control structure used as the contructor

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_diagnostic\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_diagnostics_at_sync}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::post\_tracer\_diagnostics\_at\_sync}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::post\_transport\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_restore\_grids() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_restore\_grids()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_restore_grids}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_restore\_grids}}}{\emph{diag}}{}
Restore the diagnostic grids from the temporary structure within diag.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostic control structure used as the contructor

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_diagnostic\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_diagnostics_at_sync}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::post\_tracer\_diagnostics\_at\_sync}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::post\_transport\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_grid\_storage\_end() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{diag\_grid\_storage\_end()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_grid_storage_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{diag\_grid\_storage\_end}}}{\emph{grid\_storage}}{}
Deallocates the fields in the remapping fields container.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{grid\_storage} :: {[}inout{]} Structure containing a snapshot of the target grids

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_mediator\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_diag\_masks\_set() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_diag\_masks\_set()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_masks_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_diag\_masks\_set}}}{\emph{G}, \emph{nz}, \emph{diag\_cs}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean grid type.

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} The number of layers in the model’s native grid.

\item {} 
\sphinxstylestrong{diag\_cs} :: A pointer to a type with many variables used for diagnostics

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_masks_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_masks\_set}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_diag\_indices\_get() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_diag\_indices\_get()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_indices_get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_diag\_indices\_get}}}{\emph{fo1}, \emph{fo2}, \emph{dl}, \emph{diag\_cs}, \emph{isv}, \emph{iev}, \emph{jsv}, \emph{jev}}{}
Get the diagnostics\sphinxhyphen{}compute indices (to be passed to send\_data) based on the shape of the diag field (the same way they are deduced for non\sphinxhyphen{}downsampled fields)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fo1} :: {[}in{]} The size of the diag field in x

\item {} 
\sphinxstylestrong{fo2} :: {[}in{]} The size of the diag field in y

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Integer downsample level

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{isv} :: {[}out{]} i\sphinxhyphen{}start index for diagnostics

\item {} 
\sphinxstylestrong{iev} :: {[}out{]} i\sphinxhyphen{}end index for diagnostics

\item {} 
\sphinxstylestrong{jsv} :: {[}out{]} j\sphinxhyphen{}start index for diagnostics

\item {} 
\sphinxstylestrong{jev} :: {[}out{]} j\sphinxhyphen{}end index for diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_field\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_field\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_diag\_field\_3d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_diag\_field\_3d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_diag\_field\_3d}}}{\emph{locfield}, \emph{locfield\_dsamp}, \emph{dl}, \emph{diag\_cs}, \emph{diag}, \emph{isv}, \emph{iev}, \emph{jsv}, \emph{jev}, \emph{mask}}{}
This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics\sphinxhyphen{}compurte indices for the downsampled array 3d interface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{locfield} :: Input array pointer

\item {} 
\sphinxstylestrong{locfield\_dsamp} :: {[}inout{]} Output (downsampled) array

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure describing the diagnostic to post

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Level of down sampling

\item {} 
\sphinxstylestrong{isv} :: {[}inout{]} i\sphinxhyphen{}start index for diagnostics

\item {} 
\sphinxstylestrong{iev} :: {[}inout{]} i\sphinxhyphen{}end index for diagnostics

\item {} 
\sphinxstylestrong{jsv} :: {[}inout{]} j\sphinxhyphen{}start index for diagnostics

\item {} 
\sphinxstylestrong{jev} :: {[}inout{]} j\sphinxhyphen{}end index for diagnostics

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} If present, use this real array as the data mask.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_indices_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_indices\_get}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_diag\_field\_2d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_diag\_field\_2d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_diag\_field\_2d}}}{\emph{locfield}, \emph{locfield\_dsamp}, \emph{dl}, \emph{diag\_cs}, \emph{diag}, \emph{isv}, \emph{iev}, \emph{jsv}, \emph{jev}, \emph{mask}}{}
This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics\sphinxhyphen{}compurte indices for the downsampled array 2d interface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{locfield} :: Input array pointer

\item {} 
\sphinxstylestrong{locfield\_dsamp} :: {[}inout{]} Output (downsampled) array

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure describing the diagnostic to post

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Level of down sampling

\item {} 
\sphinxstylestrong{isv} :: {[}inout{]} i\sphinxhyphen{}start index for diagnostics

\item {} 
\sphinxstylestrong{iev} :: {[}inout{]} i\sphinxhyphen{}end index for diagnostics

\item {} 
\sphinxstylestrong{jsv} :: {[}inout{]} j\sphinxhyphen{}start index for diagnostics

\item {} 
\sphinxstylestrong{jev} :: {[}inout{]} j\sphinxhyphen{}end index for diagnostics

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} If present, use this real array as the data mask.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_indices_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{downsample\_diag\_indices\_get}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_field\_3d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_field\_3d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_field_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_field\_3d}}}{\emph{field\_in}, \emph{field\_out}, \emph{dl}, \emph{method}, \emph{mask}, \emph{diag\_cs}, \emph{diag}, \emph{isv\_o}, \emph{jsv\_o}, \emph{isv\_d}, \emph{iev\_d}, \emph{jsv\_d}, \emph{jev\_d}}{}
This subroutine allocates and computes a down sampled 3d array given an input array The down sample method is based on the “cell\_methods” for the diagnostics as explained in the above table.

\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:namespacemom-diag-mediator-1downsampling}}
Unexpected section title.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{The} \PYG{n}{down} \PYG{n}{sample} \PYG{n}{algorithm}
\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{=}
\end{sphinxVerbatim}


The down sample method could be deduced (before send\_data call) from the diagx\_cell\_method, diagy\_cell\_method and diagv\_cell\_method

This is the summary of the down sample algoritm for a diagnostic field f:
\begin{equation*}
\begin{split}f(Id,Jd) = \sum_{i,j} f(Id+i,Jd+j) * weight(Id+i,Jd+j) / [ \sum_{i,j} weight(Id+i,Jd+j)]\end{split}
\end{equation*}
Here, i and j run from 0 to dl\sphinxhyphen{}1 (dl being the down sample level). Id,Jd are the down sampled (coarse grid) indices run over the coarsened compute grid, if and jf are the original (fine grid) indices.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
Example   x\PYGZus{}cell y\PYGZus{}cell v\PYGZus{}cell algorithm\PYGZus{}id    implemented weight(if,jf)
\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}
theta     mean   mean   mean   MMM =222        G\PYGZpc{}areaT(if,jf)*h(if,jf)
u         point  mean   mean   PMM =022        dyCu(if,jf)*h(if,jf)*delta(if,Id)
v         mean   point  mean   MPM =202        dxCv(if,jf)*h(if,jf)*delta(jf,Jd)
?         point  sum    mean   PSM =012        h(if,jf)*delta(if,Id)
volcello  sum    sum    sum    SSS =111        1
T\PYGZus{}dfxy\PYGZus{}co sum    sum    point  SSP =110        1
umo       point  sum    sum    PSS =011        1*delta(if,Id)
vmo       sum    point  sum    SPS =101        1*delta(jf,Jd)
umo\PYGZus{}2d    point  sum    point  PSP =010        1*delta(if,Id)
vmo\PYGZus{}2d    sum    point  point  SPP =100        1*delta(jf,Jd)
?         point  mean   point  PMP =020        dyCu(if,jf)*delta(if,Id)
?         mean   point  point  MPP =200        dxCv(if,jf)*delta(jf,Jd)
w         mean   mean   point  MMP =220        G\PYGZpc{}areaT(if,jf)
h*theta   mean   mean   sum    MMS =221        G\PYGZpc{}areaT(if,jf)

delta is the Kronecker delta
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{field\_in} :: Original field to be down sampled

\item {} 
\sphinxstylestrong{field\_out} :: down sampled field

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Level of down sampling

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Sampling method

\item {} 
\sphinxstylestrong{mask} :: Mask for field

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure describing the diagnostic to post

\item {} 
\sphinxstylestrong{isv\_o} :: {[}in{]} Original i\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{jsv\_o} :: {[}in{]} Original j\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{isv\_d} :: {[}in{]} i\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{iev\_d} :: {[}in{]} i\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{jsv\_d} :: {[}in{]} j\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{jev\_d} :: {[}in{]} j\sphinxhyphen{}end index of down sampled data

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mmm}} \sphinxcode{\sphinxupquote{mmp}} \sphinxcode{\sphinxupquote{mms}} \sphinxcode{\sphinxupquote{mpm}} \sphinxcode{\sphinxupquote{msk}} \sphinxcode{\sphinxupquote{pmm}} \sphinxcode{\sphinxupquote{pss}} \sphinxcode{\sphinxupquote{sps}} \sphinxcode{\sphinxupquote{sss}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_3d\_low}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_field\_2d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_field\_2d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_field_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_field\_2d}}}{\emph{field\_in}, \emph{field\_out}, \emph{dl}, \emph{method}, \emph{mask}, \emph{diag\_cs}, \emph{diag}, \emph{isv\_o}, \emph{jsv\_o}, \emph{isv\_d}, \emph{iev\_d}, \emph{jsv\_d}, \emph{jev\_d}}{}
This subroutine allocates and computes a down sampled 2d array given an input array The down sample method is based on the “cell\_methods” for the diagnostics as explained in the above table.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{field\_in} :: Original field to be down sampled

\item {} 
\sphinxstylestrong{field\_out} :: Down sampled field

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Level of down sampling

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Sampling method

\item {} 
\sphinxstylestrong{mask} :: Mask for field

\item {} 
\sphinxstylestrong{diag\_cs} :: {[}in{]} Structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure describing the diagnostic to post

\item {} 
\sphinxstylestrong{isv\_o} :: {[}in{]} Original i\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{jsv\_o} :: {[}in{]} Original j\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{isv\_d} :: {[}in{]} i\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{iev\_d} :: {[}in{]} i\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{jsv\_d} :: {[}in{]} j\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{jev\_d} :: {[}in{]} j\sphinxhyphen{}end index of down sampled data

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mmp}} \sphinxcode{\sphinxupquote{mpp}} \sphinxcode{\sphinxupquote{msk}} \sphinxcode{\sphinxupquote{pmp}} \sphinxcode{\sphinxupquote{psp}} \sphinxcode{\sphinxupquote{spp}} \sphinxcode{\sphinxupquote{ssp}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_data\_2d\_low}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_mask\_2d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_mask\_2d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_mask_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_mask\_2d}}}{\emph{field\_in}, \emph{field\_out}, \emph{dl}, \emph{isc\_o}, \emph{jsc\_o}, \emph{isc\_d}, \emph{iec\_d}, \emph{jsc\_d}, \emph{jec\_d}, \emph{isd\_d}, \emph{ied\_d}, \emph{jsd\_d}, \emph{jed\_d}}{}
Allocate and compute the 2d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub\sphinxhyphen{}cells are open, otherwise it’s closed (0)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{field\_in} :: {[}in{]} Original field to be down sampled

\item {} 
\sphinxstylestrong{field\_out} :: Down sampled field

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Level of down sampling

\item {} 
\sphinxstylestrong{isc\_o} :: {[}in{]} Original i\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{jsc\_o} :: {[}in{]} Original j\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{isc\_d} :: {[}in{]} Computational i\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{iec\_d} :: {[}in{]} Computational i\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{jsc\_d} :: {[}in{]} Computational j\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{jec\_d} :: {[}in{]} Computational j\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{isd\_d} :: {[}in{]} Computational i\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{ied\_d} :: {[}in{]} Computational i\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{jsd\_d} :: {[}in{]} Computational j\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{jed\_d} :: {[}in{]} Computational j\sphinxhyphen{}end index of down sampled data

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{downsample\_mask\_3d() (fortran subroutine in module mom\_diag\_mediator)@\spxentry{downsample\_mask\_3d()}\spxextra{fortran subroutine in module mom\_diag\_mediator}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_mask_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_mediator/}}\sphinxbfcode{\sphinxupquote{downsample\_mask\_3d}}}{\emph{field\_in}, \emph{field\_out}, \emph{dl}, \emph{isc\_o}, \emph{jsc\_o}, \emph{isc\_d}, \emph{iec\_d}, \emph{jsc\_d}, \emph{jec\_d}, \emph{isd\_d}, \emph{ied\_d}, \emph{jsd\_d}, \emph{jed\_d}}{}
Allocate and compute the 3d down sampled mask The masks are down sampled based on a minority rule, i.e., a coarse cell is open (1) if at least one of the sub\sphinxhyphen{}cells are open, otherwise it’s closed (0)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{field\_in} :: {[}in{]} Original field to be down sampled

\item {} 
\sphinxstylestrong{field\_out} :: down sampled field

\item {} 
\sphinxstylestrong{dl} :: {[}in{]} Level of down sampling

\item {} 
\sphinxstylestrong{isc\_o} :: {[}in{]} Original i\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{jsc\_o} :: {[}in{]} Original j\sphinxhyphen{}start index

\item {} 
\sphinxstylestrong{isc\_d} :: {[}in{]} Computational i\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{iec\_d} :: {[}in{]} Computational i\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{jsc\_d} :: {[}in{]} Computational j\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{jec\_d} :: {[}in{]} Computational j\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{isd\_d} :: {[}in{]} Computational i\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{ied\_d} :: {[}in{]} Computational i\sphinxhyphen{}end index of down sampled data

\item {} 
\sphinxstylestrong{jsd\_d} :: {[}in{]} Computational j\sphinxhyphen{}start index of down sampled data

\item {} 
\sphinxstylestrong{jed\_d} :: {[}in{]} Computational j\sphinxhyphen{}end index of down sampled data

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diag\_remap module reference}
\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap}}\label{\detokenize{api/generated/modules/mom_diag_remap:mom-diag-remap-module-reference}}\label{\detokenize{api/generated/modules/mom_diag_remap::doc}}\index{mom\_diag\_remap (module)@\spxentry{mom\_diag\_remap}\spxextra{module}|spxpagem}
provides runtime remapping of diagnostics to z star, sigma and rho vertical coordinates.

{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:detamom-diag-remap}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_diag_remap:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_ctrl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_ctrl}}}}}
&
Represents remapping of diagnostics to a particular vertical coordinate.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diag_remap:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_init()}}}}}
&
Initialize a diagnostic remapping type with the given vertical coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_end()}}}}}
&
De\sphinxhyphen{}init a diagnostic remapping type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_diag_registration_closed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_diag\_registration\_closed()}}}}}
&
Inform that all diagnostics have been registered.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_set_active}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_set\_active()}}}}}
&
Indicate that this remapping type is actually used by the diag manager.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_configure_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_configure\_axes()}}}}}
&
Configure the vertical axes for a diagnostic remapping control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_get_axes_info}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_get\_axes\_info()}}}}}
&
Get layer and interface axes ids for this coordinate Needed when defining axes groups.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_axes_configured}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_axes\_configured()}}}}}
&
Whether or not the axes for this vertical coordinated has been configured.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_update()}}}}}
&
Build/update target vertical grids for diagnostic remapping.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_do_remap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_do\_remap()}}}}}
&
Remap diagnostic field to alternative vertical grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_calc_hmask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_calc\_hmask()}}}}}
&
Calculate masks for target grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_reintegrate_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertically\_reintegrate\_diag\_field()}}}}}
&
Vertically re\sphinxhyphen{}grid an already vertically\sphinxhyphen{}integrated diagnostic field to alternative vertical grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_interpolate_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertically\_interpolate\_diag\_field()}}}}}
&
Vertically interpolate diagnostic field to alternative vertical grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/horizontally_average_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontally\_average\_diag\_field()}}}}}
&
Horizontally average field.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diag_remap:detailed-description}}\label{\detokenize{api/generated/modules/mom_diag_remap:detamom-diag-remap}}
The {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_ctrl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_ctrl()}}}}} type represents a remapping of diagnostics to a particular vertical coordinate. The module is used by the diag mediator module in the following way:
type represents a remapping of diagnostics to a particular vertical coordinate. The module is used by the diag mediator module in the following way:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
\sphinxcode{\sphinxupquote{diag\_remap\_init()}} is called to initialize a is called to initialize a {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_ctrl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_ctrl()}}}}} instance.instance.

\item {} 
\sphinxcode{\sphinxupquote{diag\_remap\_configure\_axes()}} is called to read the configuration file and set up the vertical coordinate / axes definitions.is called to read the configuration file and set up the vertical coordinate / axes definitions.

\item {} 
\sphinxcode{\sphinxupquote{diag\_remap\_get\_axes\_info()}} returns information needed for the diag mediator to define new axes for the remapped diagnostics.returns information needed for the diag mediator to define new axes for the remapped diagnostics.

\item {} 
\sphinxcode{\sphinxupquote{diag\_remap\_update()}} is called periodically (whenever h, T or S change) to either create or update the target remapping grids.is called periodically (whenever h, T or S change) to either create or update the target remapping grids.

\item {} 
\sphinxcode{\sphinxupquote{diag\_remap\_do\_remap()}} is called from within a diag post() to do the remapping before the diagnostic is written out. is called from within a diag post() to do the remapping before the diagnostic is written out.

\end{enumerate}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_diag_remap:type-documentation}}\index{diag\_remap\_ctrl (fortran type in module mom\_diag\_remap)@\spxentry{diag\_remap\_ctrl}\spxextra{fortran type in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_ctrl}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_ctrl}}}
Represents remapping of diagnostics to a particular vertical coordinate.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{configured}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Whether vertical coordinate has been configured.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Whether remappping initialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Whether this coordinate actually gets used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertical\_coord}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The vertical coordinate that we remap to.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertical\_coord\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=10)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The coordinate name as understood by ALE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_coord\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=16)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: A name for the purpose of run\sphinxhyphen{}time parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_module\_suffix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=8)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The suffix for the module to appear in diag\_table.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Remapping control structure use for this axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regrid\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(regridding\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Regridding control structure that defines the coordinates for this axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Number of vertical levels used for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Remap grid thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_extensive}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, private}\sphinxstyleemphasis{{]}} :: Remap grid thicknesses for extensive variables {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interface\_axes\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Vertical axes id for remapping at interfaces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{layer\_axes\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Vertical axes id for remapping on layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions for remapping that recover the answers from the end of 2018. Otherwise, use updated more robust forms of the same expressions.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diag_remap:function-subroutine-documentation}}\index{diag\_remap\_init() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_init()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_init}}}{\emph{remap\_cs}, \emph{coord\_tuple}, \emph{answers\_2018}}{}
Initialize a diagnostic remapping type with the given vertical coordinate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}inout{]} Diag remapping control structure

\item {} 
\sphinxstylestrong{coord\_tuple} :: {[}in{]} A string in form of MODULE\_SUFFIX PARAMETER\_SUFFIX COORDINATE\_NAME

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true, use the order of arithmetic and expressions for remapping that recover the answers from the end of 2018. Otherwise, use more robust forms of the same expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extractword}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extractword}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_end() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_end()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_end}}}{\emph{remap\_cs}}{}
De\sphinxhyphen{}init a diagnostic remapping type. Free allocated memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{remap\_cs} :: {[}inout{]} Diag remapping control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_diag_registration_closed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_diag\_registration\_closed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_diag\_registration\_closed() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_diag\_registration\_closed()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_diag_registration_closed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_diag\_registration\_closed}}}{\emph{remap\_cs}}{}
Inform that all diagnostics have been registered. If \_set\_active() has not been called on the remapping control structure will be disabled. This saves time in the case that a vertical coordinate was configured but no diagnostics which use the coordinate appeared in the diag\_table.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{remap\_cs} :: {[}inout{]} Diag remapping control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_remap\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_set\_active() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_set\_active()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_set_active}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_set\_active}}}{\emph{remap\_cs}}{}
Indicate that this remapping type is actually used by the diag manager. If this is never called then the type will be disabled to save time. See further explanation with diag\_remap\_registration\_closed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{remap\_cs} :: {[}inout{]} Diag remapping control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_configure\_axes() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_configure\_axes()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_configure_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_configure\_axes}}}{\emph{remap\_cs}, \emph{GV}, \emph{US}, \emph{param\_file}}{}
Configure the vertical axes for a diagnostic remapping control structure. Reads a configuration parameters to determine coordinate generation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}inout{]} Diag remap control structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_get\_axes\_info() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_get\_axes\_info()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_get_axes_info}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_get\_axes\_info}}}{\emph{remap\_cs}, \emph{nz}, \emph{id\_layer}, \emph{id\_interface}}{}
Get layer and interface axes ids for this coordinate Needed when defining axes groups.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}in{]} Diagnostic coordinate control structure

\item {} 
\sphinxstylestrong{nz} :: {[}out{]} Number of vertical levels for the coordinate

\item {} 
\sphinxstylestrong{id\_layer} :: {[}out{]} 1D\sphinxhyphen{}axes id for layer points

\item {} 
\sphinxstylestrong{id\_interface} :: {[}out{]} 1D\sphinxhyphen{}axes id for interface points

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_axes\_configured() (fortran function in module mom\_diag\_remap)@\spxentry{diag\_remap\_axes\_configured()}\spxextra{fortran function in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_axes_configured}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_axes\_configured}}}{\emph{remap\_cs}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Whether or not the axes for this vertical coordinated has been configured. Configuration is complete when \sphinxcode{\sphinxupquote{diag\_remap\_configure\_axes()}} has been successfully called.
has been successfully called.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{remap\_cs} :: {[}in{]} Diagnostic coordinate control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_update() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_update()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_update}}}{\emph{remap\_cs}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{T}, \emph{S}, \emph{eqn\_of\_state}, \emph{h\_target}}{}
Build/update target vertical grids for diagnostic remapping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}inout{]} Diagnostic coordinate control structure

\item {} 
\sphinxstylestrong{g} :: The ocean’s grid type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} New thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} New temperatures {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} New salinities {[}ppt{]}

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: A pointer to the equation of state

\item {} 
\sphinxstylestrong{h\_target} :: {[}inout{]} The new diagnostic thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::build\_rho\_column}}}}} {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/build_sigma_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::build\_sigma\_column}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/build_zstar_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::build\_zstar\_column}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_rho_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::get\_rho\_cs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_sigma_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::get\_sigma\_cs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_zlike_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::get\_zlike\_cs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_do\_remap() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_do\_remap()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_do_remap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_do\_remap}}}{\emph{remap\_cs}, \emph{G}, \emph{GV}, \emph{h}, \emph{staggered\_in\_x}, \emph{staggered\_in\_y}, \emph{mask}, \emph{field}, \emph{remapped\_field}}{}
Remap diagnostic field to alternative vertical grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}in{]} Diagnostic coodinate control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The current thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{staggered\_in\_x} :: {[}in{]} True is the x\sphinxhyphen{}axis location is at u or q points

\item {} 
\sphinxstylestrong{staggered\_in\_y} :: {[}in{]} True is the y\sphinxhyphen{}axis location is at v or q points

\item {} 
\sphinxstylestrong{mask} :: A mask for the field {[}nondim{]}

\item {} 
\sphinxstylestrong{field} :: {[}in{]} The diagnostic field to be remapped {[}A{]}

\item {} 
\sphinxstylestrong{remapped\_field} :: {[}inout{]} Field remapped to new coordinate {[}A{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_remap\_calc\_hmask() (fortran subroutine in module mom\_diag\_remap)@\spxentry{diag\_remap\_calc\_hmask()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_calc_hmask}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{diag\_remap\_calc\_hmask}}}{\emph{remap\_cs}, \emph{G}, \emph{mask}}{}
Calculate masks for target grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}in{]} Diagnostic coodinate control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{mask} :: {[}out{]} h\sphinxhyphen{}point mask for target grid {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinatemode}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertically\_reintegrate\_diag\_field() (fortran subroutine in module mom\_diag\_remap)@\spxentry{vertically\_reintegrate\_diag\_field()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_reintegrate_diag_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{vertically\_reintegrate\_diag\_field}}}{\emph{remap\_cs}, \emph{G}, \emph{h}, \emph{h\_target}, \emph{staggered\_in\_x}, \emph{staggered\_in\_y}, \emph{mask}, \emph{field}, \emph{reintegrated\_field}}{}
Vertically re\sphinxhyphen{}grid an already vertically\sphinxhyphen{}integrated diagnostic field to alternative vertical grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}in{]} Diagnostic coodinate control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The thicknesses of the source grid {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_target} :: {[}in{]} The thicknesses of the target grid {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{staggered\_in\_x} :: {[}in{]} True is the x\sphinxhyphen{}axis location is at u or q points

\item {} 
\sphinxstylestrong{staggered\_in\_y} :: {[}in{]} True is the y\sphinxhyphen{}axis location is at v or q points

\item {} 
\sphinxstylestrong{mask} :: A mask for the field {[}nondim{]}

\item {} 
\sphinxstylestrong{field} :: {[}in{]} The diagnostic field to be remapped {[}A{]}

\item {} 
\sphinxstylestrong{reintegrated\_field} :: {[}inout{]} Field argument remapped to alternative coordinate {[}A{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/reintegrate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_vkernels::reintegrate\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertically\_interpolate\_diag\_field() (fortran subroutine in module mom\_diag\_remap)@\spxentry{vertically\_interpolate\_diag\_field()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_interpolate_diag_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{vertically\_interpolate\_diag\_field}}}{\emph{remap\_cs}, \emph{G}, \emph{h}, \emph{staggered\_in\_x}, \emph{staggered\_in\_y}, \emph{mask}, \emph{field}, \emph{interpolated\_field}}{}
Vertically interpolate diagnostic field to alternative vertical grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remap\_cs} :: {[}in{]} Diagnostic coodinate control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The current thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{staggered\_in\_x} :: {[}in{]} True is the x\sphinxhyphen{}axis location is at u or q points

\item {} 
\sphinxstylestrong{staggered\_in\_y} :: {[}in{]} True is the y\sphinxhyphen{}axis location is at v or q points

\item {} 
\sphinxstylestrong{mask} :: A mask for the field {[}nondim{]}

\item {} 
\sphinxstylestrong{field} :: {[}in{]} The diagnostic field to be remapped {[}A{]}

\item {} 
\sphinxstylestrong{interpolated\_field} :: {[}inout{]} Field argument remapped to alternative coordinate {[}A{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/interpolate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_vkernels::interpolate\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{horizontally\_average\_diag\_field() (fortran subroutine in module mom\_diag\_remap)@\spxentry{horizontally\_average\_diag\_field()}\spxextra{fortran subroutine in module mom\_diag\_remap}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/horizontally_average_diag_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_remap/}}\sphinxbfcode{\sphinxupquote{horizontally\_average\_diag\_field}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{staggered\_in\_x}, \emph{staggered\_in\_y}, \emph{is\_layer}, \emph{is\_extensive}, \emph{field}, \emph{averaged\_field}, \emph{averaged\_mask}}{}
Horizontally average field.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The current thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{staggered\_in\_x} :: {[}in{]} True if the x\sphinxhyphen{}axis location is at u or q points

\item {} 
\sphinxstylestrong{staggered\_in\_y} :: {[}in{]} True if the y\sphinxhyphen{}axis location is at v or q points

\item {} 
\sphinxstylestrong{is\_layer} :: {[}in{]} True if the z\sphinxhyphen{}axis location is at h points

\item {} 
\sphinxstylestrong{is\_extensive} :: {[}in{]} True if the z\sphinxhyphen{}direction is spatially integrated (over layers)

\item {} 
\sphinxstylestrong{field} :: {[}in{]} The diagnostic field to be remapped {[}A{]}

\item {} 
\sphinxstylestrong{averaged\_field} :: {[}inout{]} Field argument horizontally averaged {[}A{]}

\item {} 
\sphinxstylestrong{averaged\_mask} :: {[}inout{]} Mask for horizontally averaged field {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::assert}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_xy_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_xy\_average}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diag\_vkernels module reference}
\label{\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels}}\label{\detokenize{api/generated/modules/mom_diag_vkernels:mom-diag-vkernels-module-reference}}\label{\detokenize{api/generated/modules/mom_diag_vkernels::doc}}\index{mom\_diag\_vkernels (module)@\spxentry{mom\_diag\_vkernels}\spxextra{module}|spxpagem}
Provides kernels for single\sphinxhyphen{}column interpolation, re\sphinxhyphen{}integration (re\sphinxhyphen{}mapping of integrated quantities) and intensive\sphinxhyphen{}variable remapping in the vertical.

{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:detamom-diag-vkernels}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diag_vkernels:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/interpolate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_column()}}}}}
&
Linearly interpolate interface data, u\_src, from grid h\_src to a grid h\_dest.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/reintegrate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reintegrate\_column()}}}}}
&
Conservatively calculate integrated data, uh\_dest, on grid h\_dest, from layer\sphinxhyphen{}integrated data, uh\_src, on grid h\_src.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/diag_vkernels_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_vkernels\_unit\_tests()}}}}}
&
Returns true if any unit tests for module MOM\_diag\_vkernels fail.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_interp()}}}}}
&
Returns true if a test of \sphinxcode{\sphinxupquote{interpolate\_column()}} produces the wrong answer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_reintegrate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_reintegrate()}}}}}
&
Returns true if a test of \sphinxcode{\sphinxupquote{reintegrate\_column()}} produces the wrong answer.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diag_vkernels:detailed-description}}\label{\detokenize{api/generated/modules/mom_diag_vkernels:detamom-diag-vkernels}}
Provides kernels for single\sphinxhyphen{}column interpolation, re\sphinxhyphen{}integration (re\sphinxhyphen{}mapping of integrated quantities) and intensive\sphinxhyphen{}variable remapping in the vertical.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diag_vkernels:function-subroutine-documentation}}\index{interpolate\_column() (fortran subroutine in module mom\_diag\_vkernels)@\spxentry{interpolate\_column()}\spxextra{fortran subroutine in module mom\_diag\_vkernels}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/interpolate_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_vkernels/}}\sphinxbfcode{\sphinxupquote{interpolate\_column}}}{\emph{nsrc}, \emph{h\_src}, \emph{u\_src}, \emph{ndest}, \emph{h\_dest}, \emph{missing\_value}, \emph{u\_dest}}{}
Linearly interpolate interface data, u\_src, from grid h\_src to a grid h\_dest.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nsrc} :: {[}in{]} Number of source cells

\item {} 
\sphinxstylestrong{h\_src} :: {[}in{]} Thickness of source cells

\item {} 
\sphinxstylestrong{u\_src} :: {[}in{]} Values at source cell interfaces

\item {} 
\sphinxstylestrong{ndest} :: {[}in{]} Number of destination cells

\item {} 
\sphinxstylestrong{h\_dest} :: {[}in{]} Thickness of destination cells

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} Value to assign in vanished cells

\item {} 
\sphinxstylestrong{u\_dest} :: {[}inout{]} Interpolated value at destination cell interfaces

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_interp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_interpolate_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::vertically\_interpolate\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reintegrate\_column() (fortran subroutine in module mom\_diag\_vkernels)@\spxentry{reintegrate\_column()}\spxextra{fortran subroutine in module mom\_diag\_vkernels}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/reintegrate_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diag\_vkernels/}}\sphinxbfcode{\sphinxupquote{reintegrate\_column}}}{\emph{nsrc}, \emph{h\_src}, \emph{uh\_src}, \emph{ndest}, \emph{h\_dest}, \emph{missing\_value}, \emph{uh\_dest}}{}
Conservatively calculate integrated data, uh\_dest, on grid h\_dest, from layer\sphinxhyphen{}integrated data, uh\_src, on grid h\_src.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nsrc} :: {[}in{]} Number of source cells

\item {} 
\sphinxstylestrong{h\_src} :: {[}in{]} Thickness of source cells

\item {} 
\sphinxstylestrong{uh\_src} :: {[}in{]} Values at source cell interfaces

\item {} 
\sphinxstylestrong{ndest} :: {[}in{]} Number of destination cells

\item {} 
\sphinxstylestrong{h\_dest} :: {[}in{]} Thickness of destination cells

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} Value to assign in vanished cells

\item {} 
\sphinxstylestrong{uh\_dest} :: {[}inout{]} Interpolated value at destination cell interfaces

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_reintegrate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_reintegrate}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_reintegrate_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::vertically\_reintegrate\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diag\_vkernels\_unit\_tests() (fortran function in module mom\_diag\_vkernels)@\spxentry{diag\_vkernels\_unit\_tests()}\spxextra{fortran function in module mom\_diag\_vkernels}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/diag_vkernels_unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_vkernels/}}\sphinxbfcode{\sphinxupquote{diag\_vkernels\_unit\_tests}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if any unit tests for module MOM\_diag\_vkernels fail.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_interp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_reintegrate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_reintegrate}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_interp() (fortran function in module mom\_diag\_vkernels)@\spxentry{test\_interp()}\spxextra{fortran function in module mom\_diag\_vkernels}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_interp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_vkernels/}}\sphinxbfcode{\sphinxupquote{test\_interp}}}{\emph{verbose}, \emph{missing\_value}, \emph{msg}, \emph{nsrc}, \emph{h\_src}, \emph{u\_src}, \emph{ndest}, \emph{h\_dest}, \emph{u\_true}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if a test of \sphinxcode{\sphinxupquote{interpolate\_column()}} produces the wrong answer.
produces the wrong answer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} Value to indicate missing data

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} Message to label test

\item {} 
\sphinxstylestrong{nsrc} :: {[}in{]} Number of source cells

\item {} 
\sphinxstylestrong{h\_src} :: {[}in{]} Thickness of source cells

\item {} 
\sphinxstylestrong{u\_src} :: {[}in{]} Values at source cell interfaces

\item {} 
\sphinxstylestrong{ndest} :: {[}in{]} Number of destination cells

\item {} 
\sphinxstylestrong{h\_dest} :: {[}in{]} Thickness of destination cells

\item {} 
\sphinxstylestrong{u\_true} :: {[}in{]} Correct value at destination cell interfaces

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/interpolate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_column}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/diag_vkernels_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_vkernels\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_reintegrate() (fortran function in module mom\_diag\_vkernels)@\spxentry{test\_reintegrate()}\spxextra{fortran function in module mom\_diag\_vkernels}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/test_reintegrate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_diag\_vkernels/}}\sphinxbfcode{\sphinxupquote{test\_reintegrate}}}{\emph{verbose}, \emph{missing\_value}, \emph{msg}, \emph{nsrc}, \emph{h\_src}, \emph{uh\_src}, \emph{ndest}, \emph{h\_dest}, \emph{uh\_true}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if a test of \sphinxcode{\sphinxupquote{reintegrate\_column()}} produces the wrong answer.
produces the wrong answer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} Value to indicate missing data

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} Message to label test

\item {} 
\sphinxstylestrong{nsrc} :: {[}in{]} Number of source cells

\item {} 
\sphinxstylestrong{h\_src} :: {[}in{]} Thickness of source cells

\item {} 
\sphinxstylestrong{uh\_src} :: {[}in{]} Values of source cell stuff

\item {} 
\sphinxstylestrong{ndest} :: {[}in{]} Number of destination cells

\item {} 
\sphinxstylestrong{h\_dest} :: {[}in{]} Thickness of destination cells

\item {} 
\sphinxstylestrong{uh\_true} :: {[}in{]} Correct value of destination cell stuff

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/reintegrate_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reintegrate\_column}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/diag_vkernels_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diag\_vkernels\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diagnostics module reference}
\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics}}\label{\detokenize{api/generated/modules/mom_diagnostics:mom-diagnostics-module-reference}}\label{\detokenize{api/generated/modules/mom_diagnostics::doc}}\index{mom\_diagnostics (module)@\spxentry{mom\_diagnostics}\spxextra{module}|spxpagem}
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory.

{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:detamom-diagnostics}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_diagnostics:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/diagnostics_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnostics\_cs}}}}}
&
The control structure for the MOM\_diagnostics module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/surface_diag_ids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_diag\_ids}}}}}
&
A structure with diagnostic IDs of the surface and integrated variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/transport_diag_ids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transport\_diag\_ids}}}}}
&
A structure with diagnostic IDs of mass transport related diagnostics.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diagnostics:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_diagnostic\_fields()}}}}}
&
Diagnostics not more naturally calculated elsewhere are computed here.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/find_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_weights()}}}}}
&
This subroutine finds the location of R\_in in an increasing ordered list, Rlist, returning as k the element such that Rlist(k) \textless{}= R\_in \textless{} Rlist(k+1), and where wt and wt\_p are the linear weights that should be assigned to elements k and k+1.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_vertical_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_vertical\_integrals()}}}}}
&
This subroutine calculates vertical integrals of several tracers, along with the mass\sphinxhyphen{}weight of these tracers, the total column mass, and the carefully calculated column height.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_energy_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_energy\_diagnostics()}}}}}
&
This subroutine calculates terms in the mechanical energy budget.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_time_deriv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_time\_deriv()}}}}}
&
This subroutine registers fields to calculate a diagnostic time derivative.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_derivs()}}}}}
&
This subroutine calculates all registered time derivatives.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_surface_dyn_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_surface\_dyn\_diags()}}}}}
&
This routine posts diagnostics of various dynamic ocean surface quantities, including velocities, speed and sea surface height, at the time the ocean state is reported back to the caller.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_surface_thermo_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_surface\_thermo\_diags()}}}}}
&
This routine posts diagnostics of various ocean surface and integrated quantities at the time the ocean state is reported back to the caller.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_transport\_diagnostics()}}}}}
&
This routine posts diagnostics of the transports, including the subgridscale contributions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics\_init()}}}}}
&
This subroutine registers various diagnostics and allocates space for fields that other diagnostis depend upon.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_surface_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_surface\_diags()}}}}}
&
Register diagnostics of the surface state and integrated quantities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_transport_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_transport\_diags()}}}}}
&
Register certain diagnostics related to transports.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/write_static_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_static\_fields()}}}}}
&
Offers the static fields in the ocean grid type for output via the diag\_manager.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/set_dependent_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dependent\_diagnostics()}}}}}
&
This subroutine sets up diagnostics upon which other diagnostics depend.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics\_end()}}}}}
&
Deallocate memory associated with the diagnostics module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diagnostics:detailed-description}}\label{\detokenize{api/generated/modules/mom_diagnostics:detamom-diagnostics}}
Calculates any requested diagnostic quantities that are not calculated in the various subroutines. Diagnostic quantities are requested by allocating them memory.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_diagnostics:type-documentation}}\index{diagnostics\_cs (fortran type in module mom\_diagnostics)@\spxentry{diagnostics\_cs}\spxextra{fortran type in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/diagnostics_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{diagnostics\_cs}}}
The control structure for the MOM\_diagnostics module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_e}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_e\_d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_du\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dv\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_du\_dt\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_dv\_dt\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_col\_ht}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dh\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dkedt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pe\_to\_ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ke\_coradv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ke\_adv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ke\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ke\_horvisc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ke\_dia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uh\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vh\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhgm\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhgm\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rd1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cfl\_cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cfl\_cg1\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cfl\_cg1\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cg\_ebt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rd\_ebt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_p\_ebt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_temp\_int}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_salt\_int}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mass\_wt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_col\_mass}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_masscello}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_masso}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_volcello}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tpot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sprac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tob}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sob}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_thetaoga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_soga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sosga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tosga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_temp\_layer\_ave}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_salt\_layer\_ave}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pbo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_thkcello}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rhoinsitu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rhopot0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rhopot2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_drho\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_drho\_ds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_pre\_sync}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mono\_n2\_column\_fraction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The lower fraction of water column over which N2 is limited as monotonic for the purposes of calculating the equivalent barotropic wave speed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mono\_n2\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The depth below which N2 is limited as monotonic for the purposes of calculating the equivalent barotropic wave speed {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: interface height {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e\_d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: interface height above bottom {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{du\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: net i\sphinxhyphen{}acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dv\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: net j\sphinxhyphen{}acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dh\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: thickness rate of change {[}H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1 or kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_ebt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Equivalent barotropic modal structure {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Layer thicknesses in potential density coordinates {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal transports in potential density coordinates {[}H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional transports in potential density coordinates {[}H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uhgm\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal Gent\sphinxhyphen{}McWilliams transports in potential density coordinates {[}H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vhgm\_rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional Gent\sphinxhyphen{}McWilliams transports in potential density coordinates {[}H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: First baroclinic gravity wave speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rd1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: First baroclinic deformation radius {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: CFL for first baroclinic gravity wave speed {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_cg1\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}component of CFL for first baroclinic gravity wave speed {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_cg1\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}component of CFL for first baroclinic gravity wave speed {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KE per unit mass {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dke\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: time derivative of the layer KE {[}H L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pe\_to\_ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: potential energy to KE term {[}m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke\_coradv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KE source from the combined Coriolis and.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke\_adv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KE source from along\sphinxhyphen{}layer advection {[}H L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KE source from vertical viscosity {[}H L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke\_horvisc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KE source from horizontal viscosity {[}H L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke\_dia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KE source from diapycnal diffusion {[}H L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wave\_speed\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(wave\_speed\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The control structure for calculating wave speed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_ptr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(p3d)(50)}\sphinxstyleemphasis{{]}} :: pointers to variables used in the calculation of time derivatives

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{deriv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(p3d)(50)}\sphinxstyleemphasis{{]}} :: Time derivatives of various fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prev\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(p3d)(50)}\sphinxstyleemphasis{{]}} :: Previous values of variables used in the calculation of time derivatives previous values of variables used in calculation of time derivatives.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(50)}\sphinxstyleemphasis{{]}} :: The number of layers in each diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_time\_deriv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time derivative diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_ke\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: A handle used for group halo passes.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_diag\_ids (fortran type in module mom\_diagnostics)@\spxentry{surface\_diag\_ids}\spxextra{fortran type in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/surface_diag_ids}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{surface\_diag\_ids}}}
A structure with diagnostic IDs of the surface and integrated variables.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_zos}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_zossq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_volo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_speed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ssh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ssh\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sst}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sst\_sq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sstcon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sss\_sq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sssabs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ssu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ssv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_fraz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_salt\_deficit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_pme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_intern\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs for 2\sphinxhyphen{}d surface and bottom flux and state fields.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{transport\_diag\_ids (fortran type in module mom\_diagnostics)@\spxentry{transport\_diag\_ids}\spxextra{fortran type in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/transport_diag_ids}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{transport\_diag\_ids}}}
A structure with diagnostic IDs of mass transport related diagnostics.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_umo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_umo\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vmo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vmo\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dynamics\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dynamics\_h\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics for tracer horizontal transport.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diagnostics:function-subroutine-documentation}}\index{calculate\_diagnostic\_fields() (fortran subroutine in module mom\_diagnostics)@\spxentry{calculate\_diagnostic\_fields()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{calculate\_diagnostic\_fields}}}{\emph{u}, \emph{v}, \emph{h}, \emph{uh}, \emph{vh}, \emph{tv}, \emph{ADp}, \emph{CDp}, \emph{p\_surf}, \emph{dt}, \emph{diag\_pre\_sync}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{eta\_bt}}{}
Diagnostics not more naturally calculated elsewhere are computed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}in{]} Transport through zonal faces = u*h*dy,

\item {} 
\sphinxstylestrong{vh} :: {[}in{]} Transport through meridional faces = v*h*dx,

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{adp} :: {[}in{]} structure with pointers to accelerations in momentum equation.

\item {} 
\sphinxstylestrong{cdp} :: {[}in{]} structure with pointers to terms in continuity equation.

\item {} 
\sphinxstylestrong{p\_surf} :: A pointer to the surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. If p\_surf is not associated, it is the same as setting the surface pressure to 0.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time difference since the last call to this subroutine {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{diag\_pre\_sync} :: {[}in{]} Target grids from previous timestep

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Control structure returned by a previous call to diagnostics\_init.

\item {} 
\sphinxstylestrong{eta\_bt} :: {[}in{]} An optional barotropic

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_derivs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_energy_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_energy\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_vertical_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_vertical\_integrals}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_storage_to_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_copy\_storage\_to\_diag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_restore_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_restore\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_save_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_save\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/find_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_weights}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_volume_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_volume\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_weights() (fortran subroutine in module mom\_diagnostics)@\spxentry{find\_weights()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/find_weights}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{find\_weights}}}{\emph{Rlist}, \emph{R\_in}, \emph{k}, \emph{nz}, \emph{wt}, \emph{wt\_p}}{}
This subroutine finds the location of R\_in in an increasing ordered list, Rlist, returning as k the element such that Rlist(k) \textless{}= R\_in \textless{} Rlist(k+1), and where wt and wt\_p are the linear weights that should be assigned to elements k and k+1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{rlist} :: {[}in{]} The list of target densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{r\_in} :: {[}in{]} The density being inserted into Rlist {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{k} :: {[}inout{]} The value of k such that Rlist(k) \textless{}= R\_in \textless{} Rlist(k+1) The input value is a first guess

\item {} 
\sphinxstylestrong{nz} :: {[}in{]} The number of layers in Rlist

\item {} 
\sphinxstylestrong{wt} :: {[}out{]} The weight of layer k for interpolation, nondim

\item {} 
\sphinxstylestrong{wt\_p} :: {[}out{]} The weight of layer k+1 for interpolation, nondim

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_diagnostic\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_vertical\_integrals() (fortran subroutine in module mom\_diagnostics)@\spxentry{calculate\_vertical\_integrals()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_vertical_integrals}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{calculate\_vertical\_integrals}}}{\emph{h}, \emph{tv}, \emph{p\_surf}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine calculates vertical integrals of several tracers, along with the mass\sphinxhyphen{}weight of these tracers, the total column mass, and the carefully calculated column height.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{p\_surf} :: A pointer to the surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. If p\_surf is not associated, it is the same as setting the surface pressure to 0.

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Control structure returned by a previous call to diagnostics\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::int\_density\_dz}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_diagnostic\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_energy\_diagnostics() (fortran subroutine in module mom\_diagnostics)@\spxentry{calculate\_energy\_diagnostics()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_energy_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{calculate\_energy\_diagnostics}}}{\emph{u}, \emph{v}, \emph{h}, \emph{uh}, \emph{vh}, \emph{ADp}, \emph{CDp}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine calculates terms in the mechanical energy budget.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}in{]} Transport through zonal faces=u*h*dy,

\item {} 
\sphinxstylestrong{vh} :: {[}in{]} Transport through merid faces=v*h*dx,

\item {} 
\sphinxstylestrong{adp} :: {[}in{]} Structure pointing to accelerations in momentum equation.

\item {} 
\sphinxstylestrong{cdp} :: {[}in{]} Structure pointing to terms in continuity equations.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Control structure returned by a previous call to diagnostics\_init.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_diagnostic\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_time\_deriv() (fortran subroutine in module mom\_diagnostics)@\spxentry{register\_time\_deriv()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_time_deriv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{register\_time\_deriv}}}{\emph{lb}, \emph{f\_ptr}, \emph{deriv\_ptr}, \emph{CS}}{}
This subroutine registers fields to calculate a diagnostic time derivative.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Lower index bound of f\_ptr

\item {} 
\sphinxstylestrong{f\_ptr} :: Time derivative operand

\item {} 
\sphinxstylestrong{deriv\_ptr} :: Time derivative of f\_ptr

\item {} 
\sphinxstylestrong{cs} :: Control structure returned by previous call to diagnostics\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/set_dependent_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dependent\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_derivs() (fortran subroutine in module mom\_diagnostics)@\spxentry{calculate\_derivs()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_derivs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{calculate\_derivs}}}{\emph{dt}, \emph{G}, \emph{CS}}{}
This subroutine calculates all registered time derivatives.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time interval over which differences occur {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Control structure returned by previous call to diagnostics\_init.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_diagnostic\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_surface\_dyn\_diags() (fortran subroutine in module mom\_diagnostics)@\spxentry{post\_surface\_dyn\_diags()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_surface_dyn_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{post\_surface\_dyn\_diags}}}{\emph{IDs}, \emph{G}, \emph{diag}, \emph{sfc\_state}, \emph{ssh}}{}
This routine posts diagnostics of various dynamic ocean surface quantities, including velocities, speed and sea surface height, at the time the ocean state is reported back to the caller.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ids} :: {[}in{]} A structure with the diagnostic IDs.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} structure describing the ocean surface state

\item {} 
\sphinxstylestrong{ssh} :: {[}in{]} Time mean surface height without corrections for ice displacement {[}m{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_surface\_thermo\_diags() (fortran subroutine in module mom\_diagnostics)@\spxentry{post\_surface\_thermo\_diags()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_surface_thermo_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{post\_surface\_thermo\_diags}}}{\emph{IDs}, \emph{G}, \emph{GV}, \emph{US}, \emph{diag}, \emph{dt\_int}, \emph{sfc\_state}, \emph{tv}, \emph{ssh}, \emph{ssh\_ibc}}{}
This routine posts diagnostics of various ocean surface and integrated quantities at the time the ocean state is reported back to the caller.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ids} :: {[}in{]} A structure with the diagnostic IDs.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{dt\_int} :: {[}in{]} total time step associated with these diagnostics {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} structure describing the ocean surface state

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{ssh} :: {[}in{]} Time mean surface height without corrections for ice displacement {[}m{]}

\item {} 
\sphinxstylestrong{ssh\_ibc} :: {[}in{]} Time mean surface height with corrections for ice displacement and the inverse barometer {[}m{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_integral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_integral}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_transport\_diagnostics() (fortran subroutine in module mom\_diagnostics)@\spxentry{post\_transport\_diagnostics()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_transport_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{post\_transport\_diagnostics}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{uhtr}, \emph{vhtr}, \emph{h}, \emph{IDs}, \emph{diag\_pre\_dyn}, \emph{diag}, \emph{dt\_trans}, \emph{Reg}}{}
This routine posts diagnostics of the transports, including the subgridscale contributions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{uhtr} :: {[}in{]} Accumulated zonal thickness fluxes used to advect tracers {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}in{]} Accumulated meridional thickness fluxes used to advect tracers {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The updated layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ids} :: {[}in{]} A structure with the diagnostic IDs.

\item {} 
\sphinxstylestrong{diag\_pre\_dyn} :: {[}inout{]} Stored grids from before dynamics

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{dt\_trans} :: {[}in{]} total time step associated with the transports {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{reg} :: Pointer to the tracer registry

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_storage_to_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_copy\_storage\_to\_diag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_restore_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_restore\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_save_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_save\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::post\_tracer\_transport\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_diagnostics\_init() (fortran subroutine in module mom\_diagnostics)@\spxentry{mom\_diagnostics\_init()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{mom\_diagnostics\_init}}}{\emph{MIS}, \emph{ADp}, \emph{CDp}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{tv}}{}
This subroutine registers various diagnostics and allocates space for fields that other diagnostis depend upon.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mis} :: {[}in{]} For “MOM Internal State” a set of pointers to the fields and accelerations that make up the ocean’s internal physical state.

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} Structure with pointers to momentum equation terms.

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} Structure with pointers to continuity equation terms.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Structure to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: Pointer set to point to control structure for this module.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_time_deriv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_time\_deriv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/set_dependent_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dependent\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_surface\_diags() (fortran subroutine in module mom\_diagnostics)@\spxentry{register\_surface\_diags()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_surface_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{register\_surface\_diags}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{IDs}, \emph{diag}, \emph{tv}}{}
Register diagnostics of the surface state and integrated quantities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ids} :: {[}inout{]} A structure with the diagnostic IDs.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_transport\_diags() (fortran subroutine in module mom\_diagnostics)@\spxentry{register\_transport\_diags()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_transport_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{register\_transport\_diags}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{IDs}, \emph{diag}}{}
Register certain diagnostics related to transports.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ids} :: {[}inout{]} A structure with the diagnostic IDs.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_thickness_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::get\_thickness\_units}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_static\_fields() (fortran subroutine in module mom\_diagnostics)@\spxentry{write\_static\_fields()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/write_static_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{write\_static\_fields}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{diag}}{}
Offers the static fields in the ocean grid type for output via the diag\_manager.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_dependent\_diagnostics() (fortran subroutine in module mom\_diagnostics)@\spxentry{set\_dependent\_diagnostics()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/set_dependent_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{set\_dependent\_diagnostics}}}{\emph{MIS}, \emph{ADp}, \emph{CDp}, \emph{G}, \emph{CS}}{}
This subroutine sets up diagnostics upon which other diagnostics depend.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mis} :: {[}in{]} For “MOM Internal State” a set of pointers to the fields and accelerations making up ocean internal physical state.

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} Structure pointing to accelerations in momentum equation.

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} Structure pointing to terms in continuity equation.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_time_deriv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_time\_deriv}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_diagnostics\_end() (fortran subroutine in module mom\_diagnostics)@\spxentry{mom\_diagnostics\_end()}\spxextra{fortran subroutine in module mom\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diagnostics/}}\sphinxbfcode{\sphinxupquote{mom\_diagnostics\_end}}}{\emph{CS}, \emph{ADp}}{}
Deallocate memory associated with the diagnostics module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure returned by a previous call to diagnostics\_init.

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} structure with pointers to accelerations in momentum equation.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_diapyc\_energy\_req module reference}
\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req}}\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:mom-diapyc-energy-req-module-reference}}\label{\detokenize{api/generated/modules/mom_diapyc_energy_req::doc}}\index{mom\_diapyc\_energy\_req (module)@\spxentry{mom\_diapyc\_energy\_req}\spxextra{module}|spxpagem}
Calculates the energy requirements of mixing.

{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:detamom-diapyc-energy-req}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_cs}}}}}
&
This control structure holds parameters for the MOM\_diapyc\_energy\_req module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_test}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_test()}}}}}
&
This subroutine helps test the accuracy of the diapycnal mixing energy requirement code by writing diagnostics, possibly using an intensely mixing test profile of diffusivity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_calc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_calc()}}}}}
&
This subroutine uses a substantially refactored tridiagonal equation for diapycnal mixing of temperature and salinity to estimate the potential energy change due to diapycnal mixing in a column of water.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/find_pe_chg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg()}}}}}
&
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/find_pe_chg_orig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg\_orig()}}}}}
&
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep using the original form used in the first version of ePBL.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_init()}}}}}
&
Initialize parameters and allocate memory associated with the diapycnal energy requirement module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_end()}}}}}
&
Clean up and deallocate memory associated with the diapycnal energy requirement module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:detailed-description}}\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:detamom-diapyc-energy-req}}
Calculates the energy requirements of mixing.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:type-documentation}}\index{diapyc\_energy\_req\_cs (fortran type in module mom\_diapyc\_energy\_req)@\spxentry{diapyc\_energy\_req\_cs}\spxextra{fortran type in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{diapyc\_energy\_req\_cs}}}
This control structure holds parameters for the MOM\_diapyc\_energy\_req module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ert}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_erb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_erc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_erh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kddt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_chct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_chcb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_chcc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_chch}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_t0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_s0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_f}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_zint}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: A variable that is here because empty structures are not permitted by some compilers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{test\_kh\_scaling}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling factor for the diapycnal diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{colht\_scaling}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling factor for the column height change correction term.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_test\_kh\_profile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the internal test diffusivity profile in place of any that might be passed in as an argument.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:function-subroutine-documentation}}\index{diapyc\_energy\_req\_test() (fortran subroutine in module mom\_diapyc\_energy\_req)@\spxentry{diapyc\_energy\_req\_test()}\spxextra{fortran subroutine in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_test}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{diapyc\_energy\_req\_test}}}{\emph{h\_3d}, \emph{dt}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Kd\_int}}{}
This subroutine helps test the accuracy of the diapycnal mixing energy requirement code by writing diagnostics, possibly using an intensely mixing test profile of diffusivity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h\_3d} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}in{]} Interface diffusivities {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_calc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_calc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diapyc\_energy\_req\_calc() (fortran subroutine in module mom\_diapyc\_energy\_req)@\spxentry{diapyc\_energy\_req\_calc()}\spxextra{fortran subroutine in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_calc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{diapyc\_energy\_req\_calc}}}{\emph{h\_in}, \emph{T\_in}, \emph{S\_in}, \emph{Kd}, \emph{energy\_Kd}, \emph{dt}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{may\_print}, \emph{CS}}{}
This subroutine uses a substantially refactored tridiagonal equation for diapycnal mixing of temperature and salinity to estimate the potential energy change due to diapycnal mixing in a column of water. It does this estimate 4 different ways, all of which should be equivalent, but reports only one. The various estimates are taken because they will later be used as templates for other bits of code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Layer thickness before entrainment, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{t\_in} :: {[}in{]} The layer temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s\_in} :: {[}in{]} The layer salinities {[}ppt{]}.

\item {} 
\sphinxstylestrong{kd} :: {[}in{]} The interfaces diapycnal diffusivities {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{energy\_kd} :: {[}out{]} The column\sphinxhyphen{}integrated rate of energy consumption by diapycnal diffusion {[}R Z L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{may\_print} :: {[}in{]} If present and true, write out diagnostics of energy use.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/find_pe_chg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/find_pe_chg_orig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg\_orig}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_test}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_test}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_pe\_chg() (fortran subroutine in module mom\_diapyc\_energy\_req)@\spxentry{find\_pe\_chg()}\spxextra{fortran subroutine in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/find_pe_chg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{find\_pe\_chg}}}{\emph{Kddt\_h0}, \emph{dKddt\_h}, \emph{hp\_a}, \emph{hp\_b}, \emph{Th\_a}, \emph{Sh\_a}, \emph{Th\_b}, \emph{Sh\_b}, \emph{dT\_to\_dPE\_a}, \emph{dS\_to\_dPE\_a}, \emph{dT\_to\_dPE\_b}, \emph{dS\_to\_dPE\_b}, \emph{pres\_Z}, \emph{dT\_to\_dColHt\_a}, \emph{dS\_to\_dColHt\_a}, \emph{dT\_to\_dColHt\_b}, \emph{dS\_to\_dColHt\_b}, \emph{PE\_chg}, \emph{dPEc\_dKd}, \emph{dPE\_max}, \emph{dPEc\_dKd\_0}, \emph{ColHt\_cor}}{}
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{kddt\_h0} :: {[}in{]} The previously used diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dkddt\_h} :: {[}in{]} The trial change in the diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hp\_a} :: {[}in{]} The effective pivot thickness of the layer above the interface, given by h\_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt\_h for the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hp\_b} :: {[}in{]} The effective pivot thickness of the layer below the interface, given by h\_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt\_h for the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{th\_a} :: {[}in{]} An effective temperature times a thickness in the layer above, including implicit mixing effects with other yet higher layers {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sh\_a} :: {[}in{]} An effective salinity times a thickness in the layer above, including implicit mixing effects with other yet higher layers {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{th\_b} :: {[}in{]} An effective temperature times a thickness in the layer below, including implicit mixing effects with other yet lower layers {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sh\_b} :: {[}in{]} An effective salinity times a thickness in the layer below, including implicit mixing effects with other yet lower layers {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpe\_a} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers above {[}R Z L2 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpe\_a} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers above {[}R Z L2 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpe\_b} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers below {[}R Z L2 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpe\_b} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers below {[}R Z L2 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pres\_z} :: {[}in{]} The hydrostatic interface pressure, which is used to relate the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing {[}R L2 T\sphinxhyphen{}2 m Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolht\_a} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers above {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolht\_a} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers above {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolht\_b} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers below {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolht\_b} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers below {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pe\_chg} :: {[}out{]} The change in column potential energy from applying Kddt\_h at the present interface {[}R Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h, {[}R Z L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dpe\_max} :: {[}out{]} The maximum change in column potential energy that could be realizedd by applying a huge value of Kddt\_h at the present interface {[}R Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd\_0} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h in the limit where Kddt\_h = 0 {[}R Z L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{colht\_cor} :: {[}out{]} The correction to PE\_chg that is made due to a net change in the column height {[}R Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_calc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_calc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_pe\_chg\_orig() (fortran subroutine in module mom\_diapyc\_energy\_req)@\spxentry{find\_pe\_chg\_orig()}\spxextra{fortran subroutine in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/find_pe_chg_orig}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{find\_pe\_chg\_orig}}}{\emph{Kddt\_h}, \emph{h\_k}, \emph{b\_den\_1}, \emph{dTe\_term}, \emph{dSe\_term}, \emph{dT\_km1\_t2}, \emph{dS\_km1\_t2}, \emph{dT\_to\_dPE\_k}, \emph{dS\_to\_dPE\_k}, \emph{dT\_to\_dPEa}, \emph{dS\_to\_dPEa}, \emph{pres\_Z}, \emph{dT\_to\_dColHt\_k}, \emph{dS\_to\_dColHt\_k}, \emph{dT\_to\_dColHta}, \emph{dS\_to\_dColHta}, \emph{PE\_chg}, \emph{dPEc\_dKd}, \emph{dPE\_max}, \emph{dPEc\_dKd\_0}}{}
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep using the original form used in the first version of ePBL.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{kddt\_h} :: {[}in{]} The diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_k} :: {[}in{]} The thickness of the layer below the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{b\_den\_1} :: {[}in{]} The first term in the denominator of the pivot for the tridiagonal solver, given by h\_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt\_h for the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dte\_term} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the temperature change in the layer below the interface {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dse\_term} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the salinity change in the layer below the interface {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt\_km1\_t2} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the temperature change in the layer above the interface {[}degC{]}.

\item {} 
\sphinxstylestrong{ds\_km1\_t2} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the salinity change in the layer above the interface {[}ppt{]}.

\item {} 
\sphinxstylestrong{pres\_z} :: {[}in{]} The hydrostatic interface pressure, which is used to relate the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpe\_k} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers below {[}R Z L2 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpe\_k} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers below {[}R Z L2 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpea} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers above {[}R Z L2 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpea} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers above {[}R Z L2 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolht\_k} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers below {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolht\_k} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers below {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolhta} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers above {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolhta} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers above {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pe\_chg} :: {[}out{]} The change in column potential energy from applying Kddt\_h at the present interface {[}R Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h, {[}R Z L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dpe\_max} :: {[}out{]} The maximum change in column potential energy that could be realized by applying a huge value of Kddt\_h at the present interface {[}R Z L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd\_0} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h in the limit where Kddt\_h = 0 {[}R Z L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_calc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diapyc\_energy\_req\_calc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diapyc\_energy\_req\_init() (fortran subroutine in module mom\_diapyc\_energy\_req)@\spxentry{diapyc\_energy\_req\_init()}\spxextra{fortran subroutine in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{diapyc\_energy\_req\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initialize parameters and allocate memory associated with the diapycnal energy requirement module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} model grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} file to parse for parameter values

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} structure to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{diapyc\_energy\_req\_end() (fortran subroutine in module mom\_diapyc\_energy\_req)@\spxentry{diapyc\_energy\_req\_end()}\spxextra{fortran subroutine in module mom\_diapyc\_energy\_req}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req/}}\sphinxbfcode{\sphinxupquote{diapyc\_energy\_req\_end}}}{\emph{CS}}{}
Clean up and deallocate memory associated with the diapycnal energy requirement module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Diapycnal energy requirement control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_document module reference}
\label{\detokenize{api/generated/modules/mom_document:f/mom_document}}\label{\detokenize{api/generated/modules/mom_document:mom-document-module-reference}}\label{\detokenize{api/generated/modules/mom_document::doc}}\index{mom\_document (module)@\spxentry{mom\_document}\spxextra{module}|spxpagem}
The subroutines here provide hooks for document generation functions at various levels of granularity.

{\hyperref[\detokenize{api/generated/modules/mom_document:detamom-document}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_document:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_type}}}}}
&
A structure that controls where the documentation occurs, its veborsity and formatting.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/link_msg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{link\_msg}}}}}
&
A linked list of the parameter documentation messages that have been issued so far.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_document:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_none()}}}}}
&
This subroutine handles parameter documentation with no value.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical()}}}}}
&
This subroutine handles parameter documentation for logicals.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical\_array()}}}}}
&
This subroutine handles parameter documentation for arrays of logicals.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int()}}}}}
&
This subroutine handles parameter documentation for integers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int\_array()}}}}}
&
This subroutine handles parameter documentation for arrays of integers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real()}}}}}
&
This subroutine handles parameter documentation for reals.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array()}}}}}
&
This subroutine handles parameter documentation for arrays of reals.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_char()}}}}}
&
This subroutine handles parameter documentation for character strings.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_openblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_openblock()}}}}}
&
This subroutine handles documentation for opening a parameter block.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_closeblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_closeblock()}}}}}
&
This subroutine handles documentation for closing a parameter block.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_time()}}}}}
&
This subroutine handles parameter documentation for time\sphinxhyphen{}type variables.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc()}}}}}
&
This subroutine writes out the message and description to the documetation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/time_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{time\_string()}}}}}
&
This function returns a string with a time type formatted as seconds (perhaps including a fractional number of seconds) and days.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_string()}}}}}
&
This function returns a string with a real formatted like ‘(G)’.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_array_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_array\_string()}}}}}
&
Returns a character string of a comma\sphinxhyphen{}separated, compact formatted, reals e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/testformattedfloatisreal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{testformattedfloatisreal()}}}}}
&
This function tests whether a real value is encoded in a string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/int_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_string()}}}}}
&
This function returns a string with an integer formatted like ‘(I)’.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/logical_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{logical\_string()}}}}}
&
This function returns a string with an logical formatted like ‘(L)’.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string()}}}}}
&
This function returns a string for formatted parameter assignment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/undef_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{undef\_string()}}}}}
&
This function returns a string for formatted false logicals.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_module}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_module()}}}}}
&
This subroutine handles the module documentation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_subroutine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_subroutine()}}}}}
&
This subroutine handles the subroutine documentation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_function()}}}}}
&
This subroutine handles the function documentation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_init()}}}}}
&
Initialize the parameter documentation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file()}}}}}
&
This subroutine allocates and populates a structure that controls where the documentation occurs and its formatting, and opens up the files controlled by this structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/find_unused_unit_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_unused\_unit\_number()}}}}}
&
Find an unused unit number, returning \textgreater{}0 if found, and triggering a FATAL error if not.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_end()}}}}}
&
This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented()}}}}}
&
Returns true if documentation has already been written.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_document:detailed-description}}\label{\detokenize{api/generated/modules/mom_document:detamom-document}}
The subroutines here provide hooks for document generation functions at various levels of granularity.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_document:type-documentation}}\index{doc\_type (fortran type in module mom\_document)@\spxentry{doc\_type}\spxextra{fortran type in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_type}}}
A structure that controls where the documentation occurs, its veborsity and formatting.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{unitall}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The open unit number for docFileBase + .all.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{unitshort}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The open unit number for docFileBase + .short.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{unitlayout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The open unit number for docFileBase + .layout.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{unitdebugging}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The open unit number for docFileBase + .debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{filesareopen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any files were successfully opened.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{docfilebase}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len= mlen )}\sphinxstyleemphasis{{]}} :: The basename of the files where run\sphinxhyphen{}time parameters, settings and defaults are documented.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{complete}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, document all parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minimal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, document non\sphinxhyphen{}default parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{layout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, document layout parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debugging}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, document debugging parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{definesyntax}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use ‘\#def’ syntax instead of a=b syntax.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{warnonconflicts}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Cause a WARNING error if defaults differ.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{commentcolumn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of spaces before the comment marker.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_line\_len}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum length of message lines.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{chain\_msg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( link\_msg )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Database of messages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{blockprefix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: The full name of the current block.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{link\_msg (fortran type in module mom\_document)@\spxentry{link\_msg}\spxextra{fortran type in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/link_msg}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{link\_msg}}}
A linked list of the parameter documentation messages that have been issued so far.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{next}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( link\_msg )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Facilitates linked list.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Parameter name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{msg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=620)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Parameter value and default.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_document:function-subroutine-documentation}}\index{doc\_param\_none() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_none()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_none}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_none}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}}{}
This subroutine handles parameter documentation with no value.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_logical() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_logical()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_logical}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{val}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for logicals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The value of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this is a layout parameter.

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} \sphinxcode{\sphinxupquote{string\_false}} \sphinxcode{\sphinxupquote{string\_true}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/undef_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{undef\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_logical\_array() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_logical\_array()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_logical\_array}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{vals}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for arrays of logicals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{vals} :: {[}in{]} The array of values to record

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this is a layout parameter.

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} \sphinxcode{\sphinxupquote{string\_false}} \sphinxcode{\sphinxupquote{string\_true}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_int() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_int()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_int}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{val}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for integers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The value of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this is a layout parameter.

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/int_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_int\_array() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_int\_array()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_int\_array}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{vals}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for arrays of integers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{vals} :: {[}in{]} The array of values to record

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this is a layout parameter.

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/int_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_real() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_real()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_real}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{val}, \emph{default}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for reals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The value of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_real\_array() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_real\_array()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_real\_array}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{vals}, \emph{default}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for arrays of reals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{vals} :: {[}in{]} The array of values to record

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_array_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_array\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_char() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_char()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_char}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{units}, \emph{val}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for character strings.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The value of the parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this is a layout parameter.

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_openblock() (fortran subroutine in module mom\_document)@\spxentry{doc\_openblock()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_openblock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_openblock}}}{\emph{doc}, \emph{blockName}, \emph{desc}}{}
This subroutine handles documentation for opening a parameter block.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{blockname} :: {[}in{]} The name of the parameter block being opened

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter block being opened

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::openparameterblock}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_closeblock() (fortran subroutine in module mom\_document)@\spxentry{doc\_closeblock()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_closeblock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_closeblock}}}{\emph{doc}, \emph{blockName}}{}
This subroutine handles documentation for closing a parameter block.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{blockname} :: {[}in{]} The name of the parameter block being closed

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::closeparameterblock}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_param\_time() (fortran subroutine in module mom\_document)@\spxentry{doc\_param\_time()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_param\_time}}}{\emph{doc}, \emph{varname}, \emph{desc}, \emph{val}, \emph{default}, \emph{units}, \emph{debuggingParam}, \emph{like\_default}}{}
This subroutine handles parameter documentation for time\sphinxhyphen{}type variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The value of the parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of this parameter

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{define\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mesghasbeendocumented}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/time_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{time\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{writemessageanddesc() (fortran subroutine in module mom\_document)@\spxentry{writemessageanddesc()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{writemessageanddesc}}}{\emph{doc}, \emph{vmesg}, \emph{desc}, \emph{valueWasDefault}, \emph{indent}, \emph{layoutParam}, \emph{debuggingParam}}{}
This subroutine writes out the message and description to the documetation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: {[}in{]} A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{vmesg} :: {[}in{]} A message with the parameter name, units, and default value.

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter being documented

\item {} 
\sphinxstylestrong{valuewasdefault} :: {[}in{]} If true, this parameter has its default value

\item {} 
\sphinxstylestrong{indent} :: {[}in{]} An amount by which to indent this message

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this is a layout parameter.

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this is a debugging parameter.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_closeblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_closeblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_module}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_module}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_openblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_openblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{time\_string() (fortran function in module mom\_document)@\spxentry{time\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/time_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{time\_string}}}{\emph{time}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=40)}\sphinxstyleemphasis{{]}}}
This function returns a string with a time type formatted as seconds (perhaps including a fractional number of seconds) and days.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{time} :: {[}in{]} The time type being translated

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/int_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_string}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{real\_string() (fortran function in module mom\_document)@\spxentry{real\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/real_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{real\_string}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=32)}\sphinxstyleemphasis{{]}}}
This function returns a string with a real formatted like ‘(G)’.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The value being written into a string

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/testformattedfloatisreal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{testformattedfloatisreal}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_array_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_array\_string}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{real\_array\_string() (fortran function in module mom\_document)@\spxentry{real\_array\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/real_array_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{real\_array\_string}}}{\emph{vals}, \emph{sep}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=1320)}\sphinxstyleemphasis{{]}}}
Returns a character string of a comma\sphinxhyphen{}separated, compact formatted, reals e.g. “1., 2., 5*3., 5.E2”, that give the list of values.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The output string listing vals

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{vals} :: {[}in{]} The array of values to record

\item {} 
\sphinxstylestrong{sep} :: {[}in{]} The separator between successive values,

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/int_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_string}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{testformattedfloatisreal() (fortran function in module mom\_document)@\spxentry{testformattedfloatisreal()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/testformattedfloatisreal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{testformattedfloatisreal}}}{\emph{str}, \emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This function tests whether a real value is encoded in a string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{str} :: {[}in{]} The string that match val

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The value being tested

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_string}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_string() (fortran function in module mom\_document)@\spxentry{int\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/int_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{int\_string}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=24)}\sphinxstyleemphasis{{]}}}
This function returns a string with an integer formatted like ‘(I)’.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The value being written into a string

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/real_array_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_array\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/time_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{time\_string}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{logical\_string() (fortran function in module mom\_document)@\spxentry{logical\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/logical_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{logical\_string}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=24)}\sphinxstyleemphasis{{]}}}
This function returns a string with an logical formatted like ‘(L)’.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The value being written into a string

\end{description}\end{quote}

\end{fulllineitems}

\index{define\_string() (fortran function in module mom\_document)@\spxentry{define\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/define_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{define\_string}}}{\emph{doc}, \emph{varName}, \emph{valString}, \emph{units}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=mlen)}\sphinxstyleemphasis{{]}}}
This function returns a string for formatted parameter assignment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{valstring} :: {[}in{]} A string containing the value of the parameter

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mlen}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{undef\_string() (fortran function in module mom\_document)@\spxentry{undef\_string()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/undef_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{undef\_string}}}{\emph{doc}, \emph{varName}, \emph{units}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=mlen)}\sphinxstyleemphasis{{]}}}
This function returns a string for formatted false logicals.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of the parameter being documented

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{string\_false}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_module() (fortran subroutine in module mom\_document)@\spxentry{doc\_module()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_module}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_module}}}{\emph{doc}, \emph{modname}, \emph{desc}, \emph{log\_to\_all}, \emph{all\_default}, \emph{layoutMod}, \emph{debuggingMod}}{}
This subroutine handles the module documentation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{modname} :: {[}in{]} The name of the module being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the module being documented

\item {} 
\sphinxstylestrong{log\_to\_all} :: {[}in{]} If present and true, log this parameter to the …\_doc.all files, even if this module also has layout or debugging parameters.

\item {} 
\sphinxstylestrong{all\_default} :: {[}in{]} If true, all parameters take their default values.

\item {} 
\sphinxstylestrong{layoutmod} :: {[}in{]} If present and true, this module has layout parameters.

\item {} 
\sphinxstylestrong{debuggingmod} :: {[}in{]} If present and true, this module has debugging parameters.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/writemessageanddesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writemessageanddesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_subroutine() (fortran subroutine in module mom\_document)@\spxentry{doc\_subroutine()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_subroutine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_subroutine}}}{\emph{doc}, \emph{modname}, \emph{subname}, \emph{desc}}{}
This subroutine handles the subroutine documentation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{modname} :: {[}in{]} The name of the module being documented

\item {} 
\sphinxstylestrong{subname} :: {[}in{]} The name of the subroutine being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the subroutine being documented

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_function() (fortran subroutine in module mom\_document)@\spxentry{doc\_function()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_function}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_function}}}{\emph{doc}, \emph{modname}, \emph{fnname}, \emph{desc}}{}
This subroutine handles the function documentation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{modname} :: {[}in{]} The name of the module being documented

\item {} 
\sphinxstylestrong{fnname} :: {[}in{]} The name of the function being documented

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the function being documented

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_init() (fortran subroutine in module mom\_document)@\spxentry{doc\_init()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_init}}}{\emph{docFileBase}, \emph{doc}, \emph{minimal}, \emph{complete}, \emph{layout}, \emph{debugging}}{}
Initialize the parameter documentation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{docfilebase} :: {[}in{]} The base file name for this set of parameters, for example MOM\_parameter\_doc

\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{minimal} :: {[}in{]} If present and true, write out the files (.short) documenting those parameters that do not take on their default values.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} If present and true, write out the (.all) files documenting all parameters

\item {} 
\sphinxstylestrong{layout} :: {[}in{]} If present and true, write out the (.layout) files documenting the layout parameters

\item {} 
\sphinxstylestrong{debugging} :: {[}in{]} If present and true, write out the (.debugging) files documenting the debugging parameters

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_doc\_file() (fortran subroutine in module mom\_document)@\spxentry{open\_doc\_file()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{open\_doc\_file}}}{\emph{doc}}{}
This subroutine allocates and populates a structure that controls where the documentation occurs and its formatting, and opens up the files controlled by this structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/find_unused_unit_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_unused\_unit\_number}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_closeblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_closeblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_module}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_module}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_openblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_openblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_subroutine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_subroutine}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_unused\_unit\_number() (fortran function in module mom\_document)@\spxentry{find\_unused\_unit\_number()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/find_unused_unit_number}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{find\_unused\_unit\_number}}}{}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Find an unused unit number, returning \textgreater{}0 if found, and triggering a FATAL error if not.
\begin{quote}\begin{description}
\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/open_doc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_doc\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{doc\_end() (fortran subroutine in module mom\_document)@\spxentry{doc\_end()}\spxextra{fortran subroutine in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/doc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{doc\_end}}}{\emph{doc}}{}
This subroutine closes the the files controlled by doc, and sets flags in doc to indicate that parameterization is no longer permitted.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\end{description}\end{quote}

\end{fulllineitems}

\index{mesghasbeendocumented() (fortran function in module mom\_document)@\spxentry{mesghasbeendocumented()}\spxextra{fortran function in module mom\_document}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_document:f/mom_document/mesghasbeendocumented}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_document/}}\sphinxbfcode{\sphinxupquote{mesghasbeendocumented}}}{\emph{doc}, \emph{varName}, \emph{mesg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if documentation has already been written.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{doc} :: A pointer to a structure that controls where the documentation occurs and its formatting

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter being documented

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message with parameter values, defaults, and descriptions to compare with the message that was written previously

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_logical\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{doc\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_domains module reference}
\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains}}\label{\detokenize{api/generated/modules/mom_domains:mom-domains-module-reference}}\label{\detokenize{api/generated/modules/mom_domains::doc}}\index{mom\_domains (module)@\spxentry{mom\_domains}\spxextra{module}|spxpagem}
Describes the decomposed MOM domain and has routines for communications across PEs.

{\hyperref[\detokenize{api/generated/modules/mom_domains:detamom-domains}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_domains:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domain_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domain\_type}}}}}
&
The MOM\_domain\_type contains information about the domain decompositoin.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_domains:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_var\_3d()}}}}}
&
pass\_var\_3d does a halo update for a three\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_var\_2d()}}}}}
&
pass\_var\_2d does a halo update for a two\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_start_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_var\_start\_2d()}}}}}
&
pass\_var\_start\_2d starts a halo update for a two\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_start_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_var\_start\_3d()}}}}}
&
pass\_var\_start\_3d starts a halo update for a three\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_complete_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_var\_complete\_2d()}}}}}
&
pass\_var\_complete\_2d completes a halo update for a two\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_complete_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_var\_complete\_3d()}}}}}
&
pass\_var\_complete\_3d completes a halo update for a three\sphinxhyphen{}dimensional array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_vector\_2d()}}}}}
&
pass\_vector\_2d does a halo update for a pair of two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/fill_vector_symmetric_edges_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_vector\_symmetric\_edges\_2d()}}}}}
&
fill\_vector\_symmetric\_edges\_2d does an usual set of halo updates that only fill in the values at the edge of a pair of symmetric memory two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector. If symmetric memory is not being used, this subroutine does nothing except to possibly turn optional cpu clocks on or off.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_vector\_3d()}}}}}
&
pass\_vector\_3d does a halo update for a pair of three\sphinxhyphen{}dimensional arrays representing the compontents of a three\sphinxhyphen{}dimensional horizontal vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_start_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_vector\_start\_2d()}}}}}
&
pass\_vector\_start\_2d starts a halo update for a pair of two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_start_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_vector\_start\_3d()}}}}}
&
pass\_vector\_start\_3d starts a halo update for a pair of three\sphinxhyphen{}dimensional arrays representing the compontents of a three\sphinxhyphen{}dimensional horizontal vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_complete_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_vector\_complete\_2d()}}}}}
&
pass\_vector\_complete\_2d completes a halo update for a pair of two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_complete_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pass\_vector\_complete\_3d()}}}}}
&
pass\_vector\_complete\_3d completes a halo update for a pair of three\sphinxhyphen{}dimensional arrays representing the compontents of a three\sphinxhyphen{}dimensional horizontal vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_var_group_pass_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_var\_group\_pass\_2d()}}}}}
&
create\_var\_group\_pass\_2d sets up a group of two\sphinxhyphen{}dimensional array halo updates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_var_group_pass_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_var\_group\_pass\_3d()}}}}}
&
create\_var\_group\_pass\_3d sets up a group of three\sphinxhyphen{}dimensional array halo updates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_vector_group_pass_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_vector\_group\_pass\_2d()}}}}}
&
create\_vector\_group\_pass\_2d sets up a group of two\sphinxhyphen{}dimensional vector halo updates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_vector_group_pass_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_vector\_group\_pass\_3d()}}}}}
&
create\_vector\_group\_pass\_3d sets up a group of three\sphinxhyphen{}dimensional vector halo updates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{do\_group\_pass()}}}}}
&
do\_group\_pass carries out a group halo update.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/start_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{start\_group\_pass()}}}}}
&
start\_group\_pass starts out a group halo update.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/complete_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complete\_group\_pass()}}}}}
&
complete\_group\_pass completes a group halo update.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domains_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains\_init()}}}}}
&
MOM\_domains\_init initalizes a MOM\_domain\_type variable, based on the information read in from a param\_file\_type, and optionally returns data describing various’ properties of the domain type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/clone_md_to_md}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clone\_md\_to\_md()}}}}}
&
clone\_MD\_to\_MD copies one MOM\_domain\_type into another, while allowing some properties of the new type to differ from the original one.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/clone_md_to_d2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clone\_md\_to\_d2d()}}}}}
&
clone\_MD\_to\_d2D uses information from a MOM\_domain\_type to create a new domain2d type, while allowing some properties of the new type to differ from the original one.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_domain_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_domain\_extent()}}}}}
&
Returns various data that has been stored in a MOM\_domain\_type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_domain_extent_dsamp2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_domain\_extent\_dsamp2()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_simple\_array\_i\_ind()}}}}}
&
Return the (potentially symmetric) computational domain i\sphinxhyphen{}bounds for an array passed without index specifications (i.e.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_simple\_array\_j\_ind()}}}}}
&
Return the (potentially symmetric) computational domain j\sphinxhyphen{}bounds for an array passed without index specifications (i.e.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_global_shape}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_global\_shape()}}}}}
&
Returns the global shape of h\sphinxhyphen{}point arrays.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_domains:detailed-description}}\label{\detokenize{api/generated/modules/mom_domains:detamom-domains}}
Describes the decomposed MOM domain and has routines for communications across PEs.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_domains:type-documentation}}\index{mom\_domain\_type (fortran type in module mom\_domains)@\spxentry{mom\_domain\_type}\spxextra{fortran type in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domain_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{mom\_domain\_type}}}
The MOM\_domain\_type contains information about the domain decompositoin.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mpp\_domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(domain2d)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The FMS domain with halos on this processor, centered at h points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mpp\_domain\_d2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(domain2d)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A coarse FMS domain with halos on this processor, centered at h points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{niglobal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The total horizontal i\sphinxhyphen{}domain size.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{njglobal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The total horizontal j\sphinxhyphen{}domain size.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nihalo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The i\sphinxhyphen{}halo size in memory.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{njhalo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The j\sphinxhyphen{}halo size in memory.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{symmetric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if symmetric memory is used with this domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonblocking\_updates}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, non\sphinxhyphen{}blocking halo updates are allowed. The default is .false. (for now).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thin\_halo\_updates}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, optional arguments may be used to specify the width of the halos that are updated with each call.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{layout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(2)}\sphinxstyleemphasis{{]}} :: This domain’s processor layout. This is saved to enable the construction of related new domains with different resolutions or other properties.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{io\_layout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(2)}\sphinxstyleemphasis{{]}} :: The IO\sphinxhyphen{}layout used with this domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_flags}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Flag that specifies the properties of the domain in the i\sphinxhyphen{}direction in a define\_domain call.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y\_flags}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Flag that specifies the properties of the domain in the j\sphinxhyphen{}direction in a define\_domain call.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maskmap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to an array indicating which logical processors are actually used for the ocean code. The other logical processors would be contain only land points and are not assigned to actual processors. This need not be assigned if all logical processors are used.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_domains:function-subroutine-documentation}}\index{pass\_var\_3d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_var\_3d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_var\_3d}}}{\emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{complete}, \emph{position}, \emph{halo}, \emph{clock}}{}
pass\_var\_3d does a halo update for a three\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, sothe halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_var\_2d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_var\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_var\_2d}}}{\emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{complete}, \emph{position}, \emph{halo}, \emph{inner\_halo}, \emph{clock}}{}
pass\_var\_2d does a halo update for a two\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{inner\_halo} :: {[}in{]} The size of an inner halo to avoid updating, or 0 to avoid updating symmetric memory computational domain points. Setting this \textgreater{}=0 also enforces that complete=.true.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_var\_start\_2d() (fortran function in module mom\_domains)@\spxentry{pass\_var\_start\_2d()}\spxextra{fortran function in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_start_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_var\_start\_2d}}}{\emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{position}, \emph{complete}, \emph{halo}, \emph{clock}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
pass\_var\_start\_2d starts a halo update for a two\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The integer index for this update.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_var\_start\_3d() (fortran function in module mom\_domains)@\spxentry{pass\_var\_start\_3d()}\spxextra{fortran function in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_start_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_var\_start\_3d}}}{\emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{position}, \emph{complete}, \emph{halo}, \emph{clock}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
pass\_var\_start\_3d starts a halo update for a three\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The integer index for this update.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_var\_complete\_2d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_var\_complete\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_complete_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_var\_complete\_2d}}}{\emph{id\_update}, \emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{position}, \emph{halo}, \emph{clock}}{}
pass\_var\_complete\_2d completes a halo update for a two\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id\_update} :: {[}in{]} The integer id of this update which has been returned from a previous call to \sphinxcode{\sphinxupquote{pass\_var\_start()}}..

\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_var\_complete\_3d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_var\_complete\_3d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_complete_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_var\_complete\_3d}}}{\emph{id\_update}, \emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{position}, \emph{halo}, \emph{clock}}{}
pass\_var\_complete\_3d completes a halo update for a three\sphinxhyphen{}dimensional array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id\_update} :: {[}in{]} The integer id of this update which has been returned from a previous call to \sphinxcode{\sphinxupquote{pass\_var\_start()}}..

\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_vector\_2d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_vector\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_vector\_2d}}}{\emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{complete}, \emph{halo}, \emph{clock}}{}
pass\_vector\_2d does a halo update for a pair of two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fill\_vector\_symmetric\_edges\_2d() (fortran subroutine in module mom\_domains)@\spxentry{fill\_vector\_symmetric\_edges\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/fill_vector_symmetric_edges_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{fill\_vector\_symmetric\_edges\_2d}}}{\emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{stagger}, \emph{scalar}, \emph{clock}}{}
fill\_vector\_symmetric\_edges\_2d does an usual set of halo updates that only fill in the values at the edge of a pair of symmetric memory two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector. If symmetric memory is not being used, this subroutine does nothing except to possibly turn optional cpu clocks on or off.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{scalar} :: {[}in{]} An optional argument indicating whether.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_vector\_3d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_vector\_3d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_vector\_3d}}}{\emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{complete}, \emph{halo}, \emph{clock}}{}
pass\_vector\_3d does a halo update for a pair of three\sphinxhyphen{}dimensional arrays representing the compontents of a three\sphinxhyphen{}dimensional horizontal vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_vector\_start\_2d() (fortran function in module mom\_domains)@\spxentry{pass\_vector\_start\_2d()}\spxextra{fortran function in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_start_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_vector\_start\_2d}}}{\emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{complete}, \emph{halo}, \emph{clock}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
pass\_vector\_start\_2d starts a halo update for a pair of two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The integer index for this update.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_vector\_start\_3d() (fortran function in module mom\_domains)@\spxentry{pass\_vector\_start\_3d()}\spxextra{fortran function in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_start_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_vector\_start\_3d}}}{\emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{complete}, \emph{halo}, \emph{clock}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
pass\_vector\_start\_3d starts a halo update for a pair of three\sphinxhyphen{}dimensional arrays representing the compontents of a three\sphinxhyphen{}dimensional horizontal vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{complete} :: {[}in{]} An optional argument indicating whether the halo updates should be completed before progress resumes. Omitting complete is the same as setting complete to .true.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The integer index for this update.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_vector\_complete\_2d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_vector\_complete\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_complete_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_vector\_complete\_2d}}}{\emph{id\_update}, \emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{halo}, \emph{clock}}{}
pass\_vector\_complete\_2d completes a halo update for a pair of two\sphinxhyphen{}dimensional arrays representing the compontents of a two\sphinxhyphen{}dimensional horizontal vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id\_update} :: {[}in{]} The integer id of this update which has been returned from a previous call to \sphinxcode{\sphinxupquote{pass\_var\_start()}}..

\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pass\_vector\_complete\_3d() (fortran subroutine in module mom\_domains)@\spxentry{pass\_vector\_complete\_3d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_vector_complete_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{pass\_vector\_complete\_3d}}}{\emph{id\_update}, \emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{halo}, \emph{clock}}{}
pass\_vector\_complete\_3d completes a halo update for a pair of three\sphinxhyphen{}dimensional arrays representing the compontents of a three\sphinxhyphen{}dimensional horizontal vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id\_update} :: {[}in{]} The integer id of this update which has been returned from a previous call to \sphinxcode{\sphinxupquote{pass\_var\_start()}}..

\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{create\_var\_group\_pass\_2d() (fortran subroutine in module mom\_domains)@\spxentry{create\_var\_group\_pass\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_var_group_pass_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{create\_var\_group\_pass\_2d}}}{\emph{group}, \emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{position}, \emph{halo}, \emph{clock}}{}
create\_var\_group\_pass\_2d sets up a group of two\sphinxhyphen{}dimensional array halo updates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{create\_var\_group\_pass\_3d() (fortran subroutine in module mom\_domains)@\spxentry{create\_var\_group\_pass\_3d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_var_group_pass_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{create\_var\_group\_pass\_3d}}}{\emph{group}, \emph{array}, \emph{MOM\_dom}, \emph{sideflag}, \emph{position}, \emph{halo}, \emph{clock}}{}
create\_var\_group\_pass\_3d sets up a group of three\sphinxhyphen{}dimensional array halo updates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{array} :: {[}inout{]} The array which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{sideflag} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if sideflag is omitted.

\item {} 
\sphinxstylestrong{position} :: {[}in{]} An optional argument indicating the position. This is CENTER by default and is often CORNER, but could also be EAST\_FACE or NORTH\_FACE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{create\_vector\_group\_pass\_2d() (fortran subroutine in module mom\_domains)@\spxentry{create\_vector\_group\_pass\_2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_vector_group_pass_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{create\_vector\_group\_pass\_2d}}}{\emph{group}, \emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{halo}, \emph{clock}}{}
create\_vector\_group\_pass\_2d sets up a group of two\sphinxhyphen{}dimensional vector halo updates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{create\_vector\_group\_pass\_3d() (fortran subroutine in module mom\_domains)@\spxentry{create\_vector\_group\_pass\_3d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/create_vector_group_pass_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{create\_vector\_group\_pass\_3d}}}{\emph{group}, \emph{u\_cmpt}, \emph{v\_cmpt}, \emph{MOM\_dom}, \emph{direction}, \emph{stagger}, \emph{halo}, \emph{clock}}{}
create\_vector\_group\_pass\_3d sets up a group of three\sphinxhyphen{}dimensional vector halo updates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{u\_cmpt} :: {[}inout{]} The nominal zonal (u) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{v\_cmpt} :: {[}inout{]} The nominal meridional (v) component of the vector pair which is having its halos points exchanged.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{direction} :: {[}in{]} An optional integer indicating which directions the data should be sent. It is TO\_ALL or the sum of any of TO\_EAST, TO\_WEST, TO\_NORTH, and TO\_SOUTH, possibly plus SCALAR\_PAIR if these are paired non\sphinxhyphen{}directional scalars discretized at the typical vector component locations. For example, TO\_EAST sends the data to the processor to the east, so the halos on the western side are filled. TO\_ALL is the default if omitted.

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} An optional flag, which may be one of A\_GRID, BGRID\_NE, or CGRID\_NE, indicating where the two components of the vector are discretized. Omitting stagger is the same as setting it to CGRID\_NE.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The size of the halo to update \sphinxhyphen{} the full halo by default.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{do\_group\_pass() (fortran subroutine in module mom\_domains)@\spxentry{do\_group\_pass()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{do\_group\_pass}}}{\emph{group}, \emph{MOM\_dom}, \emph{clock}}{}
do\_group\_pass carries out a group halo update.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_advect::advect\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_regrid_accelerated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_regrid\_accelerated}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::step\_forward\_meke}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{start\_group\_pass() (fortran subroutine in module mom\_domains)@\spxentry{start\_group\_pass()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/start_group_pass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{start\_group\_pass}}}{\emph{group}, \emph{MOM\_dom}, \emph{clock}}{}
start\_group\_pass starts out a group halo update.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::propagate\_int\_tide}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{complete\_group\_pass() (fortran subroutine in module mom\_domains)@\spxentry{complete\_group\_pass()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/complete_group_pass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{complete\_group\_pass}}}{\emph{group}, \emph{MOM\_dom}, \emph{clock}}{}
complete\_group\_pass completes a group halo update.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{group} :: {[}inout{]} The data type that store information for group update. This data will be used in do\_group\_pass.

\item {} 
\sphinxstylestrong{mom\_dom} :: {[}inout{]} The MOM\_domain\_type containing the mpp\_domain needed to determine where data should be sent.

\item {} 
\sphinxstylestrong{clock} :: {[}in{]} The handle for a cpu time clock that should be started then stopped to time this routine.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::propagate\_int\_tide}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_domains\_init() (fortran subroutine in module mom\_domains)@\spxentry{mom\_domains\_init()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domains_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{mom\_domains\_init}}}{\emph{MOM\_dom}, \emph{param\_file}, \emph{symmetric}, \emph{static\_memory}, \emph{NIHALO}, \emph{NJHALO}, \emph{NIGLOBAL}, \emph{NJGLOBAL}, \emph{NIPROC}, \emph{NJPROC}, \emph{min\_halo}, \emph{domain\_name}, \emph{include\_name}, \emph{param\_suffix}}{}
MOM\_domains\_init initalizes a MOM\_domain\_type variable, based on the information read in from a param\_file\_type, and optionally returns data describing various’ properties of the domain type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mom\_dom} :: A pointer to the MOM\_domain\_type being defined here.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If present, this specifies whether this domain is symmetric, regardless of whether the macro {\color{red}\bfseries{}SYMMETRIC\_MEMORY\_} is defined.

\item {} 
\sphinxstylestrong{static\_memory} :: {[}in{]} If present and true, this domain type is set up for static memory and error checking of various input values is performed against those in the input file.

\item {} 
\sphinxstylestrong{nihalo} :: {[}in{]} Default halo sizes, required with static memory.

\item {} 
\sphinxstylestrong{njhalo} :: {[}in{]} Default halo sizes, required with static memory.

\item {} 
\sphinxstylestrong{niglobal} :: {[}in{]} Total domain sizes, required with static memory.

\item {} 
\sphinxstylestrong{njglobal} :: {[}in{]} Total domain sizes, required with static memory.

\item {} 
\sphinxstylestrong{niproc} :: {[}in{]} Processor counts, required with static memory.

\item {} 
\sphinxstylestrong{njproc} :: {[}in{]} Processor counts, required with static memory.

\item {} 
\sphinxstylestrong{min\_halo} :: {[}inout{]} If present, this sets the minimum halo size for this domain in the i\sphinxhyphen{} and j\sphinxhyphen{} directions, and returns the actual halo size used.

\item {} 
\sphinxstylestrong{domain\_name} :: {[}in{]} A name for this domain, “MOM” if missing.

\item {} 
\sphinxstylestrong{include\_name} :: {[}in{]} A name for model’s include file, “MOM\_memory.h” if missing.

\item {} 
\sphinxstylestrong{param\_suffix} :: {[}in{]} A suffix to apply to layout\sphinxhyphen{}specific parameters.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/slasher}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::slasher}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{clone\_md\_to\_md() (fortran subroutine in module mom\_domains)@\spxentry{clone\_md\_to\_md()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/clone_md_to_md}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{clone\_md\_to\_md}}}{\emph{MD\_in}, \emph{MOM\_dom}, \emph{min\_halo}, \emph{halo\_size}, \emph{symmetric}, \emph{domain\_name}, \emph{turns}}{}
clone\_MD\_to\_MD copies one MOM\_domain\_type into another, while allowing some properties of the new type to differ from the original one.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{md\_in} :: {[}in{]} An existing MOM\_domain

\item {} 
\sphinxstylestrong{mom\_dom} :: A pointer to a MOM\_domain that will be allocated if it is unassociated, and will have data copied from MD\_in

\item {} 
\sphinxstylestrong{min\_halo} :: {[}inout{]} If present, this sets the

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} If present, this sets the halo size for the domain in the i\sphinxhyphen{} and j\sphinxhyphen{}directions. min\_halo and halo\_size can not both be present.

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If present, this specifies whether the new domain is symmetric, regardless of whether the macro {\color{red}\bfseries{}SYMMETRIC\_MEMORY\_} is defined.

\item {} 
\sphinxstylestrong{domain\_name} :: {[}in{]} A name for the new domain, “MOM”

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{clone\_md\_to\_d2d() (fortran subroutine in module mom\_domains)@\spxentry{clone\_md\_to\_d2d()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/clone_md_to_d2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{clone\_md\_to\_d2d}}}{\emph{MD\_in}, \emph{mpp\_domain}, \emph{min\_halo}, \emph{halo\_size}, \emph{symmetric}, \emph{domain\_name}, \emph{turns}}{}
clone\_MD\_to\_d2D uses information from a MOM\_domain\_type to create a new domain2d type, while allowing some properties of the new type to differ from the original one.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{md\_in} :: {[}in{]} An existing MOM\_domain to be cloned

\item {} 
\sphinxstylestrong{mpp\_domain} :: {[}inout{]} The new mpp\_domain to be set up

\item {} 
\sphinxstylestrong{min\_halo} :: {[}inout{]} If present, this sets the

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} If present, this sets the halo size for the domain in the i\sphinxhyphen{} and j\sphinxhyphen{}directions. min\_halo and halo\_size can not both be present.

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If present, this specifies whether the new domain is symmetric, regardless of whether the macro {\color{red}\bfseries{}SYMMETRIC\_MEMORY\_} is defined.

\item {} 
\sphinxstylestrong{domain\_name} :: {[}in{]} A name for the new domain, “MOM”

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} If true, swap X and Y axes

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_domain\_extent() (fortran subroutine in module mom\_domains)@\spxentry{get\_domain\_extent()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_domain_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{get\_domain\_extent}}}{\emph{Domain}, \emph{isc}, \emph{iec}, \emph{jsc}, \emph{jec}, \emph{isd}, \emph{ied}, \emph{jsd}, \emph{jed}, \emph{isg}, \emph{ieg}, \emph{jsg}, \emph{jeg}, \emph{idg\_offset}, \emph{jdg\_offset}, \emph{symmetric}, \emph{local\_indexing}, \emph{index\_offset}}{}
Returns various data that has been stored in a MOM\_domain\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} The MOM domain from which to extract information

\item {} 
\sphinxstylestrong{isc} :: {[}out{]} The start i\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{iec} :: {[}out{]} The end i\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{jsc} :: {[}out{]} The start j\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{jec} :: {[}out{]} The end j\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{isd} :: {[}out{]} The start i\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{ied} :: {[}out{]} The end i\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{jsd} :: {[}out{]} The start j\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{jed} :: {[}out{]} The end j\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{isg} :: {[}out{]} The start i\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{ieg} :: {[}out{]} The end i\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{jsg} :: {[}out{]} The start j\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{jeg} :: {[}out{]} The end j\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{idg\_offset} :: {[}out{]} The offset between the corresponding global and data i\sphinxhyphen{}index spaces.

\item {} 
\sphinxstylestrong{jdg\_offset} :: {[}out{]} The offset between the corresponding global and data j\sphinxhyphen{}index spaces.

\item {} 
\sphinxstylestrong{symmetric} :: {[}out{]} True if symmetric memory is used.

\item {} 
\sphinxstylestrong{local\_indexing} :: {[}in{]} If true, local tracer array indices start at 1, as in most MOM6 code.

\item {} 
\sphinxstylestrong{index\_offset} :: {[}in{]} A fixed additional offset to all indices. This can be useful for some types of debugging with dynamic memory allocation.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::hor\_index\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_domain\_extent\_dsamp2() (fortran subroutine in module mom\_domains)@\spxentry{get\_domain\_extent\_dsamp2()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_domain_extent_dsamp2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{get\_domain\_extent\_dsamp2}}}{\emph{Domain}, \emph{isc\_d2}, \emph{iec\_d2}, \emph{jsc\_d2}, \emph{jec\_d2}, \emph{isd\_d2}, \emph{ied\_d2}, \emph{jsd\_d2}, \emph{jed\_d2}, \emph{isg\_d2}, \emph{ieg\_d2}, \emph{jsg\_d2}, \emph{jeg\_d2}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} The MOM domain from which to extract information

\item {} 
\sphinxstylestrong{isc\_d2} :: {[}out{]} The start i\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{iec\_d2} :: {[}out{]} The end i\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{jsc\_d2} :: {[}out{]} The start j\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{jec\_d2} :: {[}out{]} The end j\sphinxhyphen{}index of the computational domain

\item {} 
\sphinxstylestrong{isd\_d2} :: {[}out{]} The start i\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{ied\_d2} :: {[}out{]} The end i\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{jsd\_d2} :: {[}out{]} The start j\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{jed\_d2} :: {[}out{]} The end j\sphinxhyphen{}index of the data domain

\item {} 
\sphinxstylestrong{isg\_d2} :: {[}out{]} The start i\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{ieg\_d2} :: {[}out{]} The end i\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{jsg\_d2} :: {[}out{]} The start j\sphinxhyphen{}index of the global domain

\item {} 
\sphinxstylestrong{jeg\_d2} :: {[}out{]} The end j\sphinxhyphen{}index of the global domain

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::mom\_grid\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_simple\_array\_i\_ind() (fortran subroutine in module mom\_domains)@\spxentry{get\_simple\_array\_i\_ind()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{get\_simple\_array\_i\_ind}}}{\emph{domain}, \emph{size}, \emph{is}, \emph{ie}, \emph{symmetric}}{}
Return the (potentially symmetric) computational domain i\sphinxhyphen{}bounds for an array passed without index specifications (i.e. indices start at 1) based on an array size.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} MOM domain from which to extract information

\item {} 
\sphinxstylestrong{size} :: {[}in{]} The i\sphinxhyphen{}array size

\item {} 
\sphinxstylestrong{is} :: {[}out{]} The computational domain starting i\sphinxhyphen{}index.

\item {} 
\sphinxstylestrong{ie} :: {[}out{]} The computational domain ending i\sphinxhyphen{}index.

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If present, indicates whether symmetric sizes can be considered.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_data\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_data\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_data\_4d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_vector\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_vector\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_simple\_array\_j\_ind() (fortran subroutine in module mom\_domains)@\spxentry{get\_simple\_array\_j\_ind()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{get\_simple\_array\_j\_ind}}}{\emph{domain}, \emph{size}, \emph{js}, \emph{je}, \emph{symmetric}}{}
Return the (potentially symmetric) computational domain j\sphinxhyphen{}bounds for an array passed without index specifications (i.e. indices start at 1) based on an array size.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} MOM domain from which to extract information

\item {} 
\sphinxstylestrong{size} :: {[}in{]} The j\sphinxhyphen{}array size

\item {} 
\sphinxstylestrong{js} :: {[}out{]} The computational domain starting j\sphinxhyphen{}index.

\item {} 
\sphinxstylestrong{je} :: {[}out{]} The computational domain ending j\sphinxhyphen{}index.

\item {} 
\sphinxstylestrong{symmetric} :: {[}in{]} If present, indicates whether symmetric sizes can be considered.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_data\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_data\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_data\_4d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_vector\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::mom\_read\_vector\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_global\_shape() (fortran subroutine in module mom\_domains)@\spxentry{get\_global\_shape()}\spxextra{fortran subroutine in module mom\_domains}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_global_shape}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_domains/}}\sphinxbfcode{\sphinxupquote{get\_global\_shape}}}{\emph{domain}, \emph{niglobal}, \emph{njglobal}}{}
Returns the global shape of h\sphinxhyphen{}point arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} MOM domain

\item {} 
\sphinxstylestrong{niglobal} :: {[}out{]} i\sphinxhyphen{}index global size of h\sphinxhyphen{}point arrays

\item {} 
\sphinxstylestrong{njglobal} :: {[}out{]} j\sphinxhyphen{}index global size of h\sphinxhyphen{}point arrays

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/get_global_grid_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::get\_global\_grid\_size}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::hor\_index\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_dyn\_horgrid module reference}
\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid}}\label{\detokenize{api/generated/modules/mom_dyn_horgrid:mom-dyn-horgrid-module-reference}}\label{\detokenize{api/generated/modules/mom_dyn_horgrid::doc}}\index{mom\_dyn\_horgrid (module)@\spxentry{mom\_dyn\_horgrid}\spxextra{module}|spxpagem}
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines that work on this type.

{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:detamom-dyn-horgrid}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_dyn_horgrid:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/dyn_horgrid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyn\_horgrid\_type}}}}}
&
Describes the horizontal ocean grid with only dynamic memory arrays.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_dyn_horgrid:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/create_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_dyn\_horgrid()}}}}}
&
Allocate memory used by the {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/dyn_horgrid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyn\_horgrid\_type()}}}}} and related structures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/rescale_dyn_horgrid_bathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rescale\_dyn\_horgrid\_bathymetry()}}}}}
&
rescale\_dyn\_horgrid\_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal depth units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/set_derived_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_derived\_dyn\_horgrid()}}}}}
&
set\_derived\_dyn\_horgrid calculates metric terms that are derived from other metrics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/adcroft_reciprocal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adcroft\_reciprocal()}}}}}
&
Adcroft\_reciprocal(x) = 1/x for {\color{red}\bfseries{}|x|}\textgreater{}0 or 0 for x=0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/destroy_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{destroy\_dyn\_horgrid()}}}}}
&
Release memory used by the {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/dyn_horgrid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyn\_horgrid\_type()}}}}} and related structures.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_dyn_horgrid:detailed-description}}\label{\detokenize{api/generated/modules/mom_dyn_horgrid:detamom-dyn-horgrid}}
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines that work on this type.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_dyn_horgrid:type-documentation}}\index{dyn\_horgrid\_type (fortran type in module mom\_dyn\_horgrid)@\spxentry{dyn\_horgrid\_type}\spxextra{fortran type in module mom\_dyn\_horgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/dyn_horgrid_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid/}}\sphinxbfcode{\sphinxupquote{dyn\_horgrid\_type}}}
Describes the horizontal ocean grid with only dynamic memory arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_domain\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Ocean model domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{domain\_aux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_domain\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A non\sphinxhyphen{}symmetric auxiliary domain type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_index\_type)}\sphinxstyleemphasis{{]}} :: Horizontal index ranges.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isdb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iedb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsdb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jedb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The value of isd in the global index space (decompoistion invariant).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The value of isd in the global index space (decompoistion invariant).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idg\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The offset between the corresponding global and local i\sphinxhyphen{}indices.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jdg\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The offset between the corresponding global and local j\sphinxhyphen{}indices.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{symmetric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if symmetric memory is used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonblocking\_updates}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, non\sphinxhyphen{}blocking halo updates are allowed. The default is .false. (for now).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{first\_direction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer that indicates which direction is to be updated first in directionally split parts of the calculation. This can be altered during the course of the run via calls to set\_first\_direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 0 for land points and 1 for ocean points on the h\sphinxhyphen{}grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geolatt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic latitude at q points {[}degrees of latitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geolont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic longitude at q points {[}degrees of longitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dxt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dxT is delta x at h points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idxt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dxT {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dyt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dyT is delta y at h points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idyt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: IdyT is 1/dyT {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{areat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The area of an h\sphinxhyphen{}cell {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iareat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/areaT {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sin\_rot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The sine of the angular rotation between the local model grid’s northward and the true northward directions {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cos\_rot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The cosine of the angular rotation between the local model grid’s northward and the true northward directions {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dcu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 0 for boundary points and 1 for ocean points on the u grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geolatcu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic latitude at u points {[}degrees of latitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geoloncu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic longitude at u points {[}degrees of longitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dxcu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dxCu is delta x at u points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idxcu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dxCu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dycu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dyCu is delta y at u points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idycu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dyCu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dy\_cu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The unblocked lengths of the u\sphinxhyphen{}faces of the h\sphinxhyphen{}cell {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iareacu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The masked inverse areas of u\sphinxhyphen{}grid cells {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{areacu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The areas of the u\sphinxhyphen{}grid cells {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 0 for boundary points and 1 for ocean points on the v grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geolatcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic latitude at v points {[}degrees of latitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geoloncv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic longitude at v points {[}degrees of longitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dxcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dxCv is delta x at v points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idxcv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dxCv {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dycv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dyCv is delta y at v points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idycv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dyCv {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dx\_cv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The unblocked lengths of the v\sphinxhyphen{}faces of the h\sphinxhyphen{}cell {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iareacv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The masked inverse areas of v\sphinxhyphen{}grid cells {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{areacv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The areas of the v\sphinxhyphen{}grid cells {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask2dbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 0 for boundary points and 1 for ocean points on the q grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geolatbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic latitude at q points {[}degrees of latitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geolonbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The geographic longitude at q points {[}degrees of longitude{]} or {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dxbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dxBu is delta x at q points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idxbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dxBu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dybu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dyBu is delta y at q points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idybu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: 1/dyBu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{areabu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: areaBu is the area of a q\sphinxhyphen{}cell {[}L \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iareabu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: IareaBu = 1/areaBu {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlatt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The latitude of T points for the purpose of labeling the output axes. On many grids this is the same as geoLatT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlatb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The latitude of B points for the purpose of labeling the output axes. On many grids this is the same as geoLatBu.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The longitude of T points for the purpose of labeling the output axes. On many grids this is the same as geoLonT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlonb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The longitude of B points for the purpose of labeling the output axes. On many grids this is the same as geoLonBu.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_axis\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: The units that are used in labeling the x coordinate axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y\_axis\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: The units that are used in labeling the y coordinate axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bathyt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Ocean bottom depth at tracer points, in depth units {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bathymetry\_at\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, there are separate values for the basin depths at velocity points. Otherwise the effects of of topography are entirely determined from thickness points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dblock\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Topographic depths at u\sphinxhyphen{}points at which the flow is blocked {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dopen\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Topographic depths at u\sphinxhyphen{}points at which the flow is open at width dy\_Cu {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dblock\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Topographic depths at v\sphinxhyphen{}points at which the flow is blocked {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dopen\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Topographic depths at v\sphinxhyphen{}points at which the flow is open at width dx\_Cv {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolisbu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The Coriolis parameter at corner points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{df\_dx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Derivative d/dx f (Coriolis parameter) at h\sphinxhyphen{}points {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{df\_dy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Derivative d/dy f (Coriolis parameter) at h\sphinxhyphen{}points {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{areat\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Global sum of h\sphinxhyphen{}cell area {[}m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iareat\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Global sum of inverse h\sphinxhyphen{}cell area (1/areaT\_global) {[}m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{south\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latitude (or y\sphinxhyphen{}coordinate) of the first v\sphinxhyphen{}line.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{west\_lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The longitude (or x\sphinxhyphen{}coordinate) of the first u\sphinxhyphen{}line.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latitudinal (or y\sphinxhyphen{}coord) extent of physical domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The longitudinal (or x\sphinxhyphen{}coord) extent of physical domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rad\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The radius of the planet {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum depth of the ocean {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_dyn_horgrid:function-subroutine-documentation}}\index{create\_dyn\_horgrid() (fortran subroutine in module mom\_dyn\_horgrid)@\spxentry{create\_dyn\_horgrid()}\spxextra{fortran subroutine in module mom\_dyn\_horgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/create_dyn_horgrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid/}}\sphinxbfcode{\sphinxupquote{create\_dyn\_horgrid}}}{\emph{G}, \emph{HI}, \emph{bathymetry\_at\_vel}}{}
Allocate memory used by the {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/dyn_horgrid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyn\_horgrid\_type()}}}}} and related structures.
and related structures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} A pointer to the dynamic horizontal grid type

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A hor\_index\_type for array extents

\item {} 
\sphinxstylestrong{bathymetry\_at\_vel} :: {[}in{]} If true, there are separate values for the basin depths at velocity points. Otherwise the effects of topography are entirely determined from thickness points.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rescale\_dyn\_horgrid\_bathymetry() (fortran subroutine in module mom\_dyn\_horgrid)@\spxentry{rescale\_dyn\_horgrid\_bathymetry()}\spxextra{fortran subroutine in module mom\_dyn\_horgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/rescale_dyn_horgrid_bathymetry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid/}}\sphinxbfcode{\sphinxupquote{rescale\_dyn\_horgrid\_bathymetry}}}{\emph{G}, \emph{m\_in\_new\_units}}{}
rescale\_dyn\_horgrid\_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal depth units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{m\_in\_new\_units} :: {[}in{]} The new internal representation of 1 m depth.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_derived\_dyn\_horgrid() (fortran subroutine in module mom\_dyn\_horgrid)@\spxentry{set\_derived\_dyn\_horgrid()}\spxextra{fortran subroutine in module mom\_dyn\_horgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/set_derived_dyn_horgrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid/}}\sphinxbfcode{\sphinxupquote{set\_derived\_dyn\_horgrid}}}{\emph{G}, \emph{US}}{}
set\_derived\_dyn\_horgrid calculates metric terms that are derived from other metrics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/adcroft_reciprocal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adcroft\_reciprocal}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_mom_grid_to_dyngrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::copy\_mom\_grid\_to\_dyngrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/rotate_dyngrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::rotate\_dyngrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adcroft\_reciprocal() (fortran function in module mom\_dyn\_horgrid)@\spxentry{adcroft\_reciprocal()}\spxextra{fortran function in module mom\_dyn\_horgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/adcroft_reciprocal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid/}}\sphinxbfcode{\sphinxupquote{adcroft\_reciprocal}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Adcroft\_reciprocal(x) = 1/x for {\color{red}\bfseries{}|x|}\textgreater{}0 or 0 for x=0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The value being inverted.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The Adcroft reciprocal of val.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/set_derived_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_derived\_dyn\_horgrid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{destroy\_dyn\_horgrid() (fortran subroutine in module mom\_dyn\_horgrid)@\spxentry{destroy\_dyn\_horgrid()}\spxextra{fortran subroutine in module mom\_dyn\_horgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/destroy_dyn_horgrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid/}}\sphinxbfcode{\sphinxupquote{destroy\_dyn\_horgrid}}}{\emph{G}}{}
Release memory used by the {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/dyn_horgrid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyn\_horgrid\_type()}}}}} and related structures.
and related structures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: The dynamic horizontal grid type

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_dynamics\_split\_rk2 module reference}
\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2}}\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:mom-dynamics-split-rk2-module-reference}}\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2::doc}}\index{mom\_dynamics\_split\_rk2 (module)@\spxentry{mom\_dynamics\_split\_rk2}\spxextra{module}|spxpagem}
Time step the adiabatic dynamic core of MOM using RK2 method.

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:detamom-dynamics-split-rk2}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/mom_dyn_split_rk2_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_split\_rk2\_cs}}}}}
&
MOM\_dynamics\_split\_RK2 module control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_dyn\_split\_rk2()}}}}}
&
RK2 splitting for time stepping MOM adiabatic dynamics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/register_restarts_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restarts\_dyn\_split\_rk2()}}}}}
&
This subroutine sets up any auxiliary restart variables that are specific to the unsplit time stepping scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/initialize_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_dyn\_split\_rk2()}}}}}
&
This subroutine initializes all of the variables that are used by this dynamic core, including diagnostics and the cpu clocks.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/end_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_dyn\_split\_rk2()}}}}}
&
Close the dyn\_split\_RK2 module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:detailed-description}}\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:detamom-dynamics-split-rk2}}
This file time steps the adiabatic dynamic core by splitting between baroclinic and barotropic modes. It uses a pseudo\sphinxhyphen{}second order Runge\sphinxhyphen{}Kutta time stepping scheme for the baroclinic momentum equation and a forward\sphinxhyphen{}backward coupling between the baroclinic momentum and continuity equations. This split time\sphinxhyphen{}stepping scheme is described in detail in Hallberg (JCP, 1997). Additional issues related to exact tracer conservation and how to ensure consistency between the barotropic and layered estimates of the free surface height are described in Hallberg and Adcroft (Ocean Modelling, 2009). This was the time stepping code that is used for most GOLD applications, including GFDL’s ESM2G Earth system model, and all of the examples provided with the MOM code (although several of these solutions are routinely verified by comparison with the slower unsplit schemes).

The subroutine step\_MOM\_dyn\_split\_RK2 actually does the time stepping, while register\_restarts\_dyn\_split\_RK2 sets the fields that are found in a full restart file with this scheme, and initialize\_dyn\_split\_RK2 initializes the cpu clocks that are used in this module. For largely historical reasons, this module does not have its own control structure, but shares the same control structure with \sphinxcode{\sphinxupquote{MOM.F90}}
and the other {\color{red}\bfseries{}MOM\_dynamics\_}… modules.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:type-documentation}}\index{mom\_dyn\_split\_rk2\_cs (fortran type in module mom\_dynamics\_split\_rk2)@\spxentry{mom\_dyn\_split\_rk2\_cs}\spxextra{fortran type in module mom\_dynamics\_split\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/mom_dyn_split_rk2_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2/}}\sphinxbfcode{\sphinxupquote{mom\_dyn\_split\_rk2\_cs}}}
MOM\_dynamics\_split\_RK2 module control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_umo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vmo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_umo\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vmo\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cau}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_pfu\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_pfv\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_cau\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_cav\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u\_bt\_accel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v\_bt\_accel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_u\_bt\_accel\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_v\_bt\_accel\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* pbce {[}*, *) :: CAu = f*v \sphinxhyphen{} u.grad(u) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: PFu = \sphinxhyphen{}dM/dx {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Zonal acceleration due to convergence of the along\sphinxhyphen{}isopycnal stress tensor {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: CAv = \sphinxhyphen{}f*u \sphinxhyphen{} u.grad(v) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: PFv = \sphinxhyphen{}dM/dy {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Meridional acceleration due to convergence of the along\sphinxhyphen{}isopycnal stress tensor {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Both the fraction of the zonal momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step worth of a barotropic acceleration that a layer experiences after viscosity is applied. Nondimensional between 0 (at the bottom) and 1 (far above).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The zonal layer accelerations due to the difference between the barotropic accelerations and the baroclinic accelerations that were fed into the barotopic calculation {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Both the fraction of the meridional momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step worth of a barotropic acceleration that a layer experiences after viscosity is applied. Nondimensional between 0 (at the bottom) and 1 (far above).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The meridional layer accelerations due to the difference between the barotropic accelerations and the baroclinic accelerations that were fed into the barotopic calculation {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Instantaneous free surface height (in Boussinesq mode) or column mass anomaly (in non\sphinxhyphen{}Boussinesq mode) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: layer x\sphinxhyphen{}velocity with vertical mean replaced by time\sphinxhyphen{}mean barotropic velocity over a baroclinic timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: layer y\sphinxhyphen{}velocity with vertical mean replaced by time\sphinxhyphen{}mean barotropic velocity over a baroclinic timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: arithmetic mean of two successive layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: instantaneous SSH used in calculating PFu and PFv {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: average x\sphinxhyphen{}volume or mass flux determined by the barotropic solver {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}. uhbt is roughly equal to the vertical sum of uh.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: average y\sphinxhyphen{}volume or mass flux determined by the barotropic solver {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}. vhbt is roughly equal to vertical sum of vh.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: pbce times eta gives the baroclinic pressure anomaly in each layer due to free surface height anomalies {[}L2 H\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}1 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{taux\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional x\sphinxhyphen{}bottom stress from the ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tauy\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional y\sphinxhyphen{}bottom stress from the ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(bt\_cont\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure with elements that describe the effective summed open face areas as a function of barotropic flow.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bt\_use\_layer\_fluxes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the summed layered fluxes plus an adjustment due to a changed barotropic velocity in the barotropic continuity equation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{split\_bottom\_stress}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, provide the bottom stress calculated by the vertical viscosity to the barotropic solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calc\_dtbt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate the barotropic time\sphinxhyphen{}step dynamically.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{be}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional number from 0.5 to 1 that controls the backward weighting of the time stepping scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{begw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional number from 0 to 1 that controls the extent to which the treatment of gravity waves is forward\sphinxhyphen{}backward (0) or simulated backward Euler (1). 0 is almost always used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do debugging calls for open boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{module\_is\_initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Record whether this mouled has been initialzed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(accel\_diag\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure pointing to the various accelerations in the momentum equations, which can later be used to calculate derived diagnostics like energy budgets.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cont\_diag\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure with pointers to various terms in the continuity equations, which can later be used to calculate derived diagnostics like energy budgets.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hor\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the horizontal viscosity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{continuity\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(continuity\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the continuity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolisadv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coriolisadv\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the CoriolisAdv control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressureforce\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pressureforce\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the PressureForce control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{barotropic\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(barotropic\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the barotropic stepping control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(thickness\_diffuse\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a structure containing interface height diffusivities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertvisc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vertvisc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the vertical viscosity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{set\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(set\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the set\_visc control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tidal forcing control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ALE control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_obc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to an open boundary condition type that specifies whether, where, and what open boundary conditions are used. If no open BCs are used, this pointer stays nullified. Flather OBCs use open boundary\_CS as well.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{update\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(update\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the update\_OBC control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_eta}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_visc\_rem}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_uvp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_hp\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_av\_uvh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for group halo pass.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:function-subroutine-documentation}}\index{step\_mom\_dyn\_split\_rk2() (fortran subroutine in module mom\_dynamics\_split\_rk2)@\spxentry{step\_mom\_dyn\_split\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_split\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2/}}\sphinxbfcode{\sphinxupquote{step\_mom\_dyn\_split\_rk2}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{visc}, \emph{Time\_local}, \emph{dt}, \emph{forces}, \emph{p\_surf\_begin}, \emph{p\_surf\_end}, \emph{uh}, \emph{vh}, \emph{uhtr}, \emph{vhtr}, \emph{eta\_av}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{calc\_dtbt}, \emph{VarMix}, \emph{MEKE}, \emph{thickness\_diffuse\_CSp}, \emph{Waves}}{}
RK2 splitting for time stepping MOM adiabatic dynamics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} merid velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} thermodynamic type

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} vertical visc, bottom drag, and related

\item {} 
\sphinxstylestrong{time\_local} :: {[}in{]} model time at end of time step

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{p\_surf\_begin} :: surf pressure at the start of this dynamic time step {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{p\_surf\_end} :: surf pressure at the end of this dynamic time step {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} zonal volume/mass transport

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} merid volume/mass transport

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} accumulatated zonal volume/mass transport

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} accumulatated merid volume/mass transport

\item {} 
\sphinxstylestrong{eta\_av} :: {[}out{]} free surface height or column mass time averaged over time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{calc\_dtbt} :: {[}in{]} if true, recalculate barotropic time step

\item {} 
\sphinxstylestrong{varmix} :: specify the spatially varying viscosities

\item {} 
\sphinxstylestrong{meke} :: related to mesoscale eddy kinetic energy param

\item {} 
\sphinxstylestrong{thickness\_diffuse\_csp} :: Pointer to a structure containing interface height diffusivities

\item {} 
\sphinxstylestrong{waves} :: A pointer to a structure containing fields related to the surface wave conditions

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/complete_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::complete\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_stencil}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity\_stencil}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coradcalc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_update\_remap\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc::horizontal\_viscosity}}}}} \sphinxcode{\sphinxupquote{id\_clock\_btcalc}} \sphinxcode{\sphinxupquote{id\_clock\_btforce}} \sphinxcode{\sphinxupquote{id\_clock\_btstep}} \sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_cor}} \sphinxcode{\sphinxupquote{id\_clock\_horvisc}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_update}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pres}} \sphinxcode{\sphinxupquote{id\_clock\_vertvisc}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_accel_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_accel\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_test_extern_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_test\_extern\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce::pressureforce}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::set\_dtbt}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_viscous\_ml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/start_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::start\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::update\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_ramp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::update\_obc\_ramp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/updatecfltruncationvalue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::updatecfltruncationvalue}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restarts\_dyn\_split\_rk2() (fortran subroutine in module mom\_dynamics\_split\_rk2)@\spxentry{register\_restarts\_dyn\_split\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_split\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/register_restarts_dyn_split_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2/}}\sphinxbfcode{\sphinxupquote{register\_restarts\_dyn\_split\_rk2}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}, \emph{uh}, \emph{vh}}{}
This subroutine sets up any auxiliary restart variables that are specific to the unsplit time stepping scheme. All variables registered here should have the ability to be recreated if they are not present in a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{restart\_cs} :: restart control structure

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} zonal volume/mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} merid volume/mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_dyn\_split\_rk2() (fortran subroutine in module mom\_dynamics\_split\_rk2)@\spxentry{initialize\_dyn\_split\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_split\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/initialize_dyn_split_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2/}}\sphinxbfcode{\sphinxupquote{initialize\_dyn\_split\_rk2}}}{\emph{u}, \emph{v}, \emph{h}, \emph{uh}, \emph{vh}, \emph{eta}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{restart\_CS}, \emph{dt}, \emph{Accel\_diag}, \emph{Cont\_diag}, \emph{MIS}, \emph{VarMix}, \emph{MEKE}, \emph{thickness\_diffuse\_CSp}, \emph{OBC}, \emph{update\_OBC\_CSp}, \emph{ALE\_CSp}, \emph{setVisc\_CSp}, \emph{visc}, \emph{dirs}, \emph{ntrunc}, \emph{calc\_dtbt}, \emph{cont\_stencil}}{}
This subroutine initializes all of the variables that are used by this dynamic core, including diagnostics and the cpu clocks.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} merid velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} zonal volume/mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} merid volume/mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eta} :: {[}inout{]} free surface height or column mass {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file for parsing

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} to control diagnostics

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{restart\_cs} :: restart control structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{accel\_diag} :: {[}inout{]} points to momentum equation terms for budget analysis

\item {} 
\sphinxstylestrong{cont\_diag} :: {[}inout{]} points to terms in continuity equation

\item {} 
\sphinxstylestrong{mis} :: {[}inout{]} “MOM6 internal state” used to pass diagnostic pointers

\item {} 
\sphinxstylestrong{varmix} :: points to spatially variable viscosities

\item {} 
\sphinxstylestrong{meke} :: points to mesoscale eddy kinetic energy fields

\item {} 
\sphinxstylestrong{thickness\_diffuse\_csp} :: Pointer to the control structure used for the isopycnal height diffusive transport.

\item {} 
\sphinxstylestrong{obc} :: points to OBC related fields

\item {} 
\sphinxstylestrong{update\_obc\_csp} :: points to OBC update related fields

\item {} 
\sphinxstylestrong{ale\_csp} :: points to ALE control structure

\item {} 
\sphinxstylestrong{setvisc\_csp} :: points to the set\_visc control structure.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} vertical viscosities, bottom drag, and related

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} contains directory paths

\item {} 
\sphinxstylestrong{ntrunc} :: {[}inout{]} A target for the variable that records the number of times the velocity is truncated (this should be 0).

\item {} 
\sphinxstylestrong{calc\_dtbt} :: {[}out{]} If true, recalculate the barotropic time step

\item {} 
\sphinxstylestrong{cont\_stencil} :: {[}out{]} The stencil for thickness from the continuity solver.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_btcalc}} \sphinxcode{\sphinxupquote{id\_clock\_btforce}} \sphinxcode{\sphinxupquote{id\_clock\_btstep}} \sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_cor}} \sphinxcode{\sphinxupquote{id\_clock\_horvisc}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_update}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_init}} \sphinxcode{\sphinxupquote{id\_clock\_pres}} \sphinxcode{\sphinxupquote{id\_clock\_vertvisc}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_dyn\_split\_rk2() (fortran subroutine in module mom\_dynamics\_split\_rk2)@\spxentry{end\_dyn\_split\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_split\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/end_dyn_split_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2/}}\sphinxbfcode{\sphinxupquote{end\_dyn\_split\_rk2}}}{\emph{CS}}{}
Close the dyn\_split\_RK2 module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_dynamics\_unsplit module reference}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit}}\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:mom-dynamics-unsplit-module-reference}}\label{\detokenize{api/generated/modules/mom_dynamics_unsplit::doc}}\index{mom\_dynamics\_unsplit (module)@\spxentry{mom\_dynamics\_unsplit}\spxextra{module}|spxpagem}
Time steps the ocean dynamics with an unsplit quasi 3rd order scheme.

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:detamom-dynamics-unsplit}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/mom_dyn_unsplit_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_unsplit\_cs}}}}}
&
MOM\_dynamics\_unsplit module control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_dyn\_unsplit()}}}}}
&
Step the MOM6 dynamics using an unsplit mixed 2nd order (for continuity) and 3rd order (for the inviscid momentum equations) order scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/register_restarts_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restarts\_dyn\_unsplit()}}}}}
&
Allocate the control structure for this module, allocates memory in it, and registers any auxiliary restart variables that are specific to the unsplit time stepping scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/initialize_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_dyn\_unsplit()}}}}}
&
Initialize parameters and allocate memory associated with the unsplit dynamics module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/end_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_dyn\_unsplit()}}}}}
&
Clean up and deallocate memory associated with the unsplit dynamics module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:detailed-description}}\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:detamom-dynamics-unsplit}}
Time steps the ocean dynamics with an unsplit quasi 3rd order scheme.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:type-documentation}}\index{mom\_dyn\_unsplit\_cs (fortran type in module mom\_dynamics\_unsplit)@\spxentry{mom\_dyn\_unsplit\_cs}\spxextra{fortran type in module mom\_dynamics\_unsplit}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/mom_dyn_unsplit_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit/}}\sphinxbfcode{\sphinxupquote{mom\_dyn\_unsplit\_cs}}}
MOM\_dynamics\_unsplit module control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cau}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* diffv {[}*, *) :: CAu = f*v \sphinxhyphen{} u.grad(u) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: PFu = \sphinxhyphen{}dM/dx {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Zonal acceleration due to convergence of the along\sphinxhyphen{}isopycnal stress tensor {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: CAv = \sphinxhyphen{}f*u \sphinxhyphen{} u.grad(v) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: PFv = \sphinxhyphen{}dM/dy {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Meridional acceleration due to convergence of the along\sphinxhyphen{}isopycnal stress tensor {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{taux\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional x\sphinxhyphen{}bottom stress from the ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tauy\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional y\sphinxhyphen{}bottom stress from the ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_correct\_dt\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the correct timestep in the viscous terms applied in the first predictor step with the unsplit time stepping scheme, and in the calculation of the turbulent mixed layer properties for viscosity. The default should be true, but it is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{module\_is\_initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Record whether this mouled has been initialzed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(accel\_diag\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure pointing to the accelerations in the momentum equations, which can later be used to calculate derived diagnostics like energy budgets.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cont\_diag\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure with pointers to various terms in the continuity equations, which can later be used to calculate derived diagnostics like energy budgets.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hor\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the horizontal viscosity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{continuity\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(continuity\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the continuity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolisadv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coriolisadv\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the CoriolisAdv control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressureforce\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pressureforce\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the PressureForce control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertvisc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vertvisc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the vertvisc control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{set\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(set\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the set\_visc control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tidal forcing control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ALE control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_obc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to an open boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{update\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(update\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the update\_OBC control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:function-subroutine-documentation}}\index{step\_mom\_dyn\_unsplit() (fortran subroutine in module mom\_dynamics\_unsplit)@\spxentry{step\_mom\_dyn\_unsplit()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit/}}\sphinxbfcode{\sphinxupquote{step\_mom\_dyn\_unsplit}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{visc}, \emph{Time\_local}, \emph{dt}, \emph{forces}, \emph{p\_surf\_begin}, \emph{p\_surf\_end}, \emph{uh}, \emph{vh}, \emph{uhtr}, \emph{vhtr}, \emph{eta\_av}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{VarMix}, \emph{MEKE}, \emph{Waves}}{}
Step the MOM6 dynamics using an unsplit mixed 2nd order (for continuity) and 3rd order (for the inviscid momentum equations) order scheme.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities, bottom drag viscosities, and related fields.

\item {} 
\sphinxstylestrong{time\_local} :: {[}in{]} The model time at the end of the time step.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{p\_surf\_begin} :: A pointer (perhaps NULL) to the surface pressure at the start of this dynamic step {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{p\_surf\_end} :: A pointer (perhaps NULL) to the surface pressure at the end of this dynamic step {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} The zonal volume or mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} The meridional volume or mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} The accumulated zonal volume or mass transport since the last tracer advection {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} The accumulated meridional volume or mass transport since the last tracer advection {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{eta\_av} :: {[}out{]} The time\sphinxhyphen{}mean free surface height or column mass {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by initialize\_dyn\_unsplit.

\item {} 
\sphinxstylestrong{varmix} :: A pointer to a structure with fields that specify the spatially variable viscosities.

\item {} 
\sphinxstylestrong{meke} :: A pointer to a structure containing fields related to the Mesoscale Eddy Kinetic Energy.

\item {} 
\sphinxstylestrong{waves} :: A pointer to a structure containing fields related to the surface wave conditions

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coradcalc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc::horizontal\_viscosity}}}}} \sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_cor}} \sphinxcode{\sphinxupquote{id\_clock\_horvisc}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_update}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pres}} \sphinxcode{\sphinxupquote{id\_clock\_vertvisc}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_accel_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_accel\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_zero_normal_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_zero\_normal\_flow}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce::pressureforce}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_viscous\_ml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::update\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc\_coef}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restarts\_dyn\_unsplit() (fortran subroutine in module mom\_dynamics\_unsplit)@\spxentry{register\_restarts\_dyn\_unsplit()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/register_restarts_dyn_unsplit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit/}}\sphinxbfcode{\sphinxupquote{register\_restarts\_dyn\_unsplit}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}}{}
Allocate the control structure for this module, allocates memory in it, and registers any auxiliary restart variables that are specific to the unsplit time stepping scheme.

All variables registered here should have the ability to be recreated if they are not present in a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by initialize\_dyn\_unsplit.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_dyn\_unsplit() (fortran subroutine in module mom\_dynamics\_unsplit)@\spxentry{initialize\_dyn\_unsplit()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/initialize_dyn_unsplit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit/}}\sphinxbfcode{\sphinxupquote{initialize\_dyn\_unsplit}}}{\emph{u}, \emph{v}, \emph{h}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{restart\_CS}, \emph{Accel\_diag}, \emph{Cont\_diag}, \emph{MIS}, \emph{MEKE}, \emph{OBC}, \emph{update\_OBC\_CSp}, \emph{ALE\_CSp}, \emph{setVisc\_CSp}, \emph{visc}, \emph{dirs}, \emph{ntrunc}, \emph{cont\_stencil}}{}
Initialize parameters and allocate memory associated with the unsplit dynamics module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by initialize\_dyn\_unsplit.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\item {} 
\sphinxstylestrong{accel\_diag} :: {[}inout{]} A set of pointers to the various accelerations in the momentum equations, which can be used for later derived diagnostics, like energy budgets.

\item {} 
\sphinxstylestrong{cont\_diag} :: {[}inout{]} A structure with pointers to various terms in the continuity equations.

\item {} 
\sphinxstylestrong{mis} :: {[}inout{]} The “MOM6 Internal State” structure, used to pass around pointers to various arrays for diagnostic purposes.

\item {} 
\sphinxstylestrong{meke} :: MEKE data

\item {} 
\sphinxstylestrong{obc} :: If open boundary conditions are used, this points to the ocean\_OBC\_type that was set up in MOM\_initialization.

\item {} 
\sphinxstylestrong{update\_obc\_csp} :: If open boundary condition updates are used, this points to the appropriate control structure.

\item {} 
\sphinxstylestrong{ale\_csp} :: This points to the ALE control structure.

\item {} 
\sphinxstylestrong{setvisc\_csp} :: This points to the set\_visc control structure.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities, bottom drag viscosities, and related fields.

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} A structure containing several relevant directory paths.

\item {} 
\sphinxstylestrong{ntrunc} :: {[}inout{]} A target for the variable that records the number of times the velocity is truncated (this should be 0).

\item {} 
\sphinxstylestrong{cont\_stencil} :: {[}out{]} The stencil for thickness from the continuity solver.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_cor}} \sphinxcode{\sphinxupquote{id\_clock\_horvisc}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_update}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_init}} \sphinxcode{\sphinxupquote{id\_clock\_pres}} \sphinxcode{\sphinxupquote{id\_clock\_vertvisc}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_dyn\_unsplit() (fortran subroutine in module mom\_dynamics\_unsplit)@\spxentry{end\_dyn\_unsplit()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/end_dyn_unsplit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit/}}\sphinxbfcode{\sphinxupquote{end\_dyn\_unsplit}}}{\emph{CS}}{}
Clean up and deallocate memory associated with the unsplit dynamics module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: unsplit dynamics control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_dynamics\_unsplit\_rk2 module reference}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2}}\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:mom-dynamics-unsplit-rk2-module-reference}}\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2::doc}}\index{mom\_dynamics\_unsplit\_rk2 (module)@\spxentry{mom\_dynamics\_unsplit\_rk2}\spxextra{module}|spxpagem}
Time steps the ocean dynamics with an unsplit quasi 2nd order Runge\sphinxhyphen{}Kutta scheme.

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:detamom-dynamics-unsplit-rk2}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/mom_dyn_unsplit_rk2_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_unsplit\_rk2\_cs}}}}}
&
MOM\_dynamics\_unsplit\_RK2 module control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_mom\_dyn\_unsplit\_rk2()}}}}}
&
Step the MOM6 dynamics using an unsplit quasi\sphinxhyphen{}2nd order Runge\sphinxhyphen{}Kutta scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/register_restarts_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restarts\_dyn\_unsplit\_rk2()}}}}}
&
Allocate the control structure for this module, allocates memory in it, and registers any auxiliary restart variables that are specific to the unsplit RK2 time stepping scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/initialize_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_dyn\_unsplit\_rk2()}}}}}
&
Initialize parameters and allocate memory associated with the unsplit RK2 dynamics module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/end_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_dyn\_unsplit\_rk2()}}}}}
&
Clean up and deallocate memory associated with the dyn\_unsplit\_RK2 module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:detailed-description}}\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:detamom-dynamics-unsplit-rk2}}
Time steps the ocean dynamics with an unsplit quasi 2nd order Runge\sphinxhyphen{}Kutta scheme.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:type-documentation}}\index{mom\_dyn\_unsplit\_rk2\_cs (fortran type in module mom\_dynamics\_unsplit\_rk2)@\spxentry{mom\_dyn\_unsplit\_rk2\_cs}\spxextra{fortran type in module mom\_dynamics\_unsplit\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/mom_dyn_unsplit_rk2_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2/}}\sphinxbfcode{\sphinxupquote{mom\_dyn\_unsplit\_rk2\_cs}}}
MOM\_dynamics\_unsplit\_RK2 module control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cau}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* diffv {[}*, *) :: CAu = f*v \sphinxhyphen{} u.grad(u) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: PFu = \sphinxhyphen{}dM/dx {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Zonal acceleration due to convergence of the along\sphinxhyphen{}isopycnal stress tensor {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: CAv = \sphinxhyphen{}f*u \sphinxhyphen{} u.grad(v) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: PFv = \sphinxhyphen{}dM/dy {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Meridional acceleration due to convergence of the along\sphinxhyphen{}isopycnal stress tensor {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{taux\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional x\sphinxhyphen{}bottom stress from the ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tauy\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional y\sphinxhyphen{}bottom stress from the ocean to the seafloor {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{be}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional number from 0.5 to 1 that controls the backward weighting of the time stepping scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{begw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional number from 0 to 1 that controls the extent to which the treatment of gravity waves is forward\sphinxhyphen{}backward (0) or simulated backward Euler (1). 0 is almost always used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_correct\_dt\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the correct timestep in the calculation of the turbulent mixed layer properties for viscosity. The default should be true, but it is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{module\_is\_initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Record whether this mouled has been initialzed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(accel\_diag\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure pointing to the accelerations in the momentum equations, which can later be used to calculate derived diagnostics like energy budgets.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cont\_diag\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure with pointers to various terms in the continuity equations, which can later be used to calculate derived diagnostics like energy budgets.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hor\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the horizontal viscosity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{continuity\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(continuity\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the continuity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolisadv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coriolisadv\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the CoriolisAdv control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressureforce\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pressureforce\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the PressureForce control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertvisc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vertvisc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the vertvisc control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{set\_visc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(set\_visc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the set\_visc control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tidal forcing control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ALE control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_obc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to an open boundary condition type that specifies whether, where, and what open boundary conditions are used. If no open BCs are used, this pointer stays nullified. Flather OBCs use open boundary\_CS as well.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{update\_obc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(update\_obc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the update\_OBC control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:function-subroutine-documentation}}\index{step\_mom\_dyn\_unsplit\_rk2() (fortran subroutine in module mom\_dynamics\_unsplit\_rk2)@\spxentry{step\_mom\_dyn\_unsplit\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2/}}\sphinxbfcode{\sphinxupquote{step\_mom\_dyn\_unsplit\_rk2}}}{\emph{u\_in}, \emph{v\_in}, \emph{h\_in}, \emph{tv}, \emph{visc}, \emph{Time\_local}, \emph{dt}, \emph{forces}, \emph{p\_surf\_begin}, \emph{p\_surf\_end}, \emph{uh}, \emph{vh}, \emph{uhtr}, \emph{vhtr}, \emph{eta\_av}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{VarMix}, \emph{MEKE}}{}
Step the MOM6 dynamics using an unsplit quasi\sphinxhyphen{}2nd order Runge\sphinxhyphen{}Kutta scheme.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u\_in} :: {[}inout{]} The input and output zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_in} :: {[}inout{]} The input and output meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h\_in} :: {[}inout{]} The input and output layer thicknesses, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}, depending on whether the Boussinesq approximation is made.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities, bottom drag viscosities, and related fields.

\item {} 
\sphinxstylestrong{time\_local} :: {[}in{]} The model time at the end of the time step.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The baroclinic dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{p\_surf\_begin} :: A pointer (perhaps NULL) to the surface pressure at the beginning of this dynamic step {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{p\_surf\_end} :: A pointer (perhaps NULL) to the surface pressure at the end of this dynamic step {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} The zonal volume or mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} The meridional volume or mass transport {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} The accumulated zonal volume or mass transport since the last tracer advection {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} The accumulated meridional volume or mass transport since the last tracer advection {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{eta\_av} :: {[}out{]} The time\sphinxhyphen{}mean free surface height or column mass {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by initialize\_dyn\_unsplit\_RK2.

\item {} 
\sphinxstylestrong{varmix} :: A pointer to a structure with fields that specify the spatially variable viscosities.

\item {} 
\sphinxstylestrong{meke} :: A pointer to a structure containing fields related to the Mesoscale Eddy Kinetic Energy.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coradcalc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc::horizontal\_viscosity}}}}} \sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_cor}} \sphinxcode{\sphinxupquote{id\_clock\_horvisc}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_update}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pres}} \sphinxcode{\sphinxupquote{id\_clock\_vertvisc}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_accel_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_accel\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_zero_normal_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_zero\_normal\_flow}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce::pressureforce}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_viscous\_ml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/update_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::update\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc\_coef}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restarts\_dyn\_unsplit\_rk2() (fortran subroutine in module mom\_dynamics\_unsplit\_rk2)@\spxentry{register\_restarts\_dyn\_unsplit\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/register_restarts_dyn_unsplit_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2/}}\sphinxbfcode{\sphinxupquote{register\_restarts\_dyn\_unsplit\_rk2}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}}{}
Allocate the control structure for this module, allocates memory in it, and registers any auxiliary restart variables that are specific to the unsplit RK2 time stepping scheme.

All variables registered here should have the ability to be recreated if they are not present in a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by initialize\_dyn\_unsplit\_RK2.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_dyn\_unsplit\_rk2() (fortran subroutine in module mom\_dynamics\_unsplit\_rk2)@\spxentry{initialize\_dyn\_unsplit\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/initialize_dyn_unsplit_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2/}}\sphinxbfcode{\sphinxupquote{initialize\_dyn\_unsplit\_rk2}}}{\emph{u}, \emph{v}, \emph{h}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{restart\_CS}, \emph{Accel\_diag}, \emph{Cont\_diag}, \emph{MIS}, \emph{MEKE}, \emph{OBC}, \emph{update\_OBC\_CSp}, \emph{ALE\_CSp}, \emph{setVisc\_CSp}, \emph{visc}, \emph{dirs}, \emph{ntrunc}, \emph{cont\_stencil}}{}
Initialize parameters and allocate memory associated with the unsplit RK2 dynamics module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by initialize\_dyn\_unsplit\_RK2.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\item {} 
\sphinxstylestrong{accel\_diag} :: {[}inout{]} A set of pointers to the various accelerations in the momentum equations, which can be used for later derived diagnostics, like energy budgets.

\item {} 
\sphinxstylestrong{cont\_diag} :: {[}inout{]} A structure with pointers to various terms in the continuity equations.

\item {} 
\sphinxstylestrong{mis} :: {[}inout{]} The “MOM6 Internal State” structure, used to pass around pointers to various arrays for diagnostic purposes.

\item {} 
\sphinxstylestrong{meke} :: MEKE data

\item {} 
\sphinxstylestrong{obc} :: If open boundary conditions are used, this points to the ocean\_OBC\_type that was set up in MOM\_initialization.

\item {} 
\sphinxstylestrong{update\_obc\_csp} :: If open boundary condition updates are used, this points to the appropriate control structure.

\item {} 
\sphinxstylestrong{ale\_csp} :: This points to the ALE control structure.

\item {} 
\sphinxstylestrong{setvisc\_csp} :: This points to the set\_visc control structure.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities, bottom drag viscosities, and related fields.

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} A structure containing several relevant directory paths.

\item {} 
\sphinxstylestrong{ntrunc} :: {[}inout{]} A target for the variable that records the number of times the velocity is truncated (this should be 0).

\item {} 
\sphinxstylestrong{cont\_stencil} :: {[}out{]} The stencil for thickness from the continuity solver.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_continuity}} \sphinxcode{\sphinxupquote{id\_clock\_cor}} \sphinxcode{\sphinxupquote{id\_clock\_horvisc}} \sphinxcode{\sphinxupquote{id\_clock\_mom\_update}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_pass\_init}} \sphinxcode{\sphinxupquote{id\_clock\_pres}} \sphinxcode{\sphinxupquote{id\_clock\_vertvisc}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_dyn\_unsplit\_rk2() (fortran subroutine in module mom\_dynamics\_unsplit\_rk2)@\spxentry{end\_dyn\_unsplit\_rk2()}\spxextra{fortran subroutine in module mom\_dynamics\_unsplit\_rk2}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/end_dyn_unsplit_rk2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2/}}\sphinxbfcode{\sphinxupquote{end\_dyn\_unsplit\_rk2}}}{\emph{CS}}{}
Clean up and deallocate memory associated with the dyn\_unsplit\_RK2 module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: dyn\_unsplit\_RK2 control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{MOM\_energetic\_PBL module reference}
\label{\detokenize{api/generated/modules/MOM_energetic_PBL:f/MOM_energetic_PBL}}\label{\detokenize{api/generated/modules/MOM_energetic_PBL:mom-energetic-pbl-module-reference}}\label{\detokenize{api/generated/modules/MOM_energetic_PBL::doc}}\index{MOM\_energetic\_PBL (module)@\spxentry{MOM\_energetic\_PBL}\spxextra{module}|spxpagem}
By Robert Hallberg, 2015.

{\hyperref[\detokenize{api/generated/modules/MOM_energetic_PBL:detamom-energetic-pbl}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/MOM_energetic_PBL:detailed-description}}\label{\detokenize{api/generated/modules/MOM_energetic_PBL:detamom-energetic-pbl}}
This file contains the subroutine (energetic\_PBL) that uses an integrated boundary layer energy budget (like a bulk\sphinxhyphen{} or refined\sphinxhyphen{} bulk mixed layer scheme), but instead of homogenizing this model calculates a finite diffusivity and viscosity, which in this regard is conceptually similar to what is done with KPP or various two\sphinxhyphen{}equation closures. However, the scheme that is implemented here has the big advantage that is entirely implicit, but is simple enough that it requires only a single vertical pass to determine the diffusivity. The development of bulk mixed layer models stems from the work of various people, as described in the review paper by Niiler and Kraus (1979). The work here draws in with particular on the form for TKE decay proposed by Oberhuber (JPO, 1993, 808\sphinxhyphen{}829), with an extension to a refined bulk mixed layer as described in Hallberg (Aha Huliko’a, 2003). The physical processes portrayed in this subroutine include convectively driven mixing and mechanically driven mixing. Unlike boundary\sphinxhyphen{}layer mixing, stratified shear mixing is not a one\sphinxhyphen{}directional turbulent process, and it is dealt with elsewhere in the MOM6 code within the module \sphinxcode{\sphinxupquote{MOM\_kappa\_shear.F90}}
. It is assumed that the heat, mass, and salt fluxes have been applied elsewhere, but that their implications for the integrated TKE budget have been captured in an array that is provided as an argument to this subroutine. This is a full 3\sphinxhyphen{}d array due to the effects of penetrating shortwave radiation.


\subsection{mom\_energetic\_pbl module reference}
\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl}}\label{\detokenize{api/generated/modules/mom_energetic_pbl:mom-energetic-pbl-module-reference}}\label{\detokenize{api/generated/modules/mom_energetic_pbl::doc}}\index{mom\_energetic\_pbl (module)@\spxentry{mom\_energetic\_pbl}\spxextra{module}|spxpagem}
Energetically consistent planetary boundary layer parameterization.

{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:detamom-energetic-pbl}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_energetic_pbl:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{energetic\_pbl\_cs}}}}}
&
This control structure holds parameters for the {\hyperref[\detokenize{api/generated/modules/MOM_energetic_PBL:f/MOM_energetic_PBL}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_energetic\_PBL()}}}}} module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epbl\_column\_diags}}}}}
&
A type for conveniently passing around ePBL diagnostics for a column.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_energetic_pbl:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{energetic\_pbl()}}}}}
&
This subroutine determines the diffusivities from the integrated energetics mixed layer model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epbl\_column()}}}}}
&
This subroutine determines the diffusivities from the integrated energetics mixed layer model for a single column of water.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_pe_chg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg()}}}}}
&
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_pe_chg_orig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg\_orig()}}}}}
&
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep using the original form used in the first version of ePBL.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_mstar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_mstar()}}}}}
&
This subroutine finds the Mstar value for ePBL.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/mstar_langmuir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mstar\_langmuir()}}}}}
&
This subroutine modifies the Mstar value if the Langmuir number is present.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_get_mld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{energetic\_pbl\_get\_mld()}}}}}
&
Copies the ePBL active mixed layer depth into MLD, in units of {[}Z \textasciitilde{}\textgreater{} m{]} unless other units are specified.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{energetic\_pbl\_init()}}}}}
&
This subroutine initializes the energetic\_PBL module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{energetic\_pbl\_end()}}}}}
&
Clean up and deallocate memory associated with the energetic\_PBL module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_energetic_pbl:detailed-description}}\label{\detokenize{api/generated/modules/mom_energetic_pbl:detamom-energetic-pbl}}
Energetically consistent planetary boundary layer parameterization.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_energetic_pbl:type-documentation}}\index{energetic\_pbl\_cs (fortran type in module mom\_energetic\_pbl)@\spxentry{energetic\_pbl\_cs}\spxextra{fortran type in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_cs}}}
This control structure holds parameters for the {\hyperref[\detokenize{api/generated/modules/MOM_energetic_PBL:f/MOM_energetic_PBL}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_energetic\_PBL()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ml\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hml\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_wind}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_mke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_forcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_mech\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_conv\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mixing\_length}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_velocity\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mstar\_mix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_la\_mod}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_la}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mstar\_lt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vonkar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The von Karman coefficient. This should be a runtime parameter, but because it is set to 0.4 at runtime in KPP it might change answers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Earth’s rotation rate {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: When setting the decay scale for turbulence, use this fraction of the absolute rotation rate blended with the local value of f, as sqrt((1\sphinxhyphen{}omega\_frac)*f\textasciicircum{}2 + omega\_frac*4*omega\textasciicircum{}2) {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of the TKE input to the mixed layer available to drive entrainment {[}nondim{]}. This quantity is the vertically integrated buoyancy production minus the vertically integrated dissipation of TKE produced by buoyancy.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_mld\_iteration}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the proximity to the bottom of the actively turbulent surface boundary layer to constrain the mixing lengths.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_iteration\_guess}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: False to default to guessing half the ocean depth for the first iteration.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_bisection}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use bisection with the iterative determination of the self\sphinxhyphen{}consistent mixed layer depth. Otherwise use the false position after a maximum and minimum bound have been evaluated and the returned value from the previous guess or bisection before this.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_mld\_its}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of iterations that can be used to find a self\sphinxhyphen{}consistent mixed layer depth with Use\_MLD\_iteration.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mixlenexponent}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Exponent in the mixing length shape\sphinxhyphen{}function. 1 is law\sphinxhyphen{}of\sphinxhyphen{}the\sphinxhyphen{}wall at top and bottom, 2 is more KPP like.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mke\_to\_tke\_effic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The efficiency with which mean kinetic energy released by mechanically forced entrainment of the mixed layer is converted to TKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum value of ustar to avoid numerical problems {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. If the value is small enough, this should not affect the solution.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ekman\_scale\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional scaling factor controlling the inhibition of the diffusive length scale by rotation. Making this larger decreases the diffusivity in the planetary boundary layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{translay\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scale for the mixing length in the transition layer at the edge of the boundary layer as a fraction of the boundary layer thickness. The default is 0, but a value of 0.1 might be better justified by observations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A tolerance for determining the boundary layer thickness when Use\_MLD\_iteration is true {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_mix\_len}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum mixing length scale that will be used by ePBL {[}Z \textasciitilde{}\textgreater{} m{]}. The default (0) does not set a minimum.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wt\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An enumerated value indicating the method for finding the turbulent velocity scale. There are currently two options: wT\_mwT\_from\_cRoot\_TKE is the original (TKE\_remaining)\textasciicircum{}1/3 wT\_from\_RH18 is the version described by Reichl and Hallberg, 2018.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wstar\_ustar\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A ratio relating the efficiency with which convectively released energy is converted to a turbulent velocity, relative to mechanically forced turbulent kinetic energy {[}nondim{]}. Making this larger increases the diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vstar\_surf\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If (wT\_scheme == wT\_from\_RH18) this is the proportionality coefficient between ustar and the surface mechanical contribution to vstar {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vstar\_scale\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An overall nondimensional scaling factor for vstar times a unit conversion factor {[}Z s T\sphinxhyphen{}1 m\sphinxhyphen{}1 \textasciitilde{}\textgreater{} nondim{]}. Making this larger increases the diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An encoded integer to determine which formula is used to set mstar.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_flatcap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Set false to use asymptotic mstar cap.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_cap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Since MSTAR is restoring undissipated energy to mixing, there must be a cap on how large it can be. This is definitely a function of latitude (Ekman limit), but will be taken as constant for now.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ratio of the natural Ekman depth to the TKE decay scale {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fixed\_mstar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mstar is the ratio of the friction velocity cubed to the TKE available to drive entrainment, nondimensional. This quantity is the vertically integrated shear production minus the vertically integrated dissipation of TKE produced by shear. This value is used if the option for using a fixed mstar is used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_ek}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR Coefficient in rotation limit for mstar\_scheme=OM4.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR coefficient in rotation/stabilizing balance for mstar\_scheme=OM4.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rh18\_mstar\_cn1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR\_N coefficient 1 (outter\sphinxhyphen{}most coefficient for fit). Value of 0.275 in RH18. Increasing this coefficient increases mechanical mixing for all values of Hf/ust, but is most effective at low values (weakly developed OSBLs).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rh18\_mstar\_cn2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR\_N coefficient 2 (coefficient outside of exponential decay). Value of 8.0 in RH18. Increasing this coefficient increases MSTAR for all values of HF/ust, with a consistent affect across a wide range of Hf/ust.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rh18\_mstar\_cn3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR\_N coefficient 3 (exponential decay coefficient). Value of \sphinxhyphen{}5.0 in RH18. Increasing this increases how quickly the value of MSTAR decreases as Hf/ust increases.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rh18\_mstar\_cs1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR\_S coefficient for RH18 in stabilizing limit. Value of 0.2 in RH18.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rh18\_mstar\_cs2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MSTAR\_S exponent for RH18 in stabilizing limit. Value of 0.4 in RH18.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_convect\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Factor to reduce mstar when statically unstable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_lt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Flag for using LT in Energy calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_enhance\_form}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Integer for Enhancement functional form (various options)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_enhance\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient in fit for Langmuir Enhancment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lt\_enhance\_exp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Exponent in fit for Langmuir Enhancement.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lac\_mldoek}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient for Langmuir number modification based on the ratio of the mixed layer depth over the Ekman depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lac\_mldoob\_stab}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient for Langmuir number modification based on the ratio of the mixed layer depth over the Obukov depth with stablizing forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lac\_ekoob\_stab}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient for Langmuir number modification based on the ratio of the Ekman depth over the Obukov depth with stablizing forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lac\_mldoob\_un}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient for Langmuir number modification based on the ratio of the mixed layer depth over the Obukov depth with destablizing forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lac\_ekoob\_un}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient for Langmuir number modification based on the ratio of the Ekman depth over the Obukov depth with destablizing forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_enhance\_m}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum allowed LT enhancement to the mixing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_diagnostics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, diagnostics of the TKE budget are being calculated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{orig\_pe\_calc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the ePBL code uses the original form of the potential energy change code. Otherwise, it uses a newer version that can work with successive increments to the diffusivity in upward or downward passes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The mixed layer depth determined by active mixing in ePBL {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_wind}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The wind source of TKE {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_mke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The resolved KE source of TKE {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The convective source of TKE {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_forcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The TKE sink required to mix surface penetrating shortwave heating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_mech\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The decay of mechanical TKE {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_conv\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The decay of convective TKE {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_tke\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The work done by TKE to deepen the mixed layer {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_mix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Mstar used in EPBL {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_lt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Mstar due to Langmuir turbulence {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Langmuir number {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la\_mod}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Modified Langmuir number {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sum\_its}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)(2)}\sphinxstyleemphasis{{]}} :: The total number of iterations and columns worked on.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{velocity\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The velocity scale used in getting Kd {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mixing\_length}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The length scale used in getting Kd {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{epbl\_column\_diags (fortran type in module mom\_energetic\_pbl)@\spxentry{epbl\_column\_diags}\spxextra{fortran type in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column_diags}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{epbl\_column\_diags}}}
A type for conveniently passing around ePBL diagnostics for a column.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_conv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_forcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_wind}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_mke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_mech\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtke\_conv\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local column copies of energy change diagnostics, all in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of the Langmuir number {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lamod}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The modified Langmuir number by convection {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of mstar used in ePBL {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar\_lt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The portion of mstar due to Langmuir turbulence {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_expect}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Expected temperature changes {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ds\_expect}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Expected salinity changes {[}ppt{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_energetic_pbl:function-subroutine-documentation}}\index{energetic\_pbl() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{energetic\_pbl()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{energetic\_pbl}}}{\emph{h\_3d}, \emph{u\_3d}, \emph{v\_3d}, \emph{tv}, \emph{fluxes}, \emph{dt}, \emph{Kd\_int}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{TKE\_forced}, \emph{buoy\_flux}, \emph{dt\_diag}, \emph{last\_call}, \emph{dT\_expected}, \emph{dS\_expected}, \emph{Waves}}{}
This subroutine determines the diffusivities from the integrated energetics mixed layer model. It assumes that heating, cooling and freshwater fluxes have already been applied. All calculations are done implicitly, and there is no stability limit on the time step.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h\_3d} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{u\_3d} :: {[}in{]} Zonal velocities interpolated to h points

\item {} 
\sphinxstylestrong{v\_3d} :: {[}in{]} Zonal velocities interpolated to h points

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}in{]} The partial derivative of in\sphinxhyphen{}situ specific

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}in{]} The partial derivative of in\sphinxhyphen{}situ specific

\item {} 
\sphinxstylestrong{tke\_forced} :: {[}in{]} The forcing requirements to homogenize the

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}out{]} The diagnosed diffusivities at interfaces

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to mixedlayer\_init.

\item {} 
\sphinxstylestrong{buoy\_flux} :: {[}in{]} The surface buoyancy flux {[}Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt\_diag} :: {[}in{]} The diagnostic time step, which may be less than dt if there are two calls to mixedlayer {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{last\_call} :: {[}in{]} If true, this is the last call to mixedlayer in the current time step, so diagnostics will be written. The default is .true.

\item {} 
\sphinxstylestrong{dt\_expected} :: {[}out{]} The values of temperature change that

\item {} 
\sphinxstylestrong{ds\_expected} :: {[}out{]} The values of salinity change that

\item {} 
\sphinxstylestrong{waves} :: Wave CS

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epbl\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{epbl\_column() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{epbl\_column()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{epbl\_column}}}{\emph{h}, \emph{u}, \emph{v}, \emph{T0}, \emph{S0}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{TKE\_forcing}, \emph{B\_flux}, \emph{absf}, \emph{u\_star}, \emph{u\_star\_mean}, \emph{dt}, \emph{MLD\_io}, \emph{Kd}, \emph{mixvel}, \emph{mixlen}, \emph{GV}, \emph{US}, \emph{CS}, \emph{eCD}, \emph{dt\_diag}, \emph{Waves}, \emph{G}, \emph{i}, \emph{j}}{}
This subroutine determines the diffusivities from the integrated energetics mixed layer model for a single column of water.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Zonal velocities interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t0} :: {[}in{]} The initial layer temperatures {[}degC{]}.

\item {} 
\sphinxstylestrong{s0} :: {[}in{]} The initial layer salinities {[}ppt{]}.

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}in{]} The partial derivative of in\sphinxhyphen{}situ specific volume with potential temperature {[}R\sphinxhyphen{}1 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}in{]} The partial derivative of in\sphinxhyphen{}situ specific volume with salinity {[}R\sphinxhyphen{}1 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tke\_forcing} :: {[}in{]} The forcing requirements to homogenize the forcing that has been applied to each layer {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{b\_flux} :: {[}in{]} The surface buoyancy flux {[}Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{absf} :: {[}in{]} The absolute value of the Coriolis parameter {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{u\_star} :: {[}in{]} The surface friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{u\_star\_mean} :: {[}in{]} The surface friction velocity without any contribution from unresolved gustiness {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{mld\_io} :: {[}inout{]} A first guess at the mixed layer depth on input, and the calculated mixed layer depth on output {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{kd} :: {[}out{]} The diagnosed diffusivities at interfaces

\item {} 
\sphinxstylestrong{mixvel} :: {[}out{]} The mixing velocity scale used in Kd

\item {} 
\sphinxstylestrong{mixlen} :: {[}out{]} The mixing length scale used in Kd {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to mixedlayer\_init.

\item {} 
\sphinxstylestrong{ecd} :: {[}inout{]} A container for passing around diagnostics.

\item {} 
\sphinxstylestrong{dt\_diag} :: {[}in{]} The diagnostic time step, which may be less than dt if there are two calls to mixedlayer {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{waves} :: Wave CS for Langmuir turbulence

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index to work on (used for Waves)

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The i\sphinxhyphen{}index to work on (used for Waves)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_mstar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_mstar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_pe_chg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_pe_chg_orig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_pe\_chg\_orig}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::get\_langmuir\_number}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_efp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::real\_to\_efp}}}}} \sphinxcode{\sphinxupquote{report\_avg\_its}} \sphinxcode{\sphinxupquote{use\_fixed\_mstar}} \sphinxcode{\sphinxupquote{wt\_from\_croot\_tke}} \sphinxcode{\sphinxupquote{wt\_from\_rh18}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{energetic\_pbl}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_pe\_chg() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{find\_pe\_chg()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_pe_chg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{find\_pe\_chg}}}{\emph{Kddt\_h0}, \emph{dKddt\_h}, \emph{hp\_a}, \emph{hp\_b}, \emph{Th\_a}, \emph{Sh\_a}, \emph{Th\_b}, \emph{Sh\_b}, \emph{dT\_to\_dPE\_a}, \emph{dS\_to\_dPE\_a}, \emph{dT\_to\_dPE\_b}, \emph{dS\_to\_dPE\_b}, \emph{pres\_Z}, \emph{dT\_to\_dColHt\_a}, \emph{dS\_to\_dColHt\_a}, \emph{dT\_to\_dColHt\_b}, \emph{dS\_to\_dColHt\_b}, \emph{PE\_chg}, \emph{dPEc\_dKd}, \emph{dPE\_max}, \emph{dPEc\_dKd\_0}, \emph{PE\_ColHt\_cor}}{}
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{kddt\_h0} :: {[}in{]} The previously used diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dkddt\_h} :: {[}in{]} The trial change in the diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hp\_a} :: {[}in{]} The effective pivot thickness of the layer above the interface, given by h\_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt\_h for the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hp\_b} :: {[}in{]} The effective pivot thickness of the layer below the interface, given by h\_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt\_h for the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{th\_a} :: {[}in{]} An effective temperature times a thickness in the layer above, including implicit mixing effects with other yet higher layers {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sh\_a} :: {[}in{]} An effective salinity times a thickness in the layer above, including implicit mixing effects with other yet higher layers {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{th\_b} :: {[}in{]} An effective temperature times a thickness in the layer below, including implicit mixfing effects with other yet lower layers {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sh\_b} :: {[}in{]} An effective salinity times a thickness in the layer below, including implicit mixing effects with other yet lower layers {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpe\_a} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers above {[}R Z3 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpe\_a} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers above {[}R Z3 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpe\_b} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers below {[}R Z3 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpe\_b} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers below {[}R Z3 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pres\_z} :: {[}in{]} The rescaled hydrostatic interface pressure, which relates the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing {[}R Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolht\_a} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers above {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolht\_a} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers above {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolht\_b} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers below {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolht\_b} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers below {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pe\_chg} :: {[}out{]} The change in column potential energy from applying Kddt\_h at the present interface {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h {[}R Z3 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dpe\_max} :: {[}out{]} The maximum change in column potential energy that could be realizedd by applying a huge value of Kddt\_h at the present interface {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd\_0} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h in the limit where Kddt\_h = 0 {[}R Z3 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pe\_colht\_cor} :: {[}out{]} The correction to PE\_chg that is made due to a net change in the column height {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epbl\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_pe\_chg\_orig() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{find\_pe\_chg\_orig()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_pe_chg_orig}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{find\_pe\_chg\_orig}}}{\emph{Kddt\_h}, \emph{h\_k}, \emph{b\_den\_1}, \emph{dTe\_term}, \emph{dSe\_term}, \emph{dT\_km1\_t2}, \emph{dS\_km1\_t2}, \emph{dT\_to\_dPE\_k}, \emph{dS\_to\_dPE\_k}, \emph{dT\_to\_dPEa}, \emph{dS\_to\_dPEa}, \emph{pres\_Z}, \emph{dT\_to\_dColHt\_k}, \emph{dS\_to\_dColHt\_k}, \emph{dT\_to\_dColHta}, \emph{dS\_to\_dColHta}, \emph{PE\_chg}, \emph{dPEc\_dKd}, \emph{dPE\_max}, \emph{dPEc\_dKd\_0}}{}
This subroutine calculates the change in potential energy and or derivatives for several changes in an interfaces’s diapycnal diffusivity times a timestep using the original form used in the first version of ePBL.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{kddt\_h} :: {[}in{]} The diffusivity at an interface times the time step and divided by the average of the thicknesses around the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_k} :: {[}in{]} The thickness of the layer below the interface {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{b\_den\_1} :: {[}in{]} The first term in the denominator of the pivot for the tridiagonal solver, given by h\_k plus a term that is a fraction (determined from the tridiagonal solver) of Kddt\_h for the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dte\_term} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the temperature change in the layer below the interface {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dse\_term} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the salinity change in the layer below the interface {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt\_km1\_t2} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the temperature change in the layer above the interface {[}degC{]}.

\item {} 
\sphinxstylestrong{ds\_km1\_t2} :: {[}in{]} A diffusivity\sphinxhyphen{}independent term related to the salinity change in the layer above the interface {[}ppt{]}.

\item {} 
\sphinxstylestrong{pres\_z} :: {[}in{]} The rescaled hydrostatic interface pressure, which relates the changes in column thickness to the energy that is radiated as gravity waves and unavailable to drive mixing {[}R Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpe\_k} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers below {[}R Z3 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpe\_k} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the in the salinities of all the layers below {[}R Z3 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dpea} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dT) relating a layer’s temperature change to the change in column potential energy, including all implicit diffusive changes in the temperatures of all the layers above {[}R Z3 T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dpea} :: {[}in{]} A factor (pres\_lay*mass\_lay*dSpec\_vol/dS) relating a layer’s salinity change to the change in column potential energy, including all implicit diffusive changes in the salinities of all the layers above {[}R Z3 T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolht\_k} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers below {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolht\_k} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers below {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt\_to\_dcolhta} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dT) relating a layer’s temperature change to the change in column height, including all implicit diffusive changes in the temperatures of all the layers above {[}Z degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_to\_dcolhta} :: {[}in{]} A factor (mass\_lay*dSColHtc\_vol/dS) relating a layer’s salinity change to the change in column height, including all implicit diffusive changes in the salinities of all the layers above {[}Z ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pe\_chg} :: {[}out{]} The change in column potential energy from applying Kddt\_h at the present interface {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h {[}R Z3 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dpe\_max} :: {[}out{]} The maximum change in column potential energy that could be realizedd by applying a huge value of Kddt\_h at the present interface {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpec\_dkd\_0} :: {[}out{]} The partial derivative of PE\_chg with Kddt\_h in the limit where Kddt\_h = 0 {[}R Z3 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3 or J kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epbl\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_mstar() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{find\_mstar()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_mstar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{find\_mstar}}}{\emph{CS}, \emph{US}, \emph{Buoyancy\_Flux}, \emph{UStar}, \emph{UStar\_Mean}, \emph{BLD}, \emph{Abs\_Coriolis}, \emph{MStar}, \emph{Langmuir\_Number}, \emph{MStar\_LT}, \emph{Convect\_Langmuir\_Number}}{}
This subroutine finds the Mstar value for ePBL.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Energetic\_PBL control structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} ustar w/ gustiness {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ustar\_mean} :: {[}in{]} ustar w/o gustiness {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{abs\_coriolis} :: {[}in{]} abolute value of the Coriolis parameter {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{buoyancy\_flux} :: {[}in{]} Buoyancy flux {[}Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{bld} :: {[}in{]} boundary layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{mstar} :: {[}out{]} Ouput mstar (Mixing/ustar**3) {[}nondim{]}

\item {} 
\sphinxstylestrong{langmuir\_number} :: {[}in{]} Langmuir number {[}nondim{]}

\item {} 
\sphinxstylestrong{mstar\_lt} :: {[}out{]} Mstar increase due to Langmuir turbulence {[}nondim{]}

\item {} 
\sphinxstylestrong{convect\_langmuir\_number} :: {[}out{]} Langmuir number including buoyancy flux {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mstar\_from\_ekman}} \sphinxcode{\sphinxupquote{mstar\_from\_rh18}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/mstar_langmuir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mstar\_langmuir}}}}} \sphinxcode{\sphinxupquote{use\_fixed\_mstar}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epbl\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mstar\_langmuir() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{mstar\_langmuir()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/mstar_langmuir}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{mstar\_langmuir}}}{\emph{CS}, \emph{US}, \emph{Abs\_Coriolis}, \emph{Buoyancy\_Flux}, \emph{UStar}, \emph{BLD}, \emph{Langmuir\_Number}, \emph{Mstar}, \emph{MStar\_LT}, \emph{Convect\_Langmuir\_Number}}{}
This subroutine modifies the Mstar value if the Langmuir number is present.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Energetic\_PBL control structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{abs\_coriolis} :: {[}in{]} Absolute value of the Coriolis parameter {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{buoyancy\_flux} :: {[}in{]} Buoyancy flux {[}Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} Surface friction velocity with? gustiness {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{bld} :: {[}in{]} boundary layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{mstar} :: {[}inout{]} Input/output mstar (Mixing/ustar**3) {[}nondim{]}

\item {} 
\sphinxstylestrong{langmuir\_number} :: {[}in{]} Langmuir number {[}nondim{]}

\item {} 
\sphinxstylestrong{mstar\_lt} :: {[}out{]} Mstar increase due to Langmuir turbulence {[}nondim{]}

\item {} 
\sphinxstylestrong{convect\_langmuir\_number} :: {[}out{]} Langmuir number including buoyancy flux {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{langmuir\_add}} \sphinxcode{\sphinxupquote{langmuir\_rescale}} \sphinxcode{\sphinxupquote{no\_langmuir}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/find_mstar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_mstar}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{energetic\_pbl\_get\_mld() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{energetic\_pbl\_get\_mld()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_get_mld}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_get\_mld}}}{\emph{CS}, \emph{MLD}, \emph{G}, \emph{US}, \emph{m\_to\_MLD\_units}}{}
Copies the ePBL active mixed layer depth into MLD, in units of {[}Z \textasciitilde{}\textgreater{} m{]} unless other units are specified.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for ePBL

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{mld} :: {[}out{]} Depth of ePBL active mixing layer {[}Z \textasciitilde{}\textgreater{} m{]} or other units

\item {} 
\sphinxstylestrong{m\_to\_mld\_units} :: {[}in{]} A conversion factor from meters to the desired units for MLD

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::lateral\_boundary\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{energetic\_pbl\_init() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{energetic\_pbl\_init()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
This subroutine initializes the energetic\_PBL module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{additive\_string}} \sphinxcode{\sphinxupquote{constant\_string}} \sphinxcode{\sphinxupquote{langmuir\_add}} \sphinxcode{\sphinxupquote{langmuir\_rescale}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{mstar\_from\_ekman}} \sphinxcode{\sphinxupquote{mstar\_from\_rh18}} \sphinxcode{\sphinxupquote{no\_langmuir}} \sphinxcode{\sphinxupquote{none\_string}} \sphinxcode{\sphinxupquote{om4\_string}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_efp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::real\_to\_efp}}}}} \sphinxcode{\sphinxupquote{report\_avg\_its}} \sphinxcode{\sphinxupquote{rescaled\_string}} \sphinxcode{\sphinxupquote{rh18\_string}} \sphinxcode{\sphinxupquote{root\_tke\_string}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}} \sphinxcode{\sphinxupquote{use\_fixed\_mstar}} \sphinxcode{\sphinxupquote{wt\_from\_croot\_tke}} \sphinxcode{\sphinxupquote{wt\_from\_rh18}}

\end{description}\end{quote}

\end{fulllineitems}

\index{energetic\_pbl\_end() (fortran subroutine in module mom\_energetic\_pbl)@\spxentry{energetic\_pbl\_end()}\spxextra{fortran subroutine in module mom\_energetic\_pbl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_energetic\_pbl/}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_end}}}{\emph{CS}}{}
Clean up and deallocate memory associated with the energetic\_PBL module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Energetic\_PBL control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_entrain\_diffusive module reference}
\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive}}\label{\detokenize{api/generated/modules/mom_entrain_diffusive:mom-entrain-diffusive-module-reference}}\label{\detokenize{api/generated/modules/mom_entrain_diffusive::doc}}\index{mom\_entrain\_diffusive (module)@\spxentry{mom\_entrain\_diffusive}\spxextra{module}|spxpagem}
Diapycnal mixing and advection in isopycnal mode.

{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:detamom-entrain-diffusive}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_entrain_diffusive:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrain\_diffusive\_cs}}}}}
&
The control structure holding parametes for the MOM\_entrain\_diffusive module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_entrain_diffusive:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive()}}}}}
&
This subroutine calculates ea and eb, the rates at which a layer entrains from the layers above and below.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_to_ent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{f\_to\_ent()}}}}}
&
This subroutine calculates the actual entrainments (ea and eb) and the amount of surface forcing that is applied to each layer if there is no bulk mixed layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/set_ent_bl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ent\_bl()}}}}}
&
This subroutine sets the average entrainment across each of the interfaces between buffer layers within a timestep.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_dskb()}}}}}
&
This subroutine determines the reference density difference between the bottommost buffer layer and the first interior after the mixing between mixed and buffer layers and mixing with the layer below.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_kb_to_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{f\_kb\_to\_ea\_kb()}}}}}
&
Given an entrainment from below for layer kb, determine a consistent entrainment from above, such that dSkb * ea\_kb = dSkbp1 * F\_kb.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_ea\_kb()}}}}}
&
This subroutine determines the entrainment from above by the top interior layer (labeled kb elsewhere) given an entrainment by the layer below it, constrained to be within the provided bounds.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/find_maxf_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_maxf\_kb()}}}}}
&
Maximize F = ent*ds\_kb*I\_dSkbp1 in the range min\_ent \textless{} ent \textless{} max\_ent.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrain\_diffusive\_init()}}}}}
&
This subroutine initializes the parameters and memory associated with the entrain\_diffusive module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrain\_diffusive\_end()}}}}}
&
This subroutine cleans up and deallocates any memory associated with the entrain\_diffusive module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_entrain_diffusive:detailed-description}}\label{\detokenize{api/generated/modules/mom_entrain_diffusive:detamom-entrain-diffusive}}
By Robert Hallberg, September 1997 \sphinxhyphen{} July 2000.

This file contains the subroutines that implement diapycnal mixing and advection in isopycnal layers. The main subroutine, calculate\_entrainment, returns the entrainment by each layer across the interfaces above and below it. These are calculated subject to the constraints that no layers can be driven to neg\sphinxhyphen{} ative thickness and that the each layer maintains its target density, using the scheme described in Hallberg (MWR 2000). There may or may not be a bulk mixed layer above the isopycnal layers. The solution is iterated until the change in the entrainment between successive iterations is less than some small tolerance.

The dual\sphinxhyphen{}stream entrainment scheme of MacDougall and Dewar (JPO 1997) is used for combined diapycnal advection and diffusion, modified as described in Hallberg (MWR 2000) to be solved implicitly in time. Any profile of diffusivities may be used. Diapycnal advection is fundamentally the residual of diapycnal diffusion, so the fully implicit upwind differencing scheme that is used is entirely appropriate. The downward buoyancy flux in each layer is determined from an implicit calculation based on the previously calculated flux of the layer above and an estim\sphinxhyphen{} ated flux in the layer below. This flux is subject to the foll\sphinxhyphen{} owing conditions: (1) the flux in the top and bottom layers are set by the boundary conditions, and (2) no layer may be driven below an Angstrom thickness. If there is a bulk mixed layer, the mixed and buffer layers are treated as Eulerian layers, whose thicknesses only change due to entrainment by the interior layers.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_entrain_diffusive:type-documentation}}\index{entrain\_diffusive\_cs (fortran type in module mom\_entrain\_diffusive)@\spxentry{entrain\_diffusive\_cs}\spxextra{fortran type in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{entrain\_diffusive\_cs}}}
The control structure holding parametes for the MOM\_entrain\_diffusive module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, a refined bulk mixed layer is used with GVnk\_rho\_varies variable density mixed \& buffer layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_ent\_it}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of iterations that may be used to calculate the diapycnal entrainment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tolerance\_ent}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The tolerance with which to solve for entrainment values {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_sig\_off}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The offset between potential density and a sigma value {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID for diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diff\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic ID for mixing work.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_entrain_diffusive:function-subroutine-documentation}}\index{entrainment\_diffusive() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{entrainment\_diffusive()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{entrainment\_diffusive}}}{\emph{h}, \emph{tv}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{ea}, \emph{eb}, \emph{kb\_out}, \emph{Kd\_Lay}, \emph{Kd\_int}}{}
This subroutine calculates ea and eb, the rates at which a layer entrains from the layers above and below. The entrainment rates are proportional to the buoyancy flux in a layer and inversely proportional to the density differences between layers. The scheme that is used here is described in detail in Hallberg, Mon. Wea. Rev. 2000.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of surface fluxes that may be used.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to entrain\_diffusive\_init.

\item {} 
\sphinxstylestrong{ea} :: {[}out{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{eb} :: {[}out{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{kb\_out} :: {[}inout{]} The index of the lightest layer denser than

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}in{]} The diapycnal diffusivity of layers

\item {} 
\sphinxstylestrong{kd\_int} :: {[}in{]} The diapycnal diffusivity of interfaces

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_dskb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_ea\_kb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_kb_to_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{f\_kb\_to\_ea\_kb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_to_ent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{f\_to\_ent}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/find_maxf_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_maxf\_kb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/set_ent_bl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ent\_bl}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{f\_to\_ent() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{f\_to\_ent()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_to_ent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{f\_to\_ent}}}{\emph{F}, \emph{h}, \emph{kb}, \emph{kmb}, \emph{j}, \emph{G}, \emph{GV}, \emph{CS}, \emph{dsp1\_ds}, \emph{eakb}, \emph{Ent\_bl}, \emph{ea}, \emph{eb}, \emph{do\_i\_in}}{}
This subroutine calculates the actual entrainments (ea and eb) and the amount of surface forcing that is applied to each layer if there is no bulk mixed layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{f} :: {[}in{]} The density flux through a layer within a time step divided by the density difference across the interface below the layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{kb} :: {[}in{]} The index of the lightest layer denser than the deepest buffer layer.

\item {} 
\sphinxstylestrong{kmb} :: {[}in{]} The number of mixed and buffer layers.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The meridional index upon which to work.

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} This module’s control structure.

\item {} 
\sphinxstylestrong{dsp1\_ds} :: {[}in{]} The ratio of coordinate variable differences across the interfaces below a layer over the difference across the interface above the layer.

\item {} 
\sphinxstylestrong{eakb} :: {[}in{]} The entrainment from above by the layer below the buffer layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ent\_bl} :: {[}in{]} The average entrainment upward and downward across each interface around the buffer layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{do\_i\_in} :: {[}in{]} Indicates which i\sphinxhyphen{}points to work on.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_ent\_bl() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{set\_ent\_bl()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/set_ent_bl}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{set\_ent\_bl}}}{\emph{h}, \emph{dtKd\_int}, \emph{tv}, \emph{kb}, \emph{kmb}, \emph{do\_i}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{j}, \emph{Ent\_bl}, \emph{Sref}, \emph{h\_bl}}{}
This subroutine sets the average entrainment across each of the interfaces between buffer layers within a timestep. It also causes thin and relatively light interior layers to be entrained by the deepest buffer layer. Also find the initial coordinate potential densities (Sref) of each layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dtkd\_int} :: {[}in{]} The diapycnal diffusivity across

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{kb} :: {[}inout{]} The index of the lightest layer denser than the buffer layer or 1 if there is no buffer layer.

\item {} 
\sphinxstylestrong{kmb} :: {[}in{]} The number of mixed and buffer layers.

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} A logical variable indicating which i\sphinxhyphen{}points to work on.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The meridional index upon which to work.

\item {} 
\sphinxstylestrong{ent\_bl} :: {[}out{]} The average entrainment upward and

\item {} 
\sphinxstylestrong{sref} :: {[}out{]} The coordinate potential density minus 1000 for each layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{h\_bl} :: {[}out{]} The thickness of each layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{determine\_dskb() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{determine\_dskb()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{determine\_dskb}}}{\emph{h\_bl}, \emph{Sref}, \emph{Ent\_bl}, \emph{E\_kb}, \emph{is}, \emph{ie}, \emph{kmb}, \emph{G}, \emph{GV}, \emph{limit}, \emph{dSkb}, \emph{ddSkb\_dE}, \emph{dSlay}, \emph{ddSlay\_dE}, \emph{dS\_anom\_lim}, \emph{do\_i\_in}}{}
This subroutine determines the reference density difference between the bottommost buffer layer and the first interior after the mixing between mixed and buffer layers and mixing with the layer below. Within the mixed and buffer layers, entrainment from the layer above is increased when it is necessary to keep the layers from developing a negative thickness; otherwise it equals Ent\_bl. At each interface, the upward and downward fluxes average out to Ent\_bl, unless entrainment by the layer below is larger than twice Ent\_bl. The density difference across the first interior layer may also be returned. It could also be limited to avoid negative values or values that greatly exceed the density differences across an interface. Additionally, the partial derivatives of dSkb and dSlay with E\_kb could also be returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h\_bl} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sref} :: {[}in{]} Reference potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{ent\_bl} :: {[}in{]} The average entrainment upward and downward across each interface around the buffer layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{e\_kb} :: {[}in{]} The entrainment by the top interior layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start of the i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end of the i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{kmb} :: {[}in{]} The number of mixed and buffer layers.

\item {} 
\sphinxstylestrong{limit} :: {[}in{]} If true, limit dSkb and dSlay to avoid negative values.

\item {} 
\sphinxstylestrong{dskb} :: {[}inout{]} The limited potential density difference across the interface between the bottommost buffer layer and the topmost interior layer. {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} dSkb \textgreater{} 0.

\item {} 
\sphinxstylestrong{ddskb\_de} :: {[}inout{]} The partial derivative of dSkb with E {[}R H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}4 or m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dslay} :: {[}inout{]} The limited potential density difference across the topmost interior layer. 0 \textless{} dSkb {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{ddslay\_de} :: {[}inout{]} The partial derivative of dSlay with E {[}R H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}4 or m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ds\_anom\_lim} :: {[}inout{]} A limiting value to use for the density anomalies below the buffer layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{do\_i\_in} :: {[}in{]} If present, determines which columns are worked on.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_ea\_kb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_kb_to_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{f\_kb\_to\_ea\_kb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/find_maxf_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_maxf\_kb}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{f\_kb\_to\_ea\_kb() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{f\_kb\_to\_ea\_kb()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_kb_to_ea_kb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{f\_kb\_to\_ea\_kb}}}{\emph{h\_bl}, \emph{Sref}, \emph{Ent\_bl}, \emph{I\_dSkbp1}, \emph{F\_kb}, \emph{kmb}, \emph{i}, \emph{G}, \emph{GV}, \emph{CS}, \emph{ea\_kb}, \emph{tol\_in}}{}
Given an entrainment from below for layer kb, determine a consistent entrainment from above, such that dSkb * ea\_kb = dSkbp1 * F\_kb. The input value of ea\_kb is both the maximum value that can be obtained and the first guess of the iterations. Ideally ea\_kb should be an under\sphinxhyphen{}estimate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_bl} :: {[}in{]} Layer thickness, with the top interior

\item {} 
\sphinxstylestrong{sref} :: {[}in{]} The coordinate reference potential density,

\item {} 
\sphinxstylestrong{ent\_bl} :: {[}in{]} The average entrainment upward and downward

\item {} 
\sphinxstylestrong{i\_dskbp1} :: {[}in{]} The inverse of the difference in reference potential density across the base of the uppermost interior layer {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{f\_kb} :: {[}in{]} The entrainment from below by the uppermost interior layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{kmb} :: {[}in{]} The number of mixed and buffer layers.

\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{ea\_kb} :: {[}inout{]} The entrainment from above by the layer below the buffer layer (i.e. layer kb) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tol\_in} :: {[}in{]} A tolerance for the iterative determination of the entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_dskb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/find_maxf_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_maxf\_kb}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{determine\_ea\_kb() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{determine\_ea\_kb()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_ea_kb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{determine\_ea\_kb}}}{\emph{h\_bl}, \emph{dtKd\_kb}, \emph{Sref}, \emph{I\_dSkbp1}, \emph{Ent\_bl}, \emph{ea\_kbp1}, \emph{min\_eakb}, \emph{max\_eakb}, \emph{kmb}, \emph{is}, \emph{ie}, \emph{do\_i}, \emph{G}, \emph{GV}, \emph{CS}, \emph{Ent}, \emph{error}, \emph{err\_min\_eakb0}, \emph{err\_max\_eakb0}, \emph{F\_kb}, \emph{dFdfm\_kb}}{}
This subroutine determines the entrainment from above by the top interior layer (labeled kb elsewhere) given an entrainment by the layer below it, constrained to be within the provided bounds.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h\_bl} :: {[}in{]} Layer thickness, with the top interior layer at k\sphinxhyphen{}index kmb+1 {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sref} :: {[}in{]} The coordinate reference potential density, with the value of the topmost interior layer at layer kmb+1 {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{ent\_bl} :: {[}in{]} The average entrainment upward and downward across each interface around the buffer layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{i\_dskbp1} :: {[}in{]} The inverse of the difference in reference potential density across the base of the uppermost interior layer {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dtkd\_kb} :: {[}in{]} The diapycnal diffusivity in the top interior layer times the time step {[}H2 \textasciitilde{}\textgreater{} m2 or kg2 m\sphinxhyphen{}4{]}.

\item {} 
\sphinxstylestrong{ea\_kbp1} :: {[}in{]} The entrainment from above by layer kb+1 {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{min\_eakb} :: {[}in{]} The minimum permissible rate of entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{max\_eakb} :: {[}in{]} The maximum permissible rate of entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{kmb} :: {[}in{]} The number of mixed and buffer layers.

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start of the i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end of the i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} A logical variable indicating which i\sphinxhyphen{}points to work on.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{ent} :: {[}inout{]} The entrainment rate of the uppermost interior layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. The input value is the first guess.

\item {} 
\sphinxstylestrong{error} :: {[}out{]} The error (locally defined in this routine) associated with the returned solution.

\item {} 
\sphinxstylestrong{err\_min\_eakb0} :: {[}in{]} The errors (locally defined) associated with min\_eakb when ea\_kbp1 = 0, returned from a previous call to this fn.

\item {} 
\sphinxstylestrong{err\_max\_eakb0} :: {[}in{]} The errors (locally defined) associated with min\_eakb when ea\_kbp1 = 0, returned from a previous call to this fn.

\item {} 
\sphinxstylestrong{f\_kb} :: {[}out{]} The entrainment from below by the uppermost interior layer corresponding to the returned value of Ent {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dfdfm\_kb} :: {[}out{]} The partial derivative of F\_kb with ea\_kbp1 {[}nondim{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_dskb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_maxf\_kb() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{find\_maxf\_kb()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/find_maxf_kb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{find\_maxf\_kb}}}{\emph{h\_bl}, \emph{Sref}, \emph{Ent\_bl}, \emph{I\_dSkbp1}, \emph{min\_ent\_in}, \emph{max\_ent\_in}, \emph{kmb}, \emph{is}, \emph{ie}, \emph{G}, \emph{GV}, \emph{CS}, \emph{maxF}, \emph{ent\_maxF}, \emph{do\_i\_in}, \emph{F\_lim\_maxent}, \emph{F\_thresh}}{}
Maximize F = ent*ds\_kb*I\_dSkbp1 in the range min\_ent \textless{} ent \textless{} max\_ent.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h\_bl} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sref} :: {[}in{]} Reference potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{ent\_bl} :: {[}in{]} The average entrainment upward and

\item {} 
\sphinxstylestrong{i\_dskbp1} :: {[}in{]} The inverse of the difference in reference potential density across the base of the uppermost interior layer {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{min\_ent\_in} :: {[}in{]} The minimum value of ent to search, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{max\_ent\_in} :: {[}in{]} The maximum value of ent to search, {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{kmb} :: {[}in{]} The number of mixed and buffer layers.

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start of the i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end of the i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{maxf} :: {[}out{]} The maximum value of F = ent*ds\_kb*I\_dSkbp1 found in the range min\_ent \textless{} ent \textless{} max\_ent {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ent\_maxf} :: {[}out{]} The value of ent at that maximum {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{do\_i\_in} :: {[}in{]} A logical array indicating which columns

\item {} 
\sphinxstylestrong{f\_lim\_maxent} :: {[}out{]} If present, do not apply the limit in

\item {} 
\sphinxstylestrong{f\_thresh} :: {[}in{]} If F\_thresh is present, return the first

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_dskb}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{entrainment\_diffusive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/f_kb_to_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{f\_kb\_to\_ea\_kb}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{entrain\_diffusive\_init() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{entrain\_diffusive\_init()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{entrain\_diffusive\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{just\_read\_params}}{}
This subroutine initializes the parameters and memory associated with the entrain\_diffusive module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters logging them or registering any diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{entrain\_diffusive\_end() (fortran subroutine in module mom\_entrain\_diffusive)@\spxentry{entrain\_diffusive\_end()}\spxextra{fortran subroutine in module mom\_entrain\_diffusive}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive/}}\sphinxbfcode{\sphinxupquote{entrain\_diffusive\_end}}}{\emph{CS}}{}
This subroutine cleans up and deallocates any memory associated with the entrain\_diffusive module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that will be deallocated.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_eos module reference}
\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos}}\label{\detokenize{api/generated/modules/mom_eos:mom-eos-module-reference}}\label{\detokenize{api/generated/modules/mom_eos::doc}}\index{mom\_eos (module)@\spxentry{mom\_eos}\spxextra{module}|spxpagem}
Provides subroutines for quantities specific to the equation of state.

{\hyperref[\detokenize{api/generated/modules/mom_eos:detamom-eos}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_eos:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_type}}}}}
&
A control structure for the equation of state.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_eos:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar()}}}}}
&
Calls the appropriate subroutine to calculate density of sea water for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_stanley\_density\_scalar()}}}}}
&
Calls the appropriate subroutine to calculate density of sea water for scalar inputs including the variance of T, S and covariance of T\sphinxhyphen{}S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array()}}}}}
&
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_stanley\_density\_array()}}}}}
&
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs including the variance of T, S and covariance of T\sphinxhyphen{}S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_1d()}}}}}
&
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs, potentially limiting the domain of indices that are worked on.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_stanley\_density\_1d()}}}}}
&
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs including the variance of T, S and covariance of T\sphinxhyphen{}S, potentially limiting the domain of indices that are worked on.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array()}}}}}
&
Calls the appropriate subroutine to calculate the specific volume of sea water for 1\sphinxhyphen{}D array inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_spec\_vol\_scalar()}}}}}
&
Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_spec\_vol\_1d()}}}}}
&
Calls the appropriate subroutine to calculate the specific volume of sea water for 1\sphinxhyphen{}D array inputs, potentially limiting the domain of indices that are worked on.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_tfreeze_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_scalar()}}}}}
&
Calls the appropriate subroutine to calculate the freezing point for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_tfreeze_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_array()}}}}}
&
Calls the appropriate subroutine to calculate the freezing point for a 1\sphinxhyphen{}D array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array()}}}}}
&
Calls the appropriate subroutine to calculate density derivatives for 1\sphinxhyphen{}D array inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_1d()}}}}}
&
Calls the appropriate subroutine to calculate density derivatives for 1\sphinxhyphen{}D array inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar()}}}}}
&
Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one\sphinxhyphen{}element array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_second_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_array()}}}}}
&
Calls the appropriate subroutine to calculate density second derivatives for 1\sphinxhyphen{}D array inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_second_derivs_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar()}}}}}
&
Calls the appropriate subroutine to calculate density second derivatives for scalar nputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_derivs\_array()}}}}}
&
Calls the appropriate subroutine to calculate specific volume derivatives for an array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_derivs_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_spec\_vol\_derivs\_1d()}}}}}
&
Calls the appropriate subroutine to calculate specific volume derivatives for 1\sphinxhyphen{}d array inputs, potentially limiting the domain of indices that are worked on.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_array()}}}}}
&
Calls the appropriate subroutine to calculate the density and compressibility for 1\sphinxhyphen{}D array inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_scalar()}}}}}
&
Calculate density and compressibility for a scalar.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_domain()}}}}}
&
This subroutine returns a two point integer array indicating the domain of i\sphinxhyphen{}indices to work on in EOS calls based on information from a hor\_index type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{analytic\_int\_specific\_vol\_dp()}}}}}
&
Calls the appropriate subroutine to calculate analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_density_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{analytic\_int\_density\_dz()}}}}}
&
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/query_compressible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_compressible()}}}}}
&
Returns true if the equation of state is compressible (i.e.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_init()}}}}}
&
Initializes EOS\_type by allocating and reading parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_manual_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_manual\_init()}}}}}
&
Manually initialized an EOS type (intended for unit testing of routines which need a specific EOS)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_allocate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_allocate()}}}}}
&
Allocates EOS\_type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_end()}}}}}
&
Deallocates EOS\_type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_use_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_use\_linear()}}}}}
&
Set equation of state structure (EOS) to linear with given coefficients.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/convert_temp_salt_for_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_temp\_salt\_for\_teos10()}}}}}
&
Convert T\&S to Absolute Salinity and Conservative Temperature if using TEOS10.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_quadrature}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_quadrature()}}}}}
&
Return value of EOS\_quadrature.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/extract_member_eos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_member\_eos()}}}}}
&
Extractor routine for the EOS type if the members need to be accessed outside this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_eos:detailed-description}}\label{\detokenize{api/generated/modules/mom_eos:detamom-eos}}
The MOM\_EOS module is a wrapper for various equations of state (e.g. Linear, Wright, UNESCO) and provides a uniform interface to the rest of the model independent of which equation of state is being used.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_eos:type-documentation}}\index{eos\_type (fortran type in module mom\_eos)@\spxentry{eos\_type}\spxextra{fortran type in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_type}}}
A control structure for the equation of state.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{form\_of\_eos}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The equation of state to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{form\_of\_tfreeze}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The expression for the potential temperature of the freezing point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eos\_quadrature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, always use the generic (quadrature) code for the integrals of density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{compressible}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, in situ density is a function of pressure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_t0\_s0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drho\_dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The partial derivative of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drho\_ds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The partial derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tfr\_s0\_p0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The freezing potential temperature at S=0, P=0 {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtfr\_ds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The derivative of freezing point with salinity {[}degC ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtfr\_dp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The derivative of freezing point with pressure {[}degC Pa\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates distances in meters to the units of depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kg\_m3\_to\_r}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates kilograms per meter cubed to the units of density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{r\_to\_kg\_m3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates the units of density to kilograms per meter cubed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rl2\_t2\_to\_pa}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert pressures from R L2 T\sphinxhyphen{}2 to Pa.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l\_t\_to\_m\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert lateral velocities from L T\sphinxhyphen{}1 to m s\sphinxhyphen{}1.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_eos:function-subroutine-documentation}}\index{calculate\_density\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_scalar}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{EOS}, \emph{rho\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate density of sea water for scalar inputs. If rho\_ref is present, the anomaly with respect to rho\_ref is returned. The pressure and density can be rescaled with the US. If both the US and scale arguments are present the density scaling uses the product of the two scaling factors.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} Density (in\sphinxhyphen{}situ if pressure is local) {[}kg m\sphinxhyphen{}3{]} or {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_stanley\_density\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_stanley\_density\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_stanley\_density\_scalar}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{Tvar}, \emph{TScov}, \emph{Svar}, \emph{rho}, \emph{EOS}, \emph{rho\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate density of sea water for scalar inputs including the variance of T, S and covariance of T\sphinxhyphen{}S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\_ref is present, the anomaly with respect to rho\_ref is returned. The density can be rescaled using rho\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{tvar} :: {[}in{]} Variance of potential temperature referenced to the surface {[}degC2{]}

\item {} 
\sphinxstylestrong{tscov} :: {[}in{]} Covariance of potential temperature and salinity {[}degC ppt{]}

\item {} 
\sphinxstylestrong{svar} :: {[}in{]} Variance of salinity {[}ppt2{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} Density (in\sphinxhyphen{}situ if pressure is local) {[}kg m\sphinxhyphen{}3{]} or {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density from kg m\sphinxhyphen{}3 to the desired units {[}R m3 kg\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_array}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{start}, \emph{npts}, \emph{EOS}, \emph{rho\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs. If rho\_ref is present, the anomaly with respect to rho\_ref is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} Density (in\sphinxhyphen{}situ if pressure is local) {[}kg m\sphinxhyphen{}3{]} or {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Start index for computation

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} Number of point to compute

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_stanley\_density\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_stanley\_density\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_stanley\_density\_array}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{Tvar}, \emph{TScov}, \emph{Svar}, \emph{rho}, \emph{start}, \emph{npts}, \emph{EOS}, \emph{rho\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs including the variance of T, S and covariance of T\sphinxhyphen{}S. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\_ref is present, the anomaly with respect to rho\_ref is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}

\item {} 
\sphinxstylestrong{tvar} :: {[}in{]} Variance of potential temperature referenced to the surface {[}degC2{]}

\item {} 
\sphinxstylestrong{tscov} :: {[}in{]} Covariance of potential temperature and salinity {[}degC ppt{]}

\item {} 
\sphinxstylestrong{svar} :: {[}in{]} Variance of salinity {[}ppt2{]}

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} Density (in\sphinxhyphen{}situ if pressure is local) {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Start index for computation

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} Number of point to compute

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density from kg m\sphinxhyphen{}3 to the desired units {[}R m3 kg\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_1d() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_1d()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_1d}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{EOS}, \emph{dom}, \emph{rho\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs, potentially limiting the domain of indices that are worked on. If rho\_ref is present, the anomaly with respect to rho\_ref is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} Density (in\sphinxhyphen{}situ if pressure is local) {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dom} :: {[}in{]} The domain of indices to work on, taking into account that arrays start at 1.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_stanley\_density\_1d() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_stanley\_density\_1d()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_stanley\_density\_1d}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{Tvar}, \emph{TScov}, \emph{Svar}, \emph{rho}, \emph{EOS}, \emph{dom}, \emph{rho\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate the density of sea water for 1\sphinxhyphen{}D array inputs including the variance of T, S and covariance of T\sphinxhyphen{}S, potentially limiting the domain of indices that are worked on. The calculation uses only the second order correction in a series as discussed in Stanley et al., 2020. If rho\_ref is present, the anomaly with respect to rho\_ref is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{tvar} :: {[}in{]} Variance of potential temperature {[}degC2{]}

\item {} 
\sphinxstylestrong{tscov} :: {[}in{]} Covariance of potential temperature and salinity {[}degC ppt{]}

\item {} 
\sphinxstylestrong{svar} :: {[}in{]} Variance of salinity {[}ppt2{]}

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} Density (in\sphinxhyphen{}situ if pressure is local) {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dom} :: {[}in{]} The domain of indices to work on, taking into account that arrays start at 1.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_spec\_vol\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_array}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{start}, \emph{npts}, \emph{EOS}, \emph{spv\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate the specific volume of sea water for 1\sphinxhyphen{}D array inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}

\item {} 
\sphinxstylestrong{specvol} :: {[}inout{]} in situ specific volume {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale specific volume in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_spec\_vol\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_spec\_vol\_scalar}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_spec\_vol\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calc\_spec\_vol\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calc\_spec\_vol\_scalar}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{EOS}, \emph{spv\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate specific volume of sea water for scalar inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} In situ? specific volume {[}m3 kg\sphinxhyphen{}1{]} or {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]} or {[}R\sphinxhyphen{}1 m3 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale specific volume in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_spec\_vol\_1d() (fortran subroutine in module mom\_eos)@\spxentry{calc\_spec\_vol\_1d()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calc\_spec\_vol\_1d}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{EOS}, \emph{dom}, \emph{spv\_ref}, \emph{scale}}{}
Calls the appropriate subroutine to calculate the specific volume of sea water for 1\sphinxhyphen{}D array inputs, potentially limiting the domain of indices that are worked on.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{specvol} :: {[}inout{]} In situ specific volume {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dom} :: {[}in{]} The domain of indices to work on, taking into account that arrays start at 1.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale output specific volume in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_tfreeze\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_tfreeze_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_scalar}}}{\emph{S}, \emph{pressure}, \emph{T\_fr}, \emph{EOS}, \emph{pres\_scale}}{}
Calls the appropriate subroutine to calculate the freezing point for scalar inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}other{]}

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{pres\_scale} :: {[}in{]} A multiplicative factor to convert pressure into Pa

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{tfreeze\_linear}} \sphinxcode{\sphinxupquote{tfreeze\_millero}} \sphinxcode{\sphinxupquote{tfreeze\_teos10}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_tfreeze\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_tfreeze_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_array}}}{\emph{S}, \emph{pressure}, \emph{T\_fr}, \emph{start}, \emph{npts}, \emph{EOS}, \emph{pres\_scale}}{}
Calls the appropriate subroutine to calculate the freezing point for a 1\sphinxhyphen{}D array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}other{]}

\item {} 
\sphinxstylestrong{t\_fr} :: {[}inout{]} Freezing point potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Starting index within the array

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{pres\_scale} :: {[}in{]} A multiplicative factor to convert pressure into Pa.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{tfreeze\_linear}} \sphinxcode{\sphinxupquote{tfreeze\_millero}} \sphinxcode{\sphinxupquote{tfreeze\_teos10}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_derivs\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_array}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{start}, \emph{npts}, \emph{EOS}, \emph{scale}}{}
Calls the appropriate subroutine to calculate density derivatives for 1\sphinxhyphen{}D array inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}inout{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]} or {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}inout{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]} or {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Starting index within the array

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_1d() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_derivs\_1d()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_1d}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{EOS}, \emph{dom}, \emph{scale}}{}
Calls the appropriate subroutine to calculate density derivatives for 1\sphinxhyphen{}D array inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}inout{]} The partial derivative of density with potential temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}inout{]} The partial derivative of density with salinity {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dom} :: {[}in{]} The domain of indices to work on, taking into account that arrays start at 1.

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_derivs\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_scalar}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{EOS}, \emph{scale}}{}
Calls the appropriate subroutines to calculate density derivatives by promoting a scalar to a one\sphinxhyphen{}element array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]} or {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]} or {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_second\_derivs\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_second_derivs_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_array}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dS\_dS}, \emph{drho\_dS\_dT}, \emph{drho\_dT\_dT}, \emph{drho\_dS\_dP}, \emph{drho\_dT\_dP}, \emph{start}, \emph{npts}, \emph{EOS}, \emph{scale}}{}
Calls the appropriate subroutine to calculate density second derivatives for 1\sphinxhyphen{}D array inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}inout{]} Partial derivative of beta with respect to S {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}2{]} or {[}R ppt\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}inout{]} Partial derivative of beta with respect to T {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1{]} or {[}R ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}inout{]} Partial derivative of alpha with respect to T {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]} or {[}R degC\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}inout{]} Partial derivative of beta with respect to pressure {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]} or {[}R ppt\sphinxhyphen{}1 Pa\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}inout{]} Partial derivative of alpha with respect to pressure {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]} or {[}R degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Starting index within the array

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_density\_second\_derivs\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_second_derivs_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dS\_dS}, \emph{drho\_dS\_dT}, \emph{drho\_dT\_dT}, \emph{drho\_dS\_dP}, \emph{drho\_dT\_dP}, \emph{EOS}, \emph{scale}}{}
Calls the appropriate subroutine to calculate density second derivatives for scalar nputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}out{]} Partial derivative of beta with respect to S {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}2{]} or {[}R ppt\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}out{]} Partial derivative of beta with respect to T {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1{]} or {[}R ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}out{]} Partial derivative of alpha with respect to T {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]} or {[}R degC\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}out{]} Partial derivative of beta with respect to pressure {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]} or {[}R ppt\sphinxhyphen{}1 Pa\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}out{]} Partial derivative of alpha with respect to pressure {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]} or {[}R degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale density in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_derivs\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_spec\_vol\_derivs\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_derivs_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_derivs\_array}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{start}, \emph{npts}, \emph{EOS}}{}
Calls the appropriate subroutine to calculate specific volume derivatives for an array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}inout{]} The partial derivative of specific volume with potential temperature {[}m3 kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}inout{]} The partial derivative of specific volume with salinity {[}m3 kg\sphinxhyphen{}1 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Starting index within the array

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_derivs_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_spec\_vol\_derivs\_1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_spec\_vol\_derivs\_1d() (fortran subroutine in module mom\_eos)@\spxentry{calc\_spec\_vol\_derivs\_1d()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_derivs_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calc\_spec\_vol\_derivs\_1d}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{EOS}, \emph{dom}, \emph{scale}}{}
Calls the appropriate subroutine to calculate specific volume derivatives for 1\sphinxhyphen{}d array inputs, potentially limiting the domain of indices that are worked on.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}inout{]} The partial derivative of specific volume with potential temperature {[}R\sphinxhyphen{}1 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}inout{]} The partial derivative of specific volume with salinity {[}R\sphinxhyphen{}1 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dom} :: {[}in{]} The domain of indices to work on, taking into account that arrays start at 1.

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A multiplicative factor by which to scale specific volume in combination with scaling given by US {[}various{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_derivs\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_array() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_compress\_array()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_array}}}{\emph{T}, \emph{S}, \emph{press}, \emph{rho}, \emph{drho\_dp}, \emph{start}, \emph{npts}, \emph{EOS}}{}
Calls the appropriate subroutine to calculate the density and compressibility for 1\sphinxhyphen{}D array inputs. If US is present, the units of the inputs and outputs are rescaled.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}

\item {} 
\sphinxstylestrong{press} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} In situ density {[}kg m\sphinxhyphen{}3{]} or {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}inout{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]} or {[}T2 L\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Starting index within the array

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_compress_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_linear::calculate\_compress\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_compress_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_nemo::calculate\_compress\_nemo}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_compress_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_unesco::calculate\_compress\_unesco}}}}} \sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_scalar}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_scalar() (fortran subroutine in module mom\_eos)@\spxentry{calculate\_compress\_scalar()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_scalar}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{drho\_dp}, \emph{EOS}}{}
Calculate density and compressibility for a scalar. This just promotes the scalar to an array with a singleton dimension and calls calculate\_compress\_array. If US is present, the units of the inputs and outputs are rescaled.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]} or {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]} or {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}out{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]} or {[}T2 L\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_domain() (fortran function in module mom\_eos)@\spxentry{eos\_domain()}\spxextra{fortran function in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_domain}}}{\emph{HI}, \emph{halo}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This subroutine returns a two point integer array indicating the domain of i\sphinxhyphen{}indices to work on in EOS calls based on information from a hor\_index type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The horizontal index structure

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The halo size to work on; missing is equivalent to 0.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The index domain that the EOS will work on, taking into account that the arrays inside the EOS routines will start at 1.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/determine_temperature}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::determine\_temperature}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/double_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::double\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::entrainment\_diffusive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_n2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::find\_n2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/find_n2_bottom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_int\_tide\_input::find\_n2\_bottom}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_tke_to_kd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::find\_tke\_to\_kd}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_bml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat::mixedlayer\_restrat\_bml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_general}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat::mixedlayer\_restrat\_general}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_surface}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization/rgc_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_initialization::rgc\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_density_ratios}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_density\_ratios}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/set_ent_bl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::set\_ent\_bl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/smoothed_drdt_drds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_full\_convection::smoothed\_drdt\_drds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_epipycnal_ml_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_epipycnal\_ml\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity::user\_change\_diff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{analytic\_int\_specific\_vol\_dp() (fortran subroutine in module mom\_eos)@\spxentry{analytic\_int\_specific\_vol\_dp()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_specific_vol_dp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{analytic\_int\_specific\_vol\_dp}}}{\emph{T}, \emph{S}, \emph{p\_t}, \emph{p\_b}, \emph{alpha\_ref}, \emph{HI}, \emph{EOS}, \emph{dza}, \emph{intp\_dza}, \emph{intx\_dza}, \emph{inty\_dza}, \emph{halo\_size}, \emph{bathyP}, \emph{dP\_tiny}, \emph{useMassWghtInterp}}{}
Calls the appropriate subroutine to calculate analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model. There are essentially no free assumptions, apart from the use of Boole’s rule to do the horizontal integrals, and from a truncation in the series for log(1\sphinxhyphen{}eps/1+eps) that assumes that {\color{red}\bfseries{}|eps|} \textless{} 0.34.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The horizontal index structure

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Pressure at the top of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{p\_b} :: {[}in{]} Pressure at the bottom of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{alpha\_ref} :: {[}in{]} A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]} The calculation is mathematically identical with different values of alpha\_ref, but this reduces the effects of roundoff.

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dza} :: {[}inout{]} The change in the geopotential anomaly across

\item {} 
\sphinxstylestrong{intp\_dza} :: {[}inout{]} The integral in pressure through the layer of the

\item {} 
\sphinxstylestrong{intx\_dza} :: {[}inout{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dza} :: {[}inout{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} The width of halo points on which to calculate dza.

\item {} 
\sphinxstylestrong{bathyp} :: {[}in{]} The pressure at the bathymetry {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{dp\_tiny} :: {[}in{]} A miniscule pressure change with the same units as p\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/int_spec_vol_dp_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos\_linear::int\_spec\_vol\_dp\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{analytic\_int\_density\_dz() (fortran subroutine in module mom\_eos)@\spxentry{analytic\_int\_density\_dz()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_density_dz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{analytic\_int\_density\_dz}}}{\emph{T}, \emph{S}, \emph{z\_t}, \emph{z\_b}, \emph{rho\_ref}, \emph{rho\_0}, \emph{G\_e}, \emph{HI}, \emph{EOS}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{bathyT}, \emph{dz\_neglect}, \emph{useMassWghtInterp}}{}
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Ocean horizontal index structure

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} Height at the top of the layer in depth units {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} Height at the bottom of the layer {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} A density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e) used in the equation of state.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]} or {[}m2 Z\sphinxhyphen{}1 s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{dpa} :: {[}inout{]} The change in the pressure anomaly

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}inout{]} The integral through the thickness of the

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}inout{]} The integral in x of the difference between

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}inout{]} The integral in y of the difference between

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{dz\_neglect} :: {[}in{]} A miniscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_wright}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_compressible() (fortran function in module mom\_eos)@\spxentry{query\_compressible()}\spxextra{fortran function in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/query_compressible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{query\_compressible}}}{\emph{EOS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if the equation of state is compressible (i.e. has pressure dependence)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{eos} :: Equation of state structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_nonbouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_init() (fortran subroutine in module mom\_eos)@\spxentry{eos\_init()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_init}}}{\emph{param\_file}, \emph{EOS}, \emph{US}}{}
Initializes EOS\_type by allocating and reading parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_allocate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_allocate}}}}} \sphinxcode{\sphinxupquote{eos\_default}} \sphinxcode{\sphinxupquote{eos\_linear}} \sphinxcode{\sphinxupquote{eos\_linear\_string}} \sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_nemo\_string}} \sphinxcode{\sphinxupquote{eos\_teos10}} \sphinxcode{\sphinxupquote{eos\_teos10\_string}} \sphinxcode{\sphinxupquote{eos\_unesco}} \sphinxcode{\sphinxupquote{eos\_unesco\_string}} \sphinxcode{\sphinxupquote{eos\_wright}} \sphinxcode{\sphinxupquote{eos\_wright\_string}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{tfreeze\_default}} \sphinxcode{\sphinxupquote{tfreeze\_linear}} \sphinxcode{\sphinxupquote{tfreeze\_linear\_string}} \sphinxcode{\sphinxupquote{tfreeze\_millero}} \sphinxcode{\sphinxupquote{tfreeze\_millero\_string}} \sphinxcode{\sphinxupquote{tfreeze\_teos10}} \sphinxcode{\sphinxupquote{tfreeze\_teos10\_string}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_manual\_init() (fortran subroutine in module mom\_eos)@\spxentry{eos\_manual\_init()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_manual_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_manual\_init}}}{\emph{EOS}, \emph{form\_of\_EOS}, \emph{form\_of\_TFreeze}, \emph{EOS\_quadrature}, \emph{Compressible}, \emph{Rho\_T0\_S0}, \emph{drho\_dT}, \emph{dRho\_dS}, \emph{TFr\_S0\_P0}, \emph{dTFr\_dS}, \emph{dTFr\_dp}}{}
Manually initialized an EOS type (intended for unit testing of routines which need a specific EOS)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{form\_of\_eos} :: {[}in{]} A coded integer indicating the equation of state to use.

\item {} 
\sphinxstylestrong{form\_of\_tfreeze} :: {[}in{]} A coded integer indicating the expression for the potential temperature of the freezing point.

\item {} 
\sphinxstylestrong{eos\_quadrature} :: {[}in{]} If true, always use the generic (quadrature) code for the integrals of density.

\item {} 
\sphinxstylestrong{compressible} :: {[}in{]} If true, in situ density is a function of pressure.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} Density at T=0 degC and S=0 ppt {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} Partial derivative of density with temperature in {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} Partial derivative of density with salinity in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tfr\_s0\_p0} :: {[}in{]} The freezing potential temperature at S=0, P=0 {[}degC{]}

\item {} 
\sphinxstylestrong{dtfr\_ds} :: {[}in{]} The derivative of freezing point with salinity in {[}degC ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dtfr\_dp} :: {[}in{]} The derivative of freezing point with pressure in {[}degC Pa\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_allocate() (fortran subroutine in module mom\_eos)@\spxentry{eos\_allocate()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_allocate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_allocate}}}{\emph{EOS}}{}
Allocates EOS\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{eos} :: Equation of state structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eos\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_end() (fortran subroutine in module mom\_eos)@\spxentry{eos\_end()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_end}}}{\emph{EOS}}{}
Deallocates EOS\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{eos} :: Equation of state structure

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_use\_linear() (fortran subroutine in module mom\_eos)@\spxentry{eos\_use\_linear()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_use_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_use\_linear}}}{\emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{EOS}, \emph{use\_quadrature}}{}
Set equation of state structure (EOS) to linear with given coefficients.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} Density at T=0 degC and S=0 ppt {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} Partial derivative of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} Partial derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{use\_quadrature} :: {[}in{]} If true, always use the generic (quadrature) code for the integrals of density.

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_linear}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convert\_temp\_salt\_for\_teos10() (fortran subroutine in module mom\_eos)@\spxentry{convert\_temp\_salt\_for\_teos10()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/convert_temp_salt_for_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{convert\_temp\_salt\_for\_teos10}}}{\emph{T}, \emph{S}, \emph{HI}, \emph{kd}, \emph{mask\_z}, \emph{EOS}}{}
Convert T\&S to Absolute Salinity and Conservative Temperature if using TEOS10.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{kd} :: {[}in{]} The number of layers to work on

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The horizontal index structure

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Potential temperature referenced to the surface {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{mask\_z} :: {[}in{]} 3d mask regulating which points to convert.

\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos\_nemo}} \sphinxcode{\sphinxupquote{eos\_teos10}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_temp\_salt\_initialize\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{eos\_quadrature() (fortran function in module mom\_eos)@\spxentry{eos\_quadrature()}\spxextra{fortran function in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_quadrature}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{eos\_quadrature}}}{\emph{EOS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Return value of EOS\_quadrature.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{eos} :: Equation of state structure

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_member\_eos() (fortran subroutine in module mom\_eos)@\spxentry{extract\_member\_eos()}\spxextra{fortran subroutine in module mom\_eos}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos:f/mom_eos/extract_member_eos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos/}}\sphinxbfcode{\sphinxupquote{extract\_member\_eos}}}{\emph{EOS}, \emph{form\_of\_EOS}, \emph{form\_of\_TFreeze}, \emph{EOS\_quadrature}, \emph{Compressible}, \emph{Rho\_T0\_S0}, \emph{drho\_dT}, \emph{dRho\_dS}, \emph{TFr\_S0\_P0}, \emph{dTFr\_dS}, \emph{dTFr\_dp}}{}
Extractor routine for the EOS type if the members need to be accessed outside this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{eos} :: Equation of state structure

\item {} 
\sphinxstylestrong{form\_of\_eos} :: {[}out{]} A coded integer indicating the equation of state to use.

\item {} 
\sphinxstylestrong{form\_of\_tfreeze} :: {[}out{]} A coded integer indicating the expression for the potential temperature of the freezing point.

\item {} 
\sphinxstylestrong{eos\_quadrature} :: {[}out{]} If true, always use the generic (quadrature) code for the integrals of density.

\item {} 
\sphinxstylestrong{compressible} :: {[}out{]} If true, in situ density is a function of pressure.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}out{]} Density at T=0 degC and S=0 ppt {[}kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} Partial derivative of density with temperature in {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} Partial derivative of density with salinity in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tfr\_s0\_p0} :: {[}out{]} The freezing potential temperature at S=0, P=0 {[}degC{]}

\item {} 
\sphinxstylestrong{dtfr\_ds} :: {[}out{]} The derivative of freezing point with salinity {[}degC PSU\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dtfr\_dp} :: {[}out{]} The derivative of freezing point with pressure {[}degC Pa\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_eos\_linear module reference}
\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear}}\label{\detokenize{api/generated/modules/mom_eos_linear:mom-eos-linear-module-reference}}\label{\detokenize{api/generated/modules/mom_eos_linear::doc}}\index{mom\_eos\_linear (module)@\spxentry{mom\_eos\_linear}\spxextra{module}|spxpagem}
A simple linear equation of state for sea water with constant coefficients.

{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:detamom-eos-linear}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_eos_linear:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_scalar_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_linear()}}}}}
&
This subroutine computes the density of sea water with a trivial linear equation of state (in {[}kg m\sphinxhyphen{}3{]}) from salinity (sal {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_array_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_linear()}}}}}
&
This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m\textasciicircum{}3) from salinity (sal in psu), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_spec_vol_scalar_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_linear()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using a trivial linear equation of state for density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_spec_vol_array_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_linear()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using a trivial linear equation of state for density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_derivs_array_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array\_linear()}}}}}
&
This subroutine calculates the partial derivatives of density * with potential temperature and salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_derivs_scalar_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_linear()}}}}}
&
This subroutine calculates the partial derivatives of density * with potential temperature and salinity for a single point.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_second_derivs_scalar_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_linear()}}}}}
&
This subroutine calculates the five, partial second derivatives of density w.r.t.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_second_derivs_array_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_linear()}}}}}
&
This subroutine calculates the five, partial second derivatives of density w.r.t.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_specvol_derivs_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_specvol\_derivs\_linear()}}}}}
&
Calculate the derivatives of specific volume with temperature and salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_compress_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_linear()}}}}}
&
This subroutine computes the in situ density of sea water (rho) and the compressibility (drho/dp == C\_sound\textasciicircum{}\sphinxhyphen{}2) at the given salinity, potential temperature, and pressure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/int_density_dz_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz\_linear()}}}}}
&
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/int_spec_vol_dp_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_spec\_vol\_dp\_linear()}}}}}
&
Calculates analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_eos_linear:detailed-description}}\label{\detokenize{api/generated/modules/mom_eos_linear:detamom-eos-linear}}
A simple linear equation of state for sea water with constant coefficients.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_eos_linear:function-subroutine-documentation}}\index{calculate\_density\_scalar\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_density\_scalar\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_scalar_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_scalar\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{rho\_ref}}{}
This subroutine computes the density of sea water with a trivial linear equation of state (in {[}kg m\sphinxhyphen{}3{]}) from salinity (sal {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivatives of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivatives of density with salinity in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_array\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_density\_array\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_array_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_array\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{start}, \emph{npts}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{rho\_ref}}{}
This subroutine computes the density of sea water with a trivial linear equation of state (in kg/m\textasciicircum{}3) from salinity (sal in psu), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} in situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivatives of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivatives of density with salinity in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_scalar\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_spec\_vol\_scalar\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_spec_vol_scalar_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using a trivial linear equation of state for density. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} In situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivatives of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivatives of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_array\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_spec\_vol\_array\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_spec_vol_array_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_array\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{start}, \emph{npts}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using a trivial linear equation of state for density. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivatives of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivatives of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_array\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_density\_derivs\_array\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_derivs_array_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_array\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT\_out}, \emph{drho\_dS\_out}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{start}, \emph{npts}}{}
This subroutine calculates the partial derivatives of density * with potential temperature and salinity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt\_out} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_out} :: {[}out{]} The partial derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivative of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_scalar\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_density\_derivs\_scalar\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_derivs_scalar_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT\_out}, \emph{drho\_dS\_out}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}}{}
This subroutine calculates the partial derivatives of density * with potential temperature and salinity for a single point.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt\_out} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_out} :: {[}out{]} The partial derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivatives of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivatives of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_scalar\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_density\_second\_derivs\_scalar\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_second_derivs_scalar_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dS\_dS}, \emph{drho\_dS\_dT}, \emph{drho\_dT\_dT}, \emph{drho\_dS\_dP}, \emph{drho\_dT\_dP}}{}
This subroutine calculates the five, partial second derivatives of density w.r.t. potential temperature and salinity and pressure which for a linear equation of state should all be 0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}out{]} The second derivative of density with salinity {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}out{]} The second derivative of density with temperature and salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}out{]} The second derivative of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}out{]} The second derivative of density with salinity and pressure {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}out{]} The second derivative of density with temperature and pressure {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_array\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_density\_second\_derivs\_array\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_density_second_derivs_array_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dS\_dS}, \emph{drho\_dS\_dT}, \emph{drho\_dT\_dT}, \emph{drho\_dS\_dP}, \emph{drho\_dT\_dP}, \emph{start}, \emph{npts}}{}
This subroutine calculates the five, partial second derivatives of density w.r.t. potential temperature and salinity and pressure which for a linear equation of state should all be 0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}out{]} The second derivative of density with salinity {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}out{]} The second derivative of density with temperature and salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}out{]} The second derivative of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}out{]} The second derivative of density with salinity and pressure {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}out{]} The second derivative of density with temperature and pressure {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_specvol\_derivs\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_specvol\_derivs\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_specvol_derivs_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_specvol\_derivs\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{start}, \emph{npts}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}}{}
Calculate the derivatives of specific volume with temperature and salinity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}out{]} The partial derivative of specific volume with salinity {[}m3 kg\sphinxhyphen{}1 PSU\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}out{]} The partial derivative of specific volume with potential temperature {[}m3 kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivative of density with temperature, {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{calculate\_compress\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/calculate_compress_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_linear}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{drho\_dp}, \emph{start}, \emph{npts}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}}{}
This subroutine computes the in situ density of sea water (rho) and the compressibility (drho/dp == C\_sound\textasciicircum{}\sphinxhyphen{}2) at the given salinity, potential temperature, and pressure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}out{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivative of density with temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivative of density with salinity {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_compress\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_density\_dz\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{int\_density\_dz\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/int_density_dz_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{int\_density\_dz\_linear}}}{\emph{T}, \emph{S}, \emph{z\_t}, \emph{z\_b}, \emph{rho\_ref}, \emph{rho\_0\_pres}, \emph{G\_e}, \emph{HI}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{bathyT}, \emph{dz\_neglect}, \emph{useMassWghtInterp}}{}
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The horizontal index type for the arrays.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} Height at the top of the layer in depth units {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} Height at the top of the layer {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals.

\item {} 
\sphinxstylestrong{rho\_0\_pres} :: {[}in{]} A density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}, used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0\_pres*G\_e) used in the equation of state. rho\_0\_pres is not used.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]} or {[}m2 Z\sphinxhyphen{}1 s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivative of density with temperature, {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]} or {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivative of density with salinity, in {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]} or {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dpa} :: {[}out{]} The change in the pressure anomaly across the

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}out{]} The integral through the thickness of the layer

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}out{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}out{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{dz\_neglect} :: {[}in{]} A miniscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_spec\_vol\_dp\_linear() (fortran subroutine in module mom\_eos\_linear)@\spxentry{int\_spec\_vol\_dp\_linear()}\spxextra{fortran subroutine in module mom\_eos\_linear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_linear:f/mom_eos_linear/int_spec_vol_dp_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_linear/}}\sphinxbfcode{\sphinxupquote{int\_spec\_vol\_dp\_linear}}}{\emph{T}, \emph{S}, \emph{p\_t}, \emph{p\_b}, \emph{alpha\_ref}, \emph{HI}, \emph{Rho\_T0\_S0}, \emph{dRho\_dT}, \emph{dRho\_dS}, \emph{dza}, \emph{intp\_dza}, \emph{intx\_dza}, \emph{inty\_dza}, \emph{halo\_size}, \emph{bathyP}, \emph{dP\_neglect}, \emph{useMassWghtInterp}}{}
Calculates analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model. Specific volume is assumed to vary linearly between adjacent points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The ocean’s horizontal index type.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Pressure at the top of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}.

\item {} 
\sphinxstylestrong{p\_b} :: {[}in{]} Pressure at the top of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}.

\item {} 
\sphinxstylestrong{alpha\_ref} :: {[}in{]} A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}. The calculation is mathematically identical with different values of alpha\_ref, but this reduces the effects of roundoff.

\item {} 
\sphinxstylestrong{rho\_t0\_s0} :: {[}in{]} The density at T=0, S=0 {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivative of density with temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]} or {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivative of density with salinity, in {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]} or {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dza} :: {[}out{]} The change in the geopotential anomaly across

\item {} 
\sphinxstylestrong{intp\_dza} :: {[}out{]} The integral in pressure through the layer of the

\item {} 
\sphinxstylestrong{intx\_dza} :: {[}out{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dza} :: {[}out{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} The width of halo points on which to calculate dza.

\item {} 
\sphinxstylestrong{bathyp} :: {[}in{]} The pressure at the bathymetry {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{dp\_neglect} :: {[}in{]} A miniscule pressure change with the same units as p\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::analytic\_int\_specific\_vol\_dp}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_eos\_nemo module reference}
\label{\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo}}\label{\detokenize{api/generated/modules/mom_eos_nemo:mom-eos-nemo-module-reference}}\label{\detokenize{api/generated/modules/mom_eos_nemo::doc}}\index{mom\_eos\_nemo (module)@\spxentry{mom\_eos\_nemo}\spxextra{module}|spxpagem}
The equation of state using the expressions of Roquet et al. that are used in NEMO.

{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:detamom-eos-nemo}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_eos_nemo:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_scalar_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_nemo()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_array_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_nemo()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_derivs_array_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array\_nemo()}}}}}
&
For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the expressions derived for use with NEMO.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_derivs_scalar_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_nemo()}}}}}
&
Wrapper to calculate\_density\_derivs\_array for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_compress_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_nemo()}}}}}
&
Compute the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) and the compressibility (drho/dp = C\_sound\textasciicircum{}\sphinxhyphen{}2, stored as drho\_dp {[}s2 m\sphinxhyphen{}2{]}) from absolute salinity (sal in g/kg), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}, using the expressions derived for use with NEMO.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_eos_nemo:detailed-description}}\label{\detokenize{api/generated/modules/mom_eos_nemo:detamom-eos-nemo}}
The equation of state using the expressions of Roquet et al. that are used in NEMO.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_eos_nemo:function-subroutine-documentation}}\index{calculate\_density\_scalar\_nemo() (fortran subroutine in module mom\_eos\_nemo)@\spxentry{calculate\_density\_scalar\_nemo()}\spxextra{fortran subroutine in module mom\_eos\_nemo}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_scalar_nemo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_nemo/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_scalar\_nemo}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expressions derived for use with NEMO.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_array_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_nemo}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_array\_nemo() (fortran subroutine in module mom\_eos\_nemo)@\spxentry{calculate\_density\_array\_nemo()}\spxextra{fortran subroutine in module mom\_eos\_nemo}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_array_nemo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_nemo/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_array\_nemo}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{start}, \emph{npts}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expressions derived for use with NEMO.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} in situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{eos000}} \sphinxcode{\sphinxupquote{eos001}} \sphinxcode{\sphinxupquote{eos002}} \sphinxcode{\sphinxupquote{eos003}} \sphinxcode{\sphinxupquote{eos010}} \sphinxcode{\sphinxupquote{eos011}} \sphinxcode{\sphinxupquote{eos012}} \sphinxcode{\sphinxupquote{eos013}} \sphinxcode{\sphinxupquote{eos020}} \sphinxcode{\sphinxupquote{eos021}} \sphinxcode{\sphinxupquote{eos022}} \sphinxcode{\sphinxupquote{eos030}} \sphinxcode{\sphinxupquote{eos031}} \sphinxcode{\sphinxupquote{eos040}} \sphinxcode{\sphinxupquote{eos041}} \sphinxcode{\sphinxupquote{eos050}} \sphinxcode{\sphinxupquote{eos060}} \sphinxcode{\sphinxupquote{eos100}} \sphinxcode{\sphinxupquote{eos101}} \sphinxcode{\sphinxupquote{eos102}} \sphinxcode{\sphinxupquote{eos103}} \sphinxcode{\sphinxupquote{eos110}} \sphinxcode{\sphinxupquote{eos111}} \sphinxcode{\sphinxupquote{eos112}} \sphinxcode{\sphinxupquote{eos120}} \sphinxcode{\sphinxupquote{eos121}} \sphinxcode{\sphinxupquote{eos130}} \sphinxcode{\sphinxupquote{eos131}} \sphinxcode{\sphinxupquote{eos140}} \sphinxcode{\sphinxupquote{eos150}} \sphinxcode{\sphinxupquote{eos200}} \sphinxcode{\sphinxupquote{eos201}} \sphinxcode{\sphinxupquote{eos202}} \sphinxcode{\sphinxupquote{eos210}} \sphinxcode{\sphinxupquote{eos211}} \sphinxcode{\sphinxupquote{eos220}} \sphinxcode{\sphinxupquote{eos221}} \sphinxcode{\sphinxupquote{eos230}} \sphinxcode{\sphinxupquote{eos240}} \sphinxcode{\sphinxupquote{eos300}} \sphinxcode{\sphinxupquote{eos301}} \sphinxcode{\sphinxupquote{eos310}} \sphinxcode{\sphinxupquote{eos311}} \sphinxcode{\sphinxupquote{eos320}} \sphinxcode{\sphinxupquote{eos330}} \sphinxcode{\sphinxupquote{eos400}} \sphinxcode{\sphinxupquote{eos401}} \sphinxcode{\sphinxupquote{eos410}} \sphinxcode{\sphinxupquote{eos420}} \sphinxcode{\sphinxupquote{eos500}} \sphinxcode{\sphinxupquote{eos510}} \sphinxcode{\sphinxupquote{eos600}} \sphinxcode{\sphinxupquote{pa2db}} \sphinxcode{\sphinxupquote{r00}} \sphinxcode{\sphinxupquote{r01}} \sphinxcode{\sphinxupquote{r02}} \sphinxcode{\sphinxupquote{r03}} \sphinxcode{\sphinxupquote{r04}} \sphinxcode{\sphinxupquote{r05}} \sphinxcode{\sphinxupquote{r1\_p0}} \sphinxcode{\sphinxupquote{r1\_s0}} \sphinxcode{\sphinxupquote{r1\_t0}} \sphinxcode{\sphinxupquote{rdeltas}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_compress_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_nemo}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_scalar_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_nemo}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_array\_nemo() (fortran subroutine in module mom\_eos\_nemo)@\spxentry{calculate\_density\_derivs\_array\_nemo()}\spxextra{fortran subroutine in module mom\_eos\_nemo}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_derivs_array_nemo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_nemo/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_array\_nemo}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{start}, \emph{npts}}{}
For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the expressions derived for use with NEMO.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{alp000}} \sphinxcode{\sphinxupquote{alp001}} \sphinxcode{\sphinxupquote{alp002}} \sphinxcode{\sphinxupquote{alp003}} \sphinxcode{\sphinxupquote{alp010}} \sphinxcode{\sphinxupquote{alp011}} \sphinxcode{\sphinxupquote{alp012}} \sphinxcode{\sphinxupquote{alp020}} \sphinxcode{\sphinxupquote{alp021}} \sphinxcode{\sphinxupquote{alp030}} \sphinxcode{\sphinxupquote{alp031}} \sphinxcode{\sphinxupquote{alp040}} \sphinxcode{\sphinxupquote{alp050}} \sphinxcode{\sphinxupquote{alp100}} \sphinxcode{\sphinxupquote{alp101}} \sphinxcode{\sphinxupquote{alp102}} \sphinxcode{\sphinxupquote{alp110}} \sphinxcode{\sphinxupquote{alp111}} \sphinxcode{\sphinxupquote{alp120}} \sphinxcode{\sphinxupquote{alp121}} \sphinxcode{\sphinxupquote{alp130}} \sphinxcode{\sphinxupquote{alp140}} \sphinxcode{\sphinxupquote{alp200}} \sphinxcode{\sphinxupquote{alp201}} \sphinxcode{\sphinxupquote{alp210}} \sphinxcode{\sphinxupquote{alp211}} \sphinxcode{\sphinxupquote{alp220}} \sphinxcode{\sphinxupquote{alp230}} \sphinxcode{\sphinxupquote{alp300}} \sphinxcode{\sphinxupquote{alp301}} \sphinxcode{\sphinxupquote{alp310}} \sphinxcode{\sphinxupquote{alp320}} \sphinxcode{\sphinxupquote{alp400}} \sphinxcode{\sphinxupquote{alp410}} \sphinxcode{\sphinxupquote{alp500}} \sphinxcode{\sphinxupquote{bet000}} \sphinxcode{\sphinxupquote{bet001}} \sphinxcode{\sphinxupquote{bet002}} \sphinxcode{\sphinxupquote{bet003}} \sphinxcode{\sphinxupquote{bet010}} \sphinxcode{\sphinxupquote{bet011}} \sphinxcode{\sphinxupquote{bet012}} \sphinxcode{\sphinxupquote{bet020}} \sphinxcode{\sphinxupquote{bet021}} \sphinxcode{\sphinxupquote{bet030}} \sphinxcode{\sphinxupquote{bet031}} \sphinxcode{\sphinxupquote{bet040}} \sphinxcode{\sphinxupquote{bet050}} \sphinxcode{\sphinxupquote{bet100}} \sphinxcode{\sphinxupquote{bet101}} \sphinxcode{\sphinxupquote{bet102}} \sphinxcode{\sphinxupquote{bet110}} \sphinxcode{\sphinxupquote{bet111}} \sphinxcode{\sphinxupquote{bet120}} \sphinxcode{\sphinxupquote{bet121}} \sphinxcode{\sphinxupquote{bet130}} \sphinxcode{\sphinxupquote{bet140}} \sphinxcode{\sphinxupquote{bet200}} \sphinxcode{\sphinxupquote{bet201}} \sphinxcode{\sphinxupquote{bet210}} \sphinxcode{\sphinxupquote{bet211}} \sphinxcode{\sphinxupquote{bet220}} \sphinxcode{\sphinxupquote{bet230}} \sphinxcode{\sphinxupquote{bet300}} \sphinxcode{\sphinxupquote{bet301}} \sphinxcode{\sphinxupquote{bet310}} \sphinxcode{\sphinxupquote{bet320}} \sphinxcode{\sphinxupquote{bet400}} \sphinxcode{\sphinxupquote{bet410}} \sphinxcode{\sphinxupquote{bet500}} \sphinxcode{\sphinxupquote{pa2db}} \sphinxcode{\sphinxupquote{r1\_p0}} \sphinxcode{\sphinxupquote{r1\_s0}} \sphinxcode{\sphinxupquote{r1\_t0}} \sphinxcode{\sphinxupquote{rdeltas}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_derivs_scalar_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_nemo}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_scalar\_nemo() (fortran subroutine in module mom\_eos\_nemo)@\spxentry{calculate\_density\_derivs\_scalar\_nemo()}\spxextra{fortran subroutine in module mom\_eos\_nemo}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_derivs_scalar_nemo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_nemo/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_nemo}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dt}, \emph{drho\_ds}}{}
Wrapper to calculate\_density\_derivs\_array for scalar inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_derivs_array_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array\_nemo}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_nemo() (fortran subroutine in module mom\_eos\_nemo)@\spxentry{calculate\_compress\_nemo()}\spxextra{fortran subroutine in module mom\_eos\_nemo}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_compress_nemo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_nemo/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_nemo}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{drho\_dp}, \emph{start}, \emph{npts}}{}
Compute the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) and the compressibility (drho/dp = C\_sound\textasciicircum{}\sphinxhyphen{}2, stored as drho\_dp {[}s2 m\sphinxhyphen{}2{]}) from absolute salinity (sal in g/kg), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}, using the expressions derived for use with NEMO.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g/kg{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}out{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_nemo:f/mom_eos_nemo/calculate_density_array_nemo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_nemo}}}}} \sphinxcode{\sphinxupquote{pa2db}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_compress\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_eos\_teos10 module reference}
\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10}}\label{\detokenize{api/generated/modules/mom_eos_teos10:mom-eos-teos10-module-reference}}\label{\detokenize{api/generated/modules/mom_eos_teos10::doc}}\index{mom\_eos\_teos10 (module)@\spxentry{mom\_eos\_teos10}\spxextra{module}|spxpagem}
The equation of state using the TEOS10 expressions.

{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:detamom-eos-teos10}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_eos_teos10:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_scalar_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_teos10()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_array_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_teos10()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_spec_vol_scalar_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_teos10()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the TEOS10 equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_spec_vol_array_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_teos10()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the TEOS10 equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_derivs_array_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array\_teos10()}}}}}
&
For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_derivs_scalar_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_teos10()}}}}}
&
For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_specvol_derivs_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_specvol\_derivs\_teos10()}}}}}
&
For a given thermodynamic state, calculate the derivatives of specific volume with conservative temperature and absolute salinity, using the TEOS10 expressions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_second_derivs_scalar_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_teos10()}}}}}
&
Calculate the 5 second derivatives of the equation of state for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_second_derivs_array_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_teos10()}}}}}
&
Calculate the 5 second derivatives of the equation of state for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_compress_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_teos10()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) and the compressibility (drho/dp = C\_sound\textasciicircum{}\sphinxhyphen{}2) (drho\_dp {[}s2 m\sphinxhyphen{}2{]}) from absolute salinity (sal in g/kg), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_eos_teos10:detailed-description}}\label{\detokenize{api/generated/modules/mom_eos_teos10:detamom-eos-teos10}}
The equation of state using the TEOS10 expressions.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_eos_teos10:function-subroutine-documentation}}\index{calculate\_density\_scalar\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_density\_scalar\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_scalar_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_scalar\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expression from the TEOS10 website.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_array_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_teos10}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_array\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_density\_array\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_array_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_array\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{start}, \emph{npts}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expression from the TEOS10 website.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} in situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_scalar_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_teos10}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_scalar\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_spec\_vol\_scalar\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_spec_vol_scalar_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the TEOS10 equation of state. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_spec_vol_array_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_teos10}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_array\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_spec\_vol\_array\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_spec_vol_array_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_array\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{start}, \emph{npts}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from absolute salinity (S {[}g kg\sphinxhyphen{}1{]}), conservative temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the TEOS10 equation of state. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_spec_vol_scalar_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_teos10}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_array\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_density\_derivs\_array\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_derivs_array_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_array\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{start}, \emph{npts}}{}
For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with conservative temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with absolute salinity, {[}kg m\sphinxhyphen{}3 (g/kg)\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_scalar\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_density\_derivs\_scalar\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_derivs_scalar_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}}{}
For a given thermodynamic state, calculate the derivatives of density with conservative temperature and absolute salinity, using the TEOS10 expressions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute Salinity {[}g kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with conservative temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with absolute salinity, {[}kg m\sphinxhyphen{}3 (g/kg)\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_specvol\_derivs\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_specvol\_derivs\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_specvol_derivs_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_specvol\_derivs\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{start}, \emph{npts}}{}
For a given thermodynamic state, calculate the derivatives of specific volume with conservative temperature and absolute salinity, using the TEOS10 expressions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}out{]} The partial derivative of specific volume with conservative temperature {[}m3 kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}out{]} The partial derivative of specific volume with absolute salinity {[}m3 kg\sphinxhyphen{}1 (g/kg)\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_scalar\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_density\_second\_derivs\_scalar\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_second_derivs_scalar_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dS\_dS}, \emph{drho\_dS\_dT}, \emph{drho\_dT\_dT}, \emph{drho\_dS\_dP}, \emph{drho\_dT\_dP}}{}
Calculate the 5 second derivatives of the equation of state for scalar inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute Salinity {[}g kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}out{]} Partial derivative of beta with respect to S

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}out{]} Partial derivative of beta with resepct to T

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}out{]} Partial derivative of alpha with respect to T

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}out{]} Partial derivative of beta with respect to pressure

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}out{]} Partial derivative of alpha with respect to pressure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_array\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_density\_second\_derivs\_array\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_density_second_derivs_array_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dS\_dS}, \emph{drho\_dS\_dT}, \emph{drho\_dT\_dT}, \emph{drho\_dS\_dP}, \emph{drho\_dT\_dP}, \emph{start}, \emph{npts}}{}
Calculate the 5 second derivatives of the equation of state for scalar inputs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute Salinity {[}g kg\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}out{]} Partial derivative of beta with respect to S

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}out{]} Partial derivative of beta with resepct to T

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}out{]} Partial derivative of alpha with respect to T

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}out{]} Partial derivative of beta with respect to pressure

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}out{]} Partial derivative of alpha with respect to pressure

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_teos10() (fortran subroutine in module mom\_eos\_teos10)@\spxentry{calculate\_compress\_teos10()}\spxextra{fortran subroutine in module mom\_eos\_teos10}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_teos10:f/mom_eos_teos10/calculate_compress_teos10}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_teos10/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_teos10}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{drho\_dp}, \emph{start}, \emph{npts}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) and the compressibility (drho/dp = C\_sound\textasciicircum{}\sphinxhyphen{}2) (drho\_dp {[}s2 m\sphinxhyphen{}2{]}) from absolute salinity (sal in g/kg), conservative temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the subroutines from TEOS10 website.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}out{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pa2db}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_eos\_unesco module reference}
\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco}}\label{\detokenize{api/generated/modules/mom_eos_unesco:mom-eos-unesco-module-reference}}\label{\detokenize{api/generated/modules/mom_eos_unesco::doc}}\index{mom\_eos\_unesco (module)@\spxentry{mom\_eos\_unesco}\spxextra{module}|spxpagem}
The equation of state using the Jackett and McDougall fits to the UNESCO EOS.

{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:detamom-eos-unesco}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_eos_unesco:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_scalar_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_unesco()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}, using the UNESCO (1981) equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_array_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_unesco()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}, using the UNESCO (1981) equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_spec_vol_scalar_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_unesco()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the UNESCO (1981) equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_spec_vol_array_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_unesco()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the UNESCO (1981) equation of state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_derivs_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_unesco()}}}}}
&
This subroutine calculates the partial derivatives of density with potential temperature and salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_compress_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_unesco()}}}}}
&
This subroutine computes the in situ density of sea water (rho) and the compressibility (drho/dp == C\_sound\textasciicircum{}\sphinxhyphen{}2) at the given salinity, potential temperature, and pressure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_eos_unesco:detailed-description}}\label{\detokenize{api/generated/modules/mom_eos_unesco:detamom-eos-unesco}}
The equation of state using the Jackett and McDougall fits to the UNESCO EOS.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_eos_unesco:function-subroutine-documentation}}\index{calculate\_density\_scalar\_unesco() (fortran subroutine in module mom\_eos\_unesco)@\spxentry{calculate\_density\_scalar\_unesco()}\spxextra{fortran subroutine in module mom\_eos\_unesco}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_scalar_unesco}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_unesco/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_scalar\_unesco}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}, using the UNESCO (1981) equation of state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_array_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_unesco}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_array\_unesco() (fortran subroutine in module mom\_eos\_unesco)@\spxentry{calculate\_density\_array\_unesco()}\spxextra{fortran subroutine in module mom\_eos\_unesco}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_array_unesco}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_unesco/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_array\_unesco}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{start}, \emph{npts}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}, using the UNESCO (1981) equation of state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} in situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{r00}} \sphinxcode{\sphinxupquote{r01}} \sphinxcode{\sphinxupquote{r02}} \sphinxcode{\sphinxupquote{r032}} \sphinxcode{\sphinxupquote{r10}} \sphinxcode{\sphinxupquote{r11}} \sphinxcode{\sphinxupquote{r132}} \sphinxcode{\sphinxupquote{r20}} \sphinxcode{\sphinxupquote{r21}} \sphinxcode{\sphinxupquote{r232}} \sphinxcode{\sphinxupquote{r30}} \sphinxcode{\sphinxupquote{r31}} \sphinxcode{\sphinxupquote{r40}} \sphinxcode{\sphinxupquote{r41}} \sphinxcode{\sphinxupquote{r50}} \sphinxcode{\sphinxupquote{s00}} \sphinxcode{\sphinxupquote{s01}} \sphinxcode{\sphinxupquote{s032}} \sphinxcode{\sphinxupquote{s10}} \sphinxcode{\sphinxupquote{s11}} \sphinxcode{\sphinxupquote{s132}} \sphinxcode{\sphinxupquote{s20}} \sphinxcode{\sphinxupquote{s21}} \sphinxcode{\sphinxupquote{s232}} \sphinxcode{\sphinxupquote{s30}} \sphinxcode{\sphinxupquote{s31}} \sphinxcode{\sphinxupquote{s40}} \sphinxcode{\sphinxupquote{sp00}} \sphinxcode{\sphinxupquote{sp000}} \sphinxcode{\sphinxupquote{sp001}} \sphinxcode{\sphinxupquote{sp01}} \sphinxcode{\sphinxupquote{sp010}} \sphinxcode{\sphinxupquote{sp011}} \sphinxcode{\sphinxupquote{sp020}} \sphinxcode{\sphinxupquote{sp021}} \sphinxcode{\sphinxupquote{sp032}} \sphinxcode{\sphinxupquote{sp10}} \sphinxcode{\sphinxupquote{sp11}} \sphinxcode{\sphinxupquote{sp20}} \sphinxcode{\sphinxupquote{sp21}} \sphinxcode{\sphinxupquote{sp30}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_scalar_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_unesco}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_scalar\_unesco() (fortran subroutine in module mom\_eos\_unesco)@\spxentry{calculate\_spec\_vol\_scalar\_unesco()}\spxextra{fortran subroutine in module mom\_eos\_unesco}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_spec_vol_scalar_unesco}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_unesco/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_unesco}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the UNESCO (1981) equation of state. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_spec_vol_array_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_unesco}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_array\_unesco() (fortran subroutine in module mom\_eos\_unesco)@\spxentry{calculate\_spec\_vol\_array\_unesco()}\spxextra{fortran subroutine in module mom\_eos\_unesco}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_spec_vol_array_unesco}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_unesco/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_array\_unesco}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{start}, \emph{npts}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}, using the UNESCO (1981) equation of state. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{r00}} \sphinxcode{\sphinxupquote{r01}} \sphinxcode{\sphinxupquote{r02}} \sphinxcode{\sphinxupquote{r032}} \sphinxcode{\sphinxupquote{r10}} \sphinxcode{\sphinxupquote{r11}} \sphinxcode{\sphinxupquote{r132}} \sphinxcode{\sphinxupquote{r20}} \sphinxcode{\sphinxupquote{r21}} \sphinxcode{\sphinxupquote{r232}} \sphinxcode{\sphinxupquote{r30}} \sphinxcode{\sphinxupquote{r31}} \sphinxcode{\sphinxupquote{r40}} \sphinxcode{\sphinxupquote{r41}} \sphinxcode{\sphinxupquote{r50}} \sphinxcode{\sphinxupquote{s00}} \sphinxcode{\sphinxupquote{s01}} \sphinxcode{\sphinxupquote{s032}} \sphinxcode{\sphinxupquote{s10}} \sphinxcode{\sphinxupquote{s11}} \sphinxcode{\sphinxupquote{s132}} \sphinxcode{\sphinxupquote{s20}} \sphinxcode{\sphinxupquote{s21}} \sphinxcode{\sphinxupquote{s232}} \sphinxcode{\sphinxupquote{s30}} \sphinxcode{\sphinxupquote{s31}} \sphinxcode{\sphinxupquote{s40}} \sphinxcode{\sphinxupquote{sp00}} \sphinxcode{\sphinxupquote{sp000}} \sphinxcode{\sphinxupquote{sp001}} \sphinxcode{\sphinxupquote{sp01}} \sphinxcode{\sphinxupquote{sp010}} \sphinxcode{\sphinxupquote{sp011}} \sphinxcode{\sphinxupquote{sp020}} \sphinxcode{\sphinxupquote{sp021}} \sphinxcode{\sphinxupquote{sp032}} \sphinxcode{\sphinxupquote{sp10}} \sphinxcode{\sphinxupquote{sp11}} \sphinxcode{\sphinxupquote{sp20}} \sphinxcode{\sphinxupquote{sp21}} \sphinxcode{\sphinxupquote{sp30}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_spec_vol_scalar_unesco}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_unesco}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_unesco() (fortran subroutine in module mom\_eos\_unesco)@\spxentry{calculate\_density\_derivs\_unesco()}\spxextra{fortran subroutine in module mom\_eos\_unesco}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_density_derivs_unesco}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_unesco/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_unesco}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{start}, \emph{npts}}{}
This subroutine calculates the partial derivatives of density with potential temperature and salinity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{r00}} \sphinxcode{\sphinxupquote{r01}} \sphinxcode{\sphinxupquote{r02}} \sphinxcode{\sphinxupquote{r032}} \sphinxcode{\sphinxupquote{r10}} \sphinxcode{\sphinxupquote{r11}} \sphinxcode{\sphinxupquote{r132}} \sphinxcode{\sphinxupquote{r20}} \sphinxcode{\sphinxupquote{r21}} \sphinxcode{\sphinxupquote{r232}} \sphinxcode{\sphinxupquote{r30}} \sphinxcode{\sphinxupquote{r31}} \sphinxcode{\sphinxupquote{r40}} \sphinxcode{\sphinxupquote{r41}} \sphinxcode{\sphinxupquote{r50}} \sphinxcode{\sphinxupquote{s00}} \sphinxcode{\sphinxupquote{s01}} \sphinxcode{\sphinxupquote{s032}} \sphinxcode{\sphinxupquote{s10}} \sphinxcode{\sphinxupquote{s11}} \sphinxcode{\sphinxupquote{s132}} \sphinxcode{\sphinxupquote{s20}} \sphinxcode{\sphinxupquote{s21}} \sphinxcode{\sphinxupquote{s232}} \sphinxcode{\sphinxupquote{s30}} \sphinxcode{\sphinxupquote{s31}} \sphinxcode{\sphinxupquote{s40}} \sphinxcode{\sphinxupquote{sp00}} \sphinxcode{\sphinxupquote{sp000}} \sphinxcode{\sphinxupquote{sp001}} \sphinxcode{\sphinxupquote{sp01}} \sphinxcode{\sphinxupquote{sp010}} \sphinxcode{\sphinxupquote{sp011}} \sphinxcode{\sphinxupquote{sp020}} \sphinxcode{\sphinxupquote{sp021}} \sphinxcode{\sphinxupquote{sp032}} \sphinxcode{\sphinxupquote{sp10}} \sphinxcode{\sphinxupquote{sp11}} \sphinxcode{\sphinxupquote{sp20}} \sphinxcode{\sphinxupquote{sp21}} \sphinxcode{\sphinxupquote{sp30}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_unesco() (fortran subroutine in module mom\_eos\_unesco)@\spxentry{calculate\_compress\_unesco()}\spxextra{fortran subroutine in module mom\_eos\_unesco}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_unesco:f/mom_eos_unesco/calculate_compress_unesco}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_unesco/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_unesco}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{drho\_dp}, \emph{start}, \emph{npts}}{}
This subroutine computes the in situ density of sea water (rho) and the compressibility (drho/dp == C\_sound\textasciicircum{}\sphinxhyphen{}2) at the given salinity, potential temperature, and pressure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}out{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{r00}} \sphinxcode{\sphinxupquote{r01}} \sphinxcode{\sphinxupquote{r02}} \sphinxcode{\sphinxupquote{r032}} \sphinxcode{\sphinxupquote{r10}} \sphinxcode{\sphinxupquote{r11}} \sphinxcode{\sphinxupquote{r132}} \sphinxcode{\sphinxupquote{r20}} \sphinxcode{\sphinxupquote{r21}} \sphinxcode{\sphinxupquote{r232}} \sphinxcode{\sphinxupquote{r30}} \sphinxcode{\sphinxupquote{r31}} \sphinxcode{\sphinxupquote{r40}} \sphinxcode{\sphinxupquote{r41}} \sphinxcode{\sphinxupquote{r50}} \sphinxcode{\sphinxupquote{s00}} \sphinxcode{\sphinxupquote{s01}} \sphinxcode{\sphinxupquote{s032}} \sphinxcode{\sphinxupquote{s10}} \sphinxcode{\sphinxupquote{s11}} \sphinxcode{\sphinxupquote{s132}} \sphinxcode{\sphinxupquote{s20}} \sphinxcode{\sphinxupquote{s21}} \sphinxcode{\sphinxupquote{s232}} \sphinxcode{\sphinxupquote{s30}} \sphinxcode{\sphinxupquote{s31}} \sphinxcode{\sphinxupquote{s40}} \sphinxcode{\sphinxupquote{sp00}} \sphinxcode{\sphinxupquote{sp000}} \sphinxcode{\sphinxupquote{sp001}} \sphinxcode{\sphinxupquote{sp01}} \sphinxcode{\sphinxupquote{sp010}} \sphinxcode{\sphinxupquote{sp011}} \sphinxcode{\sphinxupquote{sp020}} \sphinxcode{\sphinxupquote{sp021}} \sphinxcode{\sphinxupquote{sp032}} \sphinxcode{\sphinxupquote{sp10}} \sphinxcode{\sphinxupquote{sp11}} \sphinxcode{\sphinxupquote{sp20}} \sphinxcode{\sphinxupquote{sp21}} \sphinxcode{\sphinxupquote{sp30}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_compress\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_eos\_wright module reference}
\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright}}\label{\detokenize{api/generated/modules/mom_eos_wright:mom-eos-wright-module-reference}}\label{\detokenize{api/generated/modules/mom_eos_wright::doc}}\index{mom\_eos\_wright (module)@\spxentry{mom\_eos\_wright}\spxextra{module}|spxpagem}
The equation of state using the Wright 1997 expressions.

{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:detamom-eos-wright}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_eos_wright:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_wright()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_wright()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_spec_vol_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_wright()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_spec_vol_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_wright()}}}}}
&
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_derivs_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array\_wright()}}}}}
&
For a given thermodynamic state, return the thermal/haline expansion coefficients.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_derivs_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_wright()}}}}}
&
The scalar version of calculate\_density\_derivs which promotes scalar inputs to a 1\sphinxhyphen{}element array and then demotes the output back to a scalar.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_second_derivs_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_wright()}}}}}
&
Second derivatives of density with respect to temperature, salinity, and pressure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_second_derivs_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_wright()}}}}}
&
Second derivatives of density with respect to temperature, salinity, and pressure for scalar inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_specvol_derivs_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_specvol\_derivs\_wright()}}}}}
&
For a given thermodynamic state, return the partial derivatives of specific volume with temperature and salinity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_compress_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_compress\_wright()}}}}}
&
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) and the compressibility (drho/dp = C\_sound\textasciicircum{}\sphinxhyphen{}2) (drho\_dp {[}s2 m\sphinxhyphen{}2{]}) from salinity (sal in psu), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/int_density_dz_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_density\_dz\_wright()}}}}}
&
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/int_spec_vol_dp_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_spec\_vol\_dp\_wright()}}}}}
&
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_eos_wright:detailed-description}}\label{\detokenize{api/generated/modules/mom_eos_wright:detamom-eos-wright}}
The equation of state using the Wright 1997 expressions.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_eos_wright:function-subroutine-documentation}}\index{calculate\_density\_scalar\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_density\_scalar\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_scalar_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_scalar\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735\sphinxhyphen{}740.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}out{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_array\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_array\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_density\_array\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_array_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_array\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{start}, \emph{npts}, \emph{rho\_ref}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735\sphinxhyphen{}740.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} in situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A reference density {[}kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_scalar\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_scalar\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_spec\_vol\_scalar\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_spec_vol_scalar_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735\sphinxhyphen{}740. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}out{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_spec_vol_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_array\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_spec\_vol\_array\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_spec\_vol\_array\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_spec_vol_array_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_spec\_vol\_array\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{specvol}, \emph{start}, \emph{npts}, \emph{spv\_ref}}{}
This subroutine computes the in situ specific volume of sea water (specvol in {[}m3 kg\sphinxhyphen{}1{]}) from salinity (S {[}PSU{]}), potential temperature (T {[}degC{]}) and pressure {[}Pa{]}. It uses the expression from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735\sphinxhyphen{}740. If spv\_ref is present, specvol is an anomaly from spv\_ref.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{specvol} :: {[}inout{]} in situ specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A reference specific volume {[}m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_spec_vol_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_spec\_vol\_scalar\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_array\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_density\_derivs\_array\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_derivs_array_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_array\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}, \emph{start}, \emph{npts}}{}
For a given thermodynamic state, return the thermal/haline expansion coefficients.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}inout{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}inout{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_derivs_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_derivs\_scalar\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_density\_derivs\_scalar\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_derivs_scalar_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_derivs\_scalar\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{drho\_dT}, \emph{drho\_dS}}{}
The scalar version of calculate\_density\_derivs which promotes scalar inputs to a 1\sphinxhyphen{}element array and then demotes the output back to a scalar.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{drho\_dt} :: {[}out{]} The partial derivative of density with potential temperature {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}out{]} The partial derivative of density with salinity, in {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_derivs_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_derivs\_array\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_array\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_density\_second\_derivs\_array\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_second_derivs_array_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_wright}}}{\emph{T}, \emph{S}, \emph{P}, \emph{drho\_ds\_ds}, \emph{drho\_ds\_dt}, \emph{drho\_dt\_dt}, \emph{drho\_ds\_dp}, \emph{drho\_dt\_dp}, \emph{start}, \emph{npts}}{}
Second derivatives of density with respect to temperature, salinity, and pressure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to 0 dbar {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}

\item {} 
\sphinxstylestrong{p} :: {[}in{]} Pressure {[}Pa{]}

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}inout{]} Partial derivative of beta with respect to S {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}inout{]} Partial derivative of beta with respcct to T {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}inout{]} Partial derivative of alpha with respect to T {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}inout{]} Partial derivative of beta with respect to pressure {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}inout{]} Partial derivative of alpha with respect to pressure {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{start} :: {[}in{]} Starting index in T,S,P

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} Number of points to loop over

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_second_derivs_scalar_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_density\_second\_derivs\_scalar\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_density\_second\_derivs\_scalar\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_second_derivs_scalar_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_density\_second\_derivs\_scalar\_wright}}}{\emph{T}, \emph{S}, \emph{P}, \emph{drho\_ds\_ds}, \emph{drho\_ds\_dt}, \emph{drho\_dt\_dt}, \emph{drho\_ds\_dp}, \emph{drho\_dt\_dp}}{}
Second derivatives of density with respect to temperature, salinity, and pressure for scalar inputs. Inputs promoted to 1\sphinxhyphen{}element array and output demoted to scalar.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature referenced to 0 dbar

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}

\item {} 
\sphinxstylestrong{p} :: {[}in{]} pressure {[}Pa{]}

\item {} 
\sphinxstylestrong{drho\_ds\_ds} :: {[}out{]} Partial derivative of beta with respect to S {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dt} :: {[}out{]} Partial derivative of beta with respcct to T {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dt} :: {[}out{]} Partial derivative of alpha with respect to T {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{drho\_ds\_dp} :: {[}out{]} Partial derivative of beta with respect to pressure {[}kg m\sphinxhyphen{}3 PSU\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_dt\_dp} :: {[}out{]} Partial derivative of alpha with respect to pressure {[}kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1 Pa\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_density_second_derivs_array_wright}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_density\_second\_derivs\_array\_wright}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_specvol\_derivs\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_specvol\_derivs\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_specvol_derivs_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_specvol\_derivs\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{dSV\_dT}, \emph{dSV\_dS}, \emph{start}, \emph{npts}}{}
For a given thermodynamic state, return the partial derivatives of specific volume with temperature and salinity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}inout{]} The partial derivative of specific volume with potential temperature {[}m3 kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dsv\_ds} :: {[}inout{]} The partial derivative of specific volume with salinity {[}m3 kg\sphinxhyphen{}1 / Pa{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_compress\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{calculate\_compress\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/calculate_compress_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{calculate\_compress\_wright}}}{\emph{T}, \emph{S}, \emph{pressure}, \emph{rho}, \emph{drho\_dp}, \emph{start}, \emph{npts}}{}
This subroutine computes the in situ density of sea water (rho in {[}kg m\sphinxhyphen{}3{]}) and the compressibility (drho/dp = C\_sound\textasciicircum{}\sphinxhyphen{}2) (drho\_dp {[}s2 m\sphinxhyphen{}2{]}) from salinity (sal in psu), potential temperature (T {[}degC{]}), and pressure {[}Pa{]}. It uses the expressions from Wright, 1997, J. Atmos. Ocean. Tech., 14, 735\sphinxhyphen{}740. Coded by R. Hallberg, 1/01.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pressure} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{rho} :: {[}inout{]} In situ density {[}kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{drho\_dp} :: {[}inout{]} The partial derivative of density with pressure (also the inverse of the square of sound speed) {[}s2 m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_density\_dz\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{int\_density\_dz\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/int_density_dz_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{int\_density\_dz\_wright}}}{\emph{T}, \emph{S}, \emph{z\_t}, \emph{z\_b}, \emph{rho\_ref}, \emph{rho\_0}, \emph{G\_e}, \emph{HI}, \emph{dpa}, \emph{intz\_dpa}, \emph{intx\_dpa}, \emph{inty\_dpa}, \emph{bathyT}, \emph{dz\_neglect}, \emph{useMassWghtInterp}, \emph{rho\_scale}, \emph{pres\_scale}}{}
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals of pressure anomalies across layers, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a Boussinesq model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The horizontal index type for the arrays.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{z\_t} :: {[}in{]} Height at the top of the layer in depth units {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{z\_b} :: {[}in{]} Height at the top of the layer {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{rho\_ref} :: {[}in{]} A mean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is subtracted out to reduce the magnitude of each of the integrals. (The pressure is calucated as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e.)

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} Density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} or {[}kg m\sphinxhyphen{}3{]}, that is used to calculate the pressure (as p\textasciitilde{}=\sphinxhyphen{}z*rho\_0*G\_e) used in the equation of state.

\item {} 
\sphinxstylestrong{g\_e} :: {[}in{]} The Earth’s gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]} or {[}m2 Z\sphinxhyphen{}1 s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dpa} :: {[}inout{]} The change in the pressure anomaly across the

\item {} 
\sphinxstylestrong{intz\_dpa} :: {[}inout{]} The integral through the thickness of the layer

\item {} 
\sphinxstylestrong{intx\_dpa} :: {[}inout{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dpa} :: {[}inout{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of the bathymetry {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{dz\_neglect} :: {[}in{]} A miniscule thickness change {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\item {} 
\sphinxstylestrong{rho\_scale} :: {[}in{]} A multiplicative factor by which to scale density from kg m\sphinxhyphen{}3 to the desired units {[}R m3 kg\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1{]}

\item {} 
\sphinxstylestrong{pres\_scale} :: {[}in{]} A multiplicative factor to convert pressure into Pa {[}Pa T2 R\sphinxhyphen{}1 L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} 1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_spec\_vol\_dp\_wright() (fortran subroutine in module mom\_eos\_wright)@\spxentry{int\_spec\_vol\_dp\_wright()}\spxextra{fortran subroutine in module mom\_eos\_wright}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_eos_wright:f/mom_eos_wright/int_spec_vol_dp_wright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_eos\_wright/}}\sphinxbfcode{\sphinxupquote{int\_spec\_vol\_dp\_wright}}}{\emph{T}, \emph{S}, \emph{p\_t}, \emph{p\_b}, \emph{spv\_ref}, \emph{HI}, \emph{dza}, \emph{intp\_dza}, \emph{intx\_dza}, \emph{inty\_dza}, \emph{halo\_size}, \emph{bathyP}, \emph{dP\_neglect}, \emph{useMassWghtInterp}, \emph{SV\_scale}, \emph{pres\_scale}}{}
This subroutine calculates analytical and nearly\sphinxhyphen{}analytical integrals in pressure across layers of geopotential anomalies, which are required for calculating the finite\sphinxhyphen{}volume form pressure accelerations in a non\sphinxhyphen{}Boussinesq model. There are essentially no free assumptions, apart from the use of Boole’s rule to do the horizontal integrals, and from a truncation in the series for log(1\sphinxhyphen{}eps/1+eps) that assumes that {\color{red}\bfseries{}|eps|} \textless{} 0.34.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} The ocean’s horizontal index type.

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature relative to the surface

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{p\_t} :: {[}in{]} Pressure at the top of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}.

\item {} 
\sphinxstylestrong{p\_b} :: {[}in{]} Pressure at the top of the layer {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}.

\item {} 
\sphinxstylestrong{spv\_ref} :: {[}in{]} A mean specific volume that is subtracted out to reduce the magnitude of each of the integrals {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}. The calculation is mathematically identical with different values of spv\_ref, but this reduces the effects of roundoff.

\item {} 
\sphinxstylestrong{dza} :: {[}inout{]} The change in the geopotential anomaly across

\item {} 
\sphinxstylestrong{intp\_dza} :: {[}inout{]} The integral in pressure through the layer of

\item {} 
\sphinxstylestrong{intx\_dza} :: {[}inout{]} The integral in x of the difference between the

\item {} 
\sphinxstylestrong{inty\_dza} :: {[}inout{]} The integral in y of the difference between the

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} The width of halo points on which to calculate dza.

\item {} 
\sphinxstylestrong{bathyp} :: {[}in{]} The pressure at the bathymetry {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{dp\_neglect} :: {[}in{]} A miniscule pressure change with the same units as p\_t {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}Pa{]}

\item {} 
\sphinxstylestrong{usemasswghtinterp} :: {[}in{]} If true, uses mass weighting to interpolate T/S for top and bottom integrals.

\item {} 
\sphinxstylestrong{sv\_scale} :: {[}in{]} A multiplicative factor by which to scale specific volume from m3 kg\sphinxhyphen{}1 to the desired units {[}kg m\sphinxhyphen{}3 R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1{]}

\item {} 
\sphinxstylestrong{pres\_scale} :: {[}in{]} A multiplicative factor to convert pressure into Pa {[}Pa T2 R\sphinxhyphen{}1 L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} 1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{a0}} \sphinxcode{\sphinxupquote{a1}} \sphinxcode{\sphinxupquote{a2}} \sphinxcode{\sphinxupquote{b0}} \sphinxcode{\sphinxupquote{b1}} \sphinxcode{\sphinxupquote{b2}} \sphinxcode{\sphinxupquote{b3}} \sphinxcode{\sphinxupquote{b4}} \sphinxcode{\sphinxupquote{b5}} \sphinxcode{\sphinxupquote{c0}} \sphinxcode{\sphinxupquote{c1}} \sphinxcode{\sphinxupquote{c2}} \sphinxcode{\sphinxupquote{c3}} \sphinxcode{\sphinxupquote{c4}} \sphinxcode{\sphinxupquote{c5}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_error\_handler module reference}
\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler}}\label{\detokenize{api/generated/modules/mom_error_handler:mom-error-handler-module-reference}}\label{\detokenize{api/generated/modules/mom_error_handler::doc}}\index{mom\_error\_handler (module)@\spxentry{mom\_error\_handler}\spxextra{module}|spxpagem}
Routines for error handling and I/O management.

{\hyperref[\detokenize{api/generated/modules/mom_error_handler:detamom-error-handler}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_error_handler:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_root\_pe()}}}}}
&
This returns .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mesg()}}}}}
&
This provides a convenient interface for writing an informative comment.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error()}}}}}
&
This provides a convenient interface for writing an mpp\_error message with run\sphinxhyphen{}time filter based on a verbosity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_set_verbosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_verbosity()}}}}}
&
This subroutine sets the level of verbosity filtering MOM error messages.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_get_verbosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_verbosity()}}}}}
&
This subroutine gets the level of verbosity filtering MOM error messages.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_verbose_enough}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verbose\_enough()}}}}}
&
This tests whether the level of verbosity filtering MOM error messages is sufficient to write a message of verbosity level verb.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_showquery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_showquery()}}}}}
&
Returns True, if the verbosity\textgreater{}=6 indicating to show the call tree.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_enter()}}}}}
&
Writes a message about entering a subroutine if call tree reporting is active.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_leave()}}}}}
&
Writes a message about leaving a subroutine if call tree reporting is active.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_waypoint()}}}}}
&
Writes a message about reaching a milestone if call tree reporting is active.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{assert()}}}}}
&
Issues a FATAL error if the assertion fails, i.e.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_error_handler:detailed-description}}\label{\detokenize{api/generated/modules/mom_error_handler:detamom-error-handler}}
Routines for error handling and I/O management.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_error_handler:function-subroutine-documentation}}\index{is\_root\_pe() (fortran function in module mom\_error\_handler)@\spxentry{is\_root\_pe()}\spxextra{fortran function in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{is\_root\_pe}}}{}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This returns .true. if the current PE is the root PE.
\begin{quote}\begin{description}
\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg3}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg5}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_nsew}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg\_nsew}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_s}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg\_s}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chk_sum_msg_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chk\_sum\_msg\_w}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum0}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_b\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_b\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_h\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_h\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_u\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_u\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_v\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_v\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/clearparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::clearparameterblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/close_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::close\_param\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::closeparameterblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::depth\_list\_setup}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_mediator\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_test}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req::diapyc\_energy\_req\_test}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_closeblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_closeblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_openblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_openblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_logical_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_logical\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_param\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::entrainment\_diffusive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params::find\_obsolete\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/found_in_diagtable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics::found\_in\_diagtable}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::get\_variable\_line}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_version_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_version\_cs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_version_plain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_version\_plain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_state\_stats}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/mom_write_cputime_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime::mom\_write\_cputime\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/open_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::open\_param\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::open\_restart\_units}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::openparameterblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/popblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::popblocklevel}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::populate\_param\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_0d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_1d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_2d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_3d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_4d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field_expand_cmor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field\_expand\_cmor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/register_obsolete_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics::register\_obsolete\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_scalar\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_static\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/shelf_advance_front}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::shelf\_advance\_front}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/simplifywhitespace}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::simplifywhitespace}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::tidal\_mixing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/totaltands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging::totaltands}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::tracer\_registry\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime::write\_cputime}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::write\_depth\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::write\_energy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/zchksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::zchksum}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_mesg() (fortran subroutine in module mom\_error\_handler)@\spxentry{mom\_mesg()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{mom\_mesg}}}{\emph{message}, \emph{verb}, \emph{all\_print}}{}
This provides a convenient interface for writing an informative comment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{message} :: {[}in{]} A message to write out

\item {} 
\sphinxstylestrong{verb} :: {[}in{]} A level of verbosity for this message

\item {} 
\sphinxstylestrong{all\_print} :: {[}in{]} If present and true, any PEs are able to write this message.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{verbosity}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialization::adjustment\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::barotropic\_init}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder::basin\_builder\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialization::benchmark\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialization::benchmark\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/circle_obcs_initialization:f/circle_obcs_initialization/circle_obcs_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circle\_obcs\_initialization::circle\_obcs\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coriolisadv\_init}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialization::dumbbell\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_init}}}}} {\hyperref[\detokenize{api/generated/modules/external_gwave_initialization:f/external_gwave_initialization/external_gwave_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{external\_gwave\_initialization::external\_gwave\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/get_posterior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::get\_posterior\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::ice\_shelf\_solve\_outer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::initialize\_ice\_shelf\_dyn}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_channel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize::initialize\_ice\_thickness\_channel}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize::initialize\_ice\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::internal\_tides\_init}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialization::kelvin\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/lock_exchange_initialization:f/lock_exchange_initialization/lock_exchange_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lock\_exchange\_initialization::lock\_exchange\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_alloc_register_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_alloc\_register\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domains_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::mom\_domains\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::mom\_grid\_init}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_checksum_packages:f/mom_checksum_packages/mom_state_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksum\_packages::mom\_state\_stats}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialization::neverworld\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialization::neverworld\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::opacity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/read_z_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::read\_z\_edges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reproducing\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reproducing\_sum\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization::rossby\_front\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialization::seamount\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_analysis_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::set\_analysis\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_prior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::set\_prior\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/shelf_advance_front}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::shelf\_advance\_front}}}}} {\hyperref[\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization/soliton_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{soliton\_initialization::soliton\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::solo\_step\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_error() (fortran subroutine in module mom\_error\_handler)@\spxentry{mom\_error()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{mom\_error}}}{\emph{level}, \emph{message}, \emph{all\_print}}{}
This provides a convenient interface for writing an mpp\_error message with run\sphinxhyphen{}time filter based on a verbosity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{level} :: {[}in{]} The verbosity level of this message

\item {} 
\sphinxstylestrong{message} :: {[}in{]} A message to write out

\item {} 
\sphinxstylestrong{all\_print} :: {[}in{]} If present and true, any PEs are able to write this message.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{verbosity}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/accumulate_net_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::accumulate\_net\_input}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/add_int_tide_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::add\_int\_tide\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_forces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_pressure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_pressure}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_xyz_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::add\_xyz\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::adjust\_interface\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialization::adjustment\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialization::adjustment\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_advect::advect\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/alloc_bt_cont_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_variables::alloc\_bt\_cont\_type}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_density_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::analytic\_int\_density\_dz}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/analytic_int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::analytic\_int\_specific\_vol\_dp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/apply_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::apply\_ale\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/apply_ctrl_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_controlled\_forcing::apply\_ctrl\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_force_adjustments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::apply\_force\_adjustments}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/apply_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::apply\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{assert}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/attach_cell_methods}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::attach\_cell\_methods}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/average_value_ppoly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::average\_value\_ppoly}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::barotropic\_init}}}}} {\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder::basin\_builder\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_surface\_forcing::bfb\_buoyancy\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_surface\_forcing::bfb\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing::bkgnd\_mixing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::boundary\_k\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/bt_mass_source}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::bt\_mass\_source}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btcalc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_grid\_hycom1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_grid\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_rho_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_rho\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_sigma_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_sigma\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/build_slight_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::build\_slight\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::build\_zstar\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/bulk_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::bulk\_average}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_depth_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_depth\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_resoln_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_resoln\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_slope\_functions}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions_using_just_e}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_slope\_functions\_using\_just\_e}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calc\_spec\_vol\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_derivs_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calc\_spec\_vol\_derivs\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calc_spec_vol_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calc\_spec\_vol\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_visbeck_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_visbeck\_coeffs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_compress\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_compress_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_compress\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_cvmix_tidal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::calculate\_cvmix\_tidal}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_derivs\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_derivs\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_derivs_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_derivs\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_second_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_second\_derivs\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_density_second_derivs_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_density\_second\_derivs\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_diagnostic\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_spec\_vol\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_spec_vol_derivs_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_spec\_vol\_derivs\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_stanley\_density\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_stanley\_density\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_stanley_density_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_stanley\_density\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_tfreeze_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_tfreeze\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/calculate_tfreeze_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::calculate\_tfreeze\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/call_obc_register}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::call\_obc\_register}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_register}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_register}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_set\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_surface\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/check_bkgnd_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing::check\_bkgnd\_scheme}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::check\_grid\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/check_mask_val_consistency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::check\_mask\_val\_consistency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/check_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::check\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_sb2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging::check\_redundant\_sb2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vb2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging::check\_redundant\_vb2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_debugging:f/mom_debugging/check_redundant_vc2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_debugging::check\_redundant\_vc2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/clone_md_to_d2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::clone\_md\_to\_d2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/clone_md_to_md}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::clone\_md\_to\_md}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm::continuity\_ppm}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/continuity_ppm_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm::continuity\_ppm\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/convert_temp_salt_for_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::convert\_temp\_salt\_for\_teos10}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitsi}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinateunitsi}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_dyngrid_to_mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::copy\_dyngrid\_to\_mom\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_mom_grid_to_dyngrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::copy\_mom\_grid\_to\_dyngrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coradcalc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coradcalc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coriolisadv\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/correct_halo_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::correct\_halo\_rotation}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/create_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::create\_dyn\_horgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/create_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::create\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv::cvmix\_conv\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff::cvmix\_ddiff\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_shear::cvmix\_shear\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::define\_axes\_group}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::define\_axes\_group\_dsamp}}}}} {\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialization::dense\_water\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::depth\_list\_setup}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/destroy_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::destroy\_dyn\_horgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_dskb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::determine\_dskb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/determine_ea_kb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::determine\_ea\_kb}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/determine_is_new_run}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::determine\_is\_new\_run}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_mediator\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_update\_remap\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diapyc_energy_req:f/mom_diapyc_energy_req/diapyc_energy_req_test}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diapyc\_energy\_req::diapyc\_energy\_req\_test}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_barotropic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::distribute\_residual\_uh\_barotropic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_upwards}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::distribute\_residual\_uh\_upwards}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_barotropic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::distribute\_residual\_vh\_barotropic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_upwards}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::distribute\_residual\_vh\_upwards}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::downsample\_diag\_field\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::downsample\_diag\_field\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/downsample_diag_indices_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::downsample\_diag\_indices\_get}}}}} {\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing::dumbbell\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_set_obc_tracer_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_initialization::dyed\_channel\_set\_obc\_tracer\_data}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_update_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_initialization::dyed\_channel\_update\_flow}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization/dyed_obcs_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obcs\_initialization::dyed\_obcs\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/dz_function1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::dz\_function1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_list_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::efp\_list\_sum\_across\_pes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/efp_val_sum_across_pes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::efp\_val\_sum\_across\_pes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/ensembler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::ensembler}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrain_diffusive_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::entrain\_diffusive\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_entrain_diffusive:f/mom_entrain_diffusive/entrainment_diffusive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_entrain\_diffusive::entrainment\_diffusive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_use_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_use\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::epbl\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/eq_phase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::eq\_phase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/extract_iob_stresses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::extract\_iob\_stresses}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::extractfluxes1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::filtered\_grid\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/find_depth_of_pressure_in_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::find\_depth\_of\_pressure\_in\_cell}}}}} {\hyperref[\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_interface\_heights::find\_eta\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/find_in_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::find\_in\_files}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params::find\_obsolete\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/fluxes_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::fluxes\_accumulate}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/found_in_diagtable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics::found\_in\_diagtable}}}}} {\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_entraining}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_geothermal::geothermal\_entraining}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/get_ale_sponge_thicknesses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::get\_ale\_sponge\_thicknesses}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/get_chl_from_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::get\_chl\_from\_model}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::get\_langmuir\_number}}}}} {\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/get_polynomial_coordinate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::get\_polynomial\_coordinate}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_i\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_j\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_tr_flux_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::get\_tr\_flux\_units}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateinterfaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::getcoordinateinterfaces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateshortname}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::getcoordinateshortname}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::getcoordinateunits}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getstaticthickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::getstaticthickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_i_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_i\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_j_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_j\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc::horizontal\_viscosity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::ice\_shelf\_advect}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state::ice\_shelf\_state\_init}}}}} {\hyperref[\detokenize{api/generated/modules/idealized_hurricane:f/idealized_hurricane/idealized_hurricane_wind_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{idealized\_hurricane::idealized\_hurricane\_wind\_init}}}}} {\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/init_coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt::init\_coord\_adapt}}}}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/init_coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::init\_coord\_hycom}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/init_coord_rho}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::init\_coord\_rho}}}}} {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/init_coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::init\_coord\_sigma}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/init_coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::init\_coord\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/init_coord_zlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::init\_coord\_zlike}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/init_tracer_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::init\_tracer\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::initialize\_ale\_sponge\_fixed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::initialize\_ale\_sponge\_varying}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/initialize_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::initialize\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/initialize_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::initialize\_dyed\_obc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::initialize\_ice\_shelf\_dyn}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize::initialize\_ice\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize::initialize\_ice\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/initialize_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::initialize\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/initialize_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::initialize\_isomip\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::initialize\_mom\_generic\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/initialize_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::initialize\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initialize\_regridding}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/initialize_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::initialize\_rgc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_shelf\_mass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_density_dz_generic_pcm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::int\_density\_dz\_generic\_pcm}}}}} {\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_spec_vol_dp_generic_pcm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::int\_spec\_vol\_dp\_generic\_pcm}}}}} {\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_int\_tide\_input::int\_tide\_input\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/integraterecononinterval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::integraterecononinterval}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::internal\_tides\_init}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolation_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::interpolation\_scheme}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/is_new_run}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::is\_new\_run}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/ispossumerrsignificant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::ispossumerrsignificant}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_init}}}}} {\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialization::kelvin\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_calculate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_calculate}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::lateral\_boundary\_diffusion\_init}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/linear_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::linear\_solver}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/linear_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::linear\_solver}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/lock_tracer_registry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::lock\_tracer\_registry}}}}} {\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/marine_ice_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_marine\_ice::marine\_ice\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_alloc_register_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_alloc\_register\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_init}}}}} {\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_surface\_forcing::meso\_buoyancy\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_surface\_forcing::meso\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/mixedlayer_detrain_2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::mixedlayer\_detrain\_2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat::mixedlayer\_restrat}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_bml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat::mixedlayer\_restrat\_bml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_general}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat::mixedlayer\_restrat\_general}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::mom\_diagnostics\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domains_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::mom\_domains\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_flux\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::mom\_grid\_init}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_set_verbosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_verbosity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/mom_sum_output_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::mom\_sum\_output\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/mom_wave_interface_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::mom\_wave\_interface\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/nodal_fu}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::nodal\_fu}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/num_timelevels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::num\_timelevels}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params::obsolete\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params::obsolete\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params::obsolete\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_params::obsolete\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/ocean_register_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::ocean\_register\_diag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_from_chl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::opacity\_from\_chl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::opacity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::open\_restart\_units}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/pass_var_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::pass\_var\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_2d\_low}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_3d\_low}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/postale_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::postale\_tracer\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm::ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::ppm\_reconstruction\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_continuity_ppm:f/mom_continuity_ppm/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity\_ppm::ppm\_reconstruction\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_nonbouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce::pressureforce\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_nonbouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_corner_spread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::propagate\_corner\_spread}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::propagate\_int\_tide}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/query_compressible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::query\_compressible}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_0d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_1d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_2d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_3d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_4d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_4d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/read_axis_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::read\_axis\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::read\_depth\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_constituents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::read\_tidal\_constituents}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::read\_tidal\_energy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/read_z_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::read\_z\_edges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_efp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::real\_to\_efp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/real_to_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::real\_to\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/refract}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::refract}}}}} {\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/register_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::register\_advection\_test\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/register_barotropic_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::register\_barotropic\_restarts}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::register\_boundary\_impulse\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/register_ctrl_forcing_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_controlled\_forcing::register\_ctrl\_forcing\_restarts}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/register_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::register\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::register\_dye\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/register_dyed_channel_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_initialization::register\_dyed\_channel\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/register_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::register\_dyed\_obc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/register_ice_shelf_dyn_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::register\_ice\_shelf\_dyn\_restarts}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::register\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/register_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::register\_isomip\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/register_kelvin_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialization::register\_kelvin\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/register_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::register\_mom\_generic\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/register_obsolete_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics::register\_obsolete\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/register_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::register\_ocmip2\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::register\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/register_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::register\_pseudo\_salt\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_4d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_ptr0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_ptr1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_ptr2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_ptr3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_ptr4d}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/register_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::register\_rgc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/register_shelfwave_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_initialization::register\_shelfwave\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/register_tidal_bay_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_bay\_initialization::register\_tidal\_bay\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_time_deriv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::register\_time\_deriv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::regridding\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_layers}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_layers\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regularize\_layers::regularize\_surface}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remap\_via\_sub\_cells}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_w}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/reopen_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::reopen\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_efp_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reproducing\_efp\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reproducing\_sum\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reproducing_sum_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reproducing\_sum\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/rescale_dyn_horgrid_bathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::rescale\_dyn\_horgrid\_bathymetry}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/rescale_grid_bathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::rescale\_grid\_bathymetry}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restart\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_files_exist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restart\_files\_exist}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restart\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization/rgc_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_initialization::rgc\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/rho_interfaces_col}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::rho\_interfaces\_col}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization::rossby\_front\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/rotate_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::rotate\_ale\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::rotate\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/rotate_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_variables::rotate\_surface\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_mpp\_chksum\_real\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_mpp\_chksum\_real\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_time\_interp\_external\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_time\_interp\_external\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_time\_interp\_external\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_write\_field\_real\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transform\_fms::rotated\_write\_field\_real\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/safe_string_copy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::safe\_string\_copy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::save\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests::scm\_cvmix\_tests\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialization::seamount\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/set_adapt_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt::set\_adapt\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_analysis_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::set\_analysis\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::set\_axes\_info\_dsamp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::set\_dtbt}}}}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/set_hycom_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::set\_hycom\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/set_int_tide_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_int\_tide\_input::set\_int\_tide\_input}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes_dsamp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::set\_masks\_for\_axes\_dsamp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/set_opacity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::set\_opacity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_prior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::set\_prior\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_depths}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_max\_depths}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/set_rho_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::set\_rho\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/set_sigma_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::set\_sigma\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/set_slight_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::set\_slight\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_target\_densities}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_field_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::set\_up\_ale\_sponge\_field\_fixed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/set_up_ale_sponge_field_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::set\_up\_ale\_sponge\_field\_varying}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_up_bt_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::set\_up\_bt\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_ml_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_ml\_density}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_bbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_viscous\_bbl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_viscous\_ml}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/set_zlike_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::set\_zlike\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/setcoordinateresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::setcoordinateresolution}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/setreconstructiontype}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::setreconstructiontype}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/setup_tidal_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::setup\_tidal\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::shelf\_calc\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::solo\_step\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_linear_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_linear\_system}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::state\_dependent\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::step\_forward\_meke}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/store_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::store\_stocks}}}}} {\hyperref[\detokenize{api/generated/modules/supercritical_initialization:f/supercritical_initialization/supercritical_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{supercritical\_initialization::supercritical\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/surface_bands_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::surface\_bands\_by\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/teleport}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::teleport}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/test_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::test\_line}}}}} {\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse::thickness\_diffuse}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_frequency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_frequency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::tidal\_mixing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::tracer\_flow\_control\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::tracer\_registry\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::tracer\_z\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/tridiag_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_structure::tridiag\_solver}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/uniformresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::uniformresolution}}}}} {\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_scaling::unit\_scaling\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_offline_from_arrays}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::update\_offline\_from\_arrays}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/updatecfltruncationvalue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::updatecfltruncationvalue}}}}} {\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing::user\_buoyancy\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity::user\_change\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity::user\_change\_diff\_init}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_init\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_initialize_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_initialize\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_initialize\_velocity}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_register_tracer_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_register\_tracer\_example}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_set\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_set\_rotation}}}}} {\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing::user\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing::user\_wind\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/varmix_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::varmix\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgridinit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::verticalgridinit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc\_coef}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_remnant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_vert\_friction::vertvisc\_remnant}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_set_param}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed\_set\_param}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speeds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speeds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_structure::wave\_structure}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_structure::wave\_structure\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime::write\_cputime}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::write\_depth\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::write\_energy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/write_u_accel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pointaccel::write\_u\_accel}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/write_v_accel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pointaccel::write\_v\_accel}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_set\_verbosity() (fortran subroutine in module mom\_error\_handler)@\spxentry{mom\_set\_verbosity()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_set_verbosity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{mom\_set\_verbosity}}}{\emph{verb}}{}
This subroutine sets the level of verbosity filtering MOM error messages.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verb} :: {[}in{]} A level of verbosity to set

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error}}}}} \sphinxcode{\sphinxupquote{verbosity}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_get\_verbosity() (fortran function in module mom\_error\_handler)@\spxentry{mom\_get\_verbosity()}\spxextra{fortran function in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_get_verbosity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{mom\_get\_verbosity}}}{}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This subroutine gets the level of verbosity filtering MOM error messages.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{verbosity}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_verbose\_enough() (fortran function in module mom\_error\_handler)@\spxentry{mom\_verbose\_enough()}\spxextra{fortran function in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_verbose_enough}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{mom\_verbose\_enough}}}{\emph{verb}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This tests whether the level of verbosity filtering MOM error messages is sufficient to write a message of verbosity level verb.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verb} :: {[}in{]} A level of verbosity to test

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{verbosity}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calltree\_showquery() (fortran function in module mom\_error\_handler)@\spxentry{calltree\_showquery()}\spxextra{fortran function in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_showquery}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{calltree\_showquery}}}{}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns True, if the verbosity\textgreater{}=6 indicating to show the call tree.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{verbosity}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calltree\_enter() (fortran subroutine in module mom\_error\_handler)@\spxentry{calltree\_enter()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{calltree\_enter}}}{\emph{mesg}, \emph{n}}{}
Writes a message about entering a subroutine if call tree reporting is active.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Message to write

\item {} 
\sphinxstylestrong{n} :: {[}in{]} An optional integer to write at end of message

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calltreeindentlevel}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{verbosity}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_build_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_build\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_tracer\_final}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/apply_topography_edits_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::apply\_topography\_edits\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_const}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_from\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_from\_files}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/initialize_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::initialize\_masks}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_fit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_fit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_from\_profile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_thickness\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_uniform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_thickness\_uniform}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::initialize\_topography\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_named}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::initialize\_topography\_named}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_velocity\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_velocity\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/limit_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::limit\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::mom\_initialize\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_initialize_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::mom\_initialize\_rotation}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z::mom\_initialize\_tracer\_from\_z}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_temp\_salt\_initialize\_from\_z}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_transport\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::remap\_all\_state\_vars}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::reset\_face\_lengths\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::reset\_face\_lengths\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_gprime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_gprime}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_layer_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_layer\_density}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_ts\_profile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_ts\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_ts\_ref}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_to_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_to\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::set\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_cartesian}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_cartesian}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_from_mosaic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_from\_mosaic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_mercator}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_spherical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_spherical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_beta_plane}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::set\_rotation\_beta\_plane}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_planetary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::set\_rotation\_planetary}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/update_offline_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::update\_offline\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_1gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_1gyre}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_2gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_2gyre}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_by\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_const}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_gyres}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_gyres}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/write_ocean_geometry_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::write\_ocean\_geometry\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calltree\_leave() (fortran subroutine in module mom\_error\_handler)@\spxentry{calltree\_leave()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{calltree\_leave}}}{\emph{mesg}}{}
Writes a message about leaving a subroutine if call tree reporting is active.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{mesg} :: Message to write

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calltreeindentlevel}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{verbosity}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_build_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_build\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_tracer\_final}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/apply_topography_edits_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::apply\_topography\_edits\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_const}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_from\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_from\_files}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::buoyancy\_forcing\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/initialize_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::initialize\_masks}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_fit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_fit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_from\_profile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_temp\_salt\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_thickness\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_uniform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_thickness\_uniform}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::initialize\_topography\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_named}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::initialize\_topography\_named}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_velocity\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_velocity\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/limit_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::limit\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::mom\_initialize\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_initialize_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::mom\_initialize\_rotation}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z::mom\_initialize\_tracer\_from\_z}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_temp\_salt\_initialize\_from\_z}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_transport\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::remap\_all\_state\_vars}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::reset\_face\_lengths\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::reset\_face\_lengths\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_gprime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_gprime}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_layer_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_layer\_density}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_ts\_profile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_ts\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_from_ts_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_from\_ts\_ref}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/set_coord_to_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::set\_coord\_to\_none}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::set\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_cartesian}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_cartesian}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_from_mosaic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_from\_mosaic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_mercator}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_spherical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics\_spherical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_beta_plane}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::set\_rotation\_beta\_plane}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_planetary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::set\_rotation\_planetary}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/update_offline_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::update\_offline\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_1gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_1gyre}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_2gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_2gyre}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_by\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_const}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_gyres}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_gyres}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/write_ocean_geometry_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::write\_ocean\_geometry\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calltree\_waypoint() (fortran subroutine in module mom\_error\_handler)@\spxentry{calltree\_waypoint()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{calltree\_waypoint}}}{\emph{mesg}, \emph{n}}{}
Writes a message about reaching a milestone if call tree reporting is active.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Message to write

\item {} 
\sphinxstylestrong{n} :: {[}in{]} An optional integer to write at end of message

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{calltreeindentlevel}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{verbosity}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_tracer_final}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_tracer\_final}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/remap_all_state_vars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::remap\_all\_state\_vars}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{assert() (fortran subroutine in module mom\_error\_handler)@\spxentry{assert()}\spxextra{fortran subroutine in module mom\_error\_handler}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/assert}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_error\_handler/}}\sphinxbfcode{\sphinxupquote{assert}}}{\emph{logical\_arg}, \emph{msg}}{}
Issues a FATAL error if the assertion fails, i.e. the first argument is false.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{logical\_arg} :: {[}in{]} If false causes a FATAL error

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} Message to issue in case of failed assertion

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/add_diag_to_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::add\_diag\_to\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_calc_hmask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_calc\_hmask}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_do_remap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_do\_remap}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_new_diag_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::get\_new\_diag\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/horizontally_average_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::horizontally\_average\_diag\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_1d_k}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_1d\_k}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_2d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_2d\_low}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_data_3d_low}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_data\_3d\_low}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/post_xy_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::post\_xy\_average}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_scalar_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_scalar\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_static_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_static\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_masks_for_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::set\_masks\_for\_axes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_interpolate_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::vertically\_interpolate\_diag\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/vertically_reintegrate_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::vertically\_reintegrate\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_file\_parser module reference}
\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser}}\label{\detokenize{api/generated/modules/mom_file_parser:mom-file-parser-module-reference}}\label{\detokenize{api/generated/modules/mom_file_parser::doc}}\index{mom\_file\_parser (module)@\spxentry{mom\_file\_parser}\spxextra{module}|spxpagem}
The MOM6 facility to parse input files for runtime parameters.

{\hyperref[\detokenize{api/generated/modules/mom_file_parser:detamom-file-parser}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_file_parser:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/file_data_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{file\_data\_type}}}}}
&
The valid lines extracted from an input parameter file without comments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/link_parameter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{link\_parameter}}}}}
&
A link in the list of variables that have already had override warnings issued.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type}}}}}
&
A structure that can be parsed to read and document run\sphinxhyphen{}time parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/parameter_block}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parameter\_block}}}}}
&
Specify the active parameter block.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_file_parser:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/open_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_param\_file()}}}}}
&
Make the contents of a parameter input file availalble in a {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/close_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close\_param\_file()}}}}}
&
Close any open input files and deallocate memory associated with this {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data()}}}}}
&
Read the contents of a parameter input file, and store the contents in a {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/file_data_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{file\_data\_type()}}}}} after removing comments and simplifying white space.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openmultilinecomment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{openmultilinecomment()}}}}}
&
Return True if a /* appears on this line without a closing {\color{red}\bfseries{}*}/.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closemultilinecomment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{closemultilinecomment()}}}}}
&
Return True if a {\color{red}\bfseries{}*}/ appears on this line.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentindex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentindex()}}}}}
&
Find position of last character before any comments, As marked by “!”, “//”, or “/{\color{red}\bfseries{}*}” following F90, C++, or C syntax.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentnonblank}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentnonblank()}}}}}
&
Find position of last non\sphinxhyphen{}blank character before any comments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/replacetabs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{replacetabs()}}}}}
&
Returns a string with tabs replaced by a blank.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/removecomments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{removecomments()}}}}}
&
Trims comments and leading blanks from string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/simplifywhitespace}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{simplifywhitespace()}}}}}
&
Constructs a string with all repeated whitespace replaced with single blanks and insert white space where it helps delineate tokens (e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_int()}}}}}
&
This subroutine reads the value of an integer model parameter from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_int\_array()}}}}}
&
This subroutine reads the values of an array of integer model parameters from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_real()}}}}}
&
This subroutine reads the value of a real model parameter from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_real\_array()}}}}}
&
This subroutine reads the values of an array of real model parameters from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char()}}}}}
&
This subroutine reads the value of a character string model parameter from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char\_array()}}}}}
&
This subroutine reads the values of an array of character string model parameters from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_logical()}}}}}
&
This subroutine reads the value of a logical model parameter from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_time()}}}}}
&
This subroutine reads the value of a time\_type model parameter from a parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/strip_quotes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strip\_quotes()}}}}}
&
This function removes single and double quotes from a character string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line()}}}}}
&
This subtoutine extracts the contents of lines in the {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type()}}}}} that refer to a named parameter.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/flag_line_as_read}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flag\_line\_as\_read()}}}}}
&
Record that a line has been used to set a parameter.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/overridewarninghasbeenissued}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{overridewarninghasbeenissued()}}}}}
&
Returns true if an override warning has been issued for the variable varName.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_version_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_version\_cs()}}}}}
&
Log the version of a module to a log file and/or stdout, and/or to the parameter documentation file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_version_plain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_version\_plain()}}}}}
&
Log the version of a module to a log file and/or stdout.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_int()}}}}}
&
Log the name and value of an integer model parameter in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_int\_array()}}}}}
&
Log the name and values of an array of integer model parameter in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_real()}}}}}
&
Log the name and value of a real model parameter in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_real\_array()}}}}}
&
Log the name and values of an array of real model parameter in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_logical()}}}}}
&
Log the name and value of a logical model parameter in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_char()}}}}}
&
Log the name and value of a character string model parameter in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_time()}}}}}
&
This subroutine writes the value of a time\sphinxhyphen{}type parameter to a log file, along with its name and the module it came from.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/convert_date_to_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_date\_to\_string()}}}}}
&
This function converts a date into a string, valid with ticks and for dates up to year 99,999,999.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_int()}}}}}
&
This subroutine reads the value of an integer model parameter from a parameter file and logs it in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_int\_array()}}}}}
&
This subroutine reads the values of an array of integer model parameters from a parameter file and logs them in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_real()}}}}}
&
This subroutine reads the value of a real model parameter from a parameter file and logs it in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_real\_array()}}}}}
&
This subroutine reads the values of an array of real model parameters from a parameter file and logs them in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_char()}}}}}
&
This subroutine reads the value of a character string model parameter from a parameter file and logs it in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_char\_array()}}}}}
&
This subroutine reads the values of an array of character string model parameters from a parameter file and logs them in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_logical()}}}}}
&
This subroutine reads the value of a logical model parameter from a parameter file and logs it in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_time()}}}}}
&
This subroutine reads the value of a time\sphinxhyphen{}type model parameter from a parameter file and logs it in documentation files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/clearparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clearparameterblock()}}}}}
&
Resets the parameter block name to blank.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{openparameterblock()}}}}}
&
Tags blockName onto the end of the active parameter block name.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{closeparameterblock()}}}}}
&
Remove the lowest level of recursion from the active block name.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/pushblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pushblocklevel()}}}}}
&
Extends block name (deeper level of parameter block)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/popblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{popblocklevel()}}}}}
&
Truncates block name (shallower level of parameter block)
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_file_parser:detailed-description}}\label{\detokenize{api/generated/modules/mom_file_parser:detamom-file-parser}}
By Robert Hallberg and Alistair Adcroft, updated 9/2013.

The subroutines here parse a set of input files for the value a named parameter and sets that parameter at run time. Currently these files use use one of several formats: \#define VAR ! To set the logical VAR to true. VAR = True ! To set the logical VAR to true. \#undef VAR ! To set the logical VAR to false. VAR = False ! To set the logical VAR to false. \#define VAR 999 ! To set the real or integer VAR to 999. VAR = 999 ! To set the real or integer VAR to 999. \#override VAR = 888 ! To override a previously set value. VAR = 1.1, 2.2, 3.3 ! To set an array of real values.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_file_parser:type-documentation}}\index{file\_data\_type (fortran type in module mom\_file\_parser)@\spxentry{file\_data\_type}\spxextra{fortran type in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/file_data_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{file\_data\_type}}}
The valid lines extracted from an input parameter file without comments.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_lines}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The number of lines in this type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{line}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len= input\_str\_length )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The line content.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{line\_used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: If true, the line has been read.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{link\_parameter (fortran type in module mom\_file\_parser)@\spxentry{link\_parameter}\spxextra{fortran type in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/link_parameter}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{link\_parameter}}}
A link in the list of variables that have already had override warnings issued.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{next}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( link\_parameter )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Facilitates linked list.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Parameter name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hasissuedoverridewarning}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Has a default value.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{param\_file\_type (fortran type in module mom\_file\_parser)@\spxentry{param\_file\_type}\spxextra{fortran type in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{param\_file\_type}}}
A structure that can be parsed to read and document run\sphinxhyphen{}time parameters.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nfiles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of open files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iounit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( max\_param\_files )}\sphinxstyleemphasis{{]}} :: The unit numbers of open files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{filename}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len= filename\_length )( max\_param\_files )}\sphinxstyleemphasis{{]}} :: The names of the open files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netcdf\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical( max\_param\_files )}\sphinxstyleemphasis{{]}} :: If true, the input file is in NetCDF.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{param\_data}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( file\_data\_type )( max\_param\_files )}\sphinxstyleemphasis{{]}} :: Structures that contain the valid data lines from the parameter files, enabling all subsequent reads of parameter data to occur internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{report\_unused}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, report any parameter lines that are not used in the run.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{unused\_params\_fatal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, kill the run if there are any unused parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{log\_to\_stdout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, all log messages are also sent to stdout.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{log\_open}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the log file has been opened.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stdout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number from

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stdlog}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number from

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{doc\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: A file where all run\sphinxhyphen{}time parameters, their settings and defaults are documented.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{complete\_doc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, document all run\sphinxhyphen{}time parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minimal\_doc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, document only those run\sphinxhyphen{}time parameters that differ from defaults.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{doc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(doc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that contains information related to parameter documentation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{chain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( link\_parameter )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Facilitates linked list.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{blockname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( parameter\_block )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Name of active parameter block.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{parameter\_block (fortran type in module mom\_file\_parser)@\spxentry{parameter\_block}\spxextra{fortran type in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/parameter_block}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{parameter\_block}}}
Specify the active parameter block.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The active parameter block name.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_file_parser:function-subroutine-documentation}}\index{open\_param\_file() (fortran subroutine in module mom\_file\_parser)@\spxentry{open\_param\_file()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/open_param_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{open\_param\_file}}}{\emph{filename}, \emph{CS}, \emph{checkable}, \emph{component}, \emph{doc\_file\_dir}}{}
Make the contents of a parameter input file availalble in a {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} An input file name, optionally with the full path

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{checkable} :: {[}in{]} If this is false, it disables checks of this file for unused parameters. The default is True.

\item {} 
\sphinxstylestrong{component} :: {[}in{]} If present, this component name is used to generate parameter documentation file names; the default is”MOM”

\item {} 
\sphinxstylestrong{doc\_file\_dir} :: {[}in{]} An optional directory in which to write out the documentation files. The default is effectively ‘./’.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{all\_pes\_read}} \sphinxcode{\sphinxupquote{complete\_doc\_default}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{minimal\_doc\_default}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{close\_param\_file() (fortran subroutine in module mom\_file\_parser)@\spxentry{close\_param\_file()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/close_param_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{close\_param\_file}}}{\emph{CS}, \emph{quiet\_close}, \emph{component}}{}
Close any open input files and deallocate memory associated with this {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type()}}}}}. To use this type again, open\_param\_file would have to be called again.
. To use this type again, open\_param\_file would have to be called again.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{quiet\_close} :: {[}in{]} if present and true, do not do any logging with this call.

\item {} 
\sphinxstylestrong{component} :: {[}in{]} If present, this component name is used to generate parameter documentation file names

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{all\_pes\_read}} \sphinxcode{\sphinxupquote{complete\_doc\_default}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{log\_to\_stdout\_default}} \sphinxcode{\sphinxupquote{minimal\_doc\_default}} \sphinxcode{\sphinxupquote{report\_unused\_default}} \sphinxcode{\sphinxupquote{unused\_params\_fatal\_default}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_flux\_init}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{populate\_param\_data() (fortran subroutine in module mom\_file\_parser)@\spxentry{populate\_param\_data()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{populate\_param\_data}}}{\emph{iounit}, \emph{filename}, \emph{param\_data}}{}
Read the contents of a parameter input file, and store the contents in a {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/file_data_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{file\_data\_type()}}}}} after removing comments and simplifying white space.
after removing comments and simplifying white space.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} The IO unit number that is open for filename

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} An input file name, optionally with the full path

\item {} 
\sphinxstylestrong{param\_data} :: {[}inout{]} A list of the input lines that set parameters after comments have been stripped out.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{all\_pes\_read}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closemultilinecomment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{closemultilinecomment}}}}} \sphinxcode{\sphinxupquote{input\_str\_length}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentnonblank}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentnonblank}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openmultilinecomment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{openmultilinecomment}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/removecomments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{removecomments}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/replacetabs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{replacetabs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/simplifywhitespace}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{simplifywhitespace}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/open_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_param\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{openmultilinecomment() (fortran function in module mom\_file\_parser)@\spxentry{openmultilinecomment()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openmultilinecomment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{openmultilinecomment}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Return True if a /* appears on this line without a closing {\color{red}\bfseries{}*}/.

Inline emphasis start\sphinxhyphen{}string without end\sphinxhyphen{}string.

\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} The input string to process

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentindex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentindex}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{closemultilinecomment() (fortran function in module mom\_file\_parser)@\spxentry{closemultilinecomment()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closemultilinecomment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{closemultilinecomment}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Return True if a {\color{red}\bfseries{}*}/ appears on this line.

Inline emphasis start\sphinxhyphen{}string without end\sphinxhyphen{}string.

\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} The input string to process

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{lastnoncommentindex() (fortran function in module mom\_file\_parser)@\spxentry{lastnoncommentindex()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentindex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{lastnoncommentindex}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Find position of last character before any comments, As marked by “!”, “//”, or “/{\color{red}\bfseries{}*}” following F90, C++, or C syntax.

Inline emphasis start\sphinxhyphen{}string without end\sphinxhyphen{}string.

\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} The input string to process

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentnonblank}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentnonblank}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openmultilinecomment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{openmultilinecomment}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{lastnoncommentnonblank() (fortran function in module mom\_file\_parser)@\spxentry{lastnoncommentnonblank()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentnonblank}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{lastnoncommentnonblank}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Find position of last non\sphinxhyphen{}blank character before any comments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} The input string to process

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentindex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentindex}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/removecomments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{removecomments}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{replacetabs() (fortran function in module mom\_file\_parser)@\spxentry{replacetabs()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/replacetabs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{replacetabs}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(string))}\sphinxstyleemphasis{{]}}}
Returns a string with tabs replaced by a blank.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} The input string to process

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{removecomments() (fortran function in module mom\_file\_parser)@\spxentry{removecomments()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/removecomments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{removecomments}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(string))}\sphinxstyleemphasis{{]}}}
Trims comments and leading blanks from string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} The input string to process

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/lastnoncommentnonblank}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lastnoncommentnonblank}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{simplifywhitespace() (fortran function in module mom\_file\_parser)@\spxentry{simplifywhitespace()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/simplifywhitespace}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{simplifywhitespace}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(string)+16)}\sphinxstyleemphasis{{]}}}
Constructs a string with all repeated whitespace replaced with single blanks and insert white space where it helps delineate tokens (e.g. around =)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} A string to modify to simpify white space

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/populate_param_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{populate\_param\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_int() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_int()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_int}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}}{}
This subroutine reads the value of an integer model parameter from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_int}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_int\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_int\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_int\_array}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}}{}
This subroutine reads the values of an array of integer model parameters from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_int\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_real() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_real()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_real}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}, \emph{scale}}{}
This subroutine reads the value of a real model parameter from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the parameter is multiplied by before it is returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_real\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_real\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_real\_array}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}, \emph{scale}}{}
This subroutine reads the values of an array of real model parameters from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the parameter is multiplied by before it is returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_real\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_char() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_char()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_char}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}}{}
This subroutine reads the value of a character string model parameter from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/strip_quotes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strip\_quotes}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_char}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_char\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_char\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_char\_array}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}}{}
This subroutine reads the values of an array of character string model parameters from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/strip_quotes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strip\_quotes}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_char\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_logical() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_logical()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_logical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_logical}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{fail\_if\_missing}}{}
This subroutine reads the value of a logical model parameter from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_logical}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_param\_time() (fortran subroutine in module mom\_file\_parser)@\spxentry{read\_param\_time()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{read\_param\_time}}}{\emph{CS}, \emph{varname}, \emph{value}, \emph{timeunit}, \emph{fail\_if\_missing}, \emph{date\_format}}{}
This subroutine reads the value of a time\_type model parameter from a parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file

\item {} 
\sphinxstylestrong{timeunit} :: {[}in{]} The number of seconds in a time unit for real\sphinxhyphen{}number input.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{date\_format} :: {[}out{]} If present, this indicates whether this parameter was read in a date format, so that it can later be logged in the same format.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{strip\_quotes() (fortran function in module mom\_file\_parser)@\spxentry{strip\_quotes()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/strip_quotes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{strip\_quotes}}}{\emph{val\_str}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=input\_str\_length)}\sphinxstyleemphasis{{]}}}
This function removes single and double quotes from a character string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val\_str} :: The character string to work on

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_variable\_line() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_variable\_line()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_variable\_line}}}{\emph{CS}, \emph{varname}, \emph{found}, \emph{defined}, \emph{value\_string}, \emph{paramIsLogical}}{}
This subtoutine extracts the contents of lines in the {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/param_file_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{param\_file\_type()}}}}} that refer to a named parameter. The value\_string that is returned must be interepreted in a way that depends on the type of this variable.
that refer to a named parameter. The value\_string that is returned must be interepreted in a way that depends on the type of this variable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{found} :: {[}out{]} If true, this parameter has been found in CS

\item {} 
\sphinxstylestrong{defined} :: {[}out{]} If true, this parameter is set (or true) in the CS

\item {} 
\sphinxstylestrong{value\_string} :: {[}out{]} A string that encodes the new value

\item {} 
\sphinxstylestrong{paramislogical} :: {[}in{]} If true, this is a logical parameter that can be simply defined without parsing a value\_string.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/flag_line_as_read}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flag\_line\_as\_read}}}}} \sphinxcode{\sphinxupquote{input\_str\_length}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/overridewarninghasbeenissued}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{overridewarninghasbeenissued}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/popblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{popblocklevel}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/pushblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pushblocklevel}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{flag\_line\_as\_read() (fortran subroutine in module mom\_file\_parser)@\spxentry{flag\_line\_as\_read()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/flag_line_as_read}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{flag\_line\_as\_read}}}{\emph{line\_used}, \emph{count}}{}
Record that a line has been used to set a parameter.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{line\_used} :: A structure indicating which lines have been read

\item {} 
\sphinxstylestrong{count} :: {[}in{]} The parameter on this line number has been read

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{overridewarninghasbeenissued() (fortran function in module mom\_file\_parser)@\spxentry{overridewarninghasbeenissued()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/overridewarninghasbeenissued}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{overridewarninghasbeenissued}}}{\emph{chain}, \emph{varName}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if an override warning has been issued for the variable varName.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{chain} :: The linked list of variables that have already had override warnings issued

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the variable being queried for warnings

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_version\_cs() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_version\_cs()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_version_cs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_version\_cs}}}{\emph{CS}, \emph{modulename}, \emph{version}, \emph{desc}, \emph{log\_to\_all}, \emph{all\_default}, \emph{layout}, \emph{debugging}}{}
Log the version of a module to a log file and/or stdout, and/or to the parameter documentation file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} File parser type

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} Name of calling module

\item {} 
\sphinxstylestrong{version} :: {[}in{]} Version string of module

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} Module description

\item {} 
\sphinxstylestrong{log\_to\_all} :: {[}in{]} If present and true, log this parameter to the …\_doc.all files, even if this module also has layout or debugging parameters.

\item {} 
\sphinxstylestrong{all\_default} :: {[}in{]} If true, all parameters take their default values.

\item {} 
\sphinxstylestrong{layout} :: {[}in{]} If present and true, this module has layout parameters.

\item {} 
\sphinxstylestrong{debugging} :: {[}in{]} If present and true, this module has debugging parameters.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_version\_plain() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_version\_plain()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_version_plain}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_version\_plain}}}{\emph{modulename}, \emph{version}}{}
Log the version of a module to a log file and/or stdout.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} Name of calling module

\item {} 
\sphinxstylestrong{version} :: {[}in{]} Version string of module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_int() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_int()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_int}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
Log the name and value of an integer model parameter in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the module using this parameter

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_int}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_int\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_int\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_int\_array}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
Log the name and values of an array of integer model parameter in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the module using this parameter

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_int\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_real() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_real()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_real}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{debuggingParam}, \emph{like\_default}}{}
Log the name and value of a real model parameter in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::left\_real}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_real\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_real\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_real\_array}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{debuggingParam}, \emph{like\_default}}{}
Log the name and values of an array of real model parameter in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_reals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::left\_reals}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_real\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_logical() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_logical()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_logical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_logical}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
Log the name and value of a logical model parameter in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_logical}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_char() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_char()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_char}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{layoutParam}, \emph{debuggingParam}, \emph{like\_default}}{}
Log the name and value of a character string model parameter in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_char\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{log\_param\_time() (fortran subroutine in module mom\_file\_parser)@\spxentry{log\_param\_time()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{log\_param\_time}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{timeunit}, \emph{layoutParam}, \emph{debuggingParam}, \emph{log\_date}, \emph{like\_default}}{}
This subroutine writes the value of a time\sphinxhyphen{}type parameter to a log file, along with its name and the module it came from.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the parameter to log

\item {} 
\sphinxstylestrong{value} :: {[}in{]} The value of the parameter to log

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{timeunit} :: {[}in{]} The number of seconds in a time unit for real\sphinxhyphen{}number output.

\item {} 
\sphinxstylestrong{log\_date} :: {[}in{]} If true, log the time\_type in date format. If missing the default is false.

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{like\_default} :: {[}in{]} If present and true, log this parameter as though it has the default value, even if there is no default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/convert_date_to_string}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_date\_to\_string}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convert\_date\_to\_string() (fortran function in module mom\_file\_parser)@\spxentry{convert\_date\_to\_string()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/convert_date_to_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{convert\_date\_to\_string}}}{\emph{date}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=40)}\sphinxstyleemphasis{{]}}}
This function converts a date into a string, valid with ticks and for dates up to year 99,999,999.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{date} :: {[}in{]} The date to be translated into a string.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: A date string in a format like YYYY\sphinxhyphen{}MM\sphinxhyphen{}DD HH:MM:SS.sss

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_int() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_int()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_int}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{static\_value}, \emph{layoutParam}, \emph{debuggingParam}}{}
This subroutine reads the value of an integer model parameter from a parameter file and logs it in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_int}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_int\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_int\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_int_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_int\_array}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{static\_value}, \emph{layoutParam}, \emph{debuggingParam}}{}
This subroutine reads the values of an array of integer model parameters from a parameter file and logs them in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be reset from the parameter file

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_int\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_int_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_int\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_real() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_real()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_real}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{static\_value}, \emph{debuggingParam}, \emph{scale}, \emph{unscaled}}{}
This subroutine reads the value of a real model parameter from a parameter file and logs it in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the parameter is multiplied by before it is returned.

\item {} 
\sphinxstylestrong{unscaled} :: {[}out{]} The value of the parameter that would be returned without any multiplication by a scaling factor.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_real\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_real\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_real_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_real\_array}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{debuggingParam}, \emph{static\_value}, \emph{scale}, \emph{unscaled}}{}
This subroutine reads the values of an array of real model parameters from a parameter file and logs them in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the parameter is multiplied by before it is returned.

\item {} 
\sphinxstylestrong{unscaled} :: {[}out{]} The value of the parameter that would be returned without any multiplication by a scaling factor.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_real\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_char() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_char()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_char}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{static\_value}, \emph{layoutParam}, \emph{debuggingParam}}{}
This subroutine reads the value of a character string model parameter from a parameter file and logs it in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_char\_array() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_char\_array()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_char_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_char\_array}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{static\_value}}{}
This subroutine reads the values of an array of character string model parameters from a parameter file and logs them in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_char_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_char\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_logical() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_logical()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_logical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_logical}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{static\_value}, \emph{layoutParam}, \emph{debuggingParam}}{}
This subroutine reads the value of a logical model parameter from a parameter file and logs it in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_logical}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_param\_time() (fortran subroutine in module mom\_file\_parser)@\spxentry{get\_param\_time()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_param_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{get\_param\_time}}}{\emph{CS}, \emph{modulename}, \emph{varname}, \emph{value}, \emph{desc}, \emph{units}, \emph{default}, \emph{fail\_if\_missing}, \emph{do\_not\_read}, \emph{do\_not\_log}, \emph{timeunit}, \emph{static\_value}, \emph{layoutParam}, \emph{debuggingParam}, \emph{log\_as\_date}}{}
This subroutine reads the value of a time\sphinxhyphen{}type model parameter from a parameter file and logs it in documentation files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{modulename} :: {[}in{]} The name of the calling module

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The case\sphinxhyphen{}sensitive name of the parameter to read

\item {} 
\sphinxstylestrong{value} :: {[}inout{]} The value of the parameter that may be read from the parameter file and logged

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of this variable; if not present, this parameter is not written to a doc file

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this parameter

\item {} 
\sphinxstylestrong{default} :: {[}in{]} The default value of the parameter

\item {} 
\sphinxstylestrong{static\_value} :: {[}in{]} If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.

\item {} 
\sphinxstylestrong{fail\_if\_missing} :: {[}in{]} If present and true, a fatal error occurs if this variable is not found in the parameter file

\item {} 
\sphinxstylestrong{do\_not\_read} :: {[}in{]} If present and true, do not read a value for this parameter, although it might be logged.

\item {} 
\sphinxstylestrong{do\_not\_log} :: {[}in{]} If present and true, do not log this parameter to the documentation files

\item {} 
\sphinxstylestrong{timeunit} :: {[}in{]} The number of seconds in a time unit for real\sphinxhyphen{}number input to be translated to a time.

\item {} 
\sphinxstylestrong{layoutparam} :: {[}in{]} If present and true, this parameter is logged in the layout parameter file

\item {} 
\sphinxstylestrong{debuggingparam} :: {[}in{]} If present and true, this parameter is logged in the debugging parameter file

\item {} 
\sphinxstylestrong{log\_as\_date} :: {[}in{]} If true, log the time\_type in date format. The default is false.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{log\_param\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_param\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{clearparameterblock() (fortran subroutine in module mom\_file\_parser)@\spxentry{clearparameterblock()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/clearparameterblock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{clearparameterblock}}}{\emph{CS}}{}
Resets the parameter block name to blank.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{openparameterblock() (fortran subroutine in module mom\_file\_parser)@\spxentry{openparameterblock()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{openparameterblock}}}{\emph{CS}, \emph{blockName}, \emph{desc}}{}
Tags blockName onto the end of the active parameter block name.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{blockname} :: {[}in{]} The name of a parameter block being added

\item {} 
\sphinxstylestrong{desc} :: {[}in{]} A description of the parameter block being added

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_openblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_openblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/pushblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pushblocklevel}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/bcz_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{baroclinic\_zone\_initialization::bcz\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{closeparameterblock() (fortran subroutine in module mom\_file\_parser)@\spxentry{closeparameterblock()}\spxextra{fortran subroutine in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{closeparameterblock}}}{\emph{CS}}{}
Remove the lowest level of recursion from the active block name.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} The control structure for the file\_parser module, it is also a structure to parse for run\sphinxhyphen{}time parameters

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_document:f/mom_document/doc_closeblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_document::doc\_closeblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/popblocklevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{popblocklevel}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/bcz_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{baroclinic\_zone\_initialization::bcz\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pushblocklevel() (fortran function in module mom\_file\_parser)@\spxentry{pushblocklevel()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/pushblocklevel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{pushblocklevel}}}{\emph{oldblockName}, \emph{newBlockName}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(oldblockname)+40)}\sphinxstyleemphasis{{]}}}
Extends block name (deeper level of parameter block)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{oldblockname} :: {[}in{]} A sequence of hierarchical parameter block names

\item {} 
\sphinxstylestrong{newblockname} :: {[}in{]} A new block name to add to the end of the sequence

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/openparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{openparameterblock}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{popblocklevel() (fortran function in module mom\_file\_parser)@\spxentry{popblocklevel()}\spxextra{fortran function in module mom\_file\_parser}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/popblocklevel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_file\_parser/}}\sphinxbfcode{\sphinxupquote{popblocklevel}}}{\emph{oldblockName}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(oldblockname)+40)}\sphinxstyleemphasis{{]}}}
Truncates block name (shallower level of parameter block)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{oldblockname} :: {[}in{]} A sequence of hierarchical parameter block names

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/closeparameterblock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{closeparameterblock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/get_variable_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_variable\_line}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_fixed\_initialization module reference}
\label{\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization}}\label{\detokenize{api/generated/modules/mom_fixed_initialization:mom-fixed-initialization-module-reference}}\label{\detokenize{api/generated/modules/mom_fixed_initialization::doc}}\index{mom\_fixed\_initialization (module)@\spxentry{mom\_fixed\_initialization}\spxextra{module}|spxpagem}
Initializes fixed aspects of the model, such as horizontal grid metrics, topography and Coriolis.

{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:detamom-fixed-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_fixed_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_fixed()}}}}}
&
MOM\_initialize\_fixed sets up time\sphinxhyphen{}invariant quantities related to MOM6’s horizontal grid, bathymetry, and the Coriolis parameter.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_topography()}}}}}
&
MOM\_initialize\_topography makes the appropriate call to set up the bathymetry.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_fixed_initialization:detailed-description}}\label{\detokenize{api/generated/modules/mom_fixed_initialization:detamom-fixed-initialization}}
Initializes fixed aspects of the model, such as horizontal grid metrics, topography and Coriolis.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_fixed_initialization:function-subroutine-documentation}}\index{mom\_initialize\_fixed() (fortran subroutine in module mom\_fixed\_initialization)@\spxentry{mom\_initialize\_fixed()}\spxextra{fortran subroutine in module mom\_fixed\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_fixed\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_initialize\_fixed}}}{\emph{G}, \emph{US}, \emph{OBC}, \emph{PF}, \emph{write\_geom}, \emph{output\_dir}}{}
MOM\_initialize\_fixed sets up time\sphinxhyphen{}invariant quantities related to MOM6’s horizontal grid, bathymetry, and the Coriolis parameter.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure.

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{write\_geom} :: {[}in{]} If true, write grid geometry files.

\item {} 
\sphinxstylestrong{output\_dir} :: {[}in{]} The directory into which to write files.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/compute_global_grid_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::compute\_global\_grid\_integrals}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/initialize_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::initialize\_masks}}}}} {\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_impose_land_mask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_impose\_land\_mask}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/write_ocean_geometry_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::write\_ocean\_geometry\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_initialize\_topography() (fortran subroutine in module mom\_fixed\_initialization)@\spxentry{mom\_initialize\_topography()}\spxextra{fortran subroutine in module mom\_fixed\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_fixed\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_initialize\_topography}}}{\emph{D}, \emph{max\_depth}, \emph{G}, \emph{PF}, \emph{US}}{}
MOM\_initialize\_topography makes the appropriate call to set up the bathymetry. At this point the topography is in units of {[}m{]}, but this can be changed later.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth {[}m{]}

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}out{]} Maximum depth of model {[}m{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder::basin\_builder\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialization::benchmark\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialization::dense\_water\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialization::dumbbell\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/kelvin_initialization:f/kelvin_initialization/kelvin_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kelvin\_initialization::kelvin\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialization::neverworld\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialization::phillips\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialization::seamount\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_initialization::shelfwave\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sloshing\_initialization::sloshing\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_initialize\_topography}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_fixed}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_forcing\_type module reference}
\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type}}\label{\detokenize{api/generated/modules/mom_forcing_type:mom-forcing-type-module-reference}}\label{\detokenize{api/generated/modules/mom_forcing_type::doc}}\index{mom\_forcing\_type (module)@\spxentry{mom\_forcing\_type}\spxextra{module}|spxpagem}
This module implements boundary forcing for MOM6.

{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:detamom-forcing-type}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_forcing_type:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing}}}}}
&
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_diags}}}}}
&
Structure that defines the id handles for the forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing}}}}}
&
Structure that contains pointers to the mechanical forcing at the surface used to drive the liquid ocean simulated by MOM.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_forcing_type:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractfluxes1d()}}}}}
&
This subroutine extracts fluxes from the surface fluxes type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractfluxes2d()}}}}}
&
2d wrapper for 1d extract fluxes from surface fluxes type. This subroutine extracts fluxes from the surface fluxes type. It multiplies the fluxes by dt, so that the result is an accumulation of the fluxes over a time step.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculatebuoyancyflux1d()}}}}}
&
This routine calculates surface buoyancy flux by adding up the heat, FW \& salt fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculatebuoyancyflux2d()}}}}}
&
Calculates surface buoyancy flux by adding up the heat, FW and salt fluxes, for 2d arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mom_forcing_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_chksum()}}}}}
&
Write out chksums for thermodynamic fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mom_mech_forcing_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mech\_forcing\_chksum()}}}}}
&
Write out chksums for the driving mechanical forces.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_singlepointprint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing\_singlepointprint()}}}}}
&
Write out values of the mechanical forcing arrays at the i,j location.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_singlepointprint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_singlepointprint()}}}}}
&
Write out values of the fluxes arrays at the i,j location.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/register_forcing_type_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_forcing\_type\_diags()}}}}}
&
Register members of the forcing type for diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_accumulate()}}}}}
&
Accumulate the forcing over time steps, taking input from a mechanical forcing type and a temporary forcing\sphinxhyphen{}flux type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/fluxes_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_accumulate()}}}}}
&
Accumulate the thermodynamic fluxes over time steps.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/copy_common_forcing_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_common\_forcing\_fields()}}}}}
&
This subroutine copies the computational domains of common forcing fields from a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type to a (thermodynamic) forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/set_derived_forcing_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_derived\_forcing\_fields()}}}}}
&
This subroutine calculates certain derived forcing fields based on information from a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type and stores them in a (thermodynamic) forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/set_net_mass_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_net\_mass\_forcing()}}}}}
&
This subroutine determines the net mass source to the ocean from a (thermodynamic) forcing type and stores it in a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_net_mass_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_net\_mass\_forcing()}}}}}
&
This subroutine calculates determines the net mass source to the ocean from a (thermodynamic) forcing type and stores it in a provided array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/copy_back_forcing_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_back\_forcing\_fields()}}}}}
&
This subroutine copies the computational domains of common forcing fields from a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type to a (thermodynamic) forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing\_diags()}}}}}
&
Offer mechanical forcing fields for diagnostics for those fields registered as part of register\_forcing\_type\_diags.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_diagnostics()}}}}}
&
Offer buoyancy forcing fields for diagnostics for those fields registered as part of register\_forcing\_type\_diags.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_forcing\_by\_group()}}}}}
&
Conditionally allocate fields within the forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_forcing\_by\_ref()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_mech_forcing_by_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_mech\_forcing\_by\_group()}}}}}
&
Conditionally allocate fields within the mechanical forcing type using control flags.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_mech_forcing_from_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_mech\_forcing\_from\_ref()}}}}}
&
Conditionally allocate fields within the mechanical forcing type based on a reference forcing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_forcing_groups}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_forcing\_groups()}}}}}
&
Return flags indicating which groups of forcings are allocated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_mech_forcing_groups}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_mech\_forcing\_groups()}}}}}
&
Return flags indicating which groups of mechanical forcings are allocated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/myalloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{myalloc()}}}}}
&
Allocates and zeroes\sphinxhyphen{}out array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/deallocate_forcing_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_forcing\_type()}}}}}
&
Deallocate the forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/deallocate_mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_mech\_forcing()}}}}}
&
Deallocate the mechanical forcing type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_forcing()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_mech\_forcing()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_forcing_type:detailed-description}}\label{\detokenize{api/generated/modules/mom_forcing_type:detamom-forcing-type}}

\paragraph{Boundary fluxes}
\label{\detokenize{api/generated/modules/mom_forcing_type:boundary-fluxes}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1section-fluxes}}
The ocean is a forced\sphinxhyphen{}dissipative system. Forcing occurs at the boundaries, and this module mediates the various forcing terms from momentum, heat, salt, and mass. Boundary fluxes from other tracers are treated by coupling to biogeochemical models. We here present elements of how MOM6 assumes boundary fluxes are passed into the ocean.

Note that all fluxes are positive into the ocean. For surface boundary fluxes, that means fluxes are positive downward. For example, a positive shortwave flux warms the ocean.


\subparagraph{Surface boundary momentum fluxes}
\label{\detokenize{api/generated/modules/mom_forcing_type:surface-boundary-momentum-fluxes}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1subsection-momentum-fluxes}}
The ocean surface exchanges momentum with the overlying atmosphere, sea ice, and land ice. The momentum is exchanged as a horizontal stress (Newtons per squared meter: N/m2) imposed on the upper ocean grid cell.


\subparagraph{Surface boundary mass fluxes}
\label{\detokenize{api/generated/modules/mom_forcing_type:surface-boundary-mass-fluxes}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1subsection-mass-fluxes}}
The ocean gains or loses mass through evaporation, precipitation, sea ice melt/form, and and river runoff. Positive mass fluxes add mass to the liquid ocean. The boundary mass flux units are (kilogram per square meter per sec: kg/(m2/sec)).
\begin{itemize}
\item {} 
Evaporation field can in fact represent a mass loss (evaporation) or mass gain (condensation in foggy areas).

\item {} 
sea ice formation leads to mass moving from the liquid ocean to the ice model, and melt adds liquid to the ocean.

\item {} 
Precipitation can be liquid or frozen (snow). Furthermore, in some versions of the GFDL coupler, precipitation can be negative. The reason is that the ice model combines precipitation with ice melt and ice formation. This limitation of the ice model diagnostics should be overcome future versions.

\item {} 
River runoff can be liquid or frozen. Frozen runoff is often associated with calving land\sphinxhyphen{}ice and/or ice bergs.

\end{itemize}


\subparagraph{Surface boundary salt fluxes}
\label{\detokenize{api/generated/modules/mom_forcing_type:surface-boundary-salt-fluxes}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1subsection-salt-fluxes}}
Over most of the ocean, there is no exchange of salt with the atmosphere. However, the liquid ocean exchanges salt with sea ice. When ice forms, it extracts salt from ice pockets and discharges the salt into the liquid ocean. The salt concentration of sea ice is therefore much lower (around 5ppt) than liquid seawater (around 30\sphinxhyphen{}35ppt in high latitudes).

For ocean\sphinxhyphen{}ice models run with a prescribed atmosphere, such as in the CORE/OMMIP simulations, it is necessary to employ a surface restoring term to the k=1 salinity equation, thus imposing a salt flux onto the ocean even outside of sea ice regimes. This salt flux is non\sphinxhyphen{}physical, and represents a limitation of the ocean\sphinxhyphen{}ice models run without an interactive atmosphere. Sometimes this salt flux is converted to an implied fresh water flux. However, doing so generally leads to changes in the sea level, unless a global normalization is provided to zero\sphinxhyphen{}out the net water flux. As a complement, for models with a restoring salt flux, one may choose to zero\sphinxhyphen{}out the net salt entering the ocean. There are pros/cons of each approach.


\subparagraph{Surface boundary heat fluxes}
\label{\detokenize{api/generated/modules/mom_forcing_type:surface-boundary-heat-fluxes}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1subsection-heat-fluxes}}
There are many terms that contribute to boundary\sphinxhyphen{}related heating of the k=1 surface model grid cell. We here outline details of this heat, with each term having units W/m2.

The net flux of heat crossing ocean surface is stored in the diagnostic array “hfds”. This array is computed as
\begin{equation*}
\begin{split}\mbox{hfds = shortwave + longwave + latent + sensible + mass transfer + frazil + restore + flux adjustments}\end{split}
\end{equation*}\begin{itemize}
\item {} 
shortwave (SW) = shortwave radiation (always warms ocean)

\item {} 
longwave (LW) = longwave radiation (generally cools ocean)

\item {} 
latent (LAT) = turbulent latent heat loss due to evaporation (liquid to vapor) or melt (snow to liquid); generally cools the ocean

\item {} 
sensible (SENS) = turbulent heat transfer due to differences in air\sphinxhyphen{}sea or ice\sphinxhyphen{}sea temperature

\item {} 
mass transfer (MASS) = heat transfer due to heat content of mass (e.g., E\sphinxhyphen{}P+R) transferred across ocean surface; computed relative to 0 Celsius

\item {} 
frazil (FRAZ) = heat transferred to form frazil sea ice (positive heating of liquid ocean)

\item {} 
restore (RES) = heat from surface damping sometimes imposed in non\sphinxhyphen{}coupled model simulations .

\item {} 
restore (flux adjustments) = heat from surface flux adjustment.

\end{itemize}


\subparagraph{Treatment of shortwave}
\label{\detokenize{api/generated/modules/mom_forcing_type:treatment-of-shortwave}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1subsubsection-sw}}
The shortwave field itself is split into two pieces:
\begin{itemize}
\item {} 
shortwave = penetrative SW + non\sphinxhyphen{}penetrative SW

\item {} 
non\sphinxhyphen{}penetrative = non\sphinxhyphen{}downwelling shortwave; portion of SW totally absorbed in the k=1 cell. The non\sphinxhyphen{}penetrative SW is combined with LW+LAT+SENS+seaice\_melt\_heat in net\_heat inside routine extractFluxes1d. Notably, for many cases, non\sphinxhyphen{}penetrative SW = 0.

\item {} 
penetrative = that portion of shortwave penetrating below a tiny surface layer. This is the downwelling shortwave. Penetrative SW participates in the penetrative SW heating of k=1,nz cells, with the amount of penetration dependent on optical properties.

\end{itemize}


\subparagraph{Convergence of heat into the k=1 cell}
\label{\detokenize{api/generated/modules/mom_forcing_type:convergence-of-heat-into-the-k-1-cell}}\label{\detokenize{api/generated/modules/mom_forcing_type:namespacemom-forcing-type-1subsubsection-bdy-heating}}
The convergence of boundary\sphinxhyphen{}related heat into surface grid cell is given by the difference in the net heat entering the top of the k=1 cell and the penetrative SW leaving the bottom of the cell.

\begin{eqnarray*} Q(k=1) &=& \mbox{hfds} - \mbox{pen}\_\mbox{SW(leaving bottom of k=1)} \\ &=& \mbox{nonpen}\_\mbox{SW} + (\mbox{pen}\_\mbox{SW(enter k=1)}-\mbox{pen}\_\mbox{SW(leave k=1)}) + \mbox{LW+LAT+SENS+MASS+FRAZ+RES} \\ &=& \mbox{nonpen}\_\mbox{SW}+ \mbox{LW+LAT+SENS+MASS+FRAZ+RES} + [\mbox{pen}\_\mbox{SW(enter k=1)} - \mbox{pen}\_\mbox{SW(leave k=1)}] \end{eqnarray*}

The convergence of the penetrative shortwave flux is given by \(\mbox{pen}\_\mbox{SW (enter k)}-\mbox{pen}\_\mbox{SW (leave k)}\) . This term appears for all cells k=1,nz. It is diagnosed as “rsdoabsorb” inside module MOM6/src/parameterizations/vertical/MOM\_diabatic\_aux.F90


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_forcing_type:type-documentation}}\index{forcing (fortran type in module mom\_forcing\_type)@\spxentry{forcing}\spxextra{fortran type in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{forcing}}}
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by MOM.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: surface friction velocity scale {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_gustless}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: surface friction velocity scale without any

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{buoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: buoyancy flux {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: shortwave {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_vis\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: visible, direct shortwave {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_vis\_dif}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: visible, diffuse shortwave {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_nir\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: near\sphinxhyphen{}IR, direct shortwave {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_nir\_dif}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: near\sphinxhyphen{}IR, diffuse shortwave {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: longwave {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} (typically negative)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: latent {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} (typically \textless{} 0)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sens}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: sensible {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} (typically negative)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{seaice\_melt\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: sea ice and snow melt or formation {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} (typically negative)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_added}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: additional heat flux from SST restoring or flux adjustments {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_evap\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: latent {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} from evaporating liquid water (typically \textless{} 0)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_fprec\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: latent {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} from melting fprec (typically \textless{} 0)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_frunoff\_diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: latent {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} from melting frunoff (calving) (typically \textless{} 0)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: (\sphinxhyphen{}1)*fresh water flux evaporated out of the ocean {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: precipitating liquid water into the ocean {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: precipitating frozen water into the ocean {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: virtual liquid precip associated w/ SSS restoring {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lrunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: liquid river runoff entering ocean {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frozen river runoff (calving) entering ocean {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{seaice\_melt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: snow/seaice melt (positive) or formation (negative) {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netmassin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Sum of water mass flux out of the ocean {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netmassout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Net water mass flux into of the ocean {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netsalt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Net salt entering the ocean {[}kgSalt m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_cond}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with condensating water {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with liquid \textgreater{}0 precip {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_icemelt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with snow and seaice

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with frozen precip {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_vprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with virtual \textgreater{}0 precip {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_lrunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with liquid runoff {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with frozen runoff {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_massout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with mass leaving ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_content\_massin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content associated with mass entering ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: net salt flux into the ocean {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kgSalt m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_flux\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: salt flux provided to the ocean from coupler {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kgSalt m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_flux\_added}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: additional salt flux from restoring or flux adjustment before adjustment

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_full}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pressure at the top ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. if there is sea\sphinxhyphen{}ice, then p\_surf\_flux is at ice\sphinxhyphen{}ocean interface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pressure at the top ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} as used to drive the ocean model. If p\_surf is limited, p\_surf may be smaller than p\_surf\_full, otherwise they are the same.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_ssh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pressure at the top ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} that is used in corrections to the sea surface height field that is passed back to the calling routines. p\_surf\_SSH may point to p\_surf or to p\_surf\_full.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{accumulate\_p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the surface pressure due to the atmosphere and various types of ice needs to be accumulated, and the surface pressure explicitly reset to zero at the driver level when appropriate.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: tidal energy source driving mixing in bottom boundary layer {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: tidal contribution to bottom ustar {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: iceberg contribution to top ustar {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: area of ocean surface covered by icebergs {[}m2 m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mass\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass of icebergs {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Friction velocity under ice\sphinxhyphen{}shelves {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. as computed by the ocean at the previous time step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frac\_shelf\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Fractional ice shelf coverage of h\sphinxhyphen{}cells, nondimensional from 0 to 1. This is only associated if ice shelves are enabled, and are exactly 0 away from shelves or on land.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iceshelf\_melt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Ice shelf melt rate (positive) or freezing (negative) {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vprecglobaladj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: adjustment to restoring vprec to zero out global net {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{saltfluxglobaladj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: adjustment to restoring salt flux to zero out global net {[}kgSalt m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netfwglobaladj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: adjustment to net fresh water to zero out global net {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vprecglobalscl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: scaling of restoring vprec to zero out global net ( \sphinxhyphen{}1..1 ) {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{saltfluxglobalscl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: scaling of restoring salt flux to zero out global net ( \sphinxhyphen{}1..1 ) {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netfwglobalscl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: scaling of net fresh water to zero out global net ( \sphinxhyphen{}1..1 ) {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fluxes\_used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, all of the heat, salt, and mass fluxes have been applied to the ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_buoy\_accum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amount of time over which the buoyancy fluxes should be applied {[}T \textasciitilde{}\textgreater{} s{]}. If negative, this forcing type variable has not yet been inialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gustless\_accum\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use an incorrect expression in the time average of the gustless wind stress.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: heat capacity of seawater {[}Q degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}. C\_p is is the same value as in thermovar\_ptrs\_type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_fluxes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coupler\_2d\_bc\_type)}\sphinxstyleemphasis{{]}} :: This structure contains arrays of of named fields used for passive tracer fluxes. All arrays in tr\_fluxes use the coupler indexing, which has no halos. This is not a convenient convention, but imposed on MOM6 by the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_msg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of messages issued about excessive SW penetration.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_msg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Maximum number of messages to issue about excessive SW penetration.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{forcing\_diags (fortran type in module mom\_forcing\_type)@\spxentry{forcing\_diags}\spxextra{fortran type in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diags}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{forcing\_diags}}}
Structure that defines the id handles for the forcing type.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_prcme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_evap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_precip}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lrunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_net\_massout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_net\_massin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_massout\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_massin\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_seaice\_melt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_prcme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_evap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_precip}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_vprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lrunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_net\_massout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_net\_massin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_seaice\_melt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_prcme\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_evap\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lprec\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_fprec\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_precip\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vprec\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_net\_heat\_coupler}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_net\_heat\_surface}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sens}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lwlatsens}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sw\_vis}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sw\_nir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lat\_evap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lat\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lat\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_lrunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_cond}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_surfwater}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_vprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_massout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_added}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_massin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hfrainds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hfrunoffds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_seaice\_melt\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_heat\_content\_icemelt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_net\_heat\_coupler}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_net\_heat\_surface}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_sens}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lwlatsens}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lat\_evap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lat\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_lat\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_lrunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_frunoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_cond}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_surfwater}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_vprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_massout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_added}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_massin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_seaice\_melt\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_heat\_content\_icemelt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_net\_heat\_coupler\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_net\_heat\_surface\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sens\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lwlatsens\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sw\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lw\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lat\_ga}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_saltflux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_saltfluxin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_saltfluxadded}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_saltflux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_saltfluxin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_total\_saltfluxadded}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vprecglobaladj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vprecglobalscl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_saltfluxglobaladj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_saltfluxglobalscl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_netfwglobaladj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_netfwglobalscl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_taux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tauy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ustar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_psurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_buoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ustar\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_area\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mass\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ustar\_ice\_cover}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frac\_ice\_cover}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Forcing diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_clock\_forcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: CPU clock id.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mech\_forcing (fortran type in module mom\_forcing\_type)@\spxentry{mech\_forcing}\spxextra{fortran type in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{mech\_forcing}}}
Structure that contains pointers to the mechanical forcing at the surface used to drive the liquid ocean simulated by MOM. Data in this type is allocated in the module \sphinxcode{\sphinxupquote{MOM\_surface\_forcing.F90}}
, of which there are three versions: solo, coupled, and ice\sphinxhyphen{}shelf.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{taux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: zonal wind stress {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tauy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: meridional wind stress {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: surface friction velocity scale {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{net\_mass\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The net mass source to the ocean {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_full}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pressure at the top ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. if there is sea\sphinxhyphen{}ice, then p\_surf\_flux is at ice\sphinxhyphen{}ocean interface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pressure at the top ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} as used to drive the ocean model. If p\_surf is limited, p\_surf may be smaller than p\_surf\_full, otherwise they are the same.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf\_ssh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pressure at the top ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} that is used in corrections to the sea surface height field that is passed back to the calling routines. p\_surf\_SSH may point to p\_surf or to p\_surf\_full.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: fractional area of ocean surface covered by icebergs {[}m2 m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mass\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass of icebergs per unit ocean area {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frac\_shelf\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Fractional ice shelf coverage of u\sphinxhyphen{}cells, nondimensional from 0 to 1 {[}nondim{]}. This is only associated if ice shelves are enabled, and is exactly 0 away from shelves or on land.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frac\_shelf\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Fractional ice shelf coverage of v\sphinxhyphen{}cells, nondimensional from 0 to 1 {[}nondim{]}. This is only associated if ice shelves are enabled, and is exactly 0 away from shelves or on land.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rigidity\_ice\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Depth\sphinxhyphen{}integrated lateral viscosity of ice shelves or sea ice at.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rigidity\_ice\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Depth\sphinxhyphen{}integrated lateral viscosity of ice shelves or sea ice at.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_force\_accum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amount of time over which the mechanical forcing fluxes have been averaged {[}s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{net\_mass\_src\_set}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, an estimate of net\_mass\_src has been provided.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{accumulate\_p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the surface pressure due to the atmosphere and various types of ice needs to be accumulated, and the surface pressure explicitly reset to zero at the driver level when appropriate.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{accumulate\_rigidity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the rigidity due to various types of ice needs to be accumulated, and the rigidity explicitly reset to zero at the driver level when appropriate.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: This indicates whether the appropriate arrays have been initialized.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_forcing_type:function-subroutine-documentation}}\index{extractfluxes1d() (fortran subroutine in module mom\_forcing\_type)@\spxentry{extractfluxes1d()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{extractfluxes1d}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{fluxes}, \emph{optics}, \emph{nsw}, \emph{j}, \emph{dt}, \emph{FluxRescaleDepth}, \emph{useRiverHeatContent}, \emph{useCalvingHeatContent}, \emph{h}, \emph{T}, \emph{netMassInOut}, \emph{netMassOut}, \emph{net\_heat}, \emph{net\_salt}, \emph{pen\_SW\_bnd}, \emph{tv}, \emph{aggregate\_FW}, \emph{nonpenSW}, \emph{netmassInOut\_rate}, \emph{net\_Heat\_Rate}, \emph{net\_salt\_rate}, \emph{pen\_sw\_bnd\_Rate}, \emph{skip\_diags}}{}
This subroutine extracts fluxes from the surface fluxes type. It works on a j\sphinxhyphen{}row for optimization purposes. The 2d (i,j) wrapper is the next subroutine below. This routine multiplies fluxes by dt, so that the result is an accumulation of fluxes over a time step.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} structure containing pointers to possible forcing fields. NULL unused fields.

\item {} 
\sphinxstylestrong{optics} :: pointer to optics

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} number of bands of penetrating SW

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time step for these fluxes {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{fluxrescaledepth} :: {[}in{]} min ocean depth before fluxes are scaled away {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{useriverheatcontent} :: {[}in{]} logical for river heat content

\item {} 
\sphinxstylestrong{usecalvingheatcontent} :: {[}in{]} logical for calving heat content

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} layer temperatures {[}degC{]}

\item {} 
\sphinxstylestrong{netmassinout} :: {[}out{]} net mass flux (non\sphinxhyphen{}Bouss) or volume flux (if Bouss) of water in/out of ocean over a time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{netmassout} :: {[}out{]} net mass flux (non\sphinxhyphen{}Bouss) or volume flux (if Bouss) of water leaving ocean surface over a time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. netMassOut \textless{} 0 means mass leaves ocean.

\item {} 
\sphinxstylestrong{net\_heat} :: {[}out{]} net heat at the surface accumulated over a time step for coupler + restoring. Exclude two terms from net\_heat: (1) downwelling (penetrative) SW, (2) evaporation heat content, (since do not yet know evap temperature). {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{net\_salt} :: {[}out{]} surface salt flux into the ocean accumulated over a time step {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{pen\_sw\_bnd} :: {[}out{]} penetrating SW flux, split into bands. {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]} and array size nsw x G isd: G ied, where nsw=number of SW bands in pen\_SW\_bnd. This heat flux is not part of net\_heat.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} structure containing pointers to available thermodynamic fields. Used to keep track of the heat flux associated with net mass fluxes into the ocean.

\item {} 
\sphinxstylestrong{aggregate\_fw} :: {[}in{]} For determining how to aggregate forcing.

\item {} 
\sphinxstylestrong{nonpensw} :: {[}out{]} Non\sphinxhyphen{}penetrating SW used in net\_heat

\item {} 
\sphinxstylestrong{net\_heat\_rate} :: {[}out{]} Rate of net surface heating

\item {} 
\sphinxstylestrong{net\_salt\_rate} :: {[}out{]} Surface salt flux into the ocean

\item {} 
\sphinxstylestrong{netmassinout\_rate} :: {[}out{]} Rate of net mass flux into the ocean

\item {} 
\sphinxstylestrong{pen\_sw\_bnd\_rate} :: {[}out{]} Rate of penetrative shortwave heating

\item {} 
\sphinxstylestrong{skip\_diags} :: {[}in{]} If present and true, skip calculating diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/extract_optics_slice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::extract\_optics\_slice}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::optics\_nbands}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/applyboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::applyboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculatebuoyancyflux1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractfluxes2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extractfluxes2d() (fortran subroutine in module mom\_forcing\_type)@\spxentry{extractfluxes2d()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{extractfluxes2d}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{fluxes}, \emph{optics}, \emph{nsw}, \emph{dt}, \emph{FluxRescaleDepth}, \emph{useRiverHeatContent}, \emph{useCalvingHeatContent}, \emph{h}, \emph{T}, \emph{netMassInOut}, \emph{netMassOut}, \emph{net\_heat}, \emph{Net\_salt}, \emph{Pen\_SW\_bnd}, \emph{tv}, \emph{aggregate\_FW}}{}
2d wrapper for 1d extract fluxes from surface fluxes type. This subroutine extracts fluxes from the surface fluxes type. It multiplies the fluxes by dt, so that the result is an accumulation of the fluxes over a time step.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} structure containing pointers to forcing.

\item {} 
\sphinxstylestrong{optics} :: pointer to optics

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} number of bands of penetrating SW

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time step for these fluxes {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{fluxrescaledepth} :: {[}in{]} min ocean depth before fluxes are scaled away {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{useriverheatcontent} :: {[}in{]} logical for river heat content

\item {} 
\sphinxstylestrong{usecalvingheatcontent} :: {[}in{]} logical for calving heat content

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} layer temperatures {[}degC{]}

\item {} 
\sphinxstylestrong{netmassinout} :: {[}out{]} net mass flux (non\sphinxhyphen{}Bouss) or volume flux (if Bouss) of water in/out of ocean over a time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{netmassout} :: {[}out{]} net mass flux (non\sphinxhyphen{}Bouss) or volume flux (if Bouss) of water leaving ocean surface over a time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{net\_heat} :: {[}out{]} net heat at the surface accumulated over a time step associated with coupler + restore. Exclude two terms from net\_heat: (1) downwelling (penetrative) SW, (2) evaporation heat content, (since do not yet know temperature of evap). {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{net\_salt} :: {[}out{]} surface salt flux into the ocean accumulated over a time step {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{pen\_sw\_bnd} :: {[}out{]} penetrating SW flux, by frequency band {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]} with array size nsw x G isd: G ied, where nsw=number of SW bands in pen\_SW\_bnd. This heat flux is not in net\_heat.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} structure containing pointers to available thermodynamic fields. Here it is used to keep track of the heat flux associated with net mass fluxes into the ocean.

\item {} 
\sphinxstylestrong{aggregate\_fw} :: {[}in{]} For determining how to aggregate the forcing.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractfluxes1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculatebuoyancyflux1d() (fortran subroutine in module mom\_forcing\_type)@\spxentry{calculatebuoyancyflux1d()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{calculatebuoyancyflux1d}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{fluxes}, \emph{optics}, \emph{nsw}, \emph{h}, \emph{Temp}, \emph{Salt}, \emph{tv}, \emph{j}, \emph{buoyancyFlux}, \emph{netHeatMinusSW}, \emph{netSalt}, \emph{skip\_diags}}{}
This routine calculates surface buoyancy flux by adding up the heat, FW \& salt fluxes. These are actual fluxes, with units of stuff per time. Setting dt=1 in the call to extractFluxes routine allows us to get “stuf per time” rather than the time integrated fluxes needed in other routines that call extractFluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} surface fluxes

\item {} 
\sphinxstylestrong{optics} :: penetrating SW optics

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} The number of frequency bands of penetrating shortwave radiation

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp} :: {[}in{]} prognostic temp {[}degC{]}

\item {} 
\sphinxstylestrong{salt} :: {[}in{]} salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} thermodynamics type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}row to work on

\item {} 
\sphinxstylestrong{buoyancyflux} :: {[}inout{]} buoyancy fluxes {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{netheatminussw} :: {[}inout{]} surf Heat flux {[}degC H s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} degC m s\sphinxhyphen{}1 or degC kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{netsalt} :: {[}inout{]} surf salt flux {[}ppt H s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} ppt m s\sphinxhyphen{}1 or ppt kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{skip\_diags} :: {[}in{]} If present and true, skip calculating diagnostics inside extractFluxes1d()

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractfluxes1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::optics\_nbands}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/sumswoverbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::sumswoverbands}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculatebuoyancyflux2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculatebuoyancyflux2d() (fortran subroutine in module mom\_forcing\_type)@\spxentry{calculatebuoyancyflux2d()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{calculatebuoyancyflux2d}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{fluxes}, \emph{optics}, \emph{h}, \emph{Temp}, \emph{Salt}, \emph{tv}, \emph{buoyancyFlux}, \emph{netHeatMinusSW}, \emph{netSalt}, \emph{skip\_diags}}{}
Calculates surface buoyancy flux by adding up the heat, FW and salt fluxes, for 2d arrays. This is a wrapper for calculateBuoyancyFlux1d.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} surface fluxes

\item {} 
\sphinxstylestrong{optics} :: SW ocean optics

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp} :: {[}in{]} temperature {[}degC{]}

\item {} 
\sphinxstylestrong{salt} :: {[}in{]} salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} thermodynamics type

\item {} 
\sphinxstylestrong{buoyancyflux} :: {[}inout{]} buoyancy fluxes {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{netheatminussw} :: {[}inout{]} surf temp flux {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{netsalt} :: {[}inout{]} surf salt flux {[}ppt H \textasciitilde{}\textgreater{} ppt m or ppt kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{skip\_diags} :: {[}in{]} If present and true, skip calculating diagnostics inside extractFluxes1d()

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculatebuoyancyflux1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::optics\_nbands}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_forcing\_chksum() (fortran subroutine in module mom\_forcing\_type)@\spxentry{mom\_forcing\_chksum()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mom_forcing_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{mom\_forcing\_chksum}}}{\emph{mesg}, \emph{fluxes}, \emph{G}, \emph{US}, \emph{haloshift}}{}
Write out chksums for thermodynamic fluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} message

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} shift in halo

\end{itemize}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_mech\_forcing\_chksum() (fortran subroutine in module mom\_forcing\_type)@\spxentry{mom\_mech\_forcing\_chksum()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mom_mech_forcing_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{mom\_mech\_forcing\_chksum}}}{\emph{mesg}, \emph{forces}, \emph{G}, \emph{US}, \emph{haloshift}}{}
Write out chksums for the driving mechanical forces.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} message

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{haloshift} :: {[}in{]} shift in halo

\end{itemize}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mech\_forcing\_singlepointprint() (fortran subroutine in module mom\_forcing\_type)@\spxentry{mech\_forcing\_singlepointprint()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_singlepointprint}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{mech\_forcing\_singlepointprint}}}{\emph{forces}, \emph{G}, \emph{i}, \emph{j}, \emph{mesg}}{}
Write out values of the mechanical forcing arrays at the i,j location. This is a debugging tool.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid type

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Message

\item {} 
\sphinxstylestrong{i} :: {[}in{]} i\sphinxhyphen{}index

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{locmsg}}

\end{description}\end{quote}

\end{fulllineitems}

\index{forcing\_singlepointprint() (fortran subroutine in module mom\_forcing\_type)@\spxentry{forcing\_singlepointprint()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_singlepointprint}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{forcing\_singlepointprint}}}{\emph{fluxes}, \emph{G}, \emph{i}, \emph{j}, \emph{mesg}}{}
Write out values of the fluxes arrays at the i,j location. This is a debugging tool.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid type

\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} Message

\item {} 
\sphinxstylestrong{i} :: {[}in{]} i\sphinxhyphen{}index

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{locmsg}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/applyboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::applyboundaryfluxesinout}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_forcing\_type\_diags() (fortran subroutine in module mom\_forcing\_type)@\spxentry{register\_forcing\_type\_diags()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/register_forcing_type_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{register\_forcing\_type\_diags}}}{\emph{Time}, \emph{diag}, \emph{US}, \emph{use\_temperature}, \emph{handles}, \emph{use\_berg\_fluxes}}{}
Register members of the forcing type for diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} time type

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} diagnostic control type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{use\_temperature} :: {[}in{]} True if T/S are in use

\item {} 
\sphinxstylestrong{handles} :: {[}inout{]} handles for diagnostics

\item {} 
\sphinxstylestrong{use\_berg\_fluxes} :: {[}in{]} If true, allow iceberg flux diagnostics

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{forcing\_accumulate() (fortran subroutine in module mom\_forcing\_type)@\spxentry{forcing\_accumulate()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_accumulate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{forcing\_accumulate}}}{\emph{flux\_tmp}, \emph{forces}, \emph{fluxes}, \emph{G}, \emph{wt2}}{}
Accumulate the forcing over time steps, taking input from a mechanical forcing type and a temporary forcing\sphinxhyphen{}flux type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{flux\_tmp} :: {[}in{]} A temporary structure with current thermodynamic forcing fields

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing time\sphinxhyphen{}averaged thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{wt2} :: {[}out{]} The relative weight of the new fluxes

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/fluxes_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_accumulate}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fluxes\_accumulate() (fortran subroutine in module mom\_forcing\_type)@\spxentry{fluxes\_accumulate()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/fluxes_accumulate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{fluxes\_accumulate}}}{\emph{flux\_tmp}, \emph{fluxes}, \emph{G}, \emph{wt2}, \emph{forces}}{}
Accumulate the thermodynamic fluxes over time steps.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{flux\_tmp} :: {[}in{]} A temporary structure with current thermodynamic forcing fields

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing time\sphinxhyphen{}averaged thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{wt2} :: {[}out{]} The relative weight of the new fluxes

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_accumulate}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{copy\_common\_forcing\_fields() (fortran subroutine in module mom\_forcing\_type)@\spxentry{copy\_common\_forcing\_fields()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/copy_common_forcing_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{copy\_common\_forcing\_fields}}}{\emph{forces}, \emph{fluxes}, \emph{G}, \emph{skip\_pres}}{}
This subroutine copies the computational domains of common forcing fields from a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type to a (thermodynamic) forcing type.
type to a (thermodynamic) forcing type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\item {} 
\sphinxstylestrong{skip\_pres} :: {[}in{]} If present and true, do not copy pressure fields.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_derived\_forcing\_fields() (fortran subroutine in module mom\_forcing\_type)@\spxentry{set\_derived\_forcing\_fields()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/set_derived_forcing_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{set\_derived\_forcing\_fields}}}{\emph{forces}, \emph{fluxes}, \emph{G}, \emph{US}, \emph{Rho0}}{}
This subroutine calculates certain derived forcing fields based on information from a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type and stores them in a (thermodynamic) forcing type.
type and stores them in a (thermodynamic) forcing type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{rho0} :: {[}in{]} A reference density of seawater {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}, as used to calculate ustar.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_net\_mass\_forcing() (fortran subroutine in module mom\_forcing\_type)@\spxentry{set\_net\_mass\_forcing()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/set_net_mass_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{set\_net\_mass\_forcing}}}{\emph{fluxes}, \emph{forces}, \emph{G}, \emph{US}}{}
This subroutine determines the net mass source to the ocean from a (thermodynamic) forcing type and stores it in a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type.
type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean grid type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_net_mass_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_net\_mass\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_net\_mass\_forcing() (fortran subroutine in module mom\_forcing\_type)@\spxentry{get\_net\_mass\_forcing()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_net_mass_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{get\_net\_mass\_forcing}}}{\emph{fluxes}, \emph{G}, \emph{US}, \emph{net\_mass\_src}}{}
This subroutine calculates determines the net mass source to the ocean from a (thermodynamic) forcing type and stores it in a provided array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{net\_mass\_src} :: {[}out{]} The net mass flux of water into the ocean {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/set_net_mass_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_net\_mass\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{copy\_back\_forcing\_fields() (fortran subroutine in module mom\_forcing\_type)@\spxentry{copy\_back\_forcing\_fields()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/copy_back_forcing_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{copy\_back\_forcing\_fields}}}{\emph{fluxes}, \emph{forces}, \emph{G}}{}
This subroutine copies the computational domains of common forcing fields from a {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing()}}}}} type to a (thermodynamic) forcing type.
type to a (thermodynamic) forcing type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mech\_forcing\_diags() (fortran subroutine in module mom\_forcing\_type)@\spxentry{mech\_forcing\_diags()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{mech\_forcing\_diags}}}{\emph{forces\_in}, \emph{dt}, \emph{G}, \emph{time\_end}, \emph{diag}, \emph{handles}}{}
Offer mechanical forcing fields for diagnostics for those fields registered as part of register\_forcing\_type\_diags.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces\_in} :: {[}in{]} mechanical forcing input fields

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step for the forcing {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} The end time of the diagnostic interval.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} diagnostic type

\item {} 
\sphinxstylestrong{handles} :: {[}inout{]} diagnostic id for diag\_manager

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/deallocate_mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_mech\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::disable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::enable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_mech\_forcing}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{forcing\_diagnostics() (fortran subroutine in module mom\_forcing\_type)@\spxentry{forcing\_diagnostics()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{forcing\_diagnostics}}}{\emph{fluxes\_in}, \emph{sfc\_state}, \emph{G\_in}, \emph{US}, \emph{time\_end}, \emph{diag}, \emph{handles}}{}
Offer buoyancy forcing fields for diagnostics for those fields registered as part of register\_forcing\_type\_diags.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes\_in} :: {[}in{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{g\_in} :: {[}in{]} Input grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} The end time of the diagnostic interval.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} diagnostic regulator

\item {} 
\sphinxstylestrong{handles} :: {[}inout{]} diagnostic ids

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/deallocate_forcing_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_forcing\_type}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::disable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::enable\_averages}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_integral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_integral}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_forcing}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_forcing\_by\_group() (fortran subroutine in module mom\_forcing\_type)@\spxentry{allocate\_forcing\_by\_group()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{allocate\_forcing\_by\_group}}}{\emph{G}, \emph{fluxes}, \emph{water}, \emph{heat}, \emph{ustar}, \emph{press}, \emph{shelf}, \emph{iceberg}, \emph{salt}, \emph{fix\_accum\_bug}}{}
Conditionally allocate fields within the forcing type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{water} :: {[}in{]} If present and true, allocate water fluxes

\item {} 
\sphinxstylestrong{heat} :: {[}in{]} If present and true, allocate heat fluxes

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} If present and true, allocate ustar and related fields

\item {} 
\sphinxstylestrong{press} :: {[}in{]} If present and true, allocate p\_surf and related fields

\item {} 
\sphinxstylestrong{shelf} :: {[}in{]} If present and true, allocate fluxes for ice\sphinxhyphen{}shelf

\item {} 
\sphinxstylestrong{iceberg} :: {[}in{]} If present and true, allocate fluxes for icebergs

\item {} 
\sphinxstylestrong{salt} :: {[}in{]} If present and true, allocate salt fluxes

\item {} 
\sphinxstylestrong{fix\_accum\_bug} :: {[}in{]} If present and true, avoid using a bug in accumulation of ustar\_gustless

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/myalloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{myalloc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_forcing\_by\_ref() (fortran subroutine in module mom\_forcing\_type)@\spxentry{allocate\_forcing\_by\_ref()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_ref}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{allocate\_forcing\_by\_ref}}}{\emph{fluxes\_ref}, \emph{G}, \emph{fluxes}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes\_ref} :: {[}in{]} Reference fluxes

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid metric of target fluxes

\item {} 
\sphinxstylestrong{fluxes} :: {[}out{]} Target fluxes

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_forcing_groups}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_forcing\_groups}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/myalloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{myalloc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_mech\_forcing\_by\_group() (fortran subroutine in module mom\_forcing\_type)@\spxentry{allocate\_mech\_forcing\_by\_group()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_mech_forcing_by_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{allocate\_mech\_forcing\_by\_group}}}{\emph{G}, \emph{forces}, \emph{stress}, \emph{ustar}, \emph{shelf}, \emph{press}, \emph{iceberg}}{}
Conditionally allocate fields within the mechanical forcing type using control flags.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} Forcing fields structure

\item {} 
\sphinxstylestrong{stress} :: {[}in{]} If present and true, allocate taux, tauy

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} If present and true, allocate ustar and related fields

\item {} 
\sphinxstylestrong{shelf} :: {[}in{]} If present and true, allocate forces for ice\sphinxhyphen{}shelf

\item {} 
\sphinxstylestrong{press} :: {[}in{]} If present and true, allocate p\_surf and related fields

\item {} 
\sphinxstylestrong{iceberg} :: {[}in{]} If present and true, allocate forces for icebergs

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/myalloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{myalloc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_mech\_forcing\_from\_ref() (fortran subroutine in module mom\_forcing\_type)@\spxentry{allocate\_mech\_forcing\_from\_ref()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_mech_forcing_from_ref}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{allocate\_mech\_forcing\_from\_ref}}}{\emph{forces\_ref}, \emph{G}, \emph{forces}}{}
Conditionally allocate fields within the mechanical forcing type based on a reference forcing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces\_ref} :: {[}in{]} Reference forcing fields

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid metric of target forcing

\item {} 
\sphinxstylestrong{forces} :: {[}out{]} Mechanical forcing fields

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_mech_forcing_groups}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_mech\_forcing\_groups}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_forcing\_groups() (fortran subroutine in module mom\_forcing\_type)@\spxentry{get\_forcing\_groups()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_forcing_groups}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{get\_forcing\_groups}}}{\emph{fluxes}, \emph{water}, \emph{heat}, \emph{ustar}, \emph{press}, \emph{shelf}, \emph{iceberg}, \emph{salt}, \emph{heat\_added}, \emph{buoy}}{}
Return flags indicating which groups of forcings are allocated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} Reference flux fields

\item {} 
\sphinxstylestrong{water} :: {[}out{]} True if fluxes contains water\sphinxhyphen{}based fluxes

\item {} 
\sphinxstylestrong{heat} :: {[}out{]} True if fluxes contains heat\sphinxhyphen{}based fluxes

\item {} 
\sphinxstylestrong{ustar} :: {[}out{]} True if fluxes contains ustar fluxes

\item {} 
\sphinxstylestrong{press} :: {[}out{]} True if fluxes contains surface pressure

\item {} 
\sphinxstylestrong{shelf} :: {[}out{]} True if fluxes contains ice shelf fields

\item {} 
\sphinxstylestrong{iceberg} :: {[}out{]} True if fluxes contains iceberg fluxes

\item {} 
\sphinxstylestrong{salt} :: {[}out{]} True if fluxes contains salt flux

\item {} 
\sphinxstylestrong{heat\_added} :: {[}out{]} True if fluxes contains explicit heat

\item {} 
\sphinxstylestrong{buoy} :: {[}out{]} True if fluxes contains buoyancy fluxes

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_forcing\_by\_ref}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_mech\_forcing\_groups() (fortran subroutine in module mom\_forcing\_type)@\spxentry{get\_mech\_forcing\_groups()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_mech_forcing_groups}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{get\_mech\_forcing\_groups}}}{\emph{forces}, \emph{stress}, \emph{ustar}, \emph{shelf}, \emph{press}, \emph{iceberg}}{}
Return flags indicating which groups of mechanical forcings are allocated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces} :: {[}in{]} Reference forcing fields

\item {} 
\sphinxstylestrong{stress} :: {[}out{]} True if forces contains wind stress fields

\item {} 
\sphinxstylestrong{ustar} :: {[}out{]} True if forces contains ustar field

\item {} 
\sphinxstylestrong{shelf} :: {[}out{]} True if forces contains ice shelf fields

\item {} 
\sphinxstylestrong{press} :: {[}out{]} True if forces contains pressure fields

\item {} 
\sphinxstylestrong{iceberg} :: {[}out{]} True if forces contains iceberg fields

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_mech_forcing_from_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_mech\_forcing\_from\_ref}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_mech_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_mech\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{myalloc() (fortran subroutine in module mom\_forcing\_type)@\spxentry{myalloc()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/myalloc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{myalloc}}}{\emph{array}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{flag}}{}
Allocates and zeroes\sphinxhyphen{}out array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: Array to be allocated

\item {} 
\sphinxstylestrong{is} :: {[}in{]} Start i\sphinxhyphen{}index

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} End i\sphinxhyphen{}index

\item {} 
\sphinxstylestrong{js} :: {[}in{]} Start j\sphinxhyphen{}index

\item {} 
\sphinxstylestrong{je} :: {[}in{]} End j\sphinxhyphen{}index

\item {} 
\sphinxstylestrong{flag} :: {[}in{]} Flag to indicate to allocate

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_forcing\_by\_group}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_forcing_by_ref}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_forcing\_by\_ref}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/allocate_mech_forcing_by_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_mech\_forcing\_by\_group}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{deallocate\_forcing\_type() (fortran subroutine in module mom\_forcing\_type)@\spxentry{deallocate\_forcing\_type()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/deallocate_forcing_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{deallocate\_forcing\_type}}}{\emph{fluxes}}{}
Deallocate the forcing type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{fluxes} :: {[}inout{]} Forcing fields structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{deallocate\_mech\_forcing() (fortran subroutine in module mom\_forcing\_type)@\spxentry{deallocate\_mech\_forcing()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/deallocate_mech_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{deallocate\_mech\_forcing}}}{\emph{forces}}{}
Deallocate the mechanical forcing type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{forces} :: {[}inout{]} Forcing fields structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing\_diags}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_forcing() (fortran subroutine in module mom\_forcing\_type)@\spxentry{rotate\_forcing()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{rotate\_forcing}}}{\emph{fluxes\_in}, \emph{fluxes}, \emph{turns}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes\_in} :: {[}in{]} Input forcing struct

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Rotated forcing struct

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_forcing_groups}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_forcing\_groups}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_mech\_forcing() (fortran subroutine in module mom\_forcing\_type)@\spxentry{rotate\_mech\_forcing()}\spxextra{fortran subroutine in module mom\_forcing\_type}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/rotate_mech_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_forcing\_type/}}\sphinxbfcode{\sphinxupquote{rotate\_mech\_forcing}}}{\emph{forces\_in}, \emph{turns}, \emph{forces}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{forces\_in} :: {[}in{]} Forcing on the input domain

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter\sphinxhyphen{}turns

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} Forcing on the rotated domain

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/get_mech_forcing_groups}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_mech\_forcing\_groups}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mech\_forcing\_diags}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_full\_convection module reference}
\label{\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection}}\label{\detokenize{api/generated/modules/mom_full_convection:mom-full-convection-module-reference}}\label{\detokenize{api/generated/modules/mom_full_convection::doc}}\index{mom\_full\_convection (module)@\spxentry{mom\_full\_convection}\spxextra{module}|spxpagem}
Does full convective adjustment of unstable regions via a strong diffusivity.

{\hyperref[\detokenize{api/generated/modules/mom_full_convection:detamom-full-convection}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_full_convection:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/full_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{full\_convection()}}}}}
&
Calculate new temperatures and salinities that have been subject to full convective mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/is_unstable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_unstable()}}}}}
&
This function returns True if the profiles around the given interface will be statically unstable after mixing above below.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/smoothed_drdt_drds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{smoothed\_drdt\_drds()}}}}}
&
Returns the partial derivatives of locally referenced potential density with temperature and salinity after the properties have been smoothed with a small constant diffusivity.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_full_convection:detailed-description}}\label{\detokenize{api/generated/modules/mom_full_convection:detamom-full-convection}}
Does full convective adjustment of unstable regions via a strong diffusivity.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_full_convection:function-subroutine-documentation}}\index{full\_convection() (fortran subroutine in module mom\_full\_convection)@\spxentry{full\_convection()}\spxextra{fortran subroutine in module mom\_full\_convection}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/full_convection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_full\_convection/}}\sphinxbfcode{\sphinxupquote{full\_convection}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{tv}, \emph{T\_adj}, \emph{S\_adj}, \emph{p\_surf}, \emph{Kddt\_smooth}, \emph{Kddt\_convect}, \emph{halo}}{}
Calculate new temperatures and salinities that have been subject to full convective mixing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{t\_adj} :: {[}out{]} Adjusted potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s\_adj} :: {[}out{]} Adjusted salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{p\_surf} :: The pressure at the ocean surface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} (or NULL).

\item {} 
\sphinxstylestrong{kddt\_smooth} :: {[}in{]} A smoothing vertical diffusivity times a timestep {[}H2 \textasciitilde{}\textgreater{} m2 or kg2 m\sphinxhyphen{}4{]}.

\item {} 
\sphinxstylestrong{kddt\_convect} :: {[}in{]} A large convecting vertical diffusivity times a timestep {[}H2 \textasciitilde{}\textgreater{} m2 or kg2 m\sphinxhyphen{}4{]}.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to compute

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/is_unstable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_unstable}}}}} {\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/smoothed_drdt_drds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{smoothed\_drdt\_drds}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_unstable() (fortran function in module mom\_full\_convection)@\spxentry{is\_unstable()}\spxextra{fortran function in module mom\_full\_convection}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/is_unstable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_full\_convection/}}\sphinxbfcode{\sphinxupquote{is\_unstable}}}{\emph{dRho\_dT}, \emph{dRho\_dS}, \emph{h\_a}, \emph{h\_b}, \emph{mix\_A}, \emph{mix\_B}, \emph{T\_a}, \emph{T\_b}, \emph{S\_a}, \emph{S\_b}, \emph{Te\_aa}, \emph{Te\_bb}, \emph{Se\_aa}, \emph{Se\_bb}, \emph{d\_A}, \emph{d\_B}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This function returns True if the profiles around the given interface will be statically unstable after mixing above below. The arguments are the ocean state above and below, including partial calculations from a tridiagonal solver.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{drho\_dt} :: {[}in{]} The derivative of in situ density with temperature {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drho\_ds} :: {[}in{]} The derivative of in situ density with salinity {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h\_a} :: {[}in{]} The thickness of the layer above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_b} :: {[}in{]} The thickness of the layer below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{mix\_a} :: {[}in{]} The time integrated mixing rate of the interface above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{mix\_b} :: {[}in{]} The time integrated mixing rate of the interface below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t\_a} :: {[}in{]} The initial temperature of the layer above {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} The initial temperature of the layer below {[}degC{]}

\item {} 
\sphinxstylestrong{s\_a} :: {[}in{]} The initial salinity of the layer below {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} The initial salinity of the layer below {[}ppt{]}

\item {} 
\sphinxstylestrong{te\_aa} :: {[}in{]} The estimated temperature two layers above rescaled by d\_A {[}degC{]}

\item {} 
\sphinxstylestrong{te\_bb} :: {[}in{]} The estimated temperature two layers below rescaled by d\_B {[}degC{]}

\item {} 
\sphinxstylestrong{se\_aa} :: {[}in{]} The estimated salinity two layers above rescaled by d\_A {[}ppt{]}

\item {} 
\sphinxstylestrong{se\_bb} :: {[}in{]} The estimated salinity two layers below rescaled by d\_B {[}ppt{]}

\item {} 
\sphinxstylestrong{d\_a} :: {[}in{]} The rescaling dependency across the interface above, nondim.

\item {} 
\sphinxstylestrong{d\_b} :: {[}in{]} The rescaling dependency across the interface below, nondim.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The return value, true if the profile is statically unstable around the interface in question.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/full_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{full\_convection}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{smoothed\_drdt\_drds() (fortran subroutine in module mom\_full\_convection)@\spxentry{smoothed\_drdt\_drds()}\spxextra{fortran subroutine in module mom\_full\_convection}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/smoothed_drdt_drds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_full\_convection/}}\sphinxbfcode{\sphinxupquote{smoothed\_drdt\_drds}}}{\emph{h}, \emph{tv}, \emph{Kddt}, \emph{dR\_dT}, \emph{dR\_dS}, \emph{G}, \emph{GV}, \emph{US}, \emph{j}, \emph{p\_surf}, \emph{halo}}{}
Returns the partial derivatives of locally referenced potential density with temperature and salinity after the properties have been smoothed with a small constant diffusivity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{kddt} :: {[}in{]} A diffusivity times a time increment {[}H2 \textasciitilde{}\textgreater{} m2 or kg2 m\sphinxhyphen{}4{]}.

\item {} 
\sphinxstylestrong{dr\_dt} :: {[}out{]} Derivative of locally referenced

\item {} 
\sphinxstylestrong{dr\_ds} :: {[}out{]} Derivative of locally referenced

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}point to work on.

\item {} 
\sphinxstylestrong{p\_surf} :: The pressure at the ocean surface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to compute

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/full_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{full\_convection}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_generic\_tracer module reference}
\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer}}\label{\detokenize{api/generated/modules/mom_generic_tracer:mom-generic-tracer-module-reference}}\label{\detokenize{api/generated/modules/mom_generic_tracer::doc}}\index{mom\_generic\_tracer (module)@\spxentry{mom\_generic\_tracer}\spxextra{module}|spxpagem}
Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.

{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:detamom-generic-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_generic_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_cs}}}}}
&
Control structure for generic tracers.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_generic_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/register_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_mom\_generic\_tracer()}}}}}
&
Initializes the generic tracer packages and adds their tracers to the list Adds the tracers in the list of generic tracers to the set of MOM tracers (i.e., MOM\sphinxhyphen{}register them) Register these tracers for restart.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_mom\_generic\_tracer()}}}}}
&
Initialize phase II: Initialize required variables for generic tracers There are some steps of initialization that cannot be done in register\_MOM\_generic\_tracer This is the place and time to do them: Set the grid mask and initial time for all generic tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_column\_physics()}}}}}
&
Column physics for generic tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_stock()}}}}}
&
This subroutine calculates mass\sphinxhyphen{}weighted integral on the PE either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_min_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_min\_max()}}}}}
&
This subroutine find the global min and max of either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of tracers it has gone through.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_surface\_state()}}}}}
&
This subroutine calculates the surface state and sets coupler values for those generic tracers that have flux exchange with atmosphere.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_flux\_init()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_fluxes_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_fluxes\_accumulate()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer\_get()}}}}}
&
Copy the requested tracer into an array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/end_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_mom\_generic\_tracer()}}}}}
&
This subroutine deallocates the memory owned by this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_generic_tracer:detailed-description}}\label{\detokenize{api/generated/modules/mom_generic_tracer:detamom-generic-tracer}}
Drives the generic version of tracers TOPAZ and CFC and other GFDL BGC components.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_generic_tracer:type-documentation}}\index{mom\_generic\_tracer\_cs (fortran type in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_cs}\spxextra{fortran type in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_cs}}}
Control structure for generic tracers.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file in which the generic tracer initial values can be found, or an empty string for internal initialization.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The initial value assigned to tracers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The values of tracers used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracers\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, tracers may go through the initialization code if they are not found in the restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_tracer\_list}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( g\_tracer\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the first element of the linked list of generic tracers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_m}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Auxiliary to access GVH\_to\_m in routines that do not have access to GV.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_generic_tracer:function-subroutine-documentation}}\index{register\_mom\_generic\_tracer() (fortran function in module mom\_generic\_tracer)@\spxentry{register\_mom\_generic\_tracer()}\spxextra{fortran function in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/register_mom_generic_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_mom\_generic\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initializes the generic tracer packages and adds their tracers to the list Adds the tracers in the list of generic tracers to the set of MOM tracers (i.e., MOM\sphinxhyphen{}register them) Register these tracers for restart.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index ranges

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module

\item {} 
\sphinxstylestrong{tr\_reg} :: Pointer to the control structure for the tracer advection and diffusion module.

\item {} 
\sphinxstylestrong{restart\_cs} :: Pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{g\_registered}} {\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_get\_alias}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_mom\_generic\_tracer() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{initialize\_mom\_generic\_tracer()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_mom\_generic\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{param\_file}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}, \emph{ALE\_sponge\_CSp}}{}
Initialize phase II: Initialize required variables for generic tracers There are some steps of initialization that cannot be done in register\_MOM\_generic\_tracer This is the place and time to do them: Set the grid mask and initial time for all generic tracers. Diag\_register them. Z\_diag\_register them.

This subroutine initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Regulates diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\item {} 
\sphinxstylestrong{sponge\_csp} :: Pointer to the control structure for the sponges.

\item {} 
\sphinxstylestrong{ale\_sponge\_csp} :: Pointer to the control structure for the ALE sponges.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_get\_alias}}}}} {\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_csdiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_set\_csdiag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z::mom\_initialize\_tracer\_from\_z}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::tracer\_z\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_tracer\_column\_physics() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_column\_physics()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{Hml}, \emph{dt}, \emph{G}, \emph{GV}, \emph{CS}, \emph{tv}, \emph{optics}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
Column physics for generic tracers. Get the coupler values for generic tracers that exchange with atmosphere Update generic tracer concentration fields from sources and sinks. Vertically diffuse generic tracer concentration fields. Update generic tracers from bottom and their bottom reservoir.

This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. CFCs are relatively simple, as they are passive tracers. with only a surface flux as a source.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} The amount of fluid entrained from the layer

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields.

\item {} 
\sphinxstylestrong{hml} :: {[}in{]} Mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}s{]}

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{optics} :: {[}in{]} The structure containing optical properties.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limits how much water can be fluxed out of the top layer Stored previously in diabatic CS.

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_get\_alias}}}}} {\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_set_csdiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_set\_csdiag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_diag_time_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::get\_diag\_time\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_tracer\_stock() (fortran function in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_stock()}\spxextra{fortran function in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This subroutine calculates mass\sphinxhyphen{}weighted integral on the PE either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} The mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} The names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} The coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value, the number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_get\_alias}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_tracer\_min\_max() (fortran function in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_min\_max()}\spxextra{fortran function in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_min_max}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_min\_max}}}{\emph{ind\_start}, \emph{got\_minmax}, \emph{gmin}, \emph{gmax}, \emph{xgmin}, \emph{ygmin}, \emph{zgmin}, \emph{xgmax}, \emph{ygmax}, \emph{zgmax}, \emph{G}, \emph{CS}, \emph{names}, \emph{units}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This subroutine find the global min and max of either of all available tracer concentrations, or of a tracer that is being requested specifically, returning the number of tracers it has gone through.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ind\_start} :: {[}in{]} The index of the tracer to start with

\item {} 
\sphinxstylestrong{got\_minmax} :: {[}out{]} Indicates whether the global min and max are found for each tracer

\item {} 
\sphinxstylestrong{gmin} :: {[}out{]} Global minimum of each tracer, in kg times concentration units.

\item {} 
\sphinxstylestrong{gmax} :: {[}out{]} Global maximum of each tracer, in kg times concentration units.

\item {} 
\sphinxstylestrong{xgmin} :: {[}out{]} The x\sphinxhyphen{}position of the global minimum

\item {} 
\sphinxstylestrong{ygmin} :: {[}out{]} The y\sphinxhyphen{}position of the global minimum

\item {} 
\sphinxstylestrong{zgmin} :: {[}out{]} The z\sphinxhyphen{}position of the global minimum

\item {} 
\sphinxstylestrong{xgmax} :: {[}out{]} The x\sphinxhyphen{}position of the global maximum

\item {} 
\sphinxstylestrong{ygmax} :: {[}out{]} The y\sphinxhyphen{}position of the global maximum

\item {} 
\sphinxstylestrong{zgmax} :: {[}out{]} The z\sphinxhyphen{}position of the global maximum

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} The names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The units of the stocks calculated.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value, the number of tracers done here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/g_tracer_utils:f/g_tracer_utils/g_tracer_get_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{g\_tracer\_utils::g\_tracer\_get\_alias}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_tracer\_surface\_state() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_surface\_state()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine calculates the surface state and sets coupler values for those generic tracers that have flux exchange with atmosphere.

This subroutine sets up the fields that the coupler needs to calculate the CFC fluxes between the ocean and atmosphere.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/get_diag_time_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::get\_diag\_time\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_mean}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_flux\_init() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{mom\_generic\_flux\_init()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_flux_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_flux\_init}}}{\emph{verbosity}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbosity} :: {[}in{]} A 0\sphinxhyphen{}9 integer indicating a level of verbosity.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{g\_registered}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_tracer\_fluxes\_accumulate() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_fluxes\_accumulate()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_fluxes_accumulate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_fluxes\_accumulate}}}{\emph{flux\_tmp}, \emph{weight}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{flux\_tmp} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields.

\item {} 
\sphinxstylestrong{weight} :: {[}in{]} A weight for accumulating this flux

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/generic_tracer:f/generic_tracer/generic_tracer_coupler_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{generic\_tracer::generic\_tracer\_coupler\_accumulate}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_generic\_tracer\_get() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{mom\_generic\_tracer\_get()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_get}}}{\emph{name}, \emph{member}, \emph{array}, \emph{CS}}{}
Copy the requested tracer into an array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} Name of requested tracer.

\item {} 
\sphinxstylestrong{member} :: {[}in{]} The tracer element to return.

\item {} 
\sphinxstylestrong{array} :: {[}out{]} Array filled by this routine.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_mom\_generic\_tracer() (fortran subroutine in module mom\_generic\_tracer)@\spxentry{end\_mom\_generic\_tracer()}\spxextra{fortran subroutine in module mom\_generic\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/end_mom_generic_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_generic\_tracer/}}\sphinxbfcode{\sphinxupquote{end\_mom\_generic\_tracer}}}{\emph{CS}}{}
This subroutine deallocates the memory owned by this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Pointer to the control structure for this module.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_geothermal module reference}
\label{\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal}}\label{\detokenize{api/generated/modules/mom_geothermal:mom-geothermal-module-reference}}\label{\detokenize{api/generated/modules/mom_geothermal::doc}}\index{mom\_geothermal (module)@\spxentry{mom\_geothermal}\spxextra{module}|spxpagem}
Implemented geothermal heating at the ocean bottom.

{\hyperref[\detokenize{api/generated/modules/mom_geothermal:detamom-geothermal}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_geothermal:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{geothermal\_cs}}}}}
&
Control structure for geothermal heating.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_geothermal:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_entraining}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{geothermal\_entraining()}}}}}
&
Applies geothermal heating, including the movement of water between isopycnal layers to match the target densities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_in_place}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{geothermal\_in\_place()}}}}}
&
Applies geothermal heating to the bottommost layers that occur within GEOTHERMAL\_THICKNESS of the bottom, by simply heating the water in place.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{geothermal\_init()}}}}}
&
Initialize parameters and allocate memory associated with the geothermal heating module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{geothermal\_end()}}}}}
&
Clean up and deallocate memory associated with the geothermal heating module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_geothermal:detailed-description}}\label{\detokenize{api/generated/modules/mom_geothermal:detamom-geothermal}}
Geothermal heating can be added either in a layered isopycnal mode, in which the heating raises the density of the layer to the target density of the layer above, and then moves the water into that layer, or in a simple Eulerian mode, in which the bottommost GEOTHERMAL\_THICKNESS are heated. Geothermal heating will also provide a buoyant source of bottom TKE that can be used to further mix the near\sphinxhyphen{}bottom water. In cold fresh water lakes where heating increases density, water should be moved into deeper layers, but this is not implemented yet.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_geothermal:type-documentation}}\index{geothermal\_cs (fortran type in module mom\_geothermal)@\spxentry{geothermal\_cs}\spxextra{fortran type in module mom\_geothermal}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_geothermal/}}\sphinxbfcode{\sphinxupquote{geothermal\_cs}}}
Control structure for geothermal heating.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drcv\_dt\_inplace}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of dRcv\_dT above which (dRcv\_dT is negative) the water is heated in place instead of moving upward between layers {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geo\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The geothermal heat flux {[}J m\sphinxhyphen{}2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geothermal\_thick}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The thickness over which geothermal heating is applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_geothermal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, geothermal heating will be applied otherwise GEOTHERMAL\_SCALE has been set to 0 and there is no heat to apply.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_internal\_heat\_heat\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: ID for diagnostic of heat tendency.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_internal\_heat\_temp\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: ID for diagnostic of temperature tendency.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_internal\_heat\_h\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: ID for diagnostic of thickness tendency.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_geothermal:function-subroutine-documentation}}\index{geothermal\_entraining() (fortran subroutine in module mom\_geothermal)@\spxentry{geothermal\_entraining()}\spxextra{fortran subroutine in module mom\_geothermal}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_entraining}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_geothermal/}}\sphinxbfcode{\sphinxupquote{geothermal\_entraining}}}{\emph{h}, \emph{tv}, \emph{dt}, \emph{ea}, \emph{eb}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{halo}}{}
Applies geothermal heating, including the movement of water between isopycnal layers to match the target densities. The heating is applied to the bottommost layers that occur within GEOTHERMAL\_THICKNESS of the bottom. If the partial derivative of the coordinate density with temperature is positive or very small, the layers are simply heated in place. Any heat that can not be applied to the ocean is returned (WHERE)?
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} The amount of fluid moved downward into a layer; this should be increased due to mixed layer detrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} The amount of fluid moved upward into a layer; this should be increased due to mixed layer entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to geothermal\_init.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to work

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{geothermal\_in\_place() (fortran subroutine in module mom\_geothermal)@\spxentry{geothermal\_in\_place()}\spxextra{fortran subroutine in module mom\_geothermal}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_in_place}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_geothermal/}}\sphinxbfcode{\sphinxupquote{geothermal\_in\_place}}}{\emph{h}, \emph{tv}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{halo}}{}
Applies geothermal heating to the bottommost layers that occur within GEOTHERMAL\_THICKNESS of the bottom, by simply heating the water in place. Any heat that can not be applied to the ocean is returned (WHERE)?
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to geothermal\_init.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to work

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{geothermal\_init() (fortran subroutine in module mom\_geothermal)@\spxentry{geothermal\_init()}\spxextra{fortran subroutine in module mom\_geothermal}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_geothermal/}}\sphinxbfcode{\sphinxupquote{geothermal\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{useALEalgorithm}}{}
Initialize parameters and allocate memory associated with the geothermal heating module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: Pointer pointing to the module control structure.

\item {} 
\sphinxstylestrong{usealealgorithm} :: {[}in{]} logical for whether to use ALE remapping

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{geothermal\_end() (fortran subroutine in module mom\_geothermal)@\spxentry{geothermal\_end()}\spxextra{fortran subroutine in module mom\_geothermal}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_geothermal:f/mom_geothermal/geothermal_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_geothermal/}}\sphinxbfcode{\sphinxupquote{geothermal\_end}}}{\emph{CS}}{}
Clean up and deallocate memory associated with the geothermal heating module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Geothermal heating control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_get\_input module reference}
\label{\detokenize{api/generated/modules/mom_get_input:f/mom_get_input}}\label{\detokenize{api/generated/modules/mom_get_input:mom-get-input-module-reference}}\label{\detokenize{api/generated/modules/mom_get_input::doc}}\index{mom\_get\_input (module)@\spxentry{mom\_get\_input}\spxextra{module}|spxpagem}
Reads the only Fortran name list needed to boot\sphinxhyphen{}strap the model.

{\hyperref[\detokenize{api/generated/modules/mom_get_input:detamom-get-input}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_get_input:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/directories}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{directories}}}}}
&
Container for paths and parameter file names.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_get_input:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_mom\_input()}}}}}
&
Get the names of the I/O directories and initialization file.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_get_input:detailed-description}}\label{\detokenize{api/generated/modules/mom_get_input:detamom-get-input}}
The name list parameters indicate which directories to use for certain types of input and output, and which files to look in for the full parsable input parameter file(s).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_get_input:type-documentation}}\index{directories (fortran type in module mom\_get\_input)@\spxentry{directories}\spxextra{fortran type in module mom\_get\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/directories}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_get\_input/}}\sphinxbfcode{\sphinxupquote{directories}}}
Container for paths and parameter file names.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_input\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: The directory to read restart and input files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_output\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: The directory into which to write restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{output\_directory}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: The directory to use to write the model output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{input\_filename}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=2048)}\sphinxstyleemphasis{{]}} :: A string that indicates the input files or how.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_get_input:function-subroutine-documentation}}\index{get\_mom\_input() (fortran subroutine in module mom\_get\_input)@\spxentry{get\_mom\_input()}\spxextra{fortran subroutine in module mom\_get\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_get\_input/}}\sphinxbfcode{\sphinxupquote{get\_mom\_input}}}{\emph{param\_file}, \emph{dirs}, \emph{check\_params}, \emph{default\_input\_filename}, \emph{ensemble\_num}}{}
Get the names of the I/O directories and initialization file. Also calls the subroutine that opens run\sphinxhyphen{}time parameter files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}out{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{dirs} :: {[}out{]} Container for paths and parameter file names.

\item {} 
\sphinxstylestrong{check\_params} :: {[}in{]} If present and False will stop error checking for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{default\_input\_filename} :: {[}in{]} If present, is the value assumed for input\_filename if input\_filename is not listed in the namelist MOM\_input\_nml.

\item {} 
\sphinxstylestrong{ensemble\_num} :: {[}in{]} The ensemble id of the current member

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/open_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::open\_param\_file}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_flux\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_grid module reference}
\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid}}\label{\detokenize{api/generated/modules/mom_grid:mom-grid-module-reference}}\label{\detokenize{api/generated/modules/mom_grid::doc}}\index{mom\_grid (module)@\spxentry{mom\_grid}\spxextra{module}|spxpagem}
Provides the ocean grid type.

{\hyperref[\detokenize{api/generated/modules/mom_grid:detamom-grid}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_grid:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_grid\_type}}}}}
&
Ocean grid type.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_grid:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_init()}}}}}
&
MOM\_grid\_init initializes the ocean grid array sizes and grid memory.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/rescale_grid_bathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rescale\_grid\_bathymetry()}}}}}
&
rescale\_grid\_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/set_derived_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_derived\_metrics()}}}}}
&
set\_derived\_metrics calculates metric terms that are derived from other metrics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/adcroft_reciprocal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adcroft\_reciprocal()}}}}}
&
Adcroft\_reciprocal(x) = 1/x for {\color{red}\bfseries{}|x|}\textgreater{}0 or 0 for x=0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ispointincell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ispointincell()}}}}}
&
Returns true if the coordinates (x,y) are within the h\sphinxhyphen{}cell (i,j)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/set_first_direction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_first\_direction()}}}}}
&
Store an integer indicating which direction to work on first.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/get_global_grid_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_global\_grid\_size()}}}}}
&
Return global shape of horizontal grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/allocate_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_metrics()}}}}}
&
Allocate memory used by the {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_grid\_type()}}}}} and related structures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_end()}}}}}
&
Release memory used by the {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_grid\_type()}}}}} and related structures.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_grid:detailed-description}}\label{\detokenize{api/generated/modules/mom_grid:detamom-grid}}
Grid metrics and their inverses are labelled according to their staggered location on a Arakawa C (or B) grid.
\begin{itemize}
\item {} 
Metrics centered on h\sphinxhyphen{} or T\sphinxhyphen{}points are labelled T, e.g. dxT is the distance across the cell in the x\sphinxhyphen{}direction.

\item {} 
Metrics centered on u\sphinxhyphen{}points are labelled Cu (C\sphinxhyphen{}grid u location). e.g. dyCu is the y\sphinxhyphen{}distance between two corners of a T\sphinxhyphen{}cell.

\item {} 
Metrics centered on v\sphinxhyphen{}points are labelled Cv (C\sphinxhyphen{}grid v location). e.g. dyCv is the y\sphinxhyphen{}distance between two \sphinxhyphen{}points.

\item {} 
Metrics centered on q\sphinxhyphen{}points are labelled Bu (B\sphinxhyphen{}grid u,v location). e.g. areaBu is the area centered on a q\sphinxhyphen{}point.

\end{itemize}

location on an T\sphinxhyphen{}cell and around a q\sphinxhyphen{}point.”

Areas centered at T\sphinxhyphen{}, u\sphinxhyphen{}, v\sphinxhyphen{} and q\sphinxhyphen{} points are \sphinxcode{\sphinxupquote{areaT}}
, \sphinxcode{\sphinxupquote{areaCu}} , \sphinxcode{\sphinxupquote{areaCv}} and \sphinxcode{\sphinxupquote{areaBu}} respectively.

The reciprocal of metrics are pre\sphinxhyphen{}calculated and also stored in the {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_grid\_type()}}}}} with a I prepended to the name. For example,
with a I prepended to the name. For example, \sphinxcode{\sphinxupquote{1./areaT}} is called \sphinxcode{\sphinxupquote{IareaT}} , and \sphinxcode{\sphinxupquote{1./dyCv}} is \sphinxcode{\sphinxupquote{IdyCv}} .

Geographic latitude and longitude (or model coordinates if not on a sphere) are stored in \sphinxcode{\sphinxupquote{geoLatT}}
, \sphinxcode{\sphinxupquote{geoLonT}} for T\sphinxhyphen{}points. u\sphinxhyphen{}, v\sphinxhyphen{} and q\sphinxhyphen{} point coordinates are follow same pattern of replacing T with Cu, Cv and Bu respectively.

Each location also has a 2D mask indicating whether the entire column is land or ocean. \sphinxcode{\sphinxupquote{mask2dT}}
is 1 if the column is wet or 0 if the T\sphinxhyphen{}cell is land. \sphinxcode{\sphinxupquote{mask2dCu}} is 1 if both neighboring column are ocean, and 0 if either is land.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_grid:type-documentation}}\index{ocean\_grid\_type (fortran type in module mom\_grid)@\spxentry{ocean\_grid\_type}\spxextra{fortran type in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{ocean\_grid\_type}}}
Ocean grid type. See {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid()}}}}} for details.
for details.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_domain\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Ocean model domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{domain\_aux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_domain\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A non\sphinxhyphen{}symmetric auxiliary domain type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_index\_type)}\sphinxstyleemphasis{{]}} :: Horizontal index ranges.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hid2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_index\_type)}\sphinxstyleemphasis{{]}} :: Horizontal index ranges for level\sphinxhyphen{}2\sphinxhyphen{}downsampling.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isdb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iedb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsdb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jedb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The value of isd in the global index space (decompoistion invariant).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The value of isd in the global index space (decompoistion invariant).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idg\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The offset between the corresponding global and local i\sphinxhyphen{}indices.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jdg\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The offset between the corresponding global and local j\sphinxhyphen{}indices.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers in the vertical.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{symmetric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if symmetric memory is used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonblocking\_updates}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, non\sphinxhyphen{}blocking halo updates are allowed. The default is .false. (for now).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{first\_direction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer that indicates which direction is to be updated first in directionally split parts of the calculation. This can be altered during the course of the run via calls to set\_first\_direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* df\_dy {[}*) :: 0 for land points and 1 for ocean points on the h\sphinxhyphen{}grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic latitude at q points in degrees of latitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic longitude at q points in degrees of longitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dxT is delta x at h points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dxT {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dyT is delta y at h points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: IdyT is 1/dyT {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The area of an h\sphinxhyphen{}cell {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/areaT {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The sine of the angular rotation between the local model grid’s northward.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The cosine of the angular rotation between the local model grid’s northward.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 0 for boundary points and 1 for ocean points on the u grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic latitude at u points in degrees of latitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic longitude at u points in degrees of longitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dxCu is delta x at u points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dxCu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dyCu is delta y at u points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dyCu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The unblocked lengths of the u\sphinxhyphen{}faces of the h\sphinxhyphen{}cell {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The masked inverse areas of u\sphinxhyphen{}grid cells {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The areas of the u\sphinxhyphen{}grid cells {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 0 for boundary points and 1 for ocean points on the v grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic latitude at v points in degrees of latitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic longitude at v points in degrees of longitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dxCv is delta x at v points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dxCv {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dyCv is delta y at v points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dyCv {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The unblocked lengths of the v\sphinxhyphen{}faces of the h\sphinxhyphen{}cell {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The masked inverse areas of v\sphinxhyphen{}grid cells {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The areas of the v\sphinxhyphen{}grid cells {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 0 for boundary points and 1 for ocean points on the q grid {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic latitude at q points in degrees of latitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The geographic longitude at q points in degrees of longitude or m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dxBu is delta x at q points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dxBu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: dyBu is delta y at q points {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/dyBu {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: areaBu is the area of a q\sphinxhyphen{}cell {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: IareaBu = 1/areaBu {[}L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlatt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The latitude of T points for the purpose of labeling the output axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlatb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The latitude of B points for the purpose of labeling the output axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The longitude of T points for the purpose of labeling the output axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gridlonb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The longitude of B points for the purpose of labeling the output axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_axis\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: The units that are used in labeling the x coordinate axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y\_axis\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: The units that are used in labeling the y coordinate axes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Ocean bottom depth at tracer points, in depth units {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_ref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A reference value for all geometric height fields, such as bathyT {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bathymetry\_at\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, there are separate values for the basin depths at velocity points. Otherwise the effects of of topography are entirely determined from thickness points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Topographic depths at u\sphinxhyphen{}points at which the flow is blocked {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Topographic depths at u\sphinxhyphen{}points at which the flow is open at width dy\_Cu {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Topographic depths at v\sphinxhyphen{}points at which the flow is blocked {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Topographic depths at v\sphinxhyphen{}points at which the flow is open at width dx\_Cv {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The Coriolis parameter at corner points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Derivative d/dx f (Coriolis parameter) at h\sphinxhyphen{}points {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Derivative d/dy f (Coriolis parameter) at h\sphinxhyphen{}points {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{areat\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Global sum of h\sphinxhyphen{}cell area {[}m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iareat\_global}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Global sum of inverse h\sphinxhyphen{}cell area (1/areaT\_global) {[}m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A dimensional unit scaling type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nblocks}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of sub\sphinxhyphen{}PE blocks on this PE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{block}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_index\_type)(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Index ranges for each block.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{south\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latitude (or y\sphinxhyphen{}coordinate) of the first v\sphinxhyphen{}line.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{west\_lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The longitude (or x\sphinxhyphen{}coordinate) of the first u\sphinxhyphen{}line.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latitudinal (or y\sphinxhyphen{}coord) extent of physical domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The longitudinal (or x\sphinxhyphen{}coord) extent of physical domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rad\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The radius of the planet {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum depth of the ocean in depth units {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_grid:function-subroutine-documentation}}\index{mom\_grid\_init() (fortran subroutine in module mom\_grid)@\spxentry{mom\_grid\_init()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{mom\_grid\_init}}}{\emph{G}, \emph{param\_file}, \emph{US}, \emph{HI}, \emph{global\_indexing}, \emph{bathymetry\_at\_vel}}{}
MOM\_grid\_init initializes the ocean grid array sizes and grid memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The horizontal grid type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{us} :: A dimensional unit scaling type

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A hor\_index\_type for array extents

\item {} 
\sphinxstylestrong{global\_indexing} :: {[}in{]} If true use global index values instead of having the data domain on each processor start at 1.

\item {} 
\sphinxstylestrong{bathymetry\_at\_vel} :: {[}in{]} If true, there are separate values for the ocean bottom depths at velocity points. Otherwise the effects of topography are entirely determined from thickness points.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/allocate_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_metrics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_domain_extent_dsamp2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_domain\_extent\_dsamp2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::hor\_index\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rescale\_grid\_bathymetry() (fortran subroutine in module mom\_grid)@\spxentry{rescale\_grid\_bathymetry()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/rescale_grid_bathymetry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{rescale\_grid\_bathymetry}}}{\emph{G}, \emph{m\_in\_new\_units}}{}
rescale\_grid\_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The horizontal grid structure

\item {} 
\sphinxstylestrong{m\_in\_new\_units} :: {[}in{]} The new internal representation of 1 m depth.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_derived\_metrics() (fortran subroutine in module mom\_grid)@\spxentry{set\_derived\_metrics()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/set_derived_metrics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{set\_derived\_metrics}}}{\emph{G}, \emph{US}}{}
set\_derived\_metrics calculates metric terms that are derived from other metrics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The horizontal grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/adcroft_reciprocal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adcroft\_reciprocal}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_dyngrid_to_mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::copy\_dyngrid\_to\_mom\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adcroft\_reciprocal() (fortran function in module mom\_grid)@\spxentry{adcroft\_reciprocal()}\spxextra{fortran function in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/adcroft_reciprocal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{adcroft\_reciprocal}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Adcroft\_reciprocal(x) = 1/x for {\color{red}\bfseries{}|x|}\textgreater{}0 or 0 for x=0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The value being inverted.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The Adcroft reciprocal of val.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/set_derived_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_derived\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ispointincell() (fortran function in module mom\_grid)@\spxentry{ispointincell()}\spxextra{fortran function in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/ispointincell}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{ispointincell}}}{\emph{G}, \emph{i}, \emph{j}, \emph{x}, \emph{y}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if the coordinates (x,y) are within the h\sphinxhyphen{}cell (i,j)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid type

\item {} 
\sphinxstylestrong{i} :: {[}in{]} i index of cell to test

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j index of cell to test

\item {} 
\sphinxstylestrong{x} :: {[}in{]} x coordinate of point

\item {} 
\sphinxstylestrong{y} :: {[}in{]} y coordinate of point

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_first\_direction() (fortran subroutine in module mom\_grid)@\spxentry{set\_first\_direction()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/set_first_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{set\_first\_direction}}}{\emph{G}, \emph{y\_first}}{}
Store an integer indicating which direction to work on first.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{y\_first} :: {[}in{]} The first direction to store

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_global\_grid\_size() (fortran subroutine in module mom\_grid)@\spxentry{get\_global\_grid\_size()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/get_global_grid_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{get\_global\_grid\_size}}}{\emph{G}, \emph{niglobal}, \emph{njglobal}}{}
Return global shape of horizontal grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The horizontal grid type

\item {} 
\sphinxstylestrong{niglobal} :: {[}out{]} i\sphinxhyphen{}index global size of grid

\item {} 
\sphinxstylestrong{njglobal} :: {[}out{]} j\sphinxhyphen{}index global size of grid

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_global_shape}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_global\_shape}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_metrics() (fortran subroutine in module mom\_grid)@\spxentry{allocate\_metrics()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/allocate_metrics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{allocate\_metrics}}}{\emph{G}}{}
Allocate memory used by the {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_grid\_type()}}}}} and related structures.
and related structures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: {[}inout{]} The horizontal grid type

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_grid\_end() (fortran subroutine in module mom\_grid)@\spxentry{mom\_grid\_end()}\spxextra{fortran subroutine in module mom\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid/}}\sphinxbfcode{\sphinxupquote{mom\_grid\_end}}}{\emph{G}}{}
Release memory used by the {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/ocean_grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_grid\_type()}}}}} and related structures.
and related structures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: {[}inout{]} The horizontal grid type

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_grid\_initialize module reference}
\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize}}\label{\detokenize{api/generated/modules/mom_grid_initialize:mom-grid-initialize-module-reference}}\label{\detokenize{api/generated/modules/mom_grid_initialize::doc}}\index{mom\_grid\_initialize (module)@\spxentry{mom\_grid\_initialize}\spxextra{module}|spxpagem}
Initializes horizontal grid.

{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:detamom-grid-initialize}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_grid_initialize:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/gps}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gps}}}}}
&
Global positioning system (aka container for information to describe the grid)
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_grid_initialize:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics()}}}}}
&
set\_grid\_metrics is used to set the primary values in the model’s horizontal grid. The bathymetry, land\sphinxhyphen{}sea mask and any restricted channel widths are not known yet, so these are set later.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/grid_metrics_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid\_metrics\_chksum()}}}}}
&
grid\_metrics\_chksum performs a set of checksums on metrics on the grid for debugging.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_from_mosaic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_from\_mosaic()}}}}}
&
Sets the grid metrics from a mosaic file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_cartesian}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_cartesian()}}}}}
&
Calculate the values of the metric terms for a Cartesian grid that might be used and save them in arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_spherical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_spherical()}}}}}
&
Calculate the values of the metric terms that might be used and save them in arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator()}}}}}
&
Calculate the values of the metric terms that might be used and save them in arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ds\_di()}}}}}
&
This function returns the grid spacing in the logical x direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_dj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ds\_dj()}}}}}
&
This function returns the grid spacing in the logical y direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dl()}}}}}
&
This function returns the contribution from the line integral along one of the four sides of a cell face to the area of a cell, assuming that the sides follow a linear path in latitude and longitude (i.e., on a Mercator grid).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/find_root}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_root()}}}}}
&
This subroutine finds and returns the value of y at which the monotonically increasing function fn takes the value fnval, also returning in ittmax the number of iterations of Newton’s method that were used to polish the root.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dx_di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dx\_di()}}}}}
&
This function calculates and returns the value of dx/di, where x is the longitude in Radians, and i is the integral north\sphinxhyphen{}south grid index.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/int_di_dx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_di\_dx()}}}}}
&
This function calculates and returns the integral of the inverse of dx/di to the point x, in radians.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dy_dj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dy\_dj()}}}}}
&
This subroutine calculates and returns the value of dy/dj, where y is the latitude in Radians, and j is the integral north\sphinxhyphen{}south grid index.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/int_dj_dy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_dj\_dy()}}}}}
&
This subroutine calculates and returns the integral of the inverse of dy/dj to the point y, in radians.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/extrapolate_metric}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extrapolate\_metric()}}}}}
&
Extrapolates missing metric data into all the halo regions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/adcroft_reciprocal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adcroft\_reciprocal()}}}}}
&
This function implements Adcroft’s rule for reciprocals, namely that Adcroft\_Inv(x) = 1/x for {\color{red}\bfseries{}|x|}\textgreater{}0 or 0 for x=0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/initialize_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_masks()}}}}}
&
Initializes the grid masks and any metrics that come with masks already applied.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_grid_initialize:detailed-description}}\label{\detokenize{api/generated/modules/mom_grid_initialize:detamom-grid-initialize}}
The metric terms have the form Dzp, IDzp, or DXDYp, where z can be X or Y, and p can be q, u, v, or h. z describes the direction of the metric, while p describes the location. IDzp is the inverse of Dzp, while DXDYp is the product of DXp and DYp except that areaT is calculated analytically from the latitudes and longitudes of the surrounding q points.

On a sphere, a variety of grids can be implemented by defining analytic expressions for dx\_di, dy\_dj (where x and y are latitude and longitude, and i and j are grid indices) and the expressions for the integrals of their inverses in the four subroutines dy\_dj, Int\_dj\_dy, dx\_di, and Int\_di\_dx.

initialize\_masks sets up land masks based on the depth field. The one argument is the minimum ocean depth. Depths that are less than this are interpreted as land points.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_grid_initialize:type-documentation}}\index{gps (fortran type in module mom\_grid\_initialize)@\spxentry{gps}\spxextra{fortran type in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/gps}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{gps}}}
Global positioning system (aka container for information to describe the grid)
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The longitudinal or x\sphinxhyphen{}direction length of the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latitudinal or y\sphinxhyphen{}direction length of the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{west\_lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The western longitude of the domain or the equivalent starting value for the x\sphinxhyphen{}axis.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{south\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The southern latitude of the domain or the equivalent starting value for the y\sphinxhyphen{}axis.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rad\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The radius of the Earth {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lat\_enhance\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amount by which the meridional resolution is enhanced within LAT\_EQ\_ENHANCE of the equator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lat\_eq\_enhance}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latitude range to the north and south of the equator over which the resolution is enhanced, in degrees.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isotropic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, an isotropic grid on a sphere (also known as a Mercator grid) is used. With an isotropic grid, the meridional extent of the domain (LENLAT), the zonal extent (LENLON), and the number of grid points in each direction are

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{equator\_reference}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the grid is defined to have the equator at the nearest q\sphinxhyphen{} or h\sphinxhyphen{} grid point to (\sphinxhyphen{}LOWLAT*NJGLOBAL/LENLAT).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{niglobal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of i\sphinxhyphen{}points in the global grid computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{njglobal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of j\sphinxhyphen{}points in the global grid computational domain.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_grid_initialize:function-subroutine-documentation}}\index{set\_grid\_metrics() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{set\_grid\_metrics()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{set\_grid\_metrics}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
set\_grid\_metrics is used to set the primary values in the model’s horizontal grid. The bathymetry, land\sphinxhyphen{}sea mask and any restricted channel widths are not known yet, so these are set later.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/grid_metrics_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid\_metrics\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/set_derived_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::set\_derived\_dyn\_horgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_cartesian}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_cartesian}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_from_mosaic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_from\_mosaic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_spherical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_spherical}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{grid\_metrics\_chksum() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{grid\_metrics\_chksum()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/grid_metrics_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{grid\_metrics\_chksum}}}{\emph{parent}, \emph{G}, \emph{US}}{}
grid\_metrics\_chksum performs a set of checksums on metrics on the grid for debugging.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{parent} :: {[}in{]} A string identifying the caller

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_grid\_metrics\_from\_mosaic() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{set\_grid\_metrics\_from\_mosaic()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_from_mosaic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{set\_grid\_metrics\_from\_mosaic}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
Sets the grid metrics from a mosaic file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/extrapolate_metric}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extrapolate\_metric}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_grid\_metrics\_cartesian() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{set\_grid\_metrics\_cartesian()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_cartesian}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{set\_grid\_metrics\_cartesian}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
Calculate the values of the metric terms for a Cartesian grid that might be used and save them in arrays.

Within this subroutine, the x\sphinxhyphen{} and y\sphinxhyphen{} grid spacings and their inverses and the cell areas centered on h, q, u, and v points are calculated, as are the geographic locations of each of these 4 sets of points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_grid\_metrics\_spherical() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{set\_grid\_metrics\_spherical()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_spherical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{set\_grid\_metrics\_spherical}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
Calculate the values of the metric terms that might be used and save them in arrays.

Within this subroutine, the x\sphinxhyphen{} and y\sphinxhyphen{} grid spacings and their inverses and the cell areas centered on h, q, u, and v points are calculated, as are the geographic locations of each of these 4 sets of points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_grid\_metrics\_mercator() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{set\_grid\_metrics\_mercator()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
Calculate the values of the metric terms that might be used and save them in arrays.

Within this subroutine, the x\sphinxhyphen{} and y\sphinxhyphen{} grid spacings and their inverses and the cell areas centered on h, q, u, and v points are calculated, as are the geographic locations of each of these 4 sets of points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ds\_di}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_dj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ds\_dj}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dx_di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dx\_di}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dy_dj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dy\_dj}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/find_root}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_root}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/int_di_dx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_di\_dx}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/int_dj_dy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_dj\_dy}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ds\_di() (fortran function in module mom\_grid\_initialize)@\spxentry{ds\_di()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_di}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{ds\_di}}}{\emph{x}, \emph{y}, \emph{GP}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function returns the grid spacing in the logical x direction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The longitude in question

\item {} 
\sphinxstylestrong{y} :: {[}in{]} The latitude in question

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dx_di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dx\_di}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ds\_dj() (fortran function in module mom\_grid\_initialize)@\spxentry{ds\_dj()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_dj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{ds\_dj}}}{\emph{x}, \emph{y}, \emph{GP}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function returns the grid spacing in the logical y direction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The longitude in question

\item {} 
\sphinxstylestrong{y} :: {[}in{]} The latitude in question

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dy_dj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dy\_dj}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dl() (fortran function in module mom\_grid\_initialize)@\spxentry{dl()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dl}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{dl}}}{\emph{x1}, \emph{x2}, \emph{y1}, \emph{y2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function returns the contribution from the line integral along one of the four sides of a cell face to the area of a cell, assuming that the sides follow a linear path in latitude and longitude (i.e., on a Mercator grid).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x1} :: {[}in{]} Segment starting longitude, in degrees E.

\item {} 
\sphinxstylestrong{x2} :: {[}in{]} Segment ending longitude, in degrees E.

\item {} 
\sphinxstylestrong{y1} :: {[}in{]} Segment ending latitude, in degrees N.

\item {} 
\sphinxstylestrong{y2} :: {[}in{]} Segment ending latitude, in degrees N.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_root() (fortran function in module mom\_grid\_initialize)@\spxentry{find\_root()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/find_root}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{find\_root}}}{\emph{fn}, \emph{dy\_df}, \emph{GP}, \emph{fnval}, \emph{y1}, \emph{ymin}, \emph{ymax}, \emph{ittmax}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine finds and returns the value of y at which the monotonically increasing function fn takes the value fnval, also returning in ittmax the number of iterations of Newton’s method that were used to polish the root.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The value of y where fn(y) = fnval that will be returned

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fn} :: The external function whose root is being sought

\item {} 
\sphinxstylestrong{dy\_df} :: The inverse of the derivative of that function

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\item {} 
\sphinxstylestrong{fnval} :: {[}in{]} The value of fn being sought

\item {} 
\sphinxstylestrong{y1} :: {[}in{]} A first guess for y

\item {} 
\sphinxstylestrong{ymin} :: {[}in{]} The minimum permitted value of y

\item {} 
\sphinxstylestrong{ymax} :: {[}in{]} The maximum permitted value of y

\item {} 
\sphinxstylestrong{ittmax} :: {[}out{]} The number of iterations used to polish the root

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dx\_di() (fortran function in module mom\_grid\_initialize)@\spxentry{dx\_di()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dx_di}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{dx\_di}}}{\emph{x}, \emph{GP}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function calculates and returns the value of dx/di, where x is the longitude in Radians, and i is the integral north\sphinxhyphen{}south grid index.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The longitude in question

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ds\_di}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_di\_dx() (fortran function in module mom\_grid\_initialize)@\spxentry{int\_di\_dx()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/int_di_dx}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{int\_di\_dx}}}{\emph{x}, \emph{GP}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function calculates and returns the integral of the inverse of dx/di to the point x, in radians.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The longitude in question

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dy\_dj() (fortran function in module mom\_grid\_initialize)@\spxentry{dy\_dj()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/dy_dj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{dy\_dj}}}{\emph{y}, \emph{GP}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine calculates and returns the value of dy/dj, where y is the latitude in Radians, and j is the integral north\sphinxhyphen{}south grid index.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{y} :: {[}in{]} The latitude in question

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/ds_dj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ds\_dj}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_dj\_dy() (fortran function in module mom\_grid\_initialize)@\spxentry{int\_dj\_dy()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/int_dj_dy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{int\_dj\_dy}}}{\emph{y}, \emph{GP}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine calculates and returns the integral of the inverse of dy/dj to the point y, in radians.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{y} :: {[}in{]} The latitude in question

\item {} 
\sphinxstylestrong{gp} :: {[}in{]} A structure of grid parameters

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_mercator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_mercator}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extrapolate\_metric() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{extrapolate\_metric()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/extrapolate_metric}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{extrapolate\_metric}}}{\emph{var}, \emph{jh}, \emph{missing}}{}
Extrapolates missing metric data into all the halo regions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{var} :: {[}inout{]} The array in which to fill in halos

\item {} 
\sphinxstylestrong{jh} :: {[}in{]} The size of the halos to be filled

\item {} 
\sphinxstylestrong{missing} :: {[}in{]} The missing data fill value, 0 by default.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics_from_mosaic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_grid\_metrics\_from\_mosaic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adcroft\_reciprocal() (fortran function in module mom\_grid\_initialize)@\spxentry{adcroft\_reciprocal()}\spxextra{fortran function in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/adcroft_reciprocal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{adcroft\_reciprocal}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function implements Adcroft’s rule for reciprocals, namely that Adcroft\_Inv(x) = 1/x for {\color{red}\bfseries{}|x|}\textgreater{}0 or 0 for x=0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The value being inverted.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The Adcroft reciprocal of val.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/initialize_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_masks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_masks() (fortran subroutine in module mom\_grid\_initialize)@\spxentry{initialize\_masks()}\spxextra{fortran subroutine in module mom\_grid\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/initialize_masks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_grid\_initialize/}}\sphinxbfcode{\sphinxupquote{initialize\_masks}}}{\emph{G}, \emph{PF}, \emph{US}}{}
Initializes the grid masks and any metrics that come with masks already applied.

Initialize\_masks sets mask2dT, mask2dCu, mask2dCv, and mask2dBu to mask out flow over any points which are shallower than Dmin and permit an appropriate treatment of the boundary conditions. mask2dCu and mask2dCv are 0.0 at any points adjacent to a land point. mask2dBu is 0.0 at any land or boundary point. For points in the interior, mask2dCu, mask2dCv, and mask2dBu are all 1.0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/adcroft_reciprocal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adcroft\_reciprocal}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_hor\_index module reference}
\label{\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index}}\label{\detokenize{api/generated/modules/mom_hor_index:mom-hor-index-module-reference}}\label{\detokenize{api/generated/modules/mom_hor_index::doc}}\index{mom\_hor\_index (module)@\spxentry{mom\_hor\_index}\spxextra{module}|spxpagem}
Defines the horizontal index type ({\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}}) used for providing index ranges.
) used for providing index ranges.

{\hyperref[\detokenize{api/generated/modules/mom_hor_index:detamom-hor-index}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_hor_index:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type}}}}}
&
Container for horizontal index ranges for data, computational and global domains.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_hor_index:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_init()}}}}}
&
Sets various index values in a {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hit_assign}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hit\_assign()}}}}}
&
HIT\_assign copies one {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}} into another.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_hor\_index()}}}}}
&
Rotate the horizontal index ranges from the input to the output map.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_hor_index:detailed-description}}\label{\detokenize{api/generated/modules/mom_hor_index:detamom-hor-index}}
The {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}} provides the declarations and loop ranges for almost all data with horizontal extent.
provides the declarations and loop ranges for almost all data with horizontal extent.

Declarations and loop ranges should always be coded with the symmetric memory model in mind. The non\sphinxhyphen{}symmetric memory mode will then also work, albeit with a different (less efficient) communication pattern.

Using the {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}} HI:
HI:
\begin{itemize}
\item {} 
declaration of h\sphinxhyphen{}point data is of the form \sphinxcode{\sphinxupquote{h(HI\%isd:HI\%ied,HI\%jsd:HI\%jed)}}

\item {} 
declaration of q\sphinxhyphen{}point data is of the form \sphinxcode{\sphinxupquote{q(HI\%IsdB:HI\%IedB,HI\%JsdB:HI\%JedB)}}

\item {} 
declaration of u\sphinxhyphen{}point data is of the form \sphinxcode{\sphinxupquote{u(HI\%IsdB:HI\%IedB,HI\%jsd:HI\%jed)}}

\item {} 
declaration of v\sphinxhyphen{}point data is of the form \sphinxcode{\sphinxupquote{v(HI\%isd:HI\%ied,HI\%JsdB:HI\%JedB)}} .

\end{itemize}

For more detail explanation of horizontal indexing see {\hyperref[\detokenize{api/generated/pages/Horizontal_Indexing:horizontal-indexing}]{\sphinxcrossref{\DUrole{std,std-ref}{Horizontal indexing and memory}}}}
.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_hor_index:type-documentation}}\index{hor\_index\_type (fortran type in module mom\_hor\_index)@\spxentry{hor\_index\_type}\spxextra{fortran type in module mom\_hor\_index}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_hor\_index/}}\sphinxbfcode{\sphinxupquote{hor\_index\_type}}}
Container for horizontal index ranges for data, computational and global domains.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell centers within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jscb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jecb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isdb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iedb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsdb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jedb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the data domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start i\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end i\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsgb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The start j\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jegb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The end j\sphinxhyphen{}index of cell vertices within the global domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idg\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The offset between the corresponding global and local i\sphinxhyphen{}indices.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jdg\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The offset between the corresponding global and local j\sphinxhyphen{}indices.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{symmetric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if symmetric memory is used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{niglobal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The global number of h\sphinxhyphen{}cells in the i\sphinxhyphen{}direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{njglobal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The global number of h\sphinxhyphen{}cells in the j\sphinxhyphen{}direction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{turns}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of quarter\sphinxhyphen{}turn rotations from input to model.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_hor_index:function-subroutine-documentation}}\index{hor\_index\_init() (fortran subroutine in module mom\_hor\_index)@\spxentry{hor\_index\_init()}\spxextra{fortran subroutine in module mom\_hor\_index}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_index/}}\sphinxbfcode{\sphinxupquote{hor\_index\_init}}}{\emph{Domain}, \emph{HI}, \emph{param\_file}, \emph{local\_indexing}, \emph{index\_offset}}{}
Sets various index values in a {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} The MOM domain from which to extract information.

\item {} 
\sphinxstylestrong{hi} :: {[}inout{]} A horizontal index type to populate with data

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{local\_indexing} :: {[}in{]} If true, all tracer data domains start at 1

\item {} 
\sphinxstylestrong{index\_offset} :: {[}in{]} A fixed additional offset to all indices

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_domain_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_domain\_extent}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_global_shape}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_global\_shape}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::mom\_grid\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{hit\_assign() (fortran subroutine in module mom\_hor\_index)@\spxentry{hit\_assign()}\spxextra{fortran subroutine in module mom\_hor\_index}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hit_assign}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_index/}}\sphinxbfcode{\sphinxupquote{hit\_assign}}}{\emph{HI1}, \emph{HI2}}{}
HIT\_assign copies one {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_index\_type()}}}}} into another. It is accessed via an assignment (=) operator.
into another. It is accessed via an assignment (=) operator.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi1} :: {[}out{]} Horizontal index type to copy to

\item {} 
\sphinxstylestrong{hi2} :: {[}in{]} Horizontal index type to copy from

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_hor\_index() (fortran subroutine in module mom\_hor\_index)@\spxentry{rotate\_hor\_index()}\spxextra{fortran subroutine in module mom\_hor\_index}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/rotate_hor_index}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_index/}}\sphinxbfcode{\sphinxupquote{rotate\_hor\_index}}}{\emph{HI\_in}, \emph{turns}, \emph{HI}}{}
Rotate the horizontal index ranges from the input to the output map.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi\_in} :: {[}in{]} Unrotated horizontal indices

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\item {} 
\sphinxstylestrong{hi} :: {[}inout{]} Rotated horizontal indices

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_b\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_b\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_h\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_h\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_pair\_b\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_b_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_pair\_b\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_pair\_h\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_pair_h_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_pair\_h\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_u\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_u_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_u\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_uv\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_uv_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_uv\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_v\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_checksums:f/mom_checksums/chksum_v_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_checksums::chksum\_v\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_hor\_visc module reference}
\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc}}\label{\detokenize{api/generated/modules/mom_hor_visc:mom-hor-visc-module-reference}}\label{\detokenize{api/generated/modules/mom_hor_visc::doc}}\index{mom\_hor\_visc (module)@\spxentry{mom\_hor\_visc}\spxextra{module}|spxpagem}
Calculates horizontal viscosity and viscous stresses.

{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:detamom-hor-visc}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_hor_visc:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_visc\_cs}}}}}
&
Control structure for horizontal viscosity.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_hor_visc:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontal\_viscosity()}}}}}
&
Calculates the acceleration due to the horizontal viscosity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_visc\_init()}}}}}
&
Allocates space for and calculates static variables used by \sphinxcode{\sphinxupquote{horizontal\_viscosity()}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/align_aniso_tensor_to_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{align\_aniso\_tensor\_to\_grid()}}}}}
&
Calculates factors in the anisotropic orientation tensor to be align with the grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/smooth_gme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{smooth\_gme()}}}}}
&
Apply a 1\sphinxhyphen{}1\sphinxhyphen{}4\sphinxhyphen{}1\sphinxhyphen{}1 Laplacian filter one time on GME diffusive flux to reduce any horizontal two\sphinxhyphen{}grid\sphinxhyphen{}point noise.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_visc\_end()}}}}}
&
Deallocates any variables allocated in hor\_visc\_init.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_hor_visc:detailed-description}}\label{\detokenize{api/generated/modules/mom_hor_visc:detamom-hor-visc}}
This module contains the subroutine \sphinxcode{\sphinxupquote{horizontal\_viscosity()}} that calculates the effects of horizontal viscosity, including parameterizations of the value of the viscosity itself.
that calculates the effects of horizontal viscosity, including parameterizations of the value of the viscosity itself. \sphinxcode{\sphinxupquote{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.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\) .


\paragraph{Horizontal viscosity in MOM}
\label{\detokenize{api/generated/modules/mom_hor_visc:horizontal-viscosity-in-mom}}\label{\detokenize{api/generated/modules/mom_hor_visc:namespacemom-hor-visc-1section-horizontal-viscosity}}
In general, the horizontal stress tensor can be written as
\begin{equation*}
\begin{split}{\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}\end{split}
\end{equation*}
where \(\sigma_D\) , \(\sigma_T\) and \(\sigma_S\) are stresses associated with invariant factors in the strain\sphinxhyphen{}rate tensor. For a Newtonian fluid, the stress tensor is usually linearly related to the strain\sphinxhyphen{}rate tensor. The horizontal strain\sphinxhyphen{}rate tensor is
\begin{equation*}
\begin{split}\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}\end{split}
\end{equation*}
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\sphinxhyphen{}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
\begin{equation*}
\begin{split}{\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} .\end{split}
\end{equation*}
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*}


\subparagraph{Laplacian viscosity coefficient}
\label{\detokenize{api/generated/modules/mom_hor_visc:laplacian-viscosity-coefficient}}\label{\detokenize{api/generated/modules/mom_hor_visc:namespacemom-hor-visc-1section-laplacian-viscosity-coefficient}}
The horizontal viscosity coefficient,
\(\kappa_h\) , can have multiple components. The isotropic components are:
\begin{itemize}
\item {} 
A uniform background component, \(\kappa_{bg}\) .

\item {} 
A constant but spatially variable 2D map, \(\kappa_{2d}(x,y)\) .

\item {} 
A ‘’MICOM’’ viscosity, \(U_\nu \Delta(x,y)\) , which uses a constant velocity scale, \(U_\nu\) and a measure of the grid\sphinxhyphen{}spacing \(\Delta(x,y)^2 = \frac{2 \Delta x^2 \Delta y^2}{\Delta x^2 + \Delta y^2}\) .

\item {} 
A function of latitude, \(\kappa_{\phi}(x,y) = \kappa_{\pi/2} |\sin(\phi)|^n\) .

\item {} 
A dynamic Smagorinsky viscosity, \(\kappa_{Sm}(x,y,t) = C_{Sm} \Delta^2 \sqrt{\dot{e}_T^2 + \dot{e}_S^2}\) .

\item {} 
A dynamic Leith viscosity, \(\kappa_{Lth}(x,y,t) = C_{Lth} \Delta^3 \sqrt{|\nabla \zeta|^2 + |\nabla \dot{e}_D|^2}\) .

\end{itemize}

A maximum stable viscosity,
\(\kappa_{max}(x,y)\) is calculated based on the grid\sphinxhyphen{}spacing and time\sphinxhyphen{}step and used to clip calculated viscosities.

The static components of
\(\kappa_h\) are first combined as follows:
\begin{equation*}
\begin{split}\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]\end{split}
\end{equation*}
and stored in the module control structure as variables \sphinxcode{\sphinxupquote{Kh\_bg\_xx}} and \sphinxcode{\sphinxupquote{Kh\_bg\_xy}} for the tension (h\sphinxhyphen{}points) and shear (q\sphinxhyphen{}points) components respectively.

The full viscosity includes the dynamic components as follows:
\begin{equation*}
\begin{split}\kappa_h(x,y,t) = r(\Delta,L_d) \max \left( \kappa_{static}, \kappa_{Sm}, \kappa_{Lth} \right)\end{split}
\end{equation*}
where \(r(\Delta,L_d)\) is a resolution function.

The dynamic Smagorinsky and Leith viscosity schemes are exclusive with each other.


\subparagraph{Viscous boundary conditions}
\label{\detokenize{api/generated/modules/mom_hor_visc:viscous-boundary-conditions}}\label{\detokenize{api/generated/modules/mom_hor_visc:namespacemom-hor-visc-1section-viscous-boundary-conditions}}
Free slip boundary conditions have been coded, although no slip boundary conditions can be used with the Laplacian viscosity based on the 2D land\sphinxhyphen{}sea mask. For a western boundary, for example, the boundary conditions with the biharmonic operator would be written as:
\begin{equation*}
\begin{split}\partial_x v = 0 ; \partial_x^3 v = 0 ; u = 0 ; \partial_x^2 u = 0 ,\end{split}
\end{equation*}
while for a Laplacian operator, they are simply
\begin{equation*}
\begin{split}\partial_x v = 0 ; u = 0 .\end{split}
\end{equation*}
These boundary conditions are largely dictated by the use of an Arakawa C\sphinxhyphen{}grid and by the varying layer thickness.


\subparagraph{Anisotropic viscosity}
\label{\detokenize{api/generated/modules/mom_hor_visc:anisotropic-viscosity}}\label{\detokenize{api/generated/modules/mom_hor_visc:namespacemom-hor-visc-1section-anisotropic-viscosity}}
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{equation*}
\begin{split}\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}\end{split}
\end{equation*}
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\sphinxhyphen{}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.


\subparagraph{Discretization}
\label{\detokenize{api/generated/modules/mom_hor_visc:discretization}}\label{\detokenize{api/generated/modules/mom_hor_visc:namespacemom-hor-visc-1section-viscous-discretization}}
The horizontal tension,
\(\dot{e}_T\) , is stored in variable \sphinxcode{\sphinxupquote{sh\_xx}} and discretized as
\begin{equation*}
\begin{split}\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) .\end{split}
\end{equation*}
The horizontal divergent strain, \(\dot{e}_D\) , is stored in variable \sphinxcode{\sphinxupquote{div\_xx}} and discretized as
\begin{equation*}
\begin{split}\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) .\end{split}
\end{equation*}
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 \sphinxcode{\sphinxupquote{sh\_xy}} and discretized as
\begin{equation*}
\begin{split}\dot{e}_S = v_x + u_y\end{split}
\end{equation*}
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\sphinxhyphen{}slip or free\sphinxhyphen{}slip boundary conditions can be applied to \(v_x\) and \(u_y\) where appropriate.

The tendency for the x\sphinxhyphen{}component of the divergence of stress is stored in variable \sphinxcode{\sphinxupquote{diffu}}
and discretized as
\begin{equation*}
\begin{split}\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) .\end{split}
\end{equation*}
The tendency for the y\sphinxhyphen{}component of the divergence of stress is stored in variable \sphinxcode{\sphinxupquote{diffv}}
and discretized as
\begin{equation*}
\begin{split}\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) .\end{split}
\end{equation*}

\subparagraph{References}
\label{\detokenize{api/generated/modules/mom_hor_visc:references}}\label{\detokenize{api/generated/modules/mom_hor_visc:namespacemom-hor-visc-1section-viscous-refs}}
Griffies, S.M., and Hallberg, R.W., 2000: Biharmonic friction with a Smagorinsky\sphinxhyphen{}like viscosity for use in large\sphinxhyphen{}scale eddy\sphinxhyphen{}permitting ocean models. Monthly Weather Review, 128(8), 2935\sphinxhyphen{}2946.
\sphinxurl{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\sphinxhyphen{}536.
\sphinxurl{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\sphinxhyphen{}106.

Smith, R.D., and McWilliams, J.C., 2003: Anisotropic horizontal viscosity for ocean models. Ocean Modelling, 5(2), 129\sphinxhyphen{}156.
\sphinxurl{https://doi.org/10.1016/S1463-5003(02)00016-1}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_hor_visc:type-documentation}}\index{hor\_visc\_cs (fortran type in module mom\_hor\_visc)@\spxentry{hor\_visc\_cs}\spxextra{fortran type in module mom\_hor\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_hor\_visc/}}\sphinxbfcode{\sphinxupquote{hor\_visc\_cs}}}
Control structure for horizontal viscosity.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_grid\_re\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_grid\_re\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diffu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_diffv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_diffu\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_diffv\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ah\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ah\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gme\_coeff\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gme\_coeff\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vort\_xy\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_div\_xx\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sh\_xy\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sh\_xx\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frictwork}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frictworkintz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_frictwork\_gme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic id.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{laplacian}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use a Laplacian horizontal viscosity if true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{biharmonic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use a biharmonic horizontal viscosity if true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{no\_slip}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, no slip boundary conditions are used. Otherwise free slip boundary conditions are assumed. The implementation of the free slip boundary conditions on a C\sphinxhyphen{}grid is much cleaner than the no slip boundary conditions. The use of free slip b.c.s is strongly encouraged. The no slip b.c.s are not implemented with the biharmonic viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bound\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the Laplacian coefficient is locally limited to guarantee stability.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{better\_bound\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a more careful bounding of the Laplacian viscosity to guarantee stability.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bound\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the biharmonic coefficient is locally limited to guarantee stability.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{better\_bound\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a more careful bounding of the biharmonic viscosity to guarantee stability.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{re\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: so that the biharmonic Reynolds number is equal to this.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bound\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The nondimensional coefficient of the ratio of the viscosity bounds to the theoretical maximum for stability without considering other terms {[}nondim{]}. The default is 0.8.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{smagorinsky\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use Smagorinsky nonlinear eddy viscosity. KH is the background value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{smagorinsky\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a biharmonic form of Smagorinsky nonlinear eddy viscosity. AH is the background.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{leith\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use 2D Leith nonlinear eddy viscosity. KH is the background value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{modified\_leith}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use extra component of Leith viscosity to damp divergent flow. To use, still set Leith\_Kh=.TRUE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_beta\_in\_leith}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, includes the beta term in the Leith viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{leith\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a biharmonic form of 2D Leith nonlinear eddy viscosity. AH is the background.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_qg\_leith\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use QG Leith nonlinear eddy viscosity. KH is the background value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bound\_coriolis}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true \& SMAGORINSKY\_AH is used, the biharmonic viscosity is modified to include a term that scales quadratically with the velocity shears.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_kh\_bg\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Read 2d background viscosity from a file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh\_bg\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum value allowed for Laplacian horizontal viscosity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. The default is 0.0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_land\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use the land mask for the computation of thicknesses at velocity locations. This eliminates the dependence on arbitrary values over land or outside of the domain. Default is False to maintain answers with legacy experiments but should be changed to True for new experiments.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{anisotropic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, allow anisotropic component to the viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{add\_les\_viscosity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, adds the viscosity from Smagorinsky and Leith to the background viscosity instead of taking the maximum.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh\_aniso}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The anisotropic viscosity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dynamic\_aniso}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the anisotropic viscosity is recomputed as a function of state. This is set depending on ANISOTROPIC\_MODE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_scale\_meke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the viscosity contribution from MEKE is scaled by the resolution function.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_gme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use GME backscatter scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gme\_h0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The strength of GME tapers quadratically to zero when the bathymetric depth is shallower than GME\_H0 {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gme\_efficiency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The nondimensional prefactor multiplying the GME coefficient {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gme\_limiter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The absolute maximum value the GME coefficient is allowed to take {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_grid\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum horizontal Laplacian viscosity used to limit the grid Reynolds number {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_grid\_ah}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimun horizontal biharmonic viscosity used to limit grid Reynolds number {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* re\_ah\_const\_xy {[}*) :: The background Laplacian viscosity at h points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. The actual viscosity may be the larger of this viscosity and the Smagorinsky and Leith viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The background Laplacian viscosity at h points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. The actual viscosity may be the larger of this viscosity and the Smagorinsky and Leith viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The background biharmonic viscosity at h points {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}. The actual viscosity may be the larger of this viscosity and the Smagorinsky and Leith viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The amount by which stresses through h points are reduced due to partial barriers {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The maximum permitted Laplacian viscosity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The maximum permitted biharmonic viscosity {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Factor n1*n2 in the anisotropic direction tensor at h\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Factor n1**2\sphinxhyphen{}n2**2 in the anisotropic direction tensor at h\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Harmonic mean of the squares of the grid {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Harmonic mean of the squares of the grid\textasciicircum{}(3/2) {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The background Laplacian viscosity at q points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. The actual viscosity may be the larger of this viscosity and the Smagorinsky and Leith viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The background biharmonic viscosity at q points {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}. The actual viscosity may be the larger of this viscosity and the Smagorinsky and Leith viscosities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The amount by which stresses through q points are reduced due to partial barriers {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The maximum permitted Laplacian viscosity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The maximum permitted biharmonic viscosity {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Factor n1*n2 in the anisotropic direction tensor at q\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Factor n1**2\sphinxhyphen{}n2**2 in the anisotropic direction tensor at q\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dx\textasciicircum{}2 at h points {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dy\textasciicircum{}2 at h points {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dx/dy at h points {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dy/dx at h points {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dx\textasciicircum{}2 at q points {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dy\textasciicircum{}2 at q points {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dx/dy at q points {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Pre\sphinxhyphen{}calculated dy/dx at q points {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/(dx\textasciicircum{}2 dy) at u points {[}L\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/(dx dy\textasciicircum{}2) at u points {[}L\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/(dx\textasciicircum{}2 dy) at v points {[}L\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: 1/(dx dy\textasciicircum{}2) at v points {[}L\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Laplacian metric\sphinxhyphen{}dependent constants {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}L6 \textasciitilde{}\textgreater{} m6{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Laplacian metric\sphinxhyphen{}dependent constants {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}L4 \textasciitilde{}\textgreater{} m4{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}T L4 \textasciitilde{}\textgreater{} s m4{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Laplacian metric\sphinxhyphen{}dependent constants {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}L6 \textasciitilde{}\textgreater{} m6{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Laplacian metric\sphinxhyphen{}dependent constants {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}L4 \textasciitilde{}\textgreater{} m4{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}T L4 \textasciitilde{}\textgreater{} s m4{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Biharmonic metric\sphinxhyphen{}dependent constants {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure to regulate diagnostics

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_hor_visc:function-subroutine-documentation}}\index{horizontal\_viscosity() (fortran subroutine in module mom\_hor\_visc)@\spxentry{horizontal\_viscosity()}\spxextra{fortran subroutine in module mom\_hor\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_visc/}}\sphinxbfcode{\sphinxupquote{horizontal\_viscosity}}}{\emph{u}, \emph{v}, \emph{h}, \emph{diffu}, \emph{diffv}, \emph{MEKE}, \emph{VarMix}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{OBC}, \emph{BT}, \emph{TD}, \emph{ADp}}{}
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\sphinxhyphen{}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\sphinxhyphen{}2:ie+2,js\sphinxhyphen{}2:je+2{]} v{[}is\sphinxhyphen{}2:ie+2,js\sphinxhyphen{}2:je+2{]} h{[}is\sphinxhyphen{}1:ie+1,js\sphinxhyphen{}1:je+1{]}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{diffu} :: {[}out{]} Zonal acceleration due to convergence of

\item {} 
\sphinxstylestrong{diffv} :: {[}out{]} Meridional acceleration due to convergence

\item {} 
\sphinxstylestrong{meke} :: Pointer to a structure containing fields related to Mesoscale Eddy Kinetic Energy.

\item {} 
\sphinxstylestrong{varmix} :: Pointer to a structure with fields that specify the spatially variable viscosities

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Control structure returned by a previous call to hor\_visc\_init.

\item {} 
\sphinxstylestrong{obc} :: Pointer to an open boundary condition type

\item {} 
\sphinxstylestrong{bt} :: Pointer to a structure containing barotropic velocities.

\item {} 
\sphinxstylestrong{td} :: Pointer to a structure containing thickness diffusivities.

\item {} 
\sphinxstylestrong{adp} :: Acceleration diagnostic pointers

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/barotropic_get_tav}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::barotropic\_get\_tav}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/smooth_gme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{smooth\_gme}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{hor\_visc\_init() (fortran subroutine in module mom\_hor\_visc)@\spxentry{hor\_visc\_init()}\spxextra{fortran subroutine in module mom\_hor\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_visc/}}\sphinxbfcode{\sphinxupquote{hor\_visc\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{MEKE}, \emph{ADp}}{}
Allocates space for and calculates static variables used by \sphinxcode{\sphinxupquote{horizontal\_viscosity()}}. hor\_visc\_init calculates and stores the values of a number of metric functions that are used in
. hor\_visc\_init calculates and stores the values of a number of metric functions that are used in \sphinxcode{\sphinxupquote{horizontal\_viscosity()}}. .
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Structure to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for this module

\item {} 
\sphinxstylestrong{meke} :: MEKE data

\item {} 
\sphinxstylestrong{adp} :: Acceleration diagnostic pointers

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/align_aniso_tensor_to_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{align\_aniso\_tensor\_to\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{align\_aniso\_tensor\_to\_grid() (fortran subroutine in module mom\_hor\_visc)@\spxentry{align\_aniso\_tensor\_to\_grid()}\spxextra{fortran subroutine in module mom\_hor\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/align_aniso_tensor_to_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_visc/}}\sphinxbfcode{\sphinxupquote{align\_aniso\_tensor\_to\_grid}}}{\emph{CS}, \emph{n1}, \emph{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.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for horizontal viscosity

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} i\sphinxhyphen{}component of direction vector {[}nondim{]}

\item {} 
\sphinxstylestrong{n2} :: {[}in{]} j\sphinxhyphen{}component of direction vector {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hor\_visc\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{smooth\_gme() (fortran subroutine in module mom\_hor\_visc)@\spxentry{smooth\_gme()}\spxextra{fortran subroutine in module mom\_hor\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/smooth_gme}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_visc/}}\sphinxbfcode{\sphinxupquote{smooth\_gme}}}{\emph{CS}, \emph{G}, \emph{GME\_flux\_h}, \emph{GME\_flux\_q}}{}
Apply a 1\sphinxhyphen{}1\sphinxhyphen{}4\sphinxhyphen{}1\sphinxhyphen{}1 Laplacian filter one time on GME diffusive flux to reduce any horizontal two\sphinxhyphen{}grid\sphinxhyphen{}point noise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gme\_flux\_h} :: {[}inout{]} GME diffusive flux at h points

\item {} 
\sphinxstylestrong{gme\_flux\_q} :: {[}inout{]} GME diffusive flux at q points

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/horizontal_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontal\_viscosity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{hor\_visc\_end() (fortran subroutine in module mom\_hor\_visc)@\spxentry{hor\_visc\_end()}\spxextra{fortran subroutine in module mom\_hor\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc/hor_visc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_hor\_visc/}}\sphinxbfcode{\sphinxupquote{hor\_visc\_end}}}{\emph{CS}}{}
Deallocates any variables allocated in hor\_visc\_init.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to hor\_visc\_init.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_horizontal\_regridding module reference}
\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding}}\label{\detokenize{api/generated/modules/mom_horizontal_regridding:mom-horizontal-regridding-module-reference}}\label{\detokenize{api/generated/modules/mom_horizontal_regridding::doc}}\index{mom\_horizontal\_regridding (module)@\spxentry{mom\_horizontal\_regridding}\spxextra{module}|spxpagem}
Horizontal interpolation.

{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:detamom-horizontal-regridding}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_horizontal_regridding:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/mystats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mystats()}}}}}
&
Write to the terminal some basic statistics about the k\sphinxhyphen{}th level of an array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_miss_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_miss\_2d()}}}}}
&
Use ICE\sphinxhyphen{}9 algorithm to populate points (fill=1) with valid data (good=1).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_record()}}}}}
&
Extrapolate and interpolate from a file record.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_fms_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_fms\_id()}}}}}
&
Extrapolate and interpolate using a FMS time interpolation handle.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/meshgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meshgrid()}}}}}
&
Create a 2d\sphinxhyphen{}mesh of grid coordinates from 1\sphinxhyphen{}d arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_boundaries_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_boundaries\_int()}}}}}
&
Fill grid edges for integer data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_boundaries_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_boundaries\_real()}}}}}
&
Fill grid edges for real data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/smooth_heights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{smooth\_heights()}}}}}
&
Solve del2 (zi) = 0 using successive iterations with a 5 point stencil.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_horizontal_regridding:detailed-description}}\label{\detokenize{api/generated/modules/mom_horizontal_regridding:detamom-horizontal-regridding}}
Horizontal interpolation.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_horizontal_regridding:function-subroutine-documentation}}\index{mystats() (fortran subroutine in module mom\_horizontal\_regridding)@\spxentry{mystats()}\spxextra{fortran subroutine in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/mystats}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{mystats}}}{\emph{array}, \emph{missing}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{k}, \emph{mesg}}{}
Write to the terminal some basic statistics about the k\sphinxhyphen{}th level of an array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{array} :: {[}in{]} input array (ND)

\item {} 
\sphinxstylestrong{missing} :: {[}in{]} missing value (ND)

\item {} 
\sphinxstylestrong{is} :: Start index in i

\item {} 
\sphinxstylestrong{ie} :: End index in i

\item {} 
\sphinxstylestrong{js} :: Start index in j

\item {} 
\sphinxstylestrong{je} :: End index in j

\item {} 
\sphinxstylestrong{k} :: Level to calculate statistics for

\item {} 
\sphinxstylestrong{mesg} :: Label to use in message

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_fms_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_fms\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_record}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z::mom\_initialize\_tracer\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fill\_miss\_2d() (fortran subroutine in module mom\_horizontal\_regridding)@\spxentry{fill\_miss\_2d()}\spxextra{fortran subroutine in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_miss_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{fill\_miss\_2d}}}{\emph{aout}, \emph{good}, \emph{fill}, \emph{prev}, \emph{G}, \emph{smooth}, \emph{num\_pass}, \emph{relc}, \emph{crit}, \emph{debug}, \emph{answers\_2018}}{}
Use ICE\sphinxhyphen{}9 algorithm to populate points (fill=1) with valid data (good=1). If no information is available, Then use a previous guess (prev). Optionally (smooth) blend the filled points to achieve a more desirable result.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{aout} :: {[}inout{]} The array with missing values to fill

\item {} 
\sphinxstylestrong{good} :: {[}in{]} Valid data mask for incoming array

\item {} 
\sphinxstylestrong{fill} :: {[}in{]} Same shape array of points which need

\item {} 
\sphinxstylestrong{prev} :: {[}in{]} First guess where isolated holes exist.

\item {} 
\sphinxstylestrong{smooth} :: {[}in{]} If present and true, apply a number of Laplacian iterations to the interpolated data

\item {} 
\sphinxstylestrong{num\_pass} :: {[}in{]} The maximum number of iterations

\item {} 
\sphinxstylestrong{relc} :: {[}in{]} A relaxation coefficient for Laplacian (ND)

\item {} 
\sphinxstylestrong{crit} :: {[}in{]} A minimal value for deltas between iterations.

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true, write verbose debugging messages.

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true, use expressions that give the same answers as the code did in late 2018. Otherwise add parentheses for rotational symmetry.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_fms_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_fms\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_record}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{horiz\_interp\_and\_extrap\_tracer\_record() (fortran subroutine in module mom\_horizontal\_regridding)@\spxentry{horiz\_interp\_and\_extrap\_tracer\_record()}\spxextra{fortran subroutine in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_record}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_record}}}{\emph{filename}, \emph{varnam}, \emph{conversion}, \emph{recnum}, \emph{G}, \emph{tr\_z}, \emph{mask\_z}, \emph{z\_in}, \emph{z\_edges\_in}, \emph{missing\_value}, \emph{reentrant\_x}, \emph{tripolar\_n}, \emph{homogenize}, \emph{m\_to\_Z}, \emph{answers\_2018}, \emph{ongrid}}{}
Extrapolate and interpolate from a file record.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} Path to file containing tracer to be interpolated.

\item {} 
\sphinxstylestrong{varnam} :: {[}in{]} Name of tracer in filee.

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} Conversion factor for tracer.

\item {} 
\sphinxstylestrong{recnum} :: {[}in{]} Record number of tracer to be read.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid object

\item {} 
\sphinxstylestrong{tr\_z} :: pointer to allocatable tracer array on local model grid and input\sphinxhyphen{}file vertical levels.

\item {} 
\sphinxstylestrong{mask\_z} :: pointer to allocatable tracer mask array on local model grid and input\sphinxhyphen{}file vertical levels.

\item {} 
\sphinxstylestrong{z\_in} :: Cell grid values for input data.

\item {} 
\sphinxstylestrong{z\_edges\_in} :: Cell grid edge values for input data.

\item {} 
\sphinxstylestrong{missing\_value} :: {[}out{]} The missing value in the returned array.

\item {} 
\sphinxstylestrong{reentrant\_x} :: {[}in{]} If true, this grid is reentrant in the x\sphinxhyphen{}direction

\item {} 
\sphinxstylestrong{tripolar\_n} :: {[}in{]} If true, this is a northern tripolar grid

\item {} 
\sphinxstylestrong{homogenize} :: {[}in{]} If present and true, horizontally homogenize data to produce perfectly “flat” initial conditions

\item {} 
\sphinxstylestrong{m\_to\_z} :: {[}in{]} A conversion factor from meters to the units of depth. If missing, GbathyT must be in m.

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true, use expressions that give the same answers as the code did in late 2018. Otherwise add parentheses for rotational symmetry.

\item {} 
\sphinxstylestrong{ongrid} :: {[}in{]} If true, then data are assumed to have been interpolated to the model horizontal grid. In this case, only extrapolation is performed by this routine

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_miss_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_miss\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/meshgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meshgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/mystats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mystats}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{horiz\_interp\_and\_extrap\_tracer\_fms\_id() (fortran subroutine in module mom\_horizontal\_regridding)@\spxentry{horiz\_interp\_and\_extrap\_tracer\_fms\_id()}\spxextra{fortran subroutine in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_fms_id}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_fms\_id}}}{\emph{fms\_id}, \emph{Time}, \emph{conversion}, \emph{G}, \emph{tr\_z}, \emph{mask\_z}, \emph{z\_in}, \emph{z\_edges\_in}, \emph{missing\_value}, \emph{reentrant\_x}, \emph{tripolar\_n}, \emph{homogenize}, \emph{spongeOngrid}, \emph{m\_to\_Z}, \emph{answers\_2018}}{}
Extrapolate and interpolate using a FMS time interpolation handle.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fms\_id} :: {[}in{]} A unique id used by the FMS time interpolator

\item {} 
\sphinxstylestrong{time} :: {[}in{]} A FMS time type

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} Conversion factor for tracer.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid object

\item {} 
\sphinxstylestrong{tr\_z} :: pointer to allocatable tracer array on local model grid and native vertical levels.

\item {} 
\sphinxstylestrong{mask\_z} :: pointer to allocatable tracer mask array on local model grid and native vertical levels.

\item {} 
\sphinxstylestrong{z\_in} :: Cell grid values for input data.

\item {} 
\sphinxstylestrong{z\_edges\_in} :: Cell grid edge values for input data. (Intent out)

\item {} 
\sphinxstylestrong{missing\_value} :: {[}out{]} The missing value in the returned array.

\item {} 
\sphinxstylestrong{reentrant\_x} :: {[}in{]} If true, this grid is reentrant in the x\sphinxhyphen{}direction

\item {} 
\sphinxstylestrong{tripolar\_n} :: {[}in{]} If true, this is a northern tripolar grid

\item {} 
\sphinxstylestrong{homogenize} :: {[}in{]} If present and true, horizontally homogenize data to produce perfectly “flat” initial conditions

\item {} 
\sphinxstylestrong{spongeongrid} :: {[}in{]} If present and true, the sponge data are on the model grid

\item {} 
\sphinxstylestrong{m\_to\_z} :: {[}in{]} A conversion factor from meters to the units of depth. If missing, GbathyT must be in m.

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true, use expressions that give the same answers as the code did in late 2018. Otherwise add parentheses for rotational symmetry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_miss_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_miss\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/meshgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meshgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/mystats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mystats}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meshgrid() (fortran subroutine in module mom\_horizontal\_regridding)@\spxentry{meshgrid()}\spxextra{fortran subroutine in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/meshgrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{meshgrid}}}{\emph{x}, \emph{y}, \emph{x\_T}, \emph{y\_T}}{}
Create a 2d\sphinxhyphen{}mesh of grid coordinates from 1\sphinxhyphen{}d arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} input 1\sphinxhyphen{}dimensional vector

\item {} 
\sphinxstylestrong{y} :: {[}in{]} input 1\sphinxhyphen{}dimensional vector

\item {} 
\sphinxstylestrong{x\_t} :: {[}inout{]} output 2\sphinxhyphen{}dimensional array

\item {} 
\sphinxstylestrong{y\_t} :: {[}inout{]} output 2\sphinxhyphen{}dimensional array

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_fms_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_fms\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/horiz_interp_and_extrap_tracer_record}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horiz\_interp\_and\_extrap\_tracer\_record}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fill\_boundaries\_int() (fortran function in module mom\_horizontal\_regridding)@\spxentry{fill\_boundaries\_int()}\spxextra{fortran function in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_boundaries_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{fill\_boundaries\_int}}}{\emph{m}, \emph{cyclic\_x}, \emph{tripolar\_n}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Fill grid edges for integer data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{m} :: {[}in{]} input array (ND)

\item {} 
\sphinxstylestrong{cyclic\_x} :: {[}in{]} True if domain is zonally re\sphinxhyphen{}entrant

\item {} 
\sphinxstylestrong{tripolar\_n} :: {[}in{]} True if domain has an Arctic fold

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_boundaries_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_boundaries\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fill\_boundaries\_real() (fortran function in module mom\_horizontal\_regridding)@\spxentry{fill\_boundaries\_real()}\spxextra{fortran function in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_boundaries_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{fill\_boundaries\_real}}}{\emph{m}, \emph{cyclic\_x}, \emph{tripolar\_n}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Fill grid edges for real data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{m} :: {[}in{]} input array (ND)

\item {} 
\sphinxstylestrong{cyclic\_x} :: {[}in{]} True if domain is zonally re\sphinxhyphen{}entrant

\item {} 
\sphinxstylestrong{tripolar\_n} :: {[}in{]} True if domain has an Arctic fold

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/fill_boundaries_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_boundaries\_int}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{smooth\_heights() (fortran subroutine in module mom\_horizontal\_regridding)@\spxentry{smooth\_heights()}\spxextra{fortran subroutine in module mom\_horizontal\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/smooth_heights}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding/}}\sphinxbfcode{\sphinxupquote{smooth\_heights}}}{\emph{zi}, \emph{fill}, \emph{bad}, \emph{sor}, \emph{niter}, \emph{cyclic\_x}, \emph{tripolar\_n}}{}
Solve del2 (zi) = 0 using successive iterations with a 5 point stencil. Only points fill==1 are modified. Except where bad==1, information propagates isotropically in index space. The resulting solution in each region is an approximation to del2(zi)=0 subject to boundary conditions along the valid points curve bounding this region.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{zi} :: {[}inout{]} input and output array (ND)

\item {} 
\sphinxstylestrong{fill} :: {[}in{]} same shape as zi, 1=fill

\item {} 
\sphinxstylestrong{bad} :: {[}in{]} same shape as zi, 1=bad data

\item {} 
\sphinxstylestrong{sor} :: {[}in{]} relaxation coefficient (ND)

\item {} 
\sphinxstylestrong{niter} :: {[}in{]} maximum number of iterations

\item {} 
\sphinxstylestrong{cyclic\_x} :: {[}in{]} true if domain is zonally reentrant

\item {} 
\sphinxstylestrong{tripolar\_n} :: {[}in{]} true if domain has an Arctic fold

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ice\_shelf module reference}
\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf}}\label{\detokenize{api/generated/modules/mom_ice_shelf:mom-ice-shelf-module-reference}}\label{\detokenize{api/generated/modules/mom_ice_shelf::doc}}\index{mom\_ice\_shelf (module)@\spxentry{mom\_ice\_shelf}\spxextra{module}|spxpagem}
Implements the thermodynamic aspects of ocean / ice\sphinxhyphen{}shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the MOM framework and coding style.

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:detamom-ice-shelf}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_ice_shelf:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_cs}}}}}
&
Control structure that contains ice shelf parameters and diagnostics handles.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ice_shelf:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_calc\_flux()}}}}}
&
Calculates fluxes between the ocean and ice\sphinxhyphen{}shelf using the three\sphinxhyphen{}equations formulation (optional to use just two equations).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/change_thickness_using_melt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{change\_thickness\_using\_melt()}}}}}
&
Changes the thickness (mass) of the ice shelf based on sub\sphinxhyphen{}ice\sphinxhyphen{}shelf melting.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_forces()}}}}}
&
This subroutine adds the mechanical forcing fields and perhaps shelf areas, based on the ice state in ice\_shelf\_CS.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_pressure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_pressure()}}}}}
&
This subroutine adds the ice shelf pressure to the fluxes type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_flux()}}}}}
&
Updates surface fluxes that are influenced by sub\sphinxhyphen{}ice\sphinxhyphen{}shelf melting.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf()}}}}}
&
Initializes shelf model data, parameters and diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_shelf\_mass()}}}}}
&
Initializes shelf mass based on three options (file, zero and user)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/update_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_shelf\_mass()}}}}}
&
Updates the ice shelf mass using data from a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_save\_restart()}}}}}
&
Save the ice shelf restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_end()}}}}}
&
Deallocates all memory associated with this module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solo\_step\_ice\_shelf()}}}}}
&
This routine is for stepping a stand\sphinxhyphen{}alone ice shelf model without an ocean.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ice_shelf:detailed-description}}\label{\detokenize{api/generated/modules/mom_ice_shelf:detamom-ice-shelf}}

\paragraph{section\_ICE\_SHELF}
\label{\detokenize{api/generated/modules/mom_ice_shelf:section-ice-shelf}}\label{\detokenize{api/generated/modules/mom_ice_shelf:namespacemom-ice-shelf-1section-ice-shelf}}
This module implements the thermodynamic aspects of ocean/ice\sphinxhyphen{}shelf inter\sphinxhyphen{}actions using the MOM framework and coding style.

Derived from code by Chris Little, early 2010.

The ice\sphinxhyphen{}sheet dynamics subroutines do the following: initialize\_shelf\_mass \sphinxhyphen{} Initializes the ice shelf mass distribution.
\begin{itemize}
\item {} 
Initializes h\_shelf, h\_mask, area\_shelf\_h

\item {} 
CURRENTLY: initializes mass\_shelf as well, but this is unnecessary, as mass\_shelf is initialized based on h\_shelf and density\_ice immediately afterwards. Possibly subroutine should be renamed update\_shelf\_mass \sphinxhyphen{} updates ice shelf mass via netCDF file USER\_update\_shelf\_mass (TODO). solo\_step\_ice\_shelf \sphinxhyphen{} called only in ice\sphinxhyphen{}only mode. shelf\_calc\_flux \sphinxhyphen{} after melt rate \& fluxes are calculated, ice dynamics are done. currently mass\_shelf is updated immediately after ice\_shelf\_advect in fully dynamic mode.

\end{itemize}

NOTES: be aware that hmask(:,:) has a number of functions; it is used for front advancement, for subroutines in the velocity solve, and for thickness boundary conditions (this last one may be removed). in other words, interfering with its updates will have implications you might not expect.

Overall issues: Many variables need better documentation and units and the subgrid on which they are discretized.


\subparagraph{ICE\_SHELF equations}
\label{\detokenize{api/generated/modules/mom_ice_shelf:ice-shelf-equations}}\label{\detokenize{api/generated/modules/mom_ice_shelf:namespacemom-ice-shelf-1section-ice-shelf-equations}}
The three fundamental equations are: Heat flux
\begin{equation*}
\begin{split}\qquad \rho_w C_{pw} \gamma_T (T_w - T_b) = \rho_i \dot{m} L_f\end{split}
\end{equation*}
Salt flux
\begin{equation*}
\begin{split}\qquad \rho_w \gamma_s (S_w - S_b) = \rho_i \dot{m} S_b\end{split}
\end{equation*}
Freezing temperature
\begin{equation*}
\begin{split}\qquad T_b = a S_b + b + c P\end{split}
\end{equation*}
where ….


\subparagraph{References}
\label{\detokenize{api/generated/modules/mom_ice_shelf:references}}\label{\detokenize{api/generated/modules/mom_ice_shelf:namespacemom-ice-shelf-1section-ice-shelf-references}}
Asay\sphinxhyphen{}Davis, Xylar S., Stephen L. Cornford, Benjamin K. Galton\sphinxhyphen{}Fenzi, Rupert M. Gladstone, G. Hilmar Gudmundsson, David M. Holland, Paul R. Holland, and Daniel F. Martin. Experimental design for three interrelated marine ice sheet and ocean model intercomparison projects: MISMIP v. 3 (MISMIP+), ISOMIP v. 2 (ISOMIP+) and MISOMIP v. 1 (MISOMIP1). Geoscientific Model Development 9, no. 7 (2016): 2471.

Goldberg, D. N., et al. Investigation of land ice\sphinxhyphen{}ocean interaction with a fully coupled ice\sphinxhyphen{}ocean model: 1. Model description and behavior. Journal of Geophysical Research: Earth Surface 117.F2 (2012).

Goldberg, D. N., et al. Investigation of land ice\sphinxhyphen{}ocean interaction with a fully coupled ice\sphinxhyphen{}ocean model: 2. Sensitivity to external forcings. Journal of Geophysical Research: Earth Surface 117.F2 (2012).

Holland, David M., and Adrian Jenkins. Modeling thermodynamic ice\sphinxhyphen{}ocean interactions at the base of an ice shelf. Journal of Physical Oceanography 29.8 (1999): 1787\sphinxhyphen{}1800.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf:type-documentation}}\index{ice\_shelf\_cs (fortran type in module mom\_ice\_shelf)@\spxentry{ice\_shelf\_cs}\spxextra{fortran type in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_cs}}}
Control structure that contains ice shelf parameters and diagnostics handles.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_melt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_exch\_vel\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_exch\_vel\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tfreeze}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tfl\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_thermal\_driving}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_haline\_driving}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u\_ml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v\_ml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sbdry}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_surf\_elev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bathym}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_area\_shelf\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ustar\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_shelf\_mass}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mass\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure for the ice shelves.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{{]}} :: Grid for the ice\sphinxhyphen{}shelf model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure containing various unit conversion factors.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocn\_grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model grid The rest is private.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A factor that can be used to turn off ice shelf melting (flux\_factor = 0) {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_output\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=128)}\sphinxstyleemphasis{{]}} :: The directory in which to write restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ice\_shelf\_state)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure with elements that describe the ice\sphinxhyphen{}shelf state.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ice\_shelf\_dyn\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The control structure for the ice\sphinxhyphen{}shelf dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{utide}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: An unresolved tidal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_bg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum value for ustar under ice shelves {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdrag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: drag coefficient under ice shelves {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The heat capacity of sea water {[}Q degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_ocn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A reference ocean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cp\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The heat capacity of fresh ice {[}Q degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gamma\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The (fixed) turbulent exchange velocity in the 2\sphinxhyphen{}equation formulation {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salin\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The salinity of shelf ice {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{temp\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The core temperature of shelf ice {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The viscosity of ice {[}L4 Z\sphinxhyphen{}2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{density\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A typical density of ice {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_molec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The molecular kinematic viscosity of sea water {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_molec\_salt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The molecular diffusivity of salt {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_molec\_temp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The molecular diffusivity of heat {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lat\_fusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The latent heat of fusion {[}Q \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gamma\_t\_3eq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Nondimensional heat\sphinxhyphen{}transfer coefficient, used in the 3Eq. formulation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gamma\_s\_3eq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Nondimensional salt\sphinxhyphen{}transfer coefficient, used in the 3Eq. formulation This number should be specified by the user.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_mass\_melt\_threshold}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An ocean column mass below the iceshelf below which melting does not occur {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mass\_from\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Read the ice shelf mass from a file every dt.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_step}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: this is the shortest timestep that the ice shelf sees, and is equal to the forcing timestep (it is passed in when the shelf is initialized \sphinxhyphen{} so need to reorganize MOM driver. it will be the prognistic timestep … maybe.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{solo\_ice\_sheet}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: whether the ice model is running without being coupled to the ocean

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gl\_regularize}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: whether to regularize the floatation condition at the grounding line a la Goldberg Holland Schoof 2009

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gl\_couple}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: whether to let the floatation condition be determined by ocean column thickness means update\_OD\_ffrac will be called (note: GL\_regularize and GL\_couple should be exclusive)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calve\_to\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calve any ice that passes outside of a masked area.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness\_simple\_calve}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: min. ice shelf thickness criteria for calving {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: temperature at ocean surface in the restoring region {[}degC{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Salinity at ocean surface in the restoring region {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{input\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Ice volume flux at an upstream open boundary {[}m3 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{input\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Ice thickness at an upstream open boundary {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The component’s time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eqn\_of\_state}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(eos\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Type that indicates the equation of state to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{active\_shelf\_dynamics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the ice shelf mass changes as a result the dynamic ice\sphinxhyphen{}shelf model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{override\_shelf\_movement}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, user code specifies the shelf movement instead of using the dynamic ice\sphinxhyphen{}shelf mode.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isthermo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the ice shelf can exchange heat and mass with the underlying ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{threeeq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the 3 equation consistency equations are used to calculate the flux at the ocean\sphinxhyphen{}ice interface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{insulator}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, ice shelf is a perfect insulator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{const\_gamma}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, gamma\_T is specified by the user.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{constant\_sea\_level}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, apply an evaporative, heat and salt fluxes. It will avoid large increase in sea level.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_ocean\_mass\_float}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum ocean mass per unit area before the ice shelf is considered to float when constant\_sea\_level is used {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cutoff\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Depth above which melt is set to zero (\textgreater{}= 0) {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{find\_salt\_root}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, if true find Sbdry using a quadratic eq.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tfr\_0\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The freezing point at 0 pressure and 0 salinity {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtfr\_ds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Partial derivative of freezing temperature with salinity {[}degC ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dtfr\_dp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Partial derivative of freezing temperature with pressure {[}degC T2 R\sphinxhyphen{}1 L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} degC Pa\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_read\_mass}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer handle used in time interpolation of the ice shelf mass read from a file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_read\_area}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer handle used in time interpolation of the ice shelf mass read from a file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to control diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{user\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(user\_ice\_shelf\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the control structure for user\sphinxhyphen{}supplied modifications to the ice shelf code.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes and use reproducible sums.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf:function-subroutine-documentation}}\index{shelf\_calc\_flux() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{shelf\_calc\_flux()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{shelf\_calc\_flux}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{Time}, \emph{time\_step}, \emph{CS}, \emph{forces}}{}
Calculates fluxes between the ocean and ice\sphinxhyphen{}shelf using the three\sphinxhyphen{}equations formulation (optional to use just two equations). See {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:namespacemom-ice-shelf-1section-ice-shelf-equations}]{\sphinxcrossref{\DUrole{std,std-ref}{ICE\_SHELF equations}}}}
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean. The intent is only inout to allow for halo updates.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} structure containing pointers to any possible thermodynamic or mass\sphinxhyphen{}flux forcing fields.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Start time of the fluxes.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} Length of time over which these fluxes will be applied {[}s{]}.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to initialize\_ice\_shelf.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_forces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/change_thickness_using_melt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{change\_thickness\_using\_melt}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::disable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::enable\_averaging}}}}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_shelf}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/update_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_shelf\_mass}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{change\_thickness\_using\_melt() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{change\_thickness\_using\_melt()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/change_thickness_using_melt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{change\_thickness\_using\_melt}}}{\emph{ISS}, \emph{G}, \emph{US}, \emph{time\_step}, \emph{fluxes}, \emph{density\_ice}, \emph{debug}}{}
Changes the thickness (mass) of the ice shelf based on sub\sphinxhyphen{}ice\sphinxhyphen{}shelf melting.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The time step for this update {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} structure containing pointers to any possible thermodynamic or mass\sphinxhyphen{}flux forcing fields.

\item {} 
\sphinxstylestrong{density\_ice} :: {[}in{]} The density of ice\sphinxhyphen{}shelf ice {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If present and true, write chksums

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_calc\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_shelf\_forces() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{add\_shelf\_forces()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_forces}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{add\_shelf\_forces}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{forces}, \emph{do\_shelf\_area}}{}
This subroutine adds the mechanical forcing fields and perhaps shelf areas, based on the ice state in ice\_shelf\_CS.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{do\_shelf\_area} :: {[}in{]} If true find the shelf\sphinxhyphen{}covered areas.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_calc\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_shelf\_pressure() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{add\_shelf\_pressure()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_pressure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{add\_shelf\_pressure}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{fluxes}}{}
This subroutine adds the ice shelf pressure to the fluxes type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} This module’s control structure.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure of surface fluxes that may be updated.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_shelf\_flux() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{add\_shelf\_flux()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{add\_shelf\_flux}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{sfc\_state}, \emph{fluxes}}{}
Updates surface fluxes that are influenced by sub\sphinxhyphen{}ice\sphinxhyphen{}shelf melting.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} Surface ocean state

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure of surface fluxes that may be used/updated.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_pressure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_pressure}}}}} {\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_integral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_integral}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_calc\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ice\_shelf() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{initialize\_ice\_shelf()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{initialize\_ice\_shelf}}}{\emph{param\_file}, \emph{ocn\_grid}, \emph{Time}, \emph{CS}, \emph{diag}, \emph{forces}, \emph{fluxes}, \emph{Time\_in}, \emph{solo\_ice\_sheet\_in}}{}
Initializes shelf model data, parameters and diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{ocn\_grid} :: The calling ocean model’s horizontal grid structure

\item {} 
\sphinxstylestrong{time} :: {[}inout{]} The clock that that will indicate the model time

\item {} 
\sphinxstylestrong{cs} :: A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate the diagnostic output.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible thermodynamic or mass\sphinxhyphen{}flux forcing fields.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{time\_in} :: {[}in{]} The time at initialization.

\item {} 
\sphinxstylestrong{solo\_ice\_sheet\_in} :: {[}in{]} If present, this indicates whether a solo ice\sphinxhyphen{}sheet driver.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_forces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_pressure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_shelf\_pressure}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_dyngrid_to_mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::copy\_dyngrid\_to\_mom\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/fix_restart_unit_scaling}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_scaling::fix\_restart\_unit\_scaling}}}}} {\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state::ice\_shelf\_state\_init}}}}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_shelf}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize::initialize\_ice\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_shelf\_mass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::mom\_grid\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/rescale_dyn_horgrid_bathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::rescale\_dyn\_horgrid\_bathymetry}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restart\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_scaling::unit\_scaling\_init}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_shelf\_mass() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{initialize\_shelf\_mass()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_shelf_mass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{initialize\_shelf\_mass}}}{\emph{G}, \emph{param\_file}, \emph{CS}, \emph{ISS}, \emph{new\_sim}}{}
Initializes shelf mass based on three options (file, zero and user)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} The ice shelf state type that is being updated

\item {} 
\sphinxstylestrong{new\_sim} :: {[}in{]} If present and false, this run is being restarted

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_shelf\_mass() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{update\_shelf\_mass()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/update_shelf_mass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{update\_shelf\_mass}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{ISS}, \emph{Time}}{}
Updates the ice shelf mass using data from a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} The ice shelf state type that is being updated

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/shelf_calc_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_calc\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_save\_restart() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{ice\_shelf\_save\_restart()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_save_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_save\_restart}}}{\emph{CS}, \emph{Time}, \emph{directory}, \emph{time\_stamped}, \emph{filename\_suffix}}{}
Save the ice shelf restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: ice shelf control structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time at this call

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} An optional directory into which to write these restart files.

\item {} 
\sphinxstylestrong{time\_stamped} :: {[}in{]} f true, the restart file names include a unique time stamp. The default is false.

\item {} 
\sphinxstylestrong{filename\_suffix} :: {[}in{]} An optional suffix (e.g., a time\sphinxhyphen{}stamp) to append to the restart file names.

\end{itemize}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_end() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{ice\_shelf\_end()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_end}}}{\emph{CS}}{}
Deallocates all memory associated with this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the ice shelf control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_dyn_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::ice\_shelf\_dyn\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state::ice\_shelf\_state\_end}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{solo\_step\_ice\_shelf() (fortran subroutine in module mom\_ice\_shelf)@\spxentry{solo\_step\_ice\_shelf()}\spxextra{fortran subroutine in module mom\_ice\_shelf}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf/}}\sphinxbfcode{\sphinxupquote{solo\_step\_ice\_shelf}}}{\emph{CS}, \emph{time\_interval}, \emph{nsteps}, \emph{Time}, \emph{min\_time\_step\_in}}{}
This routine is for stepping a stand\sphinxhyphen{}alone ice shelf model without an ocean.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{time\_interval} :: {[}in{]} The time interval for this update {[}s{]}.

\item {} 
\sphinxstylestrong{nsteps} :: {[}inout{]} The running number of ice shelf steps.

\item {} 
\sphinxstylestrong{time} :: {[}inout{]} The current model time

\item {} 
\sphinxstylestrong{min\_time\_step\_in} :: {[}in{]} The minimum permitted time step {[}T \textasciitilde{}\textgreater{} s{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::disable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::enable\_averages}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_time_step_cfl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics::ice\_time\_step\_cfl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ice\_shelf\_dynamics module reference}
\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics}}\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:mom-ice-shelf-dynamics-module-reference}}\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics::doc}}\index{mom\_ice\_shelf\_dynamics (module)@\spxentry{mom\_ice\_shelf\_dynamics}\spxextra{module}|spxpagem}
Implements a crude placeholder for a later implementation of full ice shelf dynamics.

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:detamom-ice-shelf-dynamics}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_dyn_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_dyn\_cs}}}}}
&
The control structure for the ice shelf dynamics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/loop_bounds_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{loop\_bounds\_type}}}}}
&
A container for loop bounds.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/slope_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slope\_limiter()}}}}}
&
used for flux limiting in advective subroutines Van Leer limiter (source: Wikipedia) The return value is between 0 and 2 {[}nondim{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/quad_area}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quad\_area()}}}}}
&
Calculate area of quadrilateral.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/register_ice_shelf_dyn_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_ice\_shelf\_dyn\_restarts()}}}}}
&
This subroutine is used to register any fields related to the ice shelf dynamics that should be written to or read from the restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf\_dyn()}}}}}
&
Initializes shelf model data, parameters and diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_diagnostic\_fields()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_time_step_cfl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_time\_step\_cfl()}}}}}
&
This function returns the global maximum advective timestep that can be taken based on the current ice velocities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ice\_shelf()}}}}}
&
This subroutine updates the ice shelf velocities, mass, stresses and properties due to the ice shelf dynamics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect()}}}}}
&
This subroutine takes the velocity (on the Bgrid) and timesteps h\_t = \sphinxhyphen{} div (uh) once.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_inner}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_inner()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_x()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_y()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/shelf_advance_front}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_advance\_front()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_min_thickness_calve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_min\_thickness\_calve()}}}}}
&
Apply a very simple calving law using a minimum thickness rule.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calve_to_mask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calve\_to\_mask()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calc_shelf_driving_stress}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_shelf\_driving\_stress()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/init_boundary_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_boundary\_values()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action_subgrid_basal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action\_subgrid\_basal()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/matrix_diagonal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matrix\_diagonal()}}}}}
&
returns the diagonal entries of the matrix for a Jacobi preconditioning
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_diagonal_subgrid_basal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_diagonal\_subgrid\_basal()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/apply_boundary_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_boundary\_values()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calc_shelf_visc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_shelf\_visc()}}}}}
&
Update depth integrated viscosity, based on horizontal strain rates, and also update the nonlinear part of the basal traction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_od\_ffrac()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac_uncoupled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_od\_ffrac\_uncoupled()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_functions()}}}}}
&
This subroutine calculates the gradients of bilinear basis elements that that are centered at the vertices of the cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_fn_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_fn\_grid()}}}}}
&
This subroutine calculates the gradients of bilinear basis elements that are centered at the vertices of the cell using a locally orthogoal MOM6 grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_functions_subgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_functions\_subgrid()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_velocity_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_velocity\_masks()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/interpolate_h_to_b}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_h\_to\_b()}}}}}
&
Interpolate the ice shelf thickness from tracer point to nodal points, subject to a mask.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_dyn_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_dyn\_end()}}}}}
&
Deallocates all memory associated with the ice shelf dynamics module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_temp()}}}}}
&
This subroutine updates the vertically averaged ice shelf temperature.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_temp\_x()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_temp\_y()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:detailed-description}}\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:detamom-ice-shelf-dynamics}}
Implements a crude placeholder for a later implementation of full ice shelf dynamics.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:type-documentation}}\index{ice\_shelf\_dyn\_cs (fortran type in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_dyn\_cs}\spxextra{fortran type in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_dyn_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_dyn\_cs}}}
The control structure for the ice shelf dynamics.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_t\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ground\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_col\_thick}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_od\_av}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_u\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_v\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_t\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: the zonal velocity of the ice shelf/sheet on q\sphinxhyphen{}points (B grid) {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: the meridional velocity of the ice shelf/sheet on q\sphinxhyphen{}points (B grid) {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_face\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mask for velocity boundary conditions on the C\sphinxhyphen{}grid u\sphinxhyphen{}face \sphinxhyphen{} this is because the FEM cares about FACES THAT GET INTEGRATED OVER, not vertices. Will represent boundary conditions on computational boundary (or permanent boundary between fast\sphinxhyphen{}moving and near\sphinxhyphen{}stagnant ice FOR NOW: 1=interior bdry, 0=no\sphinxhyphen{}flow boundary, 2=stress bdry condition, 3=inhomogeneous Dirichlet boundary, 4=flux boundary: at these faces a flux will be specified which will override velocities; a homogeneous velocity condition will be specified (this seems to give the solver less difficulty)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_face\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A mask for velocity boundary conditions on the C\sphinxhyphen{}grid v\sphinxhyphen{}face, with valued defined similarly to u\_face\_mask.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_face\_mask\_bdry}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A duplicate copy of u\_face\_mask?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_face\_mask\_bdry}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A duplicate copy of v\_face\_mask?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_flux\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The ice volume flux per unit face length into the cell through open boundary u\sphinxhyphen{}faces (where u\_face\_mask=4) {[}Z L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_flux\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The ice volume flux per unit face length into the cell through open boundary v\sphinxhyphen{}faces (where v\_face\_mask=4) {[}Z L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}??

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{umask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: u\sphinxhyphen{}mask on the actual degrees of freedom (B grid) 1=normal node, 3=inhomogeneous boundary node, 0 \sphinxhyphen{} no flow node (will also get ice\sphinxhyphen{}free nodes)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vmask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: v\sphinxhyphen{}mask on the actual degrees of freedom (B grid) 1=normal node, 3=inhomogeneous boundary node, 0 \sphinxhyphen{} no flow node (will also get ice\sphinxhyphen{}free nodes)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calve\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: a mask to prevent the ice shelf front from advancing past its initial position (but it may retreat)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Vertically integrated temperature in the ice shelf/stream, on corner\sphinxhyphen{}points (B grid) {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tmask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A mask on tracer points that is 1 where there is ice.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ice\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Glen’s law ice viscosity, often in {[}R L4 Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thickness\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The ice thickness at an inflowing boundary {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The zonal ice velocity at inflowing boundaries {[}L yr\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m yr\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The meridional ice velocity at inflowing boundaries {[}L yr\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m yr\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The ice thickness at inflowing boundaries {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_bdry\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The ice temperature at inflowing boundaries {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{basal\_traction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The area integrated nonlinear part of “linearized” basal stress {[}R Z L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg s\sphinxhyphen{}1{]}. The exact form depends on basal law exponent and/or whether flow is “hybridized” a la Goldberg 2011.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{od\_rt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A running total for calculating OD\_av.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ground\_frac\_rt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A running total for calculating ground\_frac.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{od\_av}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The time average open ocean depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ground\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Fraction of the time a cell is “exposed”, i.e. the column thickness is below a threshold and interacting with the rock {[}nondim{]}. When this is 1, the ice\sphinxhyphen{}shelf is grounded.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{od\_rt\_counter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A counter of the number of contributions to OD\_rt.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{velocity\_update\_time\_step}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time interval over which to update the ice shelf velocity using the nonlinear elliptic equation, or 0 to update every timestep {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{elapsed\_velocity\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The elapsed time since the ice velocities were last updated {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{density\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A typical density of ice {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gl\_regularize}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Specifies whether to regularize the floatation condition at the grounding line as in Goldberg Holland Schoof 2009.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n\_sub\_regularize}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: partition of cell over which to integrate for interpolated grounding line the (rectangular) is divided into nxn equally\sphinxhyphen{}sized rectangles, over which basal contribution is integrated (iterative quadrature)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gl\_couple}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: whether to let the floatation condition be determined by ocean column thickness means update\_OD\_ffrac will be called (note: GL\_regularize and GL\_couple should be exclusive)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A factor used to limit subcycled advective timestep in uncoupled runs i.e. dt \textless{}= CFL\_factor * min(dx / u)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a\_glen\_isothermal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Ice viscosity parameter in Glen’s Law, {[}Pa\sphinxhyphen{}3 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n\_glen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Nonlinearity exponent in Glen’s Law.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eps\_glen\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Min. strain rate to avoid infinite Glen’s law viscosity, {[}year\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_basal\_friction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient in sliding law tau\_b = C u\textasciicircum{}(n\_basal\_fric), in units= Pa (m yr\sphinxhyphen{}1)\sphinxhyphen{}(n\_basal\_fric)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n\_basal\_fric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Exponent in sliding law tau\_b = C u\textasciicircum{}(m\_slide)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{density\_ocean\_avg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A typical ocean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}. This does not affect ocean circulation or thermodynamics. It is used to estimate the gravitational driving force at the shelf front (until we think of a better way to do it, but any difference will be negligible).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thresh\_float\_col\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The water column depth over which the shelf if considered to be floating.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{moving\_shelf\_front}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Specify whether to advance shelf front (and calve).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calve\_to\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calve off the ice shelf when it passes the edge of a mask.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness\_simple\_calve}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: min. ice shelf thickness criteria for calving {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg\_tolerance}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The tolerance in the CG solver, relative to initial residual, that determines when to stop the conjugate gradient iterations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonlinear\_tolerance}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fractional nonlinear tolerance, relative to the initial error, that sets when to stop the iterative velocity solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg\_max\_iterations}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of iterations that can be used in the CG solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nonlin\_solve\_err\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: 1: exit vel solve based on nonlin residual 2: exit based on “fixed point” metric ({\color{red}\bfseries{}|u \sphinxhyphen{} u\_last|} / {\color{red}\bfseries{}|u|} \textless{} tol) where | | is infty\sphinxhyphen{}norm

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes and use reproducible sums.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{module\_is\_initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if this module has been initialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to control diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{loop\_bounds\_type (fortran type in module mom\_ice\_shelf\_dynamics)@\spxentry{loop\_bounds\_type}\spxextra{fortran type in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/loop_bounds_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{loop\_bounds\_type}}}
A container for loop bounds.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ish}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Loop bounds.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:function-subroutine-documentation}}\index{slope\_limiter() (fortran function in module mom\_ice\_shelf\_dynamics)@\spxentry{slope\_limiter()}\spxextra{fortran function in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/slope_limiter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{slope\_limiter}}}{\emph{num}, \emph{denom}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
used for flux limiting in advective subroutines Van Leer limiter (source: Wikipedia) The return value is between 0 and 2 {[}nondim{]}.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{num} :: {[}in{]} The numerator of the ratio used in the Van Leer slope limiter

\item {} 
\sphinxstylestrong{denom} :: {[}in{]} The denominator of the ratio used in the Van Leer slope limiter

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_temp\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_temp\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{quad\_area() (fortran function in module mom\_ice\_shelf\_dynamics)@\spxentry{quad\_area()}\spxextra{fortran function in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/quad_area}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{quad\_area}}}{\emph{X}, \emph{Y}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Calculate area of quadrilateral.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The x\sphinxhyphen{}positions of the vertices of the quadrilateral {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{y} :: {[}in{]} The y\sphinxhyphen{}positions of the vertices of the quadrilateral {[}L \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_functions}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_ice\_shelf\_dyn\_restarts() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{register\_ice\_shelf\_dyn\_restarts()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/register_ice_shelf_dyn_restarts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{register\_ice\_shelf\_dyn\_restarts}}}{\emph{G}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}}{}
This subroutine is used to register any fields related to the ice shelf dynamics that should be written to or read from the restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid type describing the ice shelf grid.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer to the ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ice\_shelf\_dyn() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{initialize\_ice\_shelf\_dyn()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{initialize\_ice\_shelf\_dyn}}}{\emph{param\_file}, \emph{Time}, \emph{ISS}, \emph{CS}, \emph{G}, \emph{US}, \emph{diag}, \emph{new\_sim}, \emph{solo\_ice\_sheet\_in}}{}
Initializes shelf model data, parameters and diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{time} :: {[}inout{]} The clock that that will indicate the model time

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{cs} :: A pointer to the ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid type describing the ice shelf grid.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate the diagnostic output.

\item {} 
\sphinxstylestrong{new\_sim} :: {[}in{]} If true this is a new simulation, otherwise has been started from a restart file.

\item {} 
\sphinxstylestrong{solo\_ice\_sheet\_in} :: {[}in{]} If present, this indicates whether a solo ice\sphinxhyphen{}sheet driver.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac_uncoupled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_od\_ffrac\_uncoupled}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_velocity_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_velocity\_masks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_diagnostic\_fields() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{initialize\_diagnostic\_fields()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_diagnostic_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{initialize\_diagnostic\_fields}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{Time}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_time\_step\_cfl() (fortran function in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_time\_step\_cfl()}\spxextra{fortran function in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_time_step_cfl}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_time\_step\_cfl}}}{\emph{CS}, \emph{ISS}, \emph{G}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This function returns the global maximum advective timestep that can be taken based on the current ice velocities. Because it involves finding a global minimum, it can be surprisingly expensive.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The maximum permitted timestep based on the ice velocities {[}T \textasciitilde{}\textgreater{} s{]}.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/solo_step_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::solo\_step\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_ice\_shelf() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{update\_ice\_shelf()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{update\_ice\_shelf}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{time\_step}, \emph{Time}, \emph{ocean\_mass}, \emph{coupled\_grounding}, \emph{must\_update\_vel}}{}
This subroutine updates the ice shelf velocities, mass, stresses and properties due to the ice shelf dynamics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{ocean\_mass} :: {[}in{]} If present this is the mass per unit area

\item {} 
\sphinxstylestrong{coupled\_grounding} :: {[}in{]} If true, the grounding line is determined by coupled ice\sphinxhyphen{}ocean dynamics

\item {} 
\sphinxstylestrong{must\_update\_vel} :: {[}in{]} Always update the ice velocities if true.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/disable_averaging}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::disable\_averaging}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/enable_averages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::enable\_averages}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_temp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_od\_ffrac}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac_uncoupled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_od\_ffrac\_uncoupled}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_advect() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_advect()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_advect}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{time\_step}, \emph{Time}}{}
This subroutine takes the velocity (on the Bgrid) and timesteps h\_t = \sphinxhyphen{} div (uh) once. Additionally, it will update the volume of ice in partially\sphinxhyphen{}filled cells, and update hmask accordingly.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calve_to_mask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calve\_to\_mask}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_min_thickness_calve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_min\_thickness\_calve}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/shelf_advance_front}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelf\_advance\_front}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_velocity_masks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_velocity\_masks}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_solve\_outer() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_solve\_outer()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{u\_shlf}, \emph{v\_shlf}, \emph{iters}, \emph{time}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{u\_shlf} :: {[}inout{]} The zonal ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v\_shlf} :: {[}inout{]} The meridional ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{iters} :: {[}out{]} The number of iterations used in the solver.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/apply_boundary_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_boundary\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_fn_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_fn\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_functions_subgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_functions\_subgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calc_shelf_driving_stress}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_shelf\_driving\_stress}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calc_shelf_visc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_shelf\_visc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_inner}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_inner}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/interpolate_h_to_b}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_h\_to\_b}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_diagnostic\_fields}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf\_dyn}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_solve\_inner() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_solve\_inner()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_inner}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_solve\_inner}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{u\_shlf}, \emph{v\_shlf}, \emph{taudx}, \emph{taudy}, \emph{H\_node}, \emph{float\_cond}, \emph{hmask}, \emph{conv\_flag}, \emph{iters}, \emph{time}, \emph{Phi}, \emph{Phisub}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{u\_shlf} :: {[}inout{]} The zonal ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v\_shlf} :: {[}inout{]} The meridional ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{taudx} :: {[}in{]} The x\sphinxhyphen{}direction driving stress {[}R L3 Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{taudy} :: {[}in{]} The y\sphinxhyphen{}direction driving stress {[}R L3 Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_node} :: {[}in{]} The ice shelf thickness at nodal (corner)

\item {} 
\sphinxstylestrong{float\_cond} :: {[}in{]} An array indicating where the ice

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{conv\_flag} :: {[}out{]} A flag indicating whether (1) or not (0) the iterations have converged to the specified tolerance

\item {} 
\sphinxstylestrong{iters} :: {[}out{]} The number of iterations used in the solver.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{phi} :: {[}in{]} The gradients of bilinear basis elements at Gaussian

\item {} 
\sphinxstylestrong{phisub} :: {[}in{]} Quadrature structure weights at subgridscale

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/apply_boundary_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_boundary\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/matrix_diagonal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matrix\_diagonal}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_advect\_thickness\_x() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_advect\_thickness\_x()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_x}}}{\emph{CS}, \emph{G}, \emph{LB}, \emph{time\_step}, \emph{hmask}, \emph{h0}, \emph{h\_after\_uflux}, \emph{uh\_ice}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Loop bounds structure.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The time step for this update {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} The initial ice shelf thicknesses {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{h\_after\_uflux} :: {[}inout{]} The ice shelf thicknesses after

\item {} 
\sphinxstylestrong{uh\_ice} :: {[}inout{]} The accumulated zonal ice volume flux {[}Z L2 \textasciitilde{}\textgreater{} m3{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/slope_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slope\_limiter}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_advect\_thickness\_y() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_advect\_thickness\_y()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_thickness_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_advect\_thickness\_y}}}{\emph{CS}, \emph{G}, \emph{LB}, \emph{time\_step}, \emph{hmask}, \emph{h0}, \emph{h\_after\_vflux}, \emph{vh\_ice}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} Loop bounds structure.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The time step for this update {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} The initial ice shelf thicknesses {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{h\_after\_vflux} :: {[}inout{]} The ice shelf thicknesses after

\item {} 
\sphinxstylestrong{vh\_ice} :: {[}inout{]} The accumulated meridional ice volume flux {[}Z L2 \textasciitilde{}\textgreater{} m3{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/slope_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slope\_limiter}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{shelf\_advance\_front() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{shelf\_advance\_front()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/shelf_advance_front}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{shelf\_advance\_front}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{hmask}, \emph{uh\_ice}, \emph{vh\_ice}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}inout{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{uh\_ice} :: {[}inout{]} The accumulated zonal ice volume flux {[}Z L2 \textasciitilde{}\textgreater{} m3{]}

\item {} 
\sphinxstylestrong{vh\_ice} :: {[}inout{]} The accumulated meridional ice volume flux {[}Z L2 \textasciitilde{}\textgreater{} m3{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_min\_thickness\_calve() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_min\_thickness\_calve()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_min_thickness_calve}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_min\_thickness\_calve}}}{\emph{G}, \emph{h\_shelf}, \emph{area\_shelf\_h}, \emph{hmask}, \emph{thickness\_calve}, \emph{halo}}{}
Apply a very simple calving law using a minimum thickness rule.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}inout{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}inout{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are partly or fully covered by an ice\sphinxhyphen{}shelf

\item {} 
\sphinxstylestrong{thickness\_calve} :: {[}in{]} The thickness at which to trigger calving {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} The number of halo points to use. If not present, work on the entire data domain.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calve\_to\_mask() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{calve\_to\_mask()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calve_to_mask}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{calve\_to\_mask}}}{\emph{G}, \emph{h\_shelf}, \emph{area\_shelf\_h}, \emph{hmask}, \emph{calve\_mask}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}inout{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}inout{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are partly or fully covered by an ice\sphinxhyphen{}shelf

\item {} 
\sphinxstylestrong{calve\_mask} :: {[}in{]} A mask that indicates where the ice shelf can exist, and where it will calve.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_shelf\_driving\_stress() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{calc\_shelf\_driving\_stress()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calc_shelf_driving_stress}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{calc\_shelf\_driving\_stress}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{taudx}, \emph{taudy}, \emph{OD}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{od} :: {[}in{]} ocean floor depth at tracer points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{taudx} :: {[}inout{]} X\sphinxhyphen{}direction driving stress at q\sphinxhyphen{}points {[}kg L s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{taudy} :: {[}inout{]} Y\sphinxhyphen{}direction driving stress at q\sphinxhyphen{}points {[}kg L s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m s\sphinxhyphen{}2{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{init\_boundary\_values() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{init\_boundary\_values()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/init_boundary_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{init\_boundary\_values}}}{\emph{CS}, \emph{G}, \emph{time}, \emph{hmask}, \emph{input\_flux}, \emph{input\_thick}, \emph{new\_sim}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{input\_flux} :: {[}in{]} The integrated inward ice thickness flux per unit face length {[}Z L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{input\_thick} :: {[}in{]} The ice thickness at boundaries {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{new\_sim} :: {[}in{]} If present and false, this run is being restarted

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{cg\_action() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{cg\_action()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{cg\_action}}}{\emph{uret}, \emph{vret}, \emph{u\_shlf}, \emph{v\_shlf}, \emph{Phi}, \emph{Phisub}, \emph{umask}, \emph{vmask}, \emph{hmask}, \emph{H\_node}, \emph{ice\_visc}, \emph{float\_cond}, \emph{bathyT}, \emph{basal\_trac}, \emph{G}, \emph{US}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{dens\_ratio}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{uret} :: {[}inout{]} The retarding stresses working at u\sphinxhyphen{}points {[}R L3 Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{vret} :: {[}inout{]} The retarding stresses working at v\sphinxhyphen{}points {[}R L3 Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} kg m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{phi} :: {[}in{]} The gradients of bilinear basis elements at Gaussian

\item {} 
\sphinxstylestrong{phisub} :: {[}in{]} Quadrature structure weights at subgridscale

\item {} 
\sphinxstylestrong{u\_shlf} :: {[}in{]} The zonal ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v\_shlf} :: {[}in{]} The meridional ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{umask} :: {[}in{]} A coded mask indicating the nature of the

\item {} 
\sphinxstylestrong{vmask} :: {[}in{]} A coded mask indicating the nature of the

\item {} 
\sphinxstylestrong{h\_node} :: {[}in{]} The ice shelf thickness at nodal (corner)

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{ice\_visc} :: {[}in{]} A field related to the ice viscosity from Glen’s

\item {} 
\sphinxstylestrong{float\_cond} :: {[}in{]} An array indicating where the ice

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of ocean bathymetry at tracer points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{basal\_trac} :: {[}in{]} A field related to the nonlinear part of the

\item {} 
\sphinxstylestrong{dens\_ratio} :: {[}in{]} The density of ice divided by the density of seawater, nondimensional

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending j\sphinxhyphen{}index to work on

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action_subgrid_basal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action\_subgrid\_basal}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_inner}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_inner}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cg\_action\_subgrid\_basal() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{cg\_action\_subgrid\_basal()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action_subgrid_basal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{cg\_action\_subgrid\_basal}}}{\emph{Phisub}, \emph{H}, \emph{U}, \emph{V}, \emph{bathyT}, \emph{dens\_ratio}, \emph{Ucontr}, \emph{Vcontr}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{phisub} :: {[}in{]} Quadrature structure weights at subgridscale

\item {} 
\sphinxstylestrong{h} :: {[}in{]} The ice shelf thickness at nodal (corner) points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional ice shelf velocity at vertices {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of ocean bathymetry at tracer points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{dens\_ratio} :: {[}in{]} The density of ice divided by the density of seawater {[}nondim{]}

\item {} 
\sphinxstylestrong{ucontr} :: {[}out{]} The areal average of u\sphinxhyphen{}velocities where the ice shelf is grounded, or 0 where it is floating {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{vcontr} :: {[}out{]} The areal average of v\sphinxhyphen{}velocities where the ice shelf is grounded, or 0 where it is floating {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/apply_boundary_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_boundary\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{matrix\_diagonal() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{matrix\_diagonal()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/matrix_diagonal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{matrix\_diagonal}}}{\emph{CS}, \emph{G}, \emph{US}, \emph{float\_cond}, \emph{H\_node}, \emph{ice\_visc}, \emph{basal\_trac}, \emph{hmask}, \emph{dens\_ratio}, \emph{Phisub}, \emph{u\_diagonal}, \emph{v\_diagonal}}{}
returns the diagonal entries of the matrix for a Jacobi preconditioning
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{float\_cond} :: {[}in{]} An array indicating where the ice

\item {} 
\sphinxstylestrong{h\_node} :: {[}in{]} The ice shelf thickness at nodal

\item {} 
\sphinxstylestrong{ice\_visc} :: {[}in{]} A field related to the ice viscosity from Glen’s

\item {} 
\sphinxstylestrong{basal\_trac} :: {[}in{]} A field related to the nonlinear part of the

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{dens\_ratio} :: {[}in{]} The density of ice divided by the density of seawater {[}nondim{]}

\item {} 
\sphinxstylestrong{phisub} :: {[}in{]} Quadrature structure weights at subgridscale locations for finite element calculations {[}nondim{]}

\item {} 
\sphinxstylestrong{u\_diagonal} :: {[}inout{]} The diagonal elements of the u\sphinxhyphen{}velocity

\item {} 
\sphinxstylestrong{v\_diagonal} :: {[}inout{]} The diagonal elements of the v\sphinxhyphen{}velocity

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_fn_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_fn\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_diagonal_subgrid_basal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_diagonal\_subgrid\_basal}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_inner}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_inner}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cg\_diagonal\_subgrid\_basal() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{cg\_diagonal\_subgrid\_basal()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_diagonal_subgrid_basal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{cg\_diagonal\_subgrid\_basal}}}{\emph{Phisub}, \emph{H\_node}, \emph{bathyT}, \emph{dens\_ratio}, \emph{sub\_grnd}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{phisub} :: {[}in{]} Quadrature structure weights at subgridscale

\item {} 
\sphinxstylestrong{h\_node} :: {[}in{]} The ice shelf thickness at nodal (corner) points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{bathyt} :: {[}in{]} The depth of ocean bathymetry at tracer points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{dens\_ratio} :: {[}in{]} The density of ice divided by the density of seawater {[}nondim{]}

\item {} 
\sphinxstylestrong{sub\_grnd} :: {[}out{]} The weighted fraction of the sub\sphinxhyphen{}cell where the ice shelf is grounded {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/matrix_diagonal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matrix\_diagonal}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_boundary\_values() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{apply\_boundary\_values()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/apply_boundary_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{apply\_boundary\_values}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{time}, \emph{Phisub}, \emph{H\_node}, \emph{ice\_visc}, \emph{basal\_trac}, \emph{float\_cond}, \emph{dens\_ratio}, \emph{u\_bdry\_contr}, \emph{v\_bdry\_contr}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{phisub} :: {[}in{]} Quadrature structure weights at subgridscale

\item {} 
\sphinxstylestrong{h\_node} :: {[}in{]} The ice shelf thickness at nodal

\item {} 
\sphinxstylestrong{ice\_visc} :: {[}in{]} A field related to the ice viscosity from Glen’s

\item {} 
\sphinxstylestrong{basal\_trac} :: {[}in{]} A field related to the nonlinear part of the

\item {} 
\sphinxstylestrong{float\_cond} :: {[}in{]} An array indicating where the ice

\item {} 
\sphinxstylestrong{dens\_ratio} :: {[}in{]} The density of ice divided by the density of seawater, nondimensional

\item {} 
\sphinxstylestrong{u\_bdry\_contr} :: {[}inout{]} Zonal force contributions due to the

\item {} 
\sphinxstylestrong{v\_bdry\_contr} :: {[}inout{]} Meridional force contributions due to the

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_fn_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bilinear\_shape\_fn\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/cg_action_subgrid_basal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cg\_action\_subgrid\_basal}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_inner}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_inner}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_shelf\_visc() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{calc\_shelf\_visc()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/calc_shelf_visc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{calc\_shelf\_visc}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{u\_shlf}, \emph{v\_shlf}}{}
Update depth integrated viscosity, based on horizontal strain rates, and also update the nonlinear part of the basal traction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{u\_shlf} :: {[}inout{]} The zonal ice shelf velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_shlf} :: {[}inout{]} The meridional ice shelf velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_od\_ffrac() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{update\_od\_ffrac()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{update\_od\_ffrac}}}{\emph{CS}, \emph{G}, \emph{US}, \emph{ocean\_mass}, \emph{find\_avg}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{ocean\_mass} :: {[}in{]} The mass per unit area of the ocean {[}kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{find\_avg} :: {[}in{]} If true, find the average of OD and ffrac, and reset the underlying running sums to 0.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_od\_ffrac\_uncoupled() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{update\_od\_ffrac\_uncoupled()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_od_ffrac_uncoupled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{update\_od\_ffrac\_uncoupled}}}{\emph{CS}, \emph{G}, \emph{h\_shelf}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}in{]} the thickness of the ice shelf {[}Z \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf\_dyn}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bilinear\_shape\_functions() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{bilinear\_shape\_functions()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_functions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{bilinear\_shape\_functions}}}{\emph{X}, \emph{Y}, \emph{Phi}, \emph{area}}{}
This subroutine calculates the gradients of bilinear basis elements that that are centered at the vertices of the cell. Values are calculated at points of gaussian quadrature.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The x\sphinxhyphen{}positions of the vertices of the quadrilateral {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{y} :: {[}in{]} The y\sphinxhyphen{}positions of the vertices of the quadrilateral {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{phi} :: {[}inout{]} The gradients of bilinear basis elements at Gaussian quadrature points surrounding the cell vertices {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{area} :: {[}out{]} The quadrilateral cell area {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/quad_area}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quad\_area}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bilinear\_shape\_fn\_grid() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{bilinear\_shape\_fn\_grid()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_fn_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{bilinear\_shape\_fn\_grid}}}{\emph{G}, \emph{i}, \emph{j}, \emph{Phi}}{}
This subroutine calculates the gradients of bilinear basis elements that are centered at the vertices of the cell using a locally orthogoal MOM6 grid. Values are calculated at points of gaussian quadrature.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index in the grid to work on.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index in the grid to work on.

\item {} 
\sphinxstylestrong{phi} :: {[}inout{]} The gradients of bilinear basis elements at Gaussian quadrature points surrounding the cell vertices {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/apply_boundary_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_boundary\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/matrix_diagonal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matrix\_diagonal}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bilinear\_shape\_functions\_subgrid() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{bilinear\_shape\_functions\_subgrid()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/bilinear_shape_functions_subgrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{bilinear\_shape\_functions\_subgrid}}}{\emph{Phisub}, \emph{nsub}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{phisub} :: {[}inout{]} Quadrature structure weights at subgridscale

\item {} 
\sphinxstylestrong{nsub} :: {[}in{]} The number of subgridscale quadrature locations in each direction

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_velocity\_masks() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{update\_velocity\_masks()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_velocity_masks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{update\_velocity\_masks}}}{\emph{CS}, \emph{G}, \emph{hmask}, \emph{umask}, \emph{vmask}, \emph{u\_face\_mask}, \emph{v\_face\_mask}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf dynamics control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{umask} :: {[}out{]} A coded mask indicating the nature of the

\item {} 
\sphinxstylestrong{vmask} :: {[}out{]} A coded mask indicating the nature of the

\item {} 
\sphinxstylestrong{u\_face\_mask} :: {[}out{]} A coded mask for velocities at the C\sphinxhyphen{}grid u\sphinxhyphen{}face

\item {} 
\sphinxstylestrong{v\_face\_mask} :: {[}out{]} A coded mask for velocities at the C\sphinxhyphen{}grid v\sphinxhyphen{}face

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/initialize_ice_shelf_dyn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_shelf\_dyn}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{interpolate\_h\_to\_b() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{interpolate\_h\_to\_b()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/interpolate_h_to_b}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{interpolate\_h\_to\_b}}}{\emph{G}, \emph{h\_shelf}, \emph{hmask}, \emph{H\_node}}{}
Interpolate the ice shelf thickness from tracer point to nodal points, subject to a mask.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}in{]} The ice shelf thickness at tracer points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{h\_node} :: {[}inout{]} The ice shelf thickness at nodal (corner)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_solve_outer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_solve\_outer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_dyn\_end() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_dyn\_end()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_dyn_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_dyn\_end}}}{\emph{CS}}{}
Deallocates all memory associated with the ice shelf dynamics module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the ice shelf dynamics control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::ice\_shelf\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_temp() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_temp()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_temp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_temp}}}{\emph{CS}, \emph{ISS}, \emph{G}, \emph{US}, \emph{time\_step}, \emph{melt\_rate}, \emph{Time}}{}
This subroutine updates the vertically averaged ice shelf temperature.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{iss} :: {[}in{]} A structure with elements that describe the ice\sphinxhyphen{}shelf state

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The time step for this update {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{melt\_rate} :: {[}in{]} basal melt rate {[}R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_temp\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_advect\_temp\_y}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/update_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_advect\_temp\_x() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_advect\_temp\_x()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_advect\_temp\_x}}}{\emph{CS}, \emph{G}, \emph{time\_step}, \emph{hmask}, \emph{h0}, \emph{h\_after\_uflux}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The time step for this update {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} The initial ice shelf thicknesses {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{h\_after\_uflux} :: {[}inout{]} The ice shelf thicknesses after

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/slope_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slope\_limiter}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_temp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_advect\_temp\_y() (fortran subroutine in module mom\_ice\_shelf\_dynamics)@\spxentry{ice\_shelf\_advect\_temp\_y()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_dynamics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_advect_temp_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_dynamics/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_advect\_temp\_y}}}{\emph{CS}, \emph{G}, \emph{time\_step}, \emph{hmask}, \emph{h\_after\_uflux}, \emph{h\_after\_vflux}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A pointer to the ice shelf control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The time step for this update {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}in{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{h\_after\_uflux} :: {[}in{]} The ice shelf thicknesses after

\item {} 
\sphinxstylestrong{h\_after\_vflux} :: {[}inout{]} The ice shelf thicknesses after

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/slope_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slope\_limiter}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_dynamics:f/mom_ice_shelf_dynamics/ice_shelf_temp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_temp}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ice\_shelf\_initialize module reference}
\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize}}\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:mom-ice-shelf-initialize-module-reference}}\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize::doc}}\index{mom\_ice\_shelf\_initialize (module)@\spxentry{mom\_ice\_shelf\_initialize}\spxextra{module}|spxpagem}
Initialize ice shelf variables.

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:detamom-ice-shelf-initialize}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness()}}}}}
&
Initialize ice shelf thickness.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness\_from\_file()}}}}}
&
Initialize ice shelf thickness from file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_channel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness\_channel()}}}}}
&
Initialize ice shelf thickness for a channel configuration.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:detailed-description}}\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:detamom-ice-shelf-initialize}}
Initialize ice shelf variables.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:function-subroutine-documentation}}\index{initialize\_ice\_thickness() (fortran subroutine in module mom\_ice\_shelf\_initialize)@\spxentry{initialize\_ice\_thickness()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize/}}\sphinxbfcode{\sphinxupquote{initialize\_ice\_thickness}}}{\emph{h\_shelf}, \emph{area\_shelf\_h}, \emph{hmask}, \emph{G}, \emph{US}, \emph{PF}}{}
Initialize ice shelf thickness.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}inout{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}inout{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_channel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness\_channel}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_init_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_shelf\_init::user\_init\_ice\_thickness}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ice\_thickness\_from\_file() (fortran subroutine in module mom\_ice\_shelf\_initialize)@\spxentry{initialize\_ice\_thickness\_from\_file()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize/}}\sphinxbfcode{\sphinxupquote{initialize\_ice\_thickness\_from\_file}}}{\emph{h\_shelf}, \emph{area\_shelf\_h}, \emph{hmask}, \emph{G}, \emph{US}, \emph{PF}}{}
Initialize ice shelf thickness from file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}inout{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}inout{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ice\_thickness\_channel() (fortran subroutine in module mom\_ice\_shelf\_initialize)@\spxentry{initialize\_ice\_thickness\_channel()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_initialize}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness_channel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize/}}\sphinxbfcode{\sphinxupquote{initialize\_ice\_thickness\_channel}}}{\emph{h\_shelf}, \emph{area\_shelf\_h}, \emph{hmask}, \emph{G}, \emph{US}, \emph{PF}}{}
Initialize ice shelf thickness for a channel configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}inout{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}inout{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ice\_thickness}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ice\_shelf\_state module reference}
\label{\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state}}\label{\detokenize{api/generated/modules/mom_ice_shelf_state:mom-ice-shelf-state-module-reference}}\label{\detokenize{api/generated/modules/mom_ice_shelf_state::doc}}\index{mom\_ice\_shelf\_state (module)@\spxentry{mom\_ice\_shelf\_state}\spxextra{module}|spxpagem}
Implements the thermodynamic aspects of ocean / ice\sphinxhyphen{}shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the MOM framework and coding style.

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:detamom-ice-shelf-state}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_ice_shelf_state:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_state}}}}}
&
Structure that describes the ice shelf state.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ice_shelf_state:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_state\_init()}}}}}
&
Deallocates all memory associated with this module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_shelf\_state\_end()}}}}}
&
Deallocates all memory associated with this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ice_shelf_state:detailed-description}}\label{\detokenize{api/generated/modules/mom_ice_shelf_state:detamom-ice-shelf-state}}
Implements the thermodynamic aspects of ocean / ice\sphinxhyphen{}shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the MOM framework and coding style.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf_state:type-documentation}}\index{ice\_shelf\_state (fortran type in module mom\_ice\_shelf\_state)@\spxentry{ice\_shelf\_state}\spxextra{fortran type in module mom\_ice\_shelf\_state}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_state}}}
Structure that describes the ice shelf state.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mass\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The mass per unit area of the ice shelf or sheet {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area\_shelf\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: the thickness of the shelf {[}Z \textasciitilde{}\textgreater{} m{]}, redundant with mass but may

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Mask used to indicate ice\sphinxhyphen{}covered or partiall\sphinxhyphen{}covered cells.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tflux\_ocn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The downward sensible ocean heat flux at the.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The downward salt flux at the ocean\sphinxhyphen{}ice.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{water\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The net downward liquid water flux at the.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tflux\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The downward diffusive heat flux in the ice.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tfreeze}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The freezing point potential temperature.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ice_shelf_state:function-subroutine-documentation}}\index{ice\_shelf\_state\_init() (fortran subroutine in module mom\_ice\_shelf\_state)@\spxentry{ice\_shelf\_state\_init()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_state}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_state\_init}}}{\emph{ISS}, \emph{G}}{}
Deallocates all memory associated with this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iss} :: A pointer to the ice shelf state structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The grid structure used by the ice shelf.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_shelf\_state\_end() (fortran subroutine in module mom\_ice\_shelf\_state)@\spxentry{ice\_shelf\_state\_end()}\spxextra{fortran subroutine in module mom\_ice\_shelf\_state}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ice_shelf_state:f/mom_ice_shelf_state/ice_shelf_state_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_state/}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_state\_end}}}{\emph{ISS}}{}
Deallocates all memory associated with this module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{iss} :: A pointer to the ice shelf state structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::ice\_shelf\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_int\_tide\_input module reference}
\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input}}\label{\detokenize{api/generated/modules/mom_int_tide_input:mom-int-tide-input-module-reference}}\label{\detokenize{api/generated/modules/mom_int_tide_input::doc}}\index{mom\_int\_tide\_input (module)@\spxentry{mom\_int\_tide\_input}\spxextra{module}|spxpagem}
Calculates energy input to the internal tides.

{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:detamom-int-tide-input}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_int_tide_input:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_tide\_input\_cs}}}}}
&
This control structure holds parameters that regulate internal tide energy inputs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_tide\_input\_type}}}}}
&
This type is used to exchange fields related to the internal tides.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_int_tide_input:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/set_int_tide_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_int\_tide\_input()}}}}}
&
Sets the model\sphinxhyphen{}state dependent internal tide energy sources.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/find_n2_bottom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_n2\_bottom()}}}}}
&
Estimates the near\sphinxhyphen{}bottom buoyancy frequency (N\textasciicircum{}2).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_tide\_input\_init()}}}}}
&
Initializes the data related to the internal tide input module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_tide\_input\_end()}}}}}
&
Deallocates any memory related to the internal tide input module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_int_tide_input:detailed-description}}\label{\detokenize{api/generated/modules/mom_int_tide_input:detamom-int-tide-input}}
Calculates energy input to the internal tides.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_int_tide_input:type-documentation}}\index{int\_tide\_input\_cs (fortran type in module mom\_int\_tide\_input)@\spxentry{int\_tide\_input\_cs}\spxextra{fortran type in module mom\_int\_tide\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_int\_tide\_input/}}\sphinxbfcode{\sphinxupquote{int\_tide\_input\_cs}}}
This control structure holds parameters that regulate internal tide energy inputs.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itide\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum Internal tide conversion available to mix above the BBL {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_fill}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Vertical diffusivity used to interpolate sensible values of T \& S into thin layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itidal\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The time\sphinxhyphen{}invariant field that enters the TKE\_itidal input calculation {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The directory for input files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_source\_test}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply an arbitrary generation site for internal tide testing (BDM)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_max\_source}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: A time for use in testing internal tides.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_source\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: X Location of generation site for internal tide for testing (BDM)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_source\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Y Location of generation site for internal tide for testing (BDM)

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_tide\_input\_type (fortran type in module mom\_int\_tide\_input)@\spxentry{int\_tide\_input\_type}\spxextra{fortran type in module mom\_int\_tide\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_int\_tide\_input/}}\sphinxbfcode{\sphinxupquote{int\_tide\_input\_type}}}
This type is used to exchange fields related to the internal tides.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itidal\_input}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The internal tide TKE input at the bottom of the ocean {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The squared topographic roughness height {[}Z2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tideamp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The amplitude of the tidal velocities {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The bottom stratification {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_int_tide_input:function-subroutine-documentation}}\index{set\_int\_tide\_input() (fortran subroutine in module mom\_int\_tide\_input)@\spxentry{set\_int\_tide\_input()}\spxextra{fortran subroutine in module mom\_int\_tide\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/set_int_tide_input}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_int\_tide\_input/}}\sphinxbfcode{\sphinxupquote{set\_int\_tide\_input}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{fluxes}, \emph{itide}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Sets the model\sphinxhyphen{}state dependent internal tide energy sources.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to the thermodynamic fields

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of thermodynamic surface fluxes

\item {} 
\sphinxstylestrong{itide} :: {[}inout{]} A structure containing fields related to the internal tide sources.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/find_n2_bottom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_n2\_bottom}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/vert_fill_ts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_isopycnal\_slopes::vert\_fill\_ts}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_n2\_bottom() (fortran subroutine in module mom\_int\_tide\_input)@\spxentry{find\_n2\_bottom()}\spxextra{fortran subroutine in module mom\_int\_tide\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/find_n2_bottom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_int\_tide\_input/}}\sphinxbfcode{\sphinxupquote{find\_n2\_bottom}}}{\emph{h}, \emph{tv}, \emph{T\_f}, \emph{S\_f}, \emph{h2}, \emph{fluxes}, \emph{G}, \emph{GV}, \emph{US}, \emph{N2\_bot}}{}
Estimates the near\sphinxhyphen{}bottom buoyancy frequency (N\textasciicircum{}2).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to the thermodynamic fields

\item {} 
\sphinxstylestrong{t\_f} :: {[}in{]} Temperature after vertical filtering to smooth out the values in thin layers {[}degC{]}.

\item {} 
\sphinxstylestrong{s\_f} :: {[}in{]} Salinity after vertical filtering to smooth out the values in thin layers {[}ppt{]}.

\item {} 
\sphinxstylestrong{h2} :: {[}in{]} Bottom topographic roughness {[}Z2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of thermodynamic surface fluxes

\item {} 
\sphinxstylestrong{n2\_bot} :: {[}out{]} The squared buoyancy freqency at the ocean bottom {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/set_int_tide_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_int\_tide\_input}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_tide\_input\_init() (fortran subroutine in module mom\_int\_tide\_input)@\spxentry{int\_tide\_input\_init()}\spxextra{fortran subroutine in module mom\_int\_tide\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_int\_tide\_input/}}\sphinxbfcode{\sphinxupquote{int\_tide\_input\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{itide}}{}
Initializes the data related to the internal tide input module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure, which is initialized here.

\item {} 
\sphinxstylestrong{itide} :: A structure containing fields related to the internal tide sources.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{int\_tide\_input\_end() (fortran subroutine in module mom\_int\_tide\_input)@\spxentry{int\_tide\_input\_end()}\spxextra{fortran subroutine in module mom\_int\_tide\_input}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/int_tide_input_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_int\_tide\_input/}}\sphinxbfcode{\sphinxupquote{int\_tide\_input\_end}}}{\emph{CS}}{}
Deallocates any memory related to the internal tide input module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: This module’s control structure, which is deallocated here.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_interface\_heights module reference}
\label{\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights}}\label{\detokenize{api/generated/modules/mom_interface_heights:mom-interface-heights-module-reference}}\label{\detokenize{api/generated/modules/mom_interface_heights::doc}}\index{mom\_interface\_heights (module)@\spxentry{mom\_interface\_heights}\spxextra{module}|spxpagem}
Functions for calculating interface heights, including free surface height.

{\hyperref[\detokenize{api/generated/modules/mom_interface_heights:detamom-interface-heights}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_interface_heights:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_eta\_3d()}}}}}
&
Calculates the heights of all interfaces between layers, using the appropriate form for consistency with the calculation of the pressure gradient forces.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_eta\_2d()}}}}}
&
Calculates the free surface height, using the appropriate form for consistency with the calculation of the pressure gradient forces.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_interface_heights:detailed-description}}\label{\detokenize{api/generated/modules/mom_interface_heights:detamom-interface-heights}}
Functions for calculating interface heights, including free surface height.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_interface_heights:function-subroutine-documentation}}\index{find\_eta\_3d() (fortran subroutine in module mom\_interface\_heights)@\spxentry{find\_eta\_3d()}\spxextra{fortran subroutine in module mom\_interface\_heights}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_interface\_heights/}}\sphinxbfcode{\sphinxupquote{find\_eta\_3d}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{eta}, \emph{eta\_bt}, \emph{halo\_size}, \emph{eta\_to\_m}}{}
Calculates the heights of all interfaces between layers, using the appropriate form for consistency with the calculation of the pressure gradient forces. Additionally, these height may be dilated for consistency with the corresponding time\sphinxhyphen{}average quantity from the barotropic calculation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} layer interface heights {[}Z \textasciitilde{}\textgreater{} m{]} or 1/eta\_to\_m m).

\item {} 
\sphinxstylestrong{eta\_bt} :: {[}in{]} optional barotropic variable that gives the “correct” free surface height (Boussinesq) or total water column mass per unit area (non\sphinxhyphen{}Boussinesq). This is used to dilate the layer. thicknesses when calculating interfaceheights {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} width of halo points on which to calculate eta.

\item {} 
\sphinxstylestrong{eta\_to\_m} :: {[}in{]} The conversion factor from the units of eta to m; by default this is USZ\_to\_m.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::int\_specific\_vol\_dp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_eta\_2d() (fortran subroutine in module mom\_interface\_heights)@\spxentry{find\_eta\_2d()}\spxextra{fortran subroutine in module mom\_interface\_heights}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_interface_heights:f/mom_interface_heights/find_eta_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_interface\_heights/}}\sphinxbfcode{\sphinxupquote{find\_eta\_2d}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{eta}, \emph{eta\_bt}, \emph{halo\_size}, \emph{eta\_to\_m}}{}
Calculates the free surface height, using the appropriate form for consistency with the calculation of the pressure gradient forces. Additionally, the sea surface height may be adjusted for consistency with the corresponding time\sphinxhyphen{}average quantity from the barotropic calculation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} free surface height relative to mean sea level (z=0) often {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{eta\_bt} :: {[}in{]} optional barotropic variable that gives the “correct” free surface height (Boussinesq) or total water column mass per unit area (non\sphinxhyphen{}Boussinesq) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{halo\_size} :: {[}in{]} width of halo points on which to calculate eta.

\item {} 
\sphinxstylestrong{eta\_to\_m} :: {[}in{]} The conversion factor from the units of eta to m; by default this is USZ\_to\_m.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::int\_specific\_vol\_dp}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_internal\_tides module reference}
\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides}}\label{\detokenize{api/generated/modules/mom_internal_tides:mom-internal-tides-module-reference}}\label{\detokenize{api/generated/modules/mom_internal_tides::doc}}\index{mom\_internal\_tides (module)@\spxentry{mom\_internal\_tides}\spxextra{module}|spxpagem}
Subroutines that use the ray\sphinxhyphen{}tracing equations to propagate the internal tide energy density.

{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:detamom-internal-tides}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_internal_tides:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/int_tide_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{int\_tide\_cs}}}}}
&
This control structure has parameters for the MOM\_internal\_tides module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/loop_bounds_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{loop\_bounds\_type}}}}}
&
A structure with the active energy loop bounds.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_internal_tides:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_int\_tide()}}}}}
&
Calls subroutines in this file that are needed to refract, propagate, and dissipate energy density of the internal tide.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/sum_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sum\_en()}}}}}
&
Checks for energy conservation on computational domain.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/itidal_lowmode_loss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{itidal\_lowmode\_loss()}}}}}
&
Calculates the energy lost from the propagating internal tide due to scattering over small\sphinxhyphen{}scale roughness along the lines of Jayne \& St.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/get_lowmode_loss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_lowmode\_loss()}}}}}
&
This subroutine extracts the energy lost from the propagating internal which has been summed across all angles, frequencies, and modes for a given mechanism and location.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/refract}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{refract()}}}}}
&
Implements refraction on the internal waves at a single frequency.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_angular_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_angular\_advect()}}}}}
&
This subroutine calculates the 1\sphinxhyphen{}d flux for advection in angular space using a monotonic piecewise parabolic scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate()}}}}}
&
Propagates internal waves at a single frequency.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_corner_spread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_corner\_spread()}}}}}
&
This subroutine does first\sphinxhyphen{}order corner advection.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_x()}}}}}
&
Propagates the internal wave energy in the logical x\sphinxhyphen{}direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_y()}}}}}
&
Propagates the internal wave energy in the logical y\sphinxhyphen{}direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/zonal_flux_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_en()}}}}}
&
Evaluates the zonal mass or volume fluxes in a layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/merid_flux_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_flux\_en()}}}}}
&
Evaluates the meridional mass or volume fluxes in a layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/reflect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reflect()}}}}}
&
Reflection of the internal waves at a single frequency.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/teleport}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{teleport()}}}}}
&
Moves energy across lines of partial reflection to prevent reflection of energy that is supposed to get across.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/correct_halo_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{correct\_halo\_rotation()}}}}}
&
Rotates points in the halos where required to accommodate changes in grid orientation, such as at the tripolar fold.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x()}}}}}
&
Calculates left/right edge values for PPM reconstruction in x\sphinxhyphen{}direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y()}}}}}
&
Calculates left/right edge valus for PPM reconstruction in y\sphinxhyphen{}direction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_limit_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_pos()}}}}}
&
Limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive\sphinxhyphen{}definite.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{internal\_tides\_init()}}}}}
&
This subroutine initializes the internal tides module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{internal\_tides\_end()}}}}}
&
This subroutine deallocates the memory associated with the internal tides control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_internal_tides:detailed-description}}\label{\detokenize{api/generated/modules/mom_internal_tides:detamom-internal-tides}}
\textless{}undocumented\textgreater{}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_internal_tides:type-documentation}}\index{int\_tide\_cs (fortran type in module mom\_internal\_tides)@\spxentry{int\_tide\_cs}\spxextra{fortran type in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/int_tide_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{int\_tide\_cs}}}
This control structure has parameters for the MOM\_internal\_tides module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tot\_en}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_itidal\_input}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_itide\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_refl\_pref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_refl\_ang}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_land\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dx\_cv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dy\_cu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tot\_leak\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tot\_quad\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tot\_itidal\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tot\_froude\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tot\_allprocesses\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_en\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_itidal\_loss\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_allprocesses\_loss\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ub\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cp\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_en\_ang\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_itidal\_loss\_ang\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Diag handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_int\_tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the internal tide code.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nfreq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of internal tide frequency bands.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of internal tide vertical modes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nangle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of internal tide angular orientations.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energized\_angle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: If positive, only this angular band is energized for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{corner\_adv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a corner advection rather than PPM.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{upwind\_1st}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a first\sphinxhyphen{}order upwind scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{simple\_2nd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a simple second order (arithmetic mean) interpolation of the edge values instead of the higher order interpolation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vol\_cfl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the ratio of the open face lengths to the tracer cell areas when estimating CFL numbers. Without aggress\_adjust, the default is false; it is always true with aggress\_adjust.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ppmang}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use PPM for advection of energy in angular space.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{refl\_angle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: local coastline/ridge/shelf angles read from file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nullangle}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: placeholder value in cells with no reflection

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{refl\_pref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: partial reflection coeff for each “coast cell”

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{refl\_pref\_logical}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: true if reflecting cell with partial reflection

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{refl\_dbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: identifies reflection cells where double reflection is possible (i.e. ridge cells)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: horizontal phase speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_leak\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: energy lost due to misc background processes {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_quad\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: energy lost due to quadratic bottom drag {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_froude\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: energy lost due to wave breaking {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itidal\_loss\_fixed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Fixed part of the energy lost due to small\sphinxhyphen{}scale drag {[}R L\sphinxhyphen{}2 Z3 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]} here; This will be multiplied by N and the squared near\sphinxhyphen{}bottom velocity to get the energy losses in {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itidal\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: energy lost due to small\sphinxhyphen{}scale wave drag {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tot\_leak\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Energy loss rates due to misc bakground processes, summed over angle, frequency and mode {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tot\_quad\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Energy loss rates due to quadratic bottom drag, summed over angle, frequency and mode {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tot\_itidal\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Energy loss rates due to small\sphinxhyphen{}scale drag, summed over angle, frequency and mode {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tot\_froude\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Energy loss rates due to wave breaking, summed over angle, frequency and mode {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tot\_allprocesses\_loss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Energy loss rates due to all processes, summed over angle, frequency and mode {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{q\_itides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: fraction of local dissipation {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{en\_sum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: global sum of energy for use in debugging {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: directory to look for coastline angle file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{decay\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant rate at which internal tide energy is lost to the interior ocean internal wave field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdrag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The bottom drag coefficient {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_background\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply a drag due to background processes as a sink.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_bottom\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply a quadratic bottom drag as a sink.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_wave\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply scattering due to small\sphinxhyphen{}scale roughness as a sink.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{apply\_froude\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply wave breaking as a sink.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{en}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The internal wave energy density as a function of (i,j,angle,frequency,mode) integrated within an angular and frequency band {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{en\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The internal wave energy density as a function of (i,j,angle); temporary for restart.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frequency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The frequency of each band {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wave\_structure\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(wave\_structure\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the wave\_structure module control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{loop\_bounds\_type (fortran type in module mom\_internal\_tides)@\spxentry{loop\_bounds\_type}\spxextra{fortran type in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/loop_bounds_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{loop\_bounds\_type}}}
A structure with the active energy loop bounds.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ish}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The active loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ieh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The active loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The active loop bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jeh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The active loop bounds.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_internal_tides:function-subroutine-documentation}}\index{propagate\_int\_tide() (fortran subroutine in module mom\_internal\_tides)@\spxentry{propagate\_int\_tide()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{propagate\_int\_tide}}}{\emph{h}, \emph{tv}, \emph{cn}, \emph{TKE\_itidal\_input}, \emph{vel\_btTide}, \emph{Nb}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calls subroutines in this file that are needed to refract, propagate, and dissipate energy density of the internal tide.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Pointer to thermodynamic variables (needed for wave structure).

\item {} 
\sphinxstylestrong{tke\_itidal\_input} :: {[}in{]} The energy input to the internal waves {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{vel\_bttide} :: {[}in{]} Barotropic velocity read from file {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{nb} :: {[}in{]} Near\sphinxhyphen{}bottom buoyancy frequency {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Length of time over which to advance the internal tides {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\item {} 
\sphinxstylestrong{cn} :: {[}in{]} The internal wave speeds of each

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/complete_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::complete\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/correct_halo_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{correct\_halo\_rotation}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/itidal_lowmode_loss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{itidal\_lowmode\_loss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/refract}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{refract}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/start_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::start\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/sum_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sum\_en}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_structure::wave\_structure}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sum\_en() (fortran subroutine in module mom\_internal\_tides)@\spxentry{sum\_en()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/sum_en}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{sum\_en}}}{\emph{G}, \emph{CS}, \emph{En}, \emph{label}}{}
Checks for energy conservation on computational domain.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\item {} 
\sphinxstylestrong{en} :: {[}in{]} The energy density of the internal tides {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{label} :: {[}in{]} A label to use in error messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_area\_mean}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_int\_tide}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{itidal\_lowmode\_loss() (fortran subroutine in module mom\_internal\_tides)@\spxentry{itidal\_lowmode\_loss()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/itidal_lowmode_loss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{itidal\_lowmode\_loss}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{Nb}, \emph{Ub}, \emph{En}, \emph{TKE\_loss\_fixed}, \emph{TKE\_loss}, \emph{dt}, \emph{full\_halos}}{}
Calculates the energy lost from the propagating internal tide due to scattering over small\sphinxhyphen{}scale roughness along the lines of Jayne \& St. Laurent (2001).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\item {} 
\sphinxstylestrong{nb} :: {[}in{]} Near\sphinxhyphen{}bottom stratification {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ub} :: {[}inout{]} RMS (over one period) near\sphinxhyphen{}bottom horizontal

\item {} 
\sphinxstylestrong{tke\_loss\_fixed} :: {[}in{]} Fixed part of energy loss {[}R L\sphinxhyphen{}2 Z3 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} Energy density of the internal waves {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tke\_loss} :: {[}out{]} Energy loss rate {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{full\_halos} :: {[}in{]} If true, do the calculation over the entirecomputational domain.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_int\_tide}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_lowmode\_loss() (fortran subroutine in module mom\_internal\_tides)@\spxentry{get\_lowmode\_loss()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/get_lowmode_loss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{get\_lowmode\_loss}}}{\emph{i}, \emph{j}, \emph{G}, \emph{CS}, \emph{mechanism}, \emph{TKE\_loss\_sum}}{}
This subroutine extracts the energy lost from the propagating internal which has been summed across all angles, frequencies, and modes for a given mechanism and location.

It can be called from another module to get values from this module’s (private) CS.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index of the value to be reported.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index of the value to be reported.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\item {} 
\sphinxstylestrong{mechanism} :: {[}in{]} The named mechanism of loss to return

\item {} 
\sphinxstylestrong{tke\_loss\_sum} :: {[}out{]} Total energy loss rate due to specified mechanism {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{refract() (fortran subroutine in module mom\_internal\_tides)@\spxentry{refract()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/refract}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{refract}}}{\emph{En}, \emph{cn}, \emph{freq}, \emph{dt}, \emph{G}, \emph{US}, \emph{NAngle}, \emph{use\_PPMang}}{}
Implements refraction on the internal waves at a single frequency.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The internal gravity wave energy density as a

\item {} 
\sphinxstylestrong{cn} :: {[}in{]} Baroclinic mode speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{freq} :: {[}in{]} Wave frequency {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{use\_ppmang} :: {[}in{]} If true, use PPM for advection rather than upwind.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_angular_advect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_angular\_advect}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_int\_tide}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_angular\_advect() (fortran subroutine in module mom\_internal\_tides)@\spxentry{ppm\_angular\_advect()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_angular_advect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{ppm\_angular\_advect}}}{\emph{En2d}, \emph{CFL\_ang}, \emph{Flux\_En}, \emph{NAngle}, \emph{dt}, \emph{halo\_ang}}{}
This subroutine calculates the 1\sphinxhyphen{}d flux for advection in angular space using a monotonic piecewise parabolic scheme. This needs to be called from within i and j spatial loops.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{halo\_ang} :: {[}in{]} The halo size in angular space

\item {} 
\sphinxstylestrong{en2d} :: {[}in{]} The internal gravity wave energy density as a

\item {} 
\sphinxstylestrong{cfl\_ang} :: {[}in{]} The CFL number of the energy advection across angles

\item {} 
\sphinxstylestrong{flux\_en} :: {[}out{]} The time integrated internal wave energy flux across angles {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/refract}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{refract}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{propagate() (fortran subroutine in module mom\_internal\_tides)@\spxentry{propagate()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{propagate}}}{\emph{En}, \emph{cn}, \emph{freq}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}, \emph{NAngle}}{}
Propagates internal waves at a single frequency.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The internal gravity wave energy density as a

\item {} 
\sphinxstylestrong{cn} :: {[}in{]} Baroclinic mode speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{freq} :: {[}in{]} Wave frequency {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_corner_spread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_corner\_spread}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_y}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_int\_tide}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{propagate\_corner\_spread() (fortran subroutine in module mom\_internal\_tides)@\spxentry{propagate\_corner\_spread()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_corner_spread}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{propagate\_corner\_spread}}}{\emph{En}, \emph{energized\_wedge}, \emph{NAngle}, \emph{speed}, \emph{dt}, \emph{G}, \emph{CS}, \emph{LB}}{}
This subroutine does first\sphinxhyphen{}order corner advection. It was written with the hopes of smoothing out the garden sprinkler effect, but is too numerically diffusive to be of much use as of yet. It is not yet compatible with reflection schemes (BDM).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The energy density integrated over an angular

\item {} 
\sphinxstylestrong{speed} :: {[}in{]} The magnitude of the group velocity at the cell

\item {} 
\sphinxstylestrong{energized\_wedge} :: {[}in{]} Index of current ray direction.

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to continuity\_PPM\_init.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active energy loop bounds.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{propagate\_x() (fortran subroutine in module mom\_internal\_tides)@\spxentry{propagate\_x()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{propagate\_x}}}{\emph{En}, \emph{speed\_x}, \emph{Cgx\_av}, \emph{dCgx}, \emph{dt}, \emph{G}, \emph{US}, \emph{Nangle}, \emph{CS}, \emph{LB}}{}
Propagates the internal wave energy in the logical x\sphinxhyphen{}direction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The energy density integrated over an angular

\item {} 
\sphinxstylestrong{speed\_x} :: {[}in{]} The magnitude of the group velocity at the

\item {} 
\sphinxstylestrong{cgx\_av} :: {[}in{]} The average x\sphinxhyphen{}projection in each angular band.

\item {} 
\sphinxstylestrong{dcgx} :: {[}in{]} The difference in x\sphinxhyphen{}projections between the edges of each angular band.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to continuity\_PPM\_init.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active energy loop bounds.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/reflect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reflect}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/teleport}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{teleport}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/zonal_flux_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zonal\_flux\_en}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{propagate\_y() (fortran subroutine in module mom\_internal\_tides)@\spxentry{propagate\_y()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{propagate\_y}}}{\emph{En}, \emph{speed\_y}, \emph{Cgy\_av}, \emph{dCgy}, \emph{dt}, \emph{G}, \emph{US}, \emph{Nangle}, \emph{CS}, \emph{LB}}{}
Propagates the internal wave energy in the logical y\sphinxhyphen{}direction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The energy density integrated over an angular

\item {} 
\sphinxstylestrong{speed\_y} :: {[}in{]} The magnitude of the group velocity at the

\item {} 
\sphinxstylestrong{cgy\_av} :: {[}in{]} The average y\sphinxhyphen{}projection in each angular band.

\item {} 
\sphinxstylestrong{dcgy} :: {[}in{]} The difference in y\sphinxhyphen{}projections between the edges of each angular band.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to continuity\_PPM\_init.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active energy loop bounds.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/merid_flux_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{merid\_flux\_en}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/reflect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reflect}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/teleport}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{teleport}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{zonal\_flux\_en() (fortran subroutine in module mom\_internal\_tides)@\spxentry{zonal\_flux\_en()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/zonal_flux_en}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{zonal\_flux\_en}}}{\emph{u}, \emph{h}, \emph{hL}, \emph{hR}, \emph{uh}, \emph{dt}, \emph{G}, \emph{US}, \emph{j}, \emph{ish}, \emph{ieh}, \emph{vol\_CFL}}{}
Evaluates the zonal mass or volume fluxes in a layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Energy density used to calculate the fluxes {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hl} :: {[}in{]} Left\sphinxhyphen{} Energy densities in the reconstruction {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hr} :: {[}in{]} Right\sphinxhyphen{} Energy densities in the reconstruction {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} The zonal energy transport {[}R Z3 L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} J s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} The start i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} The end i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{vol\_cfl} :: {[}in{]} If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_x}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{merid\_flux\_en() (fortran subroutine in module mom\_internal\_tides)@\spxentry{merid\_flux\_en()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/merid_flux_en}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{merid\_flux\_en}}}{\emph{v}, \emph{h}, \emph{hL}, \emph{hR}, \emph{vh}, \emph{dt}, \emph{G}, \emph{US}, \emph{J}, \emph{ish}, \emph{ieh}, \emph{vol\_CFL}}{}
Evaluates the meridional mass or volume fluxes in a layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Energy density used to calculate the fluxes {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hl} :: {[}in{]} Left\sphinxhyphen{} Energy densities in the reconstruction {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{hr} :: {[}in{]} Right\sphinxhyphen{} Energy densities in the reconstruction {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} The meridional energy transport {[}R Z3 L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} J s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{ish} :: {[}in{]} The start i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{ieh} :: {[}in{]} The end i\sphinxhyphen{}index range to work on.

\item {} 
\sphinxstylestrong{vol\_cfl} :: {[}in{]} If true, rescale the ratio of face areas to the cell areas when estimating the CFL number.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reflect() (fortran subroutine in module mom\_internal\_tides)@\spxentry{reflect()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/reflect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{reflect}}}{\emph{En}, \emph{NAngle}, \emph{CS}, \emph{G}, \emph{LB}}{}
Reflection of the internal waves at a single frequency.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The internal gravity wave energy density as a

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active energy loop bounds.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{teleport() (fortran subroutine in module mom\_internal\_tides)@\spxentry{teleport()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/teleport}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{teleport}}}{\emph{En}, \emph{NAngle}, \emph{CS}, \emph{G}, \emph{LB}}{}
Moves energy across lines of partial reflection to prevent reflection of energy that is supposed to get across.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The internal gravity wave energy density as a

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to int\_tide\_init.

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active energy loop bounds.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{correct\_halo\_rotation() (fortran subroutine in module mom\_internal\_tides)@\spxentry{correct\_halo\_rotation()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/correct_halo_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{correct\_halo\_rotation}}}{\emph{En}, \emph{test}, \emph{G}, \emph{NAngle}}{}
Rotates points in the halos where required to accommodate changes in grid orientation, such as at the tripolar fold.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{en} :: {[}inout{]} The internal gravity wave energy density as a function of space, angular orientation, frequency, and vertical mode {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{test} :: {[}in{]} An x\sphinxhyphen{}unit vector that has been passed through

\item {} 
\sphinxstylestrong{nangle} :: {[}in{]} The number of wave orientations in the discretized wave energy spectrum.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_int\_tide}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_reconstruction\_x() (fortran subroutine in module mom\_internal\_tides)@\spxentry{ppm\_reconstruction\_x()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{ppm\_reconstruction\_x}}}{\emph{h\_in}, \emph{h\_l}, \emph{h\_r}, \emph{G}, \emph{LB}, \emph{simple\_2nd}}{}
Calculates left/right edge values for PPM reconstruction in x\sphinxhyphen{}direction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Energy density in a sector (2D).

\item {} 
\sphinxstylestrong{h\_l} :: {[}out{]} Left edge value of reconstruction (2D).

\item {} 
\sphinxstylestrong{h\_r} :: {[}out{]} Right edge value of reconstruction (2D).

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active loop bounds.

\item {} 
\sphinxstylestrong{simple\_2nd} :: {[}in{]} If true, use the arithmetic mean energy densities as default edge values for a simple 2nd order scheme.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_limit_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_pos}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_x}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_reconstruction\_y() (fortran subroutine in module mom\_internal\_tides)@\spxentry{ppm\_reconstruction\_y()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{ppm\_reconstruction\_y}}}{\emph{h\_in}, \emph{h\_l}, \emph{h\_r}, \emph{G}, \emph{LB}, \emph{simple\_2nd}}{}
Calculates left/right edge valus for PPM reconstruction in y\sphinxhyphen{}direction.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Energy density in a sector (2D).

\item {} 
\sphinxstylestrong{h\_l} :: {[}out{]} Left edge value of reconstruction (2D).

\item {} 
\sphinxstylestrong{h\_r} :: {[}out{]} Right edge value of reconstruction (2D).

\item {} 
\sphinxstylestrong{lb} :: {[}in{]} A structure with the active loop bounds.

\item {} 
\sphinxstylestrong{simple\_2nd} :: {[}in{]} If true, use the arithmetic mean energy densities as default edge values for a simple 2nd order scheme.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_limit_pos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limit\_pos}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{propagate\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_limit\_pos() (fortran subroutine in module mom\_internal\_tides)@\spxentry{ppm\_limit\_pos()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_limit_pos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{ppm\_limit\_pos}}}{\emph{h\_in}, \emph{h\_L}, \emph{h\_R}, \emph{h\_min}, \emph{G}, \emph{iis}, \emph{iie}, \emph{jis}, \emph{jie}}{}
Limits the left/right edge values of the PPM reconstruction to give a reconstruction that is positive\sphinxhyphen{}definite. Here this is reinterpreted as giving a constant thickness if the mean thickness is less than h\_min, with a minimum of h\_min otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{h\_in} :: {[}in{]} Thickness of layer (2D).

\item {} 
\sphinxstylestrong{h\_l} :: {[}inout{]} Left edge value (2D).

\item {} 
\sphinxstylestrong{h\_r} :: {[}inout{]} Right edge value (2D).

\item {} 
\sphinxstylestrong{h\_min} :: {[}in{]} The minimum thickness that can be obtained by a concave parabolic fit.

\item {} 
\sphinxstylestrong{iis} :: {[}in{]} Start i\sphinxhyphen{}index for computations

\item {} 
\sphinxstylestrong{iie} :: {[}in{]} End i\sphinxhyphen{}index for computations

\item {} 
\sphinxstylestrong{jis} :: {[}in{]} Start j\sphinxhyphen{}index for computations

\item {} 
\sphinxstylestrong{jie} :: {[}in{]} End j\sphinxhyphen{}index for computations

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/ppm_reconstruction_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{internal\_tides\_init() (fortran subroutine in module mom\_internal\_tides)@\spxentry{internal\_tides\_init()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{internal\_tides\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
This subroutine initializes the internal tides module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/define_axes_group}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::define\_axes\_group}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_structure::wave\_structure\_init}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{internal\_tides\_end() (fortran subroutine in module mom\_internal\_tides)@\spxentry{internal\_tides\_end()}\spxextra{fortran subroutine in module mom\_internal\_tides}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_internal\_tides/}}\sphinxbfcode{\sphinxupquote{internal\_tides\_end}}}{\emph{CS}}{}
This subroutine deallocates the memory associated with the internal tides control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to internal\_tides\_init, it will be deallocated here.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_intrinsic\_functions module reference}
\label{\detokenize{api/generated/modules/mom_intrinsic_functions:f/mom_intrinsic_functions}}\label{\detokenize{api/generated/modules/mom_intrinsic_functions:mom-intrinsic-functions-module-reference}}\label{\detokenize{api/generated/modules/mom_intrinsic_functions::doc}}\index{mom\_intrinsic\_functions (module)@\spxentry{mom\_intrinsic\_functions}\spxextra{module}|spxpagem}
A module with intrinsic functions that are used by MOM but are not supported by some compilers.

{\hyperref[\detokenize{api/generated/modules/mom_intrinsic_functions:detamom-intrinsic-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_intrinsic_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_intrinsic_functions:f/mom_intrinsic_functions/invcosh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invcosh()}}}}}
&
Evaluate the inverse cosh, either using a math library or an equivalent expression.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_intrinsic_functions:detailed-description}}\label{\detokenize{api/generated/modules/mom_intrinsic_functions:detamom-intrinsic-functions}}
A module with intrinsic functions that are used by MOM but are not supported by some compilers.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_intrinsic_functions:function-subroutine-documentation}}\index{invcosh() (fortran function in module mom\_intrinsic\_functions)@\spxentry{invcosh()}\spxextra{fortran function in module mom\_intrinsic\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_intrinsic_functions:f/mom_intrinsic_functions/invcosh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_intrinsic\_functions/}}\sphinxbfcode{\sphinxupquote{invcosh}}}{\emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Evaluate the inverse cosh, either using a math library or an equivalent expression.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{x} :: {[}in{]} The argument of the inverse of cosh. NaNs will occur if x\textless{}1, but there is no error checking

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/calculate_bkgnd_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing::calculate\_bkgnd\_mixing}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_io module reference}
\label{\detokenize{api/generated/modules/mom_io:f/mom_io}}\label{\detokenize{api/generated/modules/mom_io:mom-io-module-reference}}\label{\detokenize{api/generated/modules/mom_io::doc}}\index{mom\_io (module)@\spxentry{mom\_io}\spxextra{module}|spxpagem}
This module contains I/O framework code.

{\hyperref[\detokenize{api/generated/modules/mom_io:detamom-io}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_io:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vardesc}}}}}
&
Type for describing a variable, typically a tracer.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_io:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/create_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_file()}}}}}
&
Routine creates a new NetCDF file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/reopen_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reopen\_file()}}}}}
&
This routine opens an existing NetCDF file for output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/read_axis_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_axis\_data()}}}}}
&
Read the data associated with a named axis in a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/num_timelevels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{num\_timelevels()}}}}}
&
This function determines how many time levels a variable has.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{var\_desc()}}}}}
&
Returns a vardesc type whose elements have been filled with the provided fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/modify_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{modify\_vardesc()}}}}}
&
This routine modifies the named elements of a vardesc type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/cmor_long_std}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmor\_long\_std()}}}}}
&
This function returns the CMOR standard name given a CMOR longname, based on the standard pattern of character conversions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_vardesc()}}}}}
&
This routine queries vardesc.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/safe_string_copy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_string\_copy()}}}}}
&
Copies a string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/ensembler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ensembler()}}}}}
&
Returns a name with “\%\#E” or “\%E” replaced with the ensemble member number.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_file_exists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_exists()}}}}}
&
Returns true if the named file or its domain\sphinxhyphen{}decomposed variant exists.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/fms_file_exists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fms\_file\_exists()}}}}}
&
Returns true if the named file or its domain\sphinxhyphen{}decomposed variant exists.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_read\_data\_1d()}}}}}
&
This function uses the fms\_io function read\_data to read 1\sphinxhyphen{}D data field named “fieldname” from file “filename”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_read\_data\_2d()}}}}}
&
This function uses the fms\_io function read\_data to read a distributed 2\sphinxhyphen{}D data field named “fieldname” from file “filename”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_read\_data\_3d()}}}}}
&
This function uses the fms\_io function read\_data to read a distributed 3\sphinxhyphen{}D data field named “fieldname” from file “filename”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_read\_data\_4d()}}}}}
&
This function uses the fms\_io function read\_data to read a distributed 4\sphinxhyphen{}D data field named “fieldname” from file “filename”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_read\_vector\_2d()}}}}}
&
This function uses the fms\_io function read\_data to read a pair of distributed 2\sphinxhyphen{}D data fields with names given by “{[}uv{]}\_fieldname” from file “filename”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_read\_vector\_3d()}}}}}
&
This function uses the fms\_io function read\_data to read a pair of distributed 3\sphinxhyphen{}D data fields with names given by “{[}uv{]}\_fieldname” from file “filename”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/mom_io_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io\_init()}}}}}
&
Initialize the MOM\_io module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_io:detailed-description}}\label{\detokenize{api/generated/modules/mom_io:detamom-io}}
This file contains a number of subroutines that manipulate NetCDF files and handle input and output of fields. These subroutines, along with their purpose, are:
\begin{itemize}
\item {} 
create\_file: create a new file and set up structures that are needed for subsequent output and write out the coordinates.

\item {} 
reopen\_file: reopen an existing file for writing and set up structures that are needed for subsequent output.

\item {} 
open\_input\_file: open the indicated file for reading only.

\item {} 
close\_file: close an open file.

\item {} 
synch\_file: flush the buffers, completing all pending output.

\item {} 
write\_field: write a field to an open file.

\item {} 
write\_time: write a value of the time axis to an open file.

\item {} 
read\_data: read a variable from an open file.

\item {} 
read\_time: read a time from an open file.

\item {} 
name\_output\_file: provide a name for an output file based on a name root and the time of the output.

\item {} 
find\_input\_file: find a file that has been previously written by MOM and named by name\_output\_file and open it for reading.

\item {} 
handle\_error: write an error code and quit.

\end{itemize}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_io:type-documentation}}\index{vardesc (fortran type in module mom\_io)@\spxentry{vardesc}\spxextra{fortran type in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/vardesc}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{vardesc}}}
Type for describing a variable, typically a tracer.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: Variable name in a NetCDF file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=48)}\sphinxstyleemphasis{{]}} :: Physical dimensions of the variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{longname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: Long name of the variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hor\_grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=8)}\sphinxstyleemphasis{{]}} :: Horizontal grid: u, v, h, q, Cu, Cv, T, Bu, or 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=8)}\sphinxstyleemphasis{{]}} :: Vertical grid: L, i, or 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=8)}\sphinxstyleemphasis{{]}} :: Time description: s, p, or 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_field\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: CMOR name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: CMOR physical dimensions of the variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_longname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: CMOR long name of the variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{conversion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: for unit conversions, such as needed to convert from intensive to extensive

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_io:function-subroutine-documentation}}\index{create\_file() (fortran subroutine in module mom\_io)@\spxentry{create\_file()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/create_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{create\_file}}}{\emph{unit}, \emph{filename}, \emph{vars}, \emph{novars}, \emph{fields}, \emph{threading}, \emph{timeunit}, \emph{G}, \emph{dG}, \emph{GV}, \emph{checksums}}{}
Routine creates a new NetCDF file. It also sets up structures that describe this file and variables that will later be written to this file. Type for describing a variable, typically a tracer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{unit} :: {[}out{]} unit id of an open file or \sphinxhyphen{}1 on a nonwriting PE with single file output

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} full path to the file to create

\item {} 
\sphinxstylestrong{vars} :: {[}in{]} structures describing fields written to filename

\item {} 
\sphinxstylestrong{novars} :: {[}in{]} number of fields written to filename

\item {} 
\sphinxstylestrong{fields} :: {[}inout{]} array of fieldtypes for each variable

\item {} 
\sphinxstylestrong{threading} :: {[}in{]} SINGLE\_FILE or MULTIPLE

\item {} 
\sphinxstylestrong{timeunit} :: {[}in{]} length of the units for time {[}s{]}. The default value is 86400.0, for 1 day.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean horizontal grid structure; G or dG is required if the new file uses any horizontal grid axes.

\item {} 
\sphinxstylestrong{dg} :: {[}in{]} dynamic horizontal grid structure; G or dG is required if the new file uses any horizontal grid axes.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure, which is required if the new file uses any vertical grid axes.

\item {} 
\sphinxstylestrong{checksums} :: {[}in{]} checksums of vars

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_writecoordinatefile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_writecoordinatefile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/reopen_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reopen\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reopen\_file() (fortran subroutine in module mom\_io)@\spxentry{reopen\_file()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/reopen_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{reopen\_file}}}{\emph{unit}, \emph{filename}, \emph{vars}, \emph{novars}, \emph{fields}, \emph{threading}, \emph{timeunit}, \emph{G}, \emph{dG}, \emph{GV}}{}
This routine opens an existing NetCDF file for output. If it does not find the file, a new file is created. It also sets up structures that describe this file and the variables that will later be written to this file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{unit} :: {[}out{]} unit id of an open file or \sphinxhyphen{}1 on a nonwriting PE with single file output

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} full path to the file to create

\item {} 
\sphinxstylestrong{vars} :: {[}in{]} structures describing fields written to filename

\item {} 
\sphinxstylestrong{novars} :: {[}in{]} number of fields written to filename

\item {} 
\sphinxstylestrong{fields} :: {[}inout{]} array of fieldtypes for each variable

\item {} 
\sphinxstylestrong{threading} :: {[}in{]} SINGLE\_FILE or MULTIPLE

\item {} 
\sphinxstylestrong{timeunit} :: {[}in{]} length of the units for time {[}s{]}. The default value is 86400.0, for 1 day.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean horizontal grid structure; G or dG is required if a new file uses any horizontal grid axes.

\item {} 
\sphinxstylestrong{dg} :: {[}in{]} dynamic horizontal grid structure; G or dG is required if a new file uses any horizontal grid axes.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure, which is required if a new file uses any vertical grid axes.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/create_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_axis\_data() (fortran subroutine in module mom\_io)@\spxentry{read\_axis\_data()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/read_axis_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{read\_axis\_data}}}{\emph{filename}, \emph{axis\_name}, \emph{var}}{}
Read the data associated with a named axis in a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} Name of the file to read

\item {} 
\sphinxstylestrong{axis\_name} :: {[}in{]} Name of the axis to read

\item {} 
\sphinxstylestrong{var} :: {[}out{]} The axis location data

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{num\_timelevels() (fortran function in module mom\_io)@\spxentry{num\_timelevels()}\spxextra{fortran function in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/num_timelevels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{num\_timelevels}}}{\emph{filename}, \emph{varname}, \emph{min\_dims}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This function determines how many time levels a variable has.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} name of the file to read

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} variable whose number of time levels are to be returned

\item {} 
\sphinxstylestrong{min\_dims} :: {[}in{]} The minimum number of dimensions a variable must have if it has a time dimension. If the variable has 1 less dimension than this, then 0 is returned.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: number of time levels varname has in filename

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{var\_desc() (fortran function in module mom\_io)@\spxentry{var\_desc()}\spxextra{fortran function in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{var\_desc}}}{\emph{name}, \emph{units}, \emph{longname}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}, \emph{cmor\_field\_name}, \emph{cmor\_units}, \emph{cmor\_longname}, \emph{conversion}, \emph{caller}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)}\sphinxstyleemphasis{{]}}}
Returns a vardesc type whose elements have been filled with the provided fields. The argument name is required, while the others are optional and have default values that are empty strings or are appropriate for a 3\sphinxhyphen{}d tracer field at the tracer cell centers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} variable name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} variable units

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} variable long name

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}in{]} variable horizonal staggering

\item {} 
\sphinxstylestrong{z\_grid} :: {[}in{]} variable vertical staggering

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}in{]} CMOR name

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR physical dimensions of variable

\item {} 
\sphinxstylestrong{cmor\_longname} :: {[}in{]} CMOR long name

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} for unit conversions, such as needed to convert from intensive to extensive

\item {} 
\sphinxstylestrong{caller} :: {[}in{]} calling routine?

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: vardesc type that is created

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/modify_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{modify\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/safe_string_copy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_string\_copy}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_alloc_register_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke::meke\_alloc\_register\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_register\_restarts}}}}} {\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/register_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::register\_advection\_test\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/register_barotropic_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::register\_barotropic\_restarts}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::register\_boundary\_impulse\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/register_ctrl_forcing_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_controlled\_forcing::register\_ctrl\_forcing\_restarts}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/register_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::register\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::register\_dye\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/register_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::register\_dyed\_obc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::register\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/register_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::register\_isomip\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/register_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::register\_ocmip2\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::register\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/register_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::register\_pseudo\_salt\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/register_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::register\_rgc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_register_tracer_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_register\_tracer\_example}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/write_ocean_geometry_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::write\_ocean\_geometry\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/write_vertgrid_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::write\_vertgrid\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{modify\_vardesc() (fortran subroutine in module mom\_io)@\spxentry{modify\_vardesc()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/modify_vardesc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{modify\_vardesc}}}{\emph{vd}, \emph{name}, \emph{units}, \emph{longname}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}, \emph{cmor\_field\_name}, \emph{cmor\_units}, \emph{cmor\_longname}, \emph{conversion}, \emph{caller}}{}
This routine modifies the named elements of a vardesc type. All arguments are optional, except the vardesc type to be modified.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{vd} :: {[}inout{]} vardesc type that is modified

\item {} 
\sphinxstylestrong{name} :: {[}in{]} name of variable

\item {} 
\sphinxstylestrong{units} :: {[}in{]} units of variable

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} long name of variable

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}in{]} horizonal staggering of variable

\item {} 
\sphinxstylestrong{z\_grid} :: {[}in{]} vertical staggering of variable

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}in{]} CMOR name

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR physical dimensions of variable

\item {} 
\sphinxstylestrong{cmor\_longname} :: {[}in{]} CMOR long name

\item {} 
\sphinxstylestrong{conversion} :: {[}in{]} for unit conversions, such as needed to convert from intensive to extensive

\item {} 
\sphinxstylestrong{caller} :: {[}in{]} calling routine?

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/safe_string_copy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_string\_copy}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cmor\_long\_std() (fortran function in module mom\_io)@\spxentry{cmor\_long\_std()}\spxextra{fortran function in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/cmor_long_std}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{cmor\_long\_std}}}{\emph{longname}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(longname))}\sphinxstyleemphasis{{]}}}
This function returns the CMOR standard name given a CMOR longname, based on the standard pattern of character conversions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{longname} :: {[}in{]} The CMOR longname being converted

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The CMOR standard name generated from longname

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_vardesc() (fortran subroutine in module mom\_io)@\spxentry{query\_vardesc()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{query\_vardesc}}}{\emph{vd}, \emph{name}, \emph{units}, \emph{longname}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}, \emph{cmor\_field\_name}, \emph{cmor\_units}, \emph{cmor\_longname}, \emph{conversion}, \emph{caller}}{}
This routine queries vardesc.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{vd} :: {[}in{]} vardesc type that is queried

\item {} 
\sphinxstylestrong{name} :: {[}out{]} name of variable

\item {} 
\sphinxstylestrong{units} :: {[}out{]} units of variable

\item {} 
\sphinxstylestrong{longname} :: {[}out{]} long name of variable

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}out{]} horiz staggering of variable

\item {} 
\sphinxstylestrong{z\_grid} :: {[}out{]} vert staggering of variable

\item {} 
\sphinxstylestrong{t\_grid} :: {[}out{]} time description: s, p, or 1

\item {} 
\sphinxstylestrong{cmor\_field\_name} :: {[}out{]} CMOR name

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}out{]} CMOR physical dimensions of variable

\item {} 
\sphinxstylestrong{cmor\_longname} :: {[}out{]} CMOR long name

\item {} 
\sphinxstylestrong{conversion} :: {[}out{]} for unit conversions, such as needed to convert from intensive to extensive

\item {} 
\sphinxstylestrong{caller} :: {[}in{]} calling routine?

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/safe_string_copy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_string\_copy}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::advection\_test\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::boundary\_impulse\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::dye\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::ideal\_age\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/initialize_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::initialize\_advection\_test\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/initialize_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::initialize\_boundary\_impulse\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/initialize_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::initialize\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/initialize_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::initialize\_dyed\_obc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/initialize_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::initialize\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/initialize_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::initialize\_isomip\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/initialize_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::initialize\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/initialize_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::initialize\_pseudo\_salt\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/initialize_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::initialize\_rgc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::ocmip2\_cfc\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::oil\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::pseudo\_salt\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::register\_boundary\_impulse\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::register\_dye\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::register\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::register\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/register_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::register\_pseudo\_salt\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_initialize_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_initialize\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_tracer\_stock}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_string\_copy() (fortran subroutine in module mom\_io)@\spxentry{safe\_string\_copy()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/safe_string_copy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{safe\_string\_copy}}}{\emph{str1}, \emph{str2}, \emph{fieldnm}, \emph{caller}}{}
Copies a string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{str1} :: {[}in{]} The string being copied

\item {} 
\sphinxstylestrong{str2} :: {[}out{]} The string being copied into

\item {} 
\sphinxstylestrong{fieldnm} :: {[}in{]} The name of the field for error messages

\item {} 
\sphinxstylestrong{caller} :: {[}in{]} The calling routine for error messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/modify_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{modify\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ensembler() (fortran function in module mom\_io)@\spxentry{ensembler()}\spxextra{fortran function in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/ensembler}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{ensembler}}}{\emph{name}, \emph{ens\_no\_in}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(name))}\sphinxstyleemphasis{{]}}}
Returns a name with “\%\#E” or “\%E” replaced with the ensemble member number.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name to be modified

\item {} 
\sphinxstylestrong{ens\_no\_in} :: {[}in{]} The number of the current ensemble member

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The name encoded with the ensemble number

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_file\_exists() (fortran function in module mom\_io)@\spxentry{mom\_file\_exists()}\spxextra{fortran function in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_file_exists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_file\_exists}}}{\emph{filename}, \emph{MOM\_Domain}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if the named file or its domain\sphinxhyphen{}decomposed variant exists.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file being inquired about

\item {} 
\sphinxstylestrong{mom\_domain} :: {[}in{]} The MOM\_Domain that describes the decomposition

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{fms\_file\_exists() (fortran function in module mom\_io)@\spxentry{fms\_file\_exists()}\spxextra{fortran function in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/fms_file_exists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{fms\_file\_exists}}}{\emph{filename}, \emph{domain}, \emph{no\_domain}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if the named file or its domain\sphinxhyphen{}decomposed variant exists.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file being inquired about

\item {} 
\sphinxstylestrong{domain} :: {[}in{]} The mpp domain2d that describes the decomposition

\item {} 
\sphinxstylestrong{no\_domain} :: {[}in{]} This file does not use domain decomposition

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_read\_data\_1d() (fortran subroutine in module mom\_io)@\spxentry{mom\_read\_data\_1d()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_read\_data\_1d}}}{\emph{filename}, \emph{fieldname}, \emph{data}, \emph{timelevel}, \emph{scale}}{}
This function uses the fms\_io function read\_data to read 1\sphinxhyphen{}D data field named “fieldname” from file “filename”.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read

\item {} 
\sphinxstylestrong{fieldname} :: {[}in{]} The variable name of the data in the file

\item {} 
\sphinxstylestrong{data} :: {[}inout{]} The 1\sphinxhyphen{}dimensional array into which the data

\item {} 
\sphinxstylestrong{timelevel} :: {[}in{]} The time level in the file to read

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the field is multiplied by before they are returned.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_read\_data\_2d() (fortran subroutine in module mom\_io)@\spxentry{mom\_read\_data\_2d()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_read\_data\_2d}}}{\emph{filename}, \emph{fieldname}, \emph{data}, \emph{MOM\_Domain}, \emph{timelevel}, \emph{position}, \emph{scale}}{}
This function uses the fms\_io function read\_data to read a distributed 2\sphinxhyphen{}D data field named “fieldname” from file “filename”. Valid values for “position” include CORNER, CENTER, EAST\_FACE and NORTH\_FACE.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read

\item {} 
\sphinxstylestrong{fieldname} :: {[}in{]} The variable name of the data in the file

\item {} 
\sphinxstylestrong{data} :: {[}inout{]} The 2\sphinxhyphen{}dimensional array into which the data should be read

\item {} 
\sphinxstylestrong{mom\_domain} :: {[}in{]} The MOM\_Domain that describes the decomposition

\item {} 
\sphinxstylestrong{timelevel} :: {[}in{]} The time level in the file to read

\item {} 
\sphinxstylestrong{position} :: {[}in{]} A flag indicating where this data is located

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the field is multiplied by before they are returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_i\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_j\_ind}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_read\_data\_3d() (fortran subroutine in module mom\_io)@\spxentry{mom\_read\_data\_3d()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_read\_data\_3d}}}{\emph{filename}, \emph{fieldname}, \emph{data}, \emph{MOM\_Domain}, \emph{timelevel}, \emph{position}, \emph{scale}}{}
This function uses the fms\_io function read\_data to read a distributed 3\sphinxhyphen{}D data field named “fieldname” from file “filename”. Valid values for “position” include CORNER, CENTER, EAST\_FACE and NORTH\_FACE.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read

\item {} 
\sphinxstylestrong{fieldname} :: {[}in{]} The variable name of the data in the file

\item {} 
\sphinxstylestrong{data} :: {[}inout{]} The 3\sphinxhyphen{}dimensional array into which the data should be read

\item {} 
\sphinxstylestrong{mom\_domain} :: {[}in{]} The MOM\_Domain that describes the decomposition

\item {} 
\sphinxstylestrong{timelevel} :: {[}in{]} The time level in the file to read

\item {} 
\sphinxstylestrong{position} :: {[}in{]} A flag indicating where this data is located

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the field is multiplied by before they are returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_i\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_j\_ind}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_read\_data\_4d() (fortran subroutine in module mom\_io)@\spxentry{mom\_read\_data\_4d()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_data_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_read\_data\_4d}}}{\emph{filename}, \emph{fieldname}, \emph{data}, \emph{MOM\_Domain}, \emph{timelevel}, \emph{position}, \emph{scale}}{}
This function uses the fms\_io function read\_data to read a distributed 4\sphinxhyphen{}D data field named “fieldname” from file “filename”. Valid values for “position” include CORNER, CENTER, EAST\_FACE and NORTH\_FACE.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read

\item {} 
\sphinxstylestrong{fieldname} :: {[}in{]} The variable name of the data in the file

\item {} 
\sphinxstylestrong{data} :: {[}inout{]} The 4\sphinxhyphen{}dimensional array into which the data should be read

\item {} 
\sphinxstylestrong{mom\_domain} :: {[}in{]} The MOM\_Domain that describes the decomposition

\item {} 
\sphinxstylestrong{timelevel} :: {[}in{]} The time level in the file to read

\item {} 
\sphinxstylestrong{position} :: {[}in{]} A flag indicating where this data is located

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the field is multiplied by before they are returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_i\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_j\_ind}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_read\_vector\_2d() (fortran subroutine in module mom\_io)@\spxentry{mom\_read\_vector\_2d()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_read\_vector\_2d}}}{\emph{filename}, \emph{u\_fieldname}, \emph{v\_fieldname}, \emph{u\_data}, \emph{v\_data}, \emph{MOM\_Domain}, \emph{timelevel}, \emph{stagger}, \emph{scalar\_pair}, \emph{scale}}{}
This function uses the fms\_io function read\_data to read a pair of distributed 2\sphinxhyphen{}D data fields with names given by “{[}uv{]}\_fieldname” from file “filename”. Valid values for “stagger” include CGRID\_NE, BGRID\_NE, and AGRID.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read

\item {} 
\sphinxstylestrong{u\_fieldname} :: {[}in{]} The variable name of the u data in the file

\item {} 
\sphinxstylestrong{v\_fieldname} :: {[}in{]} The variable name of the v data in the file

\item {} 
\sphinxstylestrong{u\_data} :: {[}inout{]} The 2 dimensional array into which the u\sphinxhyphen{}component of the data should be read

\item {} 
\sphinxstylestrong{v\_data} :: {[}inout{]} The 2 dimensional array into which the v\sphinxhyphen{}component of the data should be read

\item {} 
\sphinxstylestrong{mom\_domain} :: {[}in{]} The MOM\_Domain that describes the decomposition

\item {} 
\sphinxstylestrong{timelevel} :: {[}in{]} The time level in the file to read

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} A flag indicating where this vector is discretized

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, a pair of scalars are to be read.cretized

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the fields are multiplied by before they are returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_i\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_j\_ind}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_read\_vector\_3d() (fortran subroutine in module mom\_io)@\spxentry{mom\_read\_vector\_3d()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_read_vector_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_read\_vector\_3d}}}{\emph{filename}, \emph{u\_fieldname}, \emph{v\_fieldname}, \emph{u\_data}, \emph{v\_data}, \emph{MOM\_Domain}, \emph{timelevel}, \emph{stagger}, \emph{scalar\_pair}, \emph{scale}}{}
This function uses the fms\_io function read\_data to read a pair of distributed 3\sphinxhyphen{}D data fields with names given by “{[}uv{]}\_fieldname” from file “filename”. Valid values for “stagger” include CGRID\_NE, BGRID\_NE, and AGRID.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read

\item {} 
\sphinxstylestrong{u\_fieldname} :: {[}in{]} The variable name of the u data in the file

\item {} 
\sphinxstylestrong{v\_fieldname} :: {[}in{]} The variable name of the v data in the file

\item {} 
\sphinxstylestrong{u\_data} :: {[}inout{]} The 3 dimensional array into which the u\sphinxhyphen{}component of the data should be read

\item {} 
\sphinxstylestrong{v\_data} :: {[}inout{]} The 3 dimensional array into which the v\sphinxhyphen{}component of the data should be read

\item {} 
\sphinxstylestrong{mom\_domain} :: {[}in{]} The MOM\_Domain that describes the decomposition

\item {} 
\sphinxstylestrong{timelevel} :: {[}in{]} The time level in the file to read

\item {} 
\sphinxstylestrong{stagger} :: {[}in{]} A flag indicating where this vector is discretized

\item {} 
\sphinxstylestrong{scalar\_pair} :: {[}in{]} If true, a pair of scalars are to be read.cretized

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor that the fields are multiplied by before they are returned.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_i_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_i\_ind}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/get_simple_array_j_ind}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::get\_simple\_array\_j\_ind}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_io\_init() (fortran subroutine in module mom\_io)@\spxentry{mom\_io\_init()}\spxextra{fortran subroutine in module mom\_io}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_io:f/mom_io/mom_io_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_io/}}\sphinxbfcode{\sphinxupquote{mom\_io\_init}}}{\emph{param\_file}}{}
Initialize the MOM\_io module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} structure indicating the open file to parse for model parameter values.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_isopycnal\_slopes module reference}
\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes}}\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:mom-isopycnal-slopes-module-reference}}\label{\detokenize{api/generated/modules/mom_isopycnal_slopes::doc}}\index{mom\_isopycnal\_slopes (module)@\spxentry{mom\_isopycnal\_slopes}\spxextra{module}|spxpagem}
Calculations of isoneutral slopes and stratification.

{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:detamom-isopycnal-slopes}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/calc_isoneutral_slopes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_isoneutral\_slopes()}}}}}
&
Calculate isopycnal slopes, and optionally return N2 used in calculation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/vert_fill_ts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vert\_fill\_ts()}}}}}
&
Returns tracer arrays (nominally T and S) with massless layers filled with sensible values, by diffusing vertically with a small but constant diffusivity.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:detailed-description}}\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:detamom-isopycnal-slopes}}
Calculations of isoneutral slopes and stratification.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:function-subroutine-documentation}}\index{calc\_isoneutral\_slopes() (fortran subroutine in module mom\_isopycnal\_slopes)@\spxentry{calc\_isoneutral\_slopes()}\spxextra{fortran subroutine in module mom\_isopycnal\_slopes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/calc_isoneutral_slopes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_isopycnal\_slopes/}}\sphinxbfcode{\sphinxupquote{calc\_isoneutral\_slopes}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{e}, \emph{tv}, \emph{dt\_kappa\_smooth}, \emph{slope\_x}, \emph{slope\_y}, \emph{N2\_u}, \emph{N2\_v}, \emph{halo}, \emph{OBC}}{}
Calculate isopycnal slopes, and optionally return N2 used in calculation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Interface heights {[}Z \textasciitilde{}\textgreater{} m{]} or units given by 1/eta\_to\_m)

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{dt\_kappa\_smooth} :: {[}in{]} A smoothing vertical diffusivity times a smoothing timescale {[}Z2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{slope\_x} :: {[}inout{]} Isopycnal slope in i\sphinxhyphen{}direction {[}nondim{]}

\item {} 
\sphinxstylestrong{slope\_y} :: {[}inout{]} Isopycnal slope in j\sphinxhyphen{}direction {[}nondim{]}

\item {} 
\sphinxstylestrong{n2\_u} :: {[}inout{]} Brunt\sphinxhyphen{}Vaisala frequency squared at

\item {} 
\sphinxstylestrong{n2\_v} :: {[}inout{]} Brunt\sphinxhyphen{}Vaisala frequency squared at

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} Halo width over which to compute

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/vert_fill_ts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vert\_fill\_ts}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_slope\_functions}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vert\_fill\_ts() (fortran subroutine in module mom\_isopycnal\_slopes)@\spxentry{vert\_fill\_ts()}\spxextra{fortran subroutine in module mom\_isopycnal\_slopes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/vert_fill_ts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_isopycnal\_slopes/}}\sphinxbfcode{\sphinxupquote{vert\_fill\_ts}}}{\emph{h}, \emph{T\_in}, \emph{S\_in}, \emph{kappa\_dt}, \emph{T\_f}, \emph{S\_f}, \emph{G}, \emph{GV}, \emph{halo\_here}, \emph{larger\_h\_denom}}{}
Returns tracer arrays (nominally T and S) with massless layers filled with sensible values, by diffusing vertically with a small but constant diffusivity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t\_in} :: {[}in{]} Input temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s\_in} :: {[}in{]} Input salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{kappa\_dt} :: {[}in{]} A vertical diffusivity to use for smoothing times a smoothing timescale {[}Z2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{t\_f} :: {[}out{]} Filled temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s\_f} :: {[}out{]} Filled salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{halo\_here} :: {[}in{]} Number of halo points to work on, 0 by default

\item {} 
\sphinxstylestrong{larger\_h\_denom} :: {[}in{]} Present and true, add a large enough minimal thickness in the denominator of the flux calculations so that the fluxes are never so large as eliminate the transmission of information across groups of massless layers.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/calc_isoneutral_slopes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_isoneutral\_slopes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_int_tide_input:f/mom_int_tide_input/set_int_tide_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_int\_tide\_input::set\_int\_tide\_input}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_kappa\_shear module reference}
\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear}}\label{\detokenize{api/generated/modules/mom_kappa_shear:mom-kappa-shear-module-reference}}\label{\detokenize{api/generated/modules/mom_kappa_shear::doc}}\index{mom\_kappa\_shear (module)@\spxentry{mom\_kappa\_shear}\spxextra{module}|spxpagem}
Shear\sphinxhyphen{}dependent mixing following Jackson et al. 2008.

{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:detamom-kappa-shear}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_kappa_shear:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_cs}}}}}
&
This control structure holds the parameters that regulate shear mixing.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_kappa_shear:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calculate_kappa_shear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_kappa\_shear()}}}}}
&
Subroutine for calculating shear\sphinxhyphen{}driven diffusivity and TKE in tracer columns.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calc_kappa_shear_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_kappa\_shear\_vertex()}}}}}
&
Subroutine for calculating shear\sphinxhyphen{}driven diffusivity and TKE in corner columns.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_column()}}}}}
&
This subroutine calculates shear\sphinxhyphen{}driven diffusivity and TKE in a single column.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calculate_projected_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_projected\_state()}}}}}
&
This subroutine calculates the velocities, temperature and salinity that the water column will have after mixing for dt with diffusivities kappa.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/find_kappa_tke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_kappa\_tke()}}}}}
&
This subroutine calculates new, consistent estimates of TKE and kappa.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_init()}}}}}
&
This subroutine initializes the parameters that regulate shear\sphinxhyphen{}driven mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_is\_used()}}}}}
&
This function indicates to other modules whether the Jackson et al shear mixing parameterization will be used without needing to duplicate the log entry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_at_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_at\_vertex()}}}}}
&
This function indicates to other modules whether the Jackson et al shear mixing parameterization will be used at the vertices without needing to duplicate the log entry.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_kappa_shear:detailed-description}}\label{\detokenize{api/generated/modules/mom_kappa_shear:detamom-kappa-shear}}
By Laura Jackson and Robert Hallberg, 2006\sphinxhyphen{}2008.

This file contains the subroutines that determine the diapycnal diffusivity driven by resolved shears, as specified by the parameterizations described in Jackson and Hallberg (JPO, 2008).

The technique by which the 6 equations (for kappa, TKE, u, v, T, and S) are solved simultaneously has been dramatically revised from the previous version. The previous version was not converging in some cases, especially near the surface mixed layer, while the revised version does. The revised version solves for kappa and TKE with shear and stratification fixed, then marches the density and velocities forward with an adaptive (and aggressive) time step in a predictor\sphinxhyphen{}corrector\sphinxhyphen{}corrector emulation of a trapezoidal scheme. Run\sphinxhyphen{}time\sphinxhyphen{}settable parameters determine the tolerence to which the kappa and TKE equations are solved and the minimum time step that can be taken.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_kappa_shear:type-documentation}}\index{kappa\_shear\_cs (fortran type in module mom\_kappa\_shear)@\spxentry{kappa\_shear\_cs}\spxextra{fortran type in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{kappa\_shear\_cs}}}
This control structure holds the parameters that regulate shear mixing.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ild2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dz\_int}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rino\_crit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The critical shear Richardson number for shear\sphinxhyphen{}entrainment {[}nondim{]}. The theoretical value is 0.25. The values found by Jackson et al. are 0.25\sphinxhyphen{}0.35.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{shearmix\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nondimensional rate scale for shear\sphinxhyphen{}driven entrainment {[}nondim{]}. The value given by Jackson et al. is 0.085\sphinxhyphen{}0.089.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fri\_curvature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant giving the curvature of the function of the Richardson number that relates shear to sources in the kappa equation {[}nondim{]}. The values found by Jackson et al. are \sphinxhyphen{}0.97 \sphinxhyphen{} \sphinxhyphen{}0.89.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The coefficient for the decay of TKE due to stratification (i.e. proportional to N*tke) {[}nondim{]}. The values found by Jackson et al. are 0.24\sphinxhyphen{}0.28.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The coefficient for the decay of TKE due to shear (i.e. proportional to {\color{red}\bfseries{}|}S|*tke) {[}nondim{]}. The values found by Jackson et al. are 0.14\sphinxhyphen{}0.12.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lambda}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The coefficient for the buoyancy length scale in the kappa equation {[}nondim{]}. The values found by Jackson et al. are 0.82\sphinxhyphen{}0.81.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lambda2\_n\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The square of the ratio of the coefficients of the buoyancy and shear scales in the diffusivity equation, 0 to eliminate the shear scale {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_bg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The background level of TKE {[}Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The background diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_trunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Diffusivities smaller than this are rounded to 0 {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_tol\_err}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fractional error in kappa that is tolerated {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prandtl\_turb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Prandtl number used to convert Kd\_shear into viscosity {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers in the mixed layer, as treated in this routine. If the pieces of the mixed layer are not to be treated collectively, nkml is set to 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_rino\_it}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of iterations that may be used to estimate the instantaneous shear\sphinxhyphen{}driven mixing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_ks\_it}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of iterations that may be used to estimate the time\sphinxhyphen{}averaged diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dkdq\_iteration\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true. use an older, dimensionally inconsistent estimate of the derivative of diffusivity with energy in the Newton’s method iteration. The bug causes undercorrections when dz \textgreater{} 1m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ks\_at\_vertex}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do the calculations of the shear\sphinxhyphen{}driven mixing at the cell vertices (i.e., the vorticity points).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eliminate\_massless}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, massless layers are merged with neighboring massive layers in this calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vel\_underflow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Velocity components smaller than vel\_underflow are set to 0 {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_src\_max\_chg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum permitted increase in the kappa source within an iteration relative to the local source {[}nondim{]}. This must be greater than 1. The lower limit for the permitted fractional decrease is (1 \sphinxhyphen{} 0.5/kappa\_src\_max\_chg). These limits could perhaps be made dynamic with an improved iterative solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{psurf\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do a simple average of the cell surface pressures to get a surface pressure at the corner if VERTEX\_SHEAR=True. Otherwise mask out any land points in the average.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{all\_layer\_tke\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, report back the latest estimate of TKE instead of the time average TKE when there is mass in all layers. Otherwise always report the time\sphinxhyphen{}averaged TKE, as is currently done when there are some massless layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restrictive\_tolerance\_check}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If false, uses the less restrictive tolerance check to determine if a timestep is acceptable for the KS\_it outer iteration loop, as the code was originally written. True uses the more restrictive check.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose debugging messages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_kappa_shear:function-subroutine-documentation}}\index{calculate\_kappa\_shear() (fortran subroutine in module mom\_kappa\_shear)@\spxentry{calculate\_kappa\_shear()}\spxextra{fortran subroutine in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calculate_kappa_shear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{calculate\_kappa\_shear}}}{\emph{u\_in}, \emph{v\_in}, \emph{h}, \emph{tv}, \emph{p\_surf}, \emph{kappa\_io}, \emph{tke\_io}, \emph{kv\_io}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{initialize\_all}}{}
Subroutine for calculating shear\sphinxhyphen{}driven diffusivity and TKE in tracer columns.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u\_in} :: {[}in{]} Initial zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_in} :: {[}in{]} Initial meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{p\_surf} :: The pressure at the ocean surface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} (or NULL).

\item {} 
\sphinxstylestrong{kappa\_io} :: {[}inout{]} The diapycnal diffusivity at each interface

\item {} 
\sphinxstylestrong{tke\_io} :: {[}out{]} The turbulent kinetic energy per unit mass at

\item {} 
\sphinxstylestrong{kv\_io} :: {[}inout{]} The vertical viscosity at each interface

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to kappa\_shear\_init.

\item {} 
\sphinxstylestrong{initialize\_all} :: {[}in{]} If present and false, the previous value of kappa is used to start the iterations

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_kappa\_shear\_vertex() (fortran subroutine in module mom\_kappa\_shear)@\spxentry{calc\_kappa\_shear\_vertex()}\spxextra{fortran subroutine in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calc_kappa_shear_vertex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{calc\_kappa\_shear\_vertex}}}{\emph{u\_in}, \emph{v\_in}, \emph{h}, \emph{T\_in}, \emph{S\_in}, \emph{tv}, \emph{p\_surf}, \emph{kappa\_io}, \emph{tke\_io}, \emph{kv\_io}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{initialize\_all}}{}
Subroutine for calculating shear\sphinxhyphen{}driven diffusivity and TKE in corner columns.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u\_in} :: {[}in{]} Initial zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_in} :: {[}in{]} Initial meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{t\_in} :: {[}in{]} Layer potential temperatures {[}degC{]}

\item {} 
\sphinxstylestrong{s\_in} :: {[}in{]} Layer salinities in ppt.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{p\_surf} :: The pressure at the ocean surface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} (or NULL).

\item {} 
\sphinxstylestrong{kappa\_io} :: {[}out{]} The diapycnal diffusivity at each interface

\item {} 
\sphinxstylestrong{tke\_io} :: {[}out{]} The turbulent kinetic energy per unit mass at

\item {} 
\sphinxstylestrong{kv\_io} :: {[}inout{]} The vertical viscosity at each interface {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to kappa\_shear\_init.

\item {} 
\sphinxstylestrong{initialize\_all} :: {[}in{]} If present and false, the previous value of kappa is used to start the iterations

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_column}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kappa\_shear\_column() (fortran subroutine in module mom\_kappa\_shear)@\spxentry{kappa\_shear\_column()}\spxextra{fortran subroutine in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{kappa\_shear\_column}}}{\emph{kappa}, \emph{tke}, \emph{dt}, \emph{nzc}, \emph{f2}, \emph{surface\_pres}, \emph{dz}, \emph{u0xdz}, \emph{v0xdz}, \emph{T0xdz}, \emph{S0xdz}, \emph{kappa\_avg}, \emph{tke\_avg}, \emph{tv}, \emph{CS}, \emph{GV}, \emph{US}, \emph{I\_Ld2\_1d}, \emph{dz\_Int\_1d}}{}
This subroutine calculates shear\sphinxhyphen{}driven diffusivity and TKE in a single column.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{kappa} :: {[}inout{]} The time\sphinxhyphen{}weighted average of kappa {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tke} :: {[}out{]} The Turbulent Kinetic Energy per unit mass at

\item {} 
\sphinxstylestrong{nzc} :: {[}in{]} The number of active layers in the column.

\item {} 
\sphinxstylestrong{f2} :: {[}in{]} The square of the Coriolis parameter {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{surface\_pres} :: {[}in{]} The surface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{dz} :: {[}in{]} The layer thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{u0xdz} :: {[}in{]} The initial zonal velocity times dz {[}Z L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v0xdz} :: {[}in{]} The initial meridional velocity times dz {[}Z L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t0xdz} :: {[}in{]} The initial temperature times dz {[}degC Z \textasciitilde{}\textgreater{} degC m{]}.

\item {} 
\sphinxstylestrong{s0xdz} :: {[}in{]} The initial salinity times dz {[}ppt Z \textasciitilde{}\textgreater{} ppt m{]}.

\item {} 
\sphinxstylestrong{kappa\_avg} :: {[}out{]} The time\sphinxhyphen{}weighted average of kappa {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tke\_avg} :: {[}out{]} The time\sphinxhyphen{}weighted average of TKE {[}Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to kappa\_shear\_init.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{i\_ld2\_1d} :: {[}out{]} The inverse of the squared mixing length {[}Z\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{dz\_int\_1d} :: {[}out{]} The extent of a finite\sphinxhyphen{}volume space surrounding an interface,

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calculate_projected_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_projected\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/find_kappa_tke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_kappa\_tke}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calc_kappa_shear_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_kappa\_shear\_vertex}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calculate_kappa_shear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_kappa\_shear}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_projected\_state() (fortran subroutine in module mom\_kappa\_shear)@\spxentry{calculate\_projected\_state()}\spxextra{fortran subroutine in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calculate_projected_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{calculate\_projected\_state}}}{\emph{kappa}, \emph{u0}, \emph{v0}, \emph{T0}, \emph{S0}, \emph{dt}, \emph{nz}, \emph{dz}, \emph{I\_dz\_int}, \emph{dbuoy\_dT}, \emph{dbuoy\_dS}, \emph{u}, \emph{v}, \emph{T}, \emph{Sal}, \emph{GV}, \emph{US}, \emph{N2}, \emph{S2}, \emph{ks\_int}, \emph{ke\_int}, \emph{vel\_underflow}}{}
This subroutine calculates the velocities, temperature and salinity that the water column will have after mixing for dt with diffusivities kappa. It may also calculate the projected buoyancy frequency and shear.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nz} :: {[}in{]} The number of layers (after eliminating massless layers?).

\item {} 
\sphinxstylestrong{kappa} :: {[}in{]} The diapycnal diffusivity at interfaces, {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} The initial zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v0} :: {[}in{]} The initial meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t0} :: {[}in{]} The initial temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s0} :: {[}in{]} The initial salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{dz} :: {[}in{]} The grid spacing of layers {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{i\_dz\_int} :: {[}in{]} The inverse of the layer’s thicknesses {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dbuoy\_dt} :: {[}in{]} The partial derivative of buoyancy with temperature {[}Z T\sphinxhyphen{}2 degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dbuoy\_ds} :: {[}in{]} The partial derivative of buoyancy with salinity {[}Z T\sphinxhyphen{}2 ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} The zonal velocity after dt {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} The meridional velocity after dt {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} The temperature after dt {[}degC{]}.

\item {} 
\sphinxstylestrong{sal} :: {[}inout{]} The salinity after dt {[}ppt{]}.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{n2} :: {[}inout{]} The buoyancy frequency squared at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{s2} :: {[}inout{]} The squared shear at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ks\_int} :: {[}in{]} The topmost k\sphinxhyphen{}index with a non\sphinxhyphen{}zero diffusivity.

\item {} 
\sphinxstylestrong{ke\_int} :: {[}in{]} The bottommost k\sphinxhyphen{}index with a non\sphinxhyphen{}zero diffusivity.

\item {} 
\sphinxstylestrong{vel\_underflow} :: {[}in{]} If present and true, any velocities that are smaller in magnitude than this value are set to 0 {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_kappa\_tke() (fortran subroutine in module mom\_kappa\_shear)@\spxentry{find\_kappa\_tke()}\spxextra{fortran subroutine in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/find_kappa_tke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{find\_kappa\_tke}}}{\emph{N2}, \emph{S2}, \emph{kappa\_in}, \emph{Idz}, \emph{dz\_Int}, \emph{I\_L2\_bdry}, \emph{f2}, \emph{nz}, \emph{CS}, \emph{GV}, \emph{US}, \emph{K\_Q}, \emph{tke}, \emph{kappa}, \emph{kappa\_src}, \emph{local\_src}}{}
This subroutine calculates new, consistent estimates of TKE and kappa.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nz} :: {[}in{]} The number of layers to work on.

\item {} 
\sphinxstylestrong{n2} :: {[}in{]} The buoyancy frequency squared at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{s2} :: {[}in{]} The squared shear at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{kappa\_in} :: {[}in{]} The initial guess at the diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dz\_int} :: {[}in{]} The thicknesses associated with interfaces {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{i\_l2\_bdry} :: {[}in{]} The inverse of the squared distance to boundaries {[}Z\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{idz} :: {[}in{]} The inverse grid spacing of layers {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{f2} :: {[}in{]} The squared Coriolis parameter {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: A pointer to this module’s control structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{k\_q} :: {[}inout{]} The shear\sphinxhyphen{}driven diapycnal diffusivity divided by the turbulent kinetic energy per unit mass at interfaces {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{tke} :: {[}out{]} The turbulent kinetic energy per unit mass at interfaces {[}Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{kappa} :: {[}out{]} The diapycnal diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kappa\_src} :: {[}out{]} The source term for kappa {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{local\_src} :: {[}out{]} The sum of all local sources for kappa,

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kappa\_shear\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kappa\_shear\_init() (fortran function in module mom\_kappa\_shear)@\spxentry{kappa\_shear\_init()}\spxextra{fortran function in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{kappa\_shear\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This subroutine initializes the parameters that regulate shear\sphinxhyphen{}driven mixing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: True if module is to be used, False otherwise

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kappa\_shear\_is\_used() (fortran function in module mom\_kappa\_shear)@\spxentry{kappa\_shear\_is\_used()}\spxextra{fortran function in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_is_used}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{kappa\_shear\_is\_used}}}{\emph{param\_file}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This function indicates to other modules whether the Jackson et al shear mixing parameterization will be used without needing to duplicate the log entry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_shear::cvmix\_shear\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_register\_restarts}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{kappa\_shear\_at\_vertex() (fortran function in module mom\_kappa\_shear)@\spxentry{kappa\_shear\_at\_vertex()}\spxextra{fortran function in module mom\_kappa\_shear}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_at_vertex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_kappa\_shear/}}\sphinxbfcode{\sphinxupquote{kappa\_shear\_at\_vertex}}}{\emph{param\_file}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This function indicates to other modules whether the Jackson et al shear mixing parameterization will be used at the vertices without needing to duplicate the log entry. It returns false if the Jackson et al scheme is not used or if it is used via calculations at the tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_register\_restarts}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_lateral\_boundary\_diffusion module reference}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:mom-lateral-boundary-diffusion-module-reference}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion::doc}}\index{mom\_lateral\_boundary\_diffusion (module)@\spxentry{mom\_lateral\_boundary\_diffusion}\spxextra{module}|spxpagem}
Calculates and applies diffusive fluxes as a parameterization of lateral mixing (non\sphinxhyphen{}neutral) by mesoscale eddies near the top and bottom (to be implemented) boundary layers of the ocean.

{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:detamom-lateral-boundary-diffusion}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lateral\_boundary\_diffusion\_cs}}}}}
&
Sets parameters for lateral boundary mixing module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lateral\_boundary\_diffusion\_init()}}}}}
&
Initialization routine that reads runtime parameters and sets up pointers to other control structures that might be needed for lateral boundary diffusion.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lateral\_boundary\_diffusion()}}}}}
&
Driver routine for calculating lateral diffusive fluxes near the top and bottom boundaries.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/bulk_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulk\_average()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/harmonic_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{harmonic\_mean()}}}}}
&
Calculate the harmonic mean of two quantities See {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-harmonic-mean}]{\sphinxcrossref{\DUrole{std,std-ref}{Harmonic Mean}}}} .
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_k\_range()}}}}}
&
Find the k\sphinxhyphen{}index range corresponding to the layers that are within the boundary\sphinxhyphen{}layer region.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_layer\_method()}}}}}
&
Calculate the lateral boundary diffusive fluxes using the layer by layer method.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_bulk\_method()}}}}}
&
Apply the lateral boundary diffusive fluxes calculated from a ‘bulk model’ See {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method2}]{\sphinxcrossref{\DUrole{std,std-ref}{Bulk layer approach (Method \#2)}}}} .
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{near\_boundary\_unit\_tests()}}}}}
&
Unit tests for near\sphinxhyphen{}boundary horizontal mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/test_layer_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_layer\_fluxes()}}}}}
&
Returns true if output of near\sphinxhyphen{}boundary unit tests does not match correct computed values and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/test_boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_boundary\_k\_range()}}}}}
&
Return true if output of unit tests for boundary\_k\_range does not match answers.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:detailed-description}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:detamom-lateral-boundary-diffusion}}

\paragraph{The Lateral Boundary Diffusion (LBD) framework}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:the-lateral-boundary-diffusion-lbd-framework}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-lbd}}
The LBD framework accounts for the effects of diabatic mesoscale fluxes within surface and bottom boundary layers. Unlike the equivalent adiabatic fluxes, which is applied along neutral density surfaces, LBD is purely horizontal.

The bottom boundary layer fluxes remain to be implemented, although most of the steps needed to do so have already been added and tested.

Boundary lateral diffusion can be applied using one of the three methods:
\begin{itemize}
\item {} 
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method2}]{\sphinxcrossref{\DUrole{std,std-ref}{Method \#1: Along layer}}}} (default);

\item {} 
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method1}]{\sphinxcrossref{\DUrole{std,std-ref}{Method \#2: Bulk layer}}}} ;

\end{itemize}

A brief summary of these methods is provided below.


\subparagraph{Along layer approach (Method \#1)}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:along-layer-approach-method-1}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method1}}
This is the recommended and more straight forward method where diffusion is applied layer by layer using only information from neighboring cells.

Step \#1: compute vertical indices containing boundary layer (boundary\_k\_range). For the TOP boundary layer, these are:

k\_top, k\_bot, zeta\_top, zeta\_bot

Step \#2: calculate the diffusive flux at each layer:
\begin{equation*}
\begin{split}F_{k} = -KHTR \times h_{eff}(k) \times (\phi_R(k) - \phi_L(k)),\end{split}
\end{equation*}
where h\_eff is the {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-harmonic-mean}]{\sphinxcrossref{\DUrole{std,std-ref}{harmonic mean}}}} of the layer thickness in the left and right columns. This method does not require a limiter since KHTR is already limted based on a diffusive CFL condition prior to the call of this module.

Step \#3: option to linearly decay the flux from k\_bot\_min to k\_bot\_max:

If LBD\_LINEAR\_TRANSITION = True and k\_bot\_diff \textgreater{} 1, the diffusive flux will decay linearly between the top interface of the layer containing the minimum boundary layer depth (k\_bot\_min) and the lower interface of the layer containing the maximum layer depth (k\_bot\_max).


\subparagraph{Bulk layer approach (Method \#2)}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:bulk-layer-approach-method-2}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method2}}
Apply the lateral boundary diffusive fluxes calculated from a ‘bulk model’.This is a lower order representation (Kraus\sphinxhyphen{}Turner like approach) which assumes that eddies are acting along well mixed layers (i.e., eddies do not know care about vertical tracer gradients within the boundary layer).

Step \#1: compute vertical indices containing boundary layer (boundary\_k\_range). For the TOP boundary layer, these are:

k\_top, k\_bot, zeta\_top, zeta\_bot

Step \#2: compute bulk averages (thickness weighted) tracer averages (phi\_L and phi\_R), then calculate the bulk diffusive flux (F\_\{bulk\}):
\begin{equation*}
\begin{split}F_{bulk} = -KHTR \times h_{eff} \times (\phi_R - \phi_L),\end{split}
\end{equation*}
where h\_eff is the {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-harmonic-mean}]{\sphinxcrossref{\DUrole{std,std-ref}{harmonic mean}}}} of the boundary layer depth in the left and right columns (
\begin{equation*}
\begin{split}HBL_L\end{split}
\end{equation*}
and
\begin{equation*}
\begin{split}HBL_R\end{split}
\end{equation*}
, respectively).

Step \#3: decompose F\_bulk onto individual layers:
\begin{equation*}
\begin{split}F_{layer}(k) = F_{bulk} \times h_{frac}(k) ,\end{split}
\end{equation*}
where h\_\{frac\} is
\begin{equation*}
\begin{split}h_{frac}(k) = h_u(k) \times \frac{1}{\sum(h_u)}.\end{split}
\end{equation*}
h\_u is the {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-harmonic-mean}]{\sphinxcrossref{\DUrole{std,std-ref}{harmonic mean}}}}
of thicknesses at each layer. Special care (layer reconstruction) must be taken at k\_min = min(k\_botL, k\_bot\_R).

Step \#4: option to linearly decay the flux from k\_bot\_min to k\_bot\_max:

If LBD\_LINEAR\_TRANSITION = True and k\_bot\_diff \textgreater{} 1, the diffusive flux will decay linearly between the top interface of the layer containing the minimum boundary layer depth (k\_bot\_min) and the lower interface of the layer containing the maximum layer depth (k\_bot\_max).

Step \#5: limit the tracer flux so that 1) only down\sphinxhyphen{}gradient fluxes are applied, and 2) the flux cannot be larger than F\_max, which is defined using the tracer gradient:
\begin{equation*}
\begin{split}F_{max} = -0.2 \times [(V_R(k) \times \phi_R(k)) - (V_L(k) \times \phi_L(k))],\end{split}
\end{equation*}
where V is the cell volume. Why 0.2? t=0 t=inf 0 .2 0 1 0 .2.2.2 0 .2


\subparagraph{Harmonic Mean}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:harmonic-mean}}\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-harmonic-mean}}
The harmonic mean (HM) betwen h1 and h2 is defined as:
\begin{equation*}
\begin{split}HM = \frac{2 \times h1 \times h2}{h1 + h2}\end{split}
\end{equation*}

\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:type-documentation}}\index{lateral\_boundary\_diffusion\_cs (fortran type in module mom\_lateral\_boundary\_diffusion)@\spxentry{lateral\_boundary\_diffusion\_cs}\spxextra{fortran type in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{lateral\_boundary\_diffusion\_cs}}}
Sets parameters for lateral boundary mixing module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Determine which of the three methods calculate and apply near boundary layer fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{deg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Degree of polynomial reconstruction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{surface\_boundary\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Which boundary layer scheme to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{limiter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Controls wether a flux limiter is applied. Only valid when method = 2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{linear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, apply a linear transition at the base/top of the boundary. The flux will be fully applied at k=k\_min and zero at k=k\_max.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: Control structure to hold remapping configuration.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(kpp\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KPP control structure needed to get BLD.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(energetic\_pbl\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ePBL control structure needed to get BLD

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:function-subroutine-documentation}}\index{lateral\_boundary\_diffusion\_init() (fortran function in module mom\_lateral\_boundary\_diffusion)@\spxentry{lateral\_boundary\_diffusion\_init()}\spxextra{fortran function in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{lateral\_boundary\_diffusion\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{diag}, \emph{diabatic\_CSp}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initialization routine that reads runtime parameters and sets up pointers to other control structures that might be needed for lateral boundary diffusion.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Time structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{diabatic\_csp} :: KPP control structure needed to get BLD

\item {} 
\sphinxstylestrong{cs} :: Lateral boundary mixing control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/extract_diabatic_member}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::extract\_diabatic\_member}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_remapping::remappingdefaultscheme}} \sphinxcode{\sphinxupquote{mom\_remapping::remappingschemesdoc}}

\end{description}\end{quote}

\end{fulllineitems}

\index{lateral\_boundary\_diffusion() (fortran subroutine in module mom\_lateral\_boundary\_diffusion)@\spxentry{lateral\_boundary\_diffusion()}\spxextra{fortran subroutine in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{lateral\_boundary\_diffusion}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{Coef\_x}, \emph{Coef\_y}, \emph{dt}, \emph{Reg}, \emph{CS}}{}
Driver routine for calculating lateral diffusive fluxes near the top and bottom boundaries. Two different methods are available: Method 1: lower order representation, calculate fluxes from bulk layer integrated quantities. Method 2: more straight forward, diffusion is applied layer by layer using only information from neighboring cells.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{coef\_x} :: {[}in{]} dt * Kh * dy / dx at u\sphinxhyphen{}points {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{coef\_y} :: {[}in{]} dt * Kh * dx / dy at v\sphinxhyphen{}points {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Tracer time step * I\_numitts (I\_numitts in tracer\_hordiff)

\item {} 
\sphinxstylestrong{reg} :: Tracer registry

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_get_mld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_get\_mld}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_bulk\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_layer\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_get_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_get\_bld}}}}} \sphinxcode{\sphinxupquote{surface}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{bulk\_average() (fortran function in module mom\_lateral\_boundary\_diffusion)@\spxentry{bulk\_average()}\spxextra{fortran function in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/bulk_average}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{bulk\_average}}}{\emph{boundary}, \emph{nk}, \emph{deg}, \emph{h}, \emph{hBLT}, \emph{phi}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{method}, \emph{k\_top}, \emph{zeta\_top}, \emph{k\_bot}, \emph{zeta\_bot}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{boundary} :: SURFACE or BOTTOM {[}nondim{]}

\item {} 
\sphinxstylestrong{nk} :: Number of layers {[}nondim{]}

\item {} 
\sphinxstylestrong{deg} :: Degree of polynomial {[}nondim{]}

\item {} 
\sphinxstylestrong{h} :: Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hblt} :: Depth of the boundary layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{phi} :: Scalar quantity

\item {} 
\sphinxstylestrong{ppoly0\_e} :: Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: Coefficients of polynomial

\item {} 
\sphinxstylestrong{method} :: Remapping scheme to use

\item {} 
\sphinxstylestrong{k\_top} :: Index of the first layer within the boundary

\item {} 
\sphinxstylestrong{zeta\_top} :: Fraction of the layer encompassed by the bottom boundary layer (0 if none, 1. if all). For the surface, this is always 0. because integration starts at the surface {[}nondim{]}

\item {} 
\sphinxstylestrong{k\_bot} :: Index of the last layer within the boundary

\item {} 
\sphinxstylestrong{zeta\_bot} :: Fraction of the layer encompassed by the surface boundary layer (0 if none, 1. if all). For the bottom boundary layer, this is always 1. because integration starts at the bottom {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/average_value_ppoly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::average\_value\_ppoly}}}}} \sphinxcode{\sphinxupquote{bottom}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{surface}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_bulk\_method}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{harmonic\_mean() (fortran function in module mom\_lateral\_boundary\_diffusion)@\spxentry{harmonic\_mean()}\spxextra{fortran function in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/harmonic_mean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{harmonic\_mean}}}{\emph{h1}, \emph{h2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Calculate the harmonic mean of two quantities See {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-harmonic-mean}]{\sphinxcrossref{\DUrole{std,std-ref}{Harmonic Mean}}}}
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h1} :: Scalar quantity

\item {} 
\sphinxstylestrong{h2} :: Scalar quantity

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_bulk\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_layer\_method}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{boundary\_k\_range() (fortran subroutine in module mom\_lateral\_boundary\_diffusion)@\spxentry{boundary\_k\_range()}\spxextra{fortran subroutine in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{boundary\_k\_range}}}{\emph{boundary}, \emph{nk}, \emph{h}, \emph{hbl}, \emph{k\_top}, \emph{zeta\_top}, \emph{k\_bot}, \emph{zeta\_bot}}{}
Find the k\sphinxhyphen{}index range corresponding to the layers that are within the boundary\sphinxhyphen{}layer region.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{boundary} :: {[}in{]} SURFACE or BOTTOM {[}nondim{]}

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers {[}nondim{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses of the column {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hbl} :: {[}in{]} Thickness of the boundary layer {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} If surface, with respect to zbl\_ref = 0. If bottom, with respect to zbl\_ref = SUM(h)

\item {} 
\sphinxstylestrong{k\_top} :: {[}out{]} Index of the first layer within the boundary

\item {} 
\sphinxstylestrong{zeta\_top} :: {[}out{]} Distance from the top of a layer to the intersection of the top extent of the boundary layer (0 at top, 1 at bottom) {[}nondim{]}

\item {} 
\sphinxstylestrong{k\_bot} :: {[}out{]} Index of the last layer within the boundary

\item {} 
\sphinxstylestrong{zeta\_bot} :: {[}out{]} Distance of the lower layer to the boundary layer depth (0 at top, 1 at bottom) {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{bottom}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{surface}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_bulk\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_layer\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{near\_boundary\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fluxes\_layer\_method() (fortran subroutine in module mom\_lateral\_boundary\_diffusion)@\spxentry{fluxes\_layer\_method()}\spxextra{fortran subroutine in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{fluxes\_layer\_method}}}{\emph{boundary}, \emph{nk}, \emph{deg}, \emph{h\_L}, \emph{h\_R}, \emph{hbl\_L}, \emph{hbl\_R}, \emph{area\_L}, \emph{area\_R}, \emph{phi\_L}, \emph{phi\_R}, \emph{ppoly0\_coefs\_L}, \emph{ppoly0\_coefs\_R}, \emph{ppoly0\_E\_L}, \emph{ppoly0\_E\_R}, \emph{method}, \emph{khtr\_u}, \emph{F\_layer}, \emph{linear\_decay}}{}
Calculate the lateral boundary diffusive fluxes using the layer by layer method. See {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method1}]{\sphinxcrossref{\DUrole{std,std-ref}{Along layer approach (Method \#1)}}}}
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{boundary} :: {[}in{]} Which boundary layer SURFACE or BOTTOM {[}nondim{]}

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers {[}nondim{]}

\item {} 
\sphinxstylestrong{deg} :: {[}in{]} order of the polynomial reconstruction {[}nondim{]}

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Layer thickness (left) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Layer thickness (right) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hbl\_l} :: {[}in{]} Thickness of the boundary boundary layer (left) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hbl\_r} :: {[}in{]} Thickness of the boundary boundary layer (right) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{area\_l} :: {[}in{]} Area of the horizontal grid (left) {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{area\_r} :: {[}in{]} Area of the horizontal grid (right) {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{phi\_l} :: {[}in{]} Tracer values (left) {[}conc{]}

\item {} 
\sphinxstylestrong{phi\_r} :: {[}in{]} Tracer values (right) {[}conc{]}

\item {} 
\sphinxstylestrong{ppoly0\_coefs\_l} :: {[}in{]} Tracer reconstruction (left) {[}conc{]}

\item {} 
\sphinxstylestrong{ppoly0\_coefs\_r} :: {[}in{]} Tracer reconstruction (right) {[}conc{]}

\item {} 
\sphinxstylestrong{ppoly0\_e\_l} :: {[}in{]} Polynomial edge values (left) {[}nondim{]}

\item {} 
\sphinxstylestrong{ppoly0\_e\_r} :: {[}in{]} Polynomial edge values (right) {[}nondim{]}

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Method of polynomial integration {[}nondim{]}

\item {} 
\sphinxstylestrong{khtr\_u} :: {[}in{]} Horizontal diffusivities times delta t at a velocity point {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{f\_layer} :: {[}out{]} Layerwise diffusive flux at U\sphinxhyphen{} or V\sphinxhyphen{}point {[}H L2 conc \textasciitilde{}\textgreater{} m3 conc{]}

\item {} 
\sphinxstylestrong{linear\_decay} :: {[}in{]} If True, apply a linear transition at the base of the boundary layer

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/average_value_ppoly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::average\_value\_ppoly}}}}} \sphinxcode{\sphinxupquote{bottom}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_k\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/harmonic_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{harmonic\_mean}}}}} \sphinxcode{\sphinxupquote{surface}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lateral\_boundary\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{near\_boundary\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fluxes\_bulk\_method() (fortran subroutine in module mom\_lateral\_boundary\_diffusion)@\spxentry{fluxes\_bulk\_method()}\spxextra{fortran subroutine in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{fluxes\_bulk\_method}}}{\emph{boundary}, \emph{nk}, \emph{deg}, \emph{h\_L}, \emph{h\_R}, \emph{hbl\_L}, \emph{hbl\_R}, \emph{area\_L}, \emph{area\_R}, \emph{phi\_L}, \emph{phi\_R}, \emph{ppoly0\_coefs\_L}, \emph{ppoly0\_coefs\_R}, \emph{ppoly0\_E\_L}, \emph{ppoly0\_E\_R}, \emph{method}, \emph{khtr\_u}, \emph{F\_bulk}, \emph{F\_layer}, \emph{F\_limit}, \emph{linear\_decay}}{}
Apply the lateral boundary diffusive fluxes calculated from a ‘bulk model’ See {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:namespacemom-lateral-boundary-diffusion-1section-method2}]{\sphinxcrossref{\DUrole{std,std-ref}{Bulk layer approach (Method \#2)}}}}
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{boundary} :: {[}in{]} Which boundary layer SURFACE or BOTTOM {[}nondim{]}

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers {[}nondim{]}

\item {} 
\sphinxstylestrong{deg} :: {[}in{]} order of the polynomial reconstruction {[}nondim{]}

\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Layer thickness (left) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Layer thickness (right) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hbl\_l} :: {[}in{]} Thickness of the boundary boundary layer (left) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hbl\_r} :: {[}in{]} Thickness of the boundary boundary layer (left) {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{area\_l} :: {[}in{]} Area of the horizontal grid (left) {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{area\_r} :: {[}in{]} Area of the horizontal grid (right) {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{phi\_l} :: {[}in{]} Tracer values (left) {[}conc{]}

\item {} 
\sphinxstylestrong{phi\_r} :: {[}in{]} Tracer values (right) {[}conc{]}

\item {} 
\sphinxstylestrong{ppoly0\_coefs\_l} :: {[}in{]} Tracer reconstruction (left) {[}conc{]}

\item {} 
\sphinxstylestrong{ppoly0\_coefs\_r} :: {[}in{]} Tracer reconstruction (right) {[}conc{]}

\item {} 
\sphinxstylestrong{ppoly0\_e\_l} :: {[}in{]} Polynomial edge values (left) {[}nondim{]}

\item {} 
\sphinxstylestrong{ppoly0\_e\_r} :: {[}in{]} Polynomial edge values (right) {[}nondim{]}

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Method of polynomial integration {[}nondim{]}

\item {} 
\sphinxstylestrong{khtr\_u} :: {[}in{]} Horizontal diffusivities times delta t at a velocity point {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{f\_bulk} :: {[}out{]} The bulk mixed layer lateral flux {[}H L2 conc \textasciitilde{}\textgreater{} m3 conc{]}

\item {} 
\sphinxstylestrong{f\_layer} :: {[}out{]} Layerwise diffusive flux at U\sphinxhyphen{} or V\sphinxhyphen{}point {[}H L2 conc \textasciitilde{}\textgreater{} m3 conc{]}

\item {} 
\sphinxstylestrong{f\_limit} :: {[}in{]} If True, apply a limiter

\item {} 
\sphinxstylestrong{linear\_decay} :: {[}in{]} If True, apply a linear transition at the base of the boundary layer

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{bottom}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_k\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/bulk_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bulk\_average}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/harmonic_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{harmonic\_mean}}}}} \sphinxcode{\sphinxupquote{surface}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lateral\_boundary\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{near\_boundary\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{near\_boundary\_unit\_tests() (fortran function in module mom\_lateral\_boundary\_diffusion)@\spxentry{near\_boundary\_unit\_tests()}\spxextra{fortran function in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{near\_boundary\_unit\_tests}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Unit tests for near\sphinxhyphen{}boundary horizontal mixing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} If true, output additional information for debugging unit tests

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{bottom}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_k\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_bulk_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_bulk\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fluxes\_layer\_method}}}}} \sphinxcode{\sphinxupquote{surface}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/test_boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_boundary\_k\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/test_layer_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_layer\_fluxes}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_layer\_fluxes() (fortran function in module mom\_lateral\_boundary\_diffusion)@\spxentry{test\_layer\_fluxes()}\spxextra{fortran function in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/test_layer_fluxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_layer\_fluxes}}}{\emph{verbose}, \emph{nk}, \emph{test\_name}, \emph{F\_calc}, \emph{F\_ans}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if output of near\sphinxhyphen{}boundary unit tests does not match correct computed values and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{test\_name} :: {[}in{]} Brief description of the unit test

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers

\item {} 
\sphinxstylestrong{f\_calc} :: {[}in{]} Fluxes of the unitless tracer from the algorithm {[}s\textasciicircum{}\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{f\_ans} :: {[}in{]} Fluxes of the unitless tracer calculated by hand {[}s\textasciicircum{}\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{near\_boundary\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_boundary\_k\_range() (fortran function in module mom\_lateral\_boundary\_diffusion)@\spxentry{test\_boundary\_k\_range()}\spxextra{fortran function in module mom\_lateral\_boundary\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/test_boundary_k_range}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_boundary\_k\_range}}}{\emph{k\_top}, \emph{zeta\_top}, \emph{k\_bot}, \emph{zeta\_bot}, \emph{k\_top\_ans}, \emph{zeta\_top\_ans}, \emph{k\_bot\_ans}, \emph{zeta\_bot\_ans}, \emph{test\_name}, \emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Return true if output of unit tests for boundary\_k\_range does not match answers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{k\_top} :: Index of cell containing top of boundary

\item {} 
\sphinxstylestrong{zeta\_top} :: Nondimension position

\item {} 
\sphinxstylestrong{k\_bot} :: Index of cell containing bottom of boundary

\item {} 
\sphinxstylestrong{zeta\_bot} :: Nondimension position

\item {} 
\sphinxstylestrong{k\_top\_ans} :: Index of cell containing top of boundary

\item {} 
\sphinxstylestrong{zeta\_top\_ans} :: Nondimension position

\item {} 
\sphinxstylestrong{k\_bot\_ans} :: Index of cell containing bottom of boundary

\item {} 
\sphinxstylestrong{zeta\_bot\_ans} :: Nondimension position

\item {} 
\sphinxstylestrong{test\_name} :: Name of the unit test

\item {} 
\sphinxstylestrong{verbose} :: If true always print output

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{near\_boundary\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_lateral\_mixing\_coeffs module reference}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs}}\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:mom-lateral-mixing-coeffs-module-reference}}\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs::doc}}\index{mom\_lateral\_mixing\_coeffs (module)@\spxentry{mom\_lateral\_mixing\_coeffs}\spxextra{module}|spxpagem}
Variable mixing coefficients.

{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:detamom-lateral-mixing-coeffs}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/varmix_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{varmix\_cs}}}}}
&
Variable mixing coefficients.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_depth_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_depth\_function()}}}}}
&
Calculates the non\sphinxhyphen{}dimensional depth functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_resoln_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_resoln\_function()}}}}}
&
Calculates and stores the non\sphinxhyphen{}dimensional resolution functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_slope\_functions()}}}}}
&
Calculates and stores functions of isopycnal slopes, e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_visbeck_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_visbeck\_coeffs()}}}}}
&
Calculates factors used when setting diffusivity coefficients similar to Visbeck et al.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions_using_just_e}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_slope\_functions\_using\_just\_e()}}}}}
&
The original calc\_slope\_function() that calculated slopes using interface positions only, not accounting for density variations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_qg_leith_viscosity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_qg\_leith\_viscosity()}}}}}
&
Calculates the Leith Laplacian and bi\sphinxhyphen{}harmonic viscosity coefficients.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/varmix_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{varmix\_init()}}}}}
&
Initializes the variables mixing coefficients container.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:detailed-description}}\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:detamom-lateral-mixing-coeffs}}
This module provides a container for various factors used in prescribing diffusivities, that are a function of the state (in particular the stratification and isoneutral slopes).


\paragraph{The resolution function}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:the-resolution-function}}\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:namespacemom-lateral-mixing-coeffs-1section-resolution-function}}
The resolution function is expressed in terms of the ratio of grid\sphinxhyphen{}spacing to deformation radius. The square of the resolution parameter is
\begin{equation*}
\begin{split}R^2 = \frac{L_d^2}{\Delta^2} = \frac{ c_g^2 }{ f^2 \Delta^2 + c_g \beta \Delta^2 }\end{split}
\end{equation*}
where the grid spacing is calculated as
\begin{equation*}
\begin{split}\Delta^2 = \Delta x^2 + \Delta y^2 .\end{split}
\end{equation*}
\begin{sphinxadmonition}{note}{Todo}

Check this reference to Bob on/off paper. The resolution function used in scaling diffusivities (Hallberg, 2010) is
\end{sphinxadmonition}
\begin{equation*}
\begin{split}r(\Delta,L_d) = \frac{1}{1+(\alpha R)^p}\end{split}
\end{equation*}
The resolution function can be applied independently to thickness diffusion (module {\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse()}}}}}), tracer diffusion (mom\_tracer\_hordiff) lateral viscosity (
), tracer diffusion (mom\_tracer\_hordiff) lateral viscosity ({\hyperref[\detokenize{api/generated/modules/mom_hor_visc:f/mom_hor_visc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_visc()}}}}}).).

Robert Hallberg, 2013: Using a resolution function to regulate parameterizations of oceanic mesoscale eddy effects. Ocean Modelling, 71, pp 92\sphinxhyphen{}103.
\sphinxurl{http://dx.doi.org/10.1016/j.ocemod.2013.08.007}


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Module parameter
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{USE\_VARIABLE\_MIXING}}
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{RESOLN\_SCALED\_KH}}
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{RESOLN\_SCALED\_KHTH}}
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{RESOLN\_SCALED\_KHTR}}
\\
\hline
\(\alpha\)
&
\sphinxcode{\sphinxupquote{KH\_RES\_SCALE\_COEF}}
(for thickness and tracer diffusivity)
\\
\hline
\(p\)
&
\sphinxcode{\sphinxupquote{KH\_RES\_FN\_POWER}}
(for thickness and tracer diffusivity)
\\
\hline
\(\alpha\)
&
\sphinxcode{\sphinxupquote{VISC\_RES\_SCALE\_COEF}}
(for lateral viscosity)
\\
\hline
\(p\)
&
\sphinxcode{\sphinxupquote{VISC\_RES\_FN\_POWER}}
(for lateral viscosity)
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{GILL\_EQUATORIAL\_LD}}
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}


\paragraph{Visbeck diffusivity}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:visbeck-diffusivity}}\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:namespacemom-lateral-mixing-coeffs-1section-vicbeck}}
This module also calculates factors used in setting the thickness diffusivity similar to a Visbeck et al., 1997, scheme. The factors are combined in \sphinxcode{\sphinxupquote{mom\_thickness\_diffuse::thickness\_diffuse()}} but calculated in this module.
but calculated in this module.
\begin{equation*}
\begin{split}\kappa_h = \alpha_s L_s^2 S N\end{split}
\end{equation*}
where
\(S\) is the magnitude of the isoneutral slope and \(N\) is the Brunt\sphinxhyphen{}Vaisala frequency.

Visbeck, Marshall, Haine and Spall, 1997: Specification of Eddy Transfer Coefficients in Coarse\sphinxhyphen{}Resolution Ocean Circulation Models. J. Phys. Oceanogr.
\sphinxurl{http://dx.doi.org/10.1175/1520-0485(1997)027\%3C0381:SOETCI\%3E2.0.CO;2}


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Module parameter
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{USE\_VARIABLE\_MIXING}}
\\
\hline
\(\alpha_s\)
&
\sphinxcode{\sphinxupquote{KHTH\_SLOPE\_CFF}}
(for {\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse()}}}}} module) module)
\\
\hline
\(\alpha_s\)
&
\sphinxcode{\sphinxupquote{KHTR\_SLOPE\_CFF}}
(for mom\_tracer\_hordiff module)
\\
\hline
\(L_{s}\)
&
\sphinxcode{\sphinxupquote{VISBECK\_L\_SCALE}}
\\
\hline
\(S_{max}\)
&
\sphinxcode{\sphinxupquote{VISBECK\_MAX\_SLOPE}}
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}


\paragraph{Vertical structure function for KhTh}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:vertical-structure-function-for-khth}}\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:namespacemom-lateral-mixing-coeffs-1section-vertical-structure-khth}}
The thickness diffusivity can be prescribed a vertical distribution with the shape of the equivalent barotropic velocity mode. The structure function is stored in the control structure for thie module ({\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/varmix_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{varmix\_cs()}}}}}) but is calculated using subroutines in
) but is calculated using subroutines in {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed()}}}}}..


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Module parameter
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{KHTH\_USE\_EBT\_STRUCT}}
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:type-documentation}}\index{varmix\_cs (fortran type in module mom\_lateral\_mixing\_coeffs)@\spxentry{varmix\_cs}\spxextra{fortran type in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/varmix_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{varmix\_cs}}}
Variable mixing coefficients.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sn\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sn\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_l2u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_l2v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_res\_fn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_s2\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_s2\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rd\_dx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_u\_qg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_v\_qg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_variable\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the variable mixing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{resoln\_scaled\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, scale away the Laplacian viscosity when the deformation radius is well resolved.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{resoln\_scaled\_khth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, scale away the thickness diffusivity when the deformation radius is well resolved.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_scaled\_khth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, KHTH is scaled away when the depth is shallower than a reference depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{resoln\_scaled\_khtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, scale away the tracer diffusivity when the deformation radius is well resolved.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interpolate\_res\_fn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, interpolate the resolution function to the velocity points from the thickness points; otherwise interpolate the wave speed and calculate the resolution function independently at each point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_stored\_slopes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, stores isopycnal slopes in this structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{resoln\_use\_ebt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the equivalent barotropic wave speed instead of first baroclinic wave for calculating the resolution fn.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khth\_use\_ebt\_struct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the equivalent barotropic structure as the vertical structure of thickness diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calculate\_cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calls

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calculate\_rd\_dx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculates Rd/dx and populate CSRd\_dx\_h. This parameter is set depending on other parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calculate\_res\_fns}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate all the resolution factors. This parameter is set depending on other parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calculate\_depth\_fns}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate all the depth factors. This parameter is set depending on other parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calculate\_eady\_growth\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate all the Eady growth rate. This parameter is set depending on other parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sn\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: S*N at u\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sn\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: S*N at v\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l2u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Length scale\textasciicircum{}2 at u\sphinxhyphen{}points {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l2v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Length scale\textasciicircum{}2 at v\sphinxhyphen{}points {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The first baroclinic gravity wave speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_fn\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional function of the ratio the first baroclinic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_fn\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional function of the ratio the first baroclinic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_fn\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional function of the ratio the first baroclinic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_fn\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional function of the ratio the first baroclinic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_fn\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional function of the ratio of the depth to.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_fn\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional function of the ratio of the depth to.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{beta\_dx2\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The magnitude of the gradient of the Coriolis parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{beta\_dx2\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The magnitude of the gradient of the Coriolis parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{beta\_dx2\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The magnitude of the gradient of the Coriolis parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{beta\_dx2\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The magnitude of the gradient of the Coriolis parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f2\_dx2\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Coriolis parameter squared times the grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f2\_dx2\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Coriolis parameter squared times the grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f2\_dx2\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Coriolis parameter squared times the grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f2\_dx2\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Coriolis parameter squared times the grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rd\_dx\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Deformation radius over grid spacing {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slope\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal isopycnal slope {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slope\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional isopycnal slope {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ebt\_struct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Vertical structure function to scale diffusivities with {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* kh\_v\_qg {[}*, *) :: Laplacian metric\sphinxhyphen{}dependent constants {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: Laplacian metric\sphinxhyphen{}dependent constants {[}L3 \textasciitilde{}\textgreater{} m3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: QG Leith GM coefficient at u\sphinxhyphen{}points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: QG Leith GM coefficient at v\sphinxhyphen{}points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_visbeck}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use Visbeck formulation for thickness diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{varmix\_ktop}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Top layer to start downward integrals.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{visbeck\_l\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fixed length scale in Visbeck formula.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_coef\_khth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A non\sphinxhyphen{}dimensional number that determines the function of resolution, used for thickness and tracer mixing, as: F = 1 / (1 + (Res\_coef\_khth*Ld/dx)\textasciicircum{}Res\_fn\_power)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_coef\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A non\sphinxhyphen{}dimensional number that determines the function of resolution, used for lateral viscosity, as: F = 1 / (1 + (Res\_coef\_visc*Ld/dx)\textasciicircum{}Res\_fn\_power)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_scaled\_khth\_h0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The depth above which KHTH is linearly scaled away {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_scaled\_khth\_exp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The exponent used in the depth dependent scaling function for KHTH {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_smooth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A diffusivity for smoothing T/S in vanished layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_fn\_power\_khth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The power of dx/Ld in the KhTh resolution function. Any positive integer power may be used, but even powers and especially 2 are coded to be more efficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{res\_fn\_power\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The power of dx/Ld in the Kh resolution function. Any positive integer power may be used, but even powers and especially 2 are coded to be more efficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{visbeck\_s\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Upper bound on slope used in Eady growth rate {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_qg\_leith\_gm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the QG Leith viscosity as the GM coefficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_beta\_in\_qg\_leith}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, includes the beta term in the QG Leith GM coefficient.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wave\_speed\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(wave\_speed\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Wave speed control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_cg1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: For group halo pass.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write out checksums of data for debugging.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:function-subroutine-documentation}}\index{calc\_depth\_function() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{calc\_depth\_function()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_depth_function}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{calc\_depth\_function}}}{\emph{G}, \emph{CS}}{}
Calculates the non\sphinxhyphen{}dimensional depth functions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_resoln\_function() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{calc\_resoln\_function()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_resoln_function}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{calc\_resoln\_function}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calculates and stores the non\sphinxhyphen{}dimensional resolution functions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/query_averaging_enabled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::query\_averaging\_enabled}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_slope\_functions() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{calc\_slope\_functions()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{calc\_slope\_functions}}}{\emph{h}, \emph{tv}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{OBC}}{}
Calculates and stores functions of isopycnal slopes, e.g. Sx, Sy, S*N, mostly used in the Visbeck et al. style scaling of diffusivity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/calc_isoneutral_slopes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_isopycnal\_slopes::calc\_isoneutral\_slopes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions_using_just_e}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_slope\_functions\_using\_just\_e}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_visbeck_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_visbeck\_coeffs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/query_averaging_enabled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::query\_averaging\_enabled}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_visbeck\_coeffs() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{calc\_visbeck\_coeffs()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_visbeck_coeffs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{calc\_visbeck\_coeffs}}}{\emph{h}, \emph{slope\_x}, \emph{slope\_y}, \emph{N2\_u}, \emph{N2\_v}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{OBC}}{}
Calculates factors used when setting diffusivity coefficients similar to Visbeck et al.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{slope\_x} :: {[}in{]} Zonal isoneutral slope

\item {} 
\sphinxstylestrong{n2\_u} :: {[}in{]} Buoyancy (Brunt\sphinxhyphen{}Vaisala) frequency at u\sphinxhyphen{}points {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{slope\_y} :: {[}in{]} Meridional isoneutral slope

\item {} 
\sphinxstylestrong{n2\_v} :: {[}in{]} Buoyancy (Brunt\sphinxhyphen{}Vaisala) frequency at v\sphinxhyphen{}points {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_none}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/query_averaging_enabled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::query\_averaging\_enabled}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_slope\_functions}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_slope\_functions\_using\_just\_e() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{calc\_slope\_functions\_using\_just\_e()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions_using_just_e}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{calc\_slope\_functions\_using\_just\_e}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{e}, \emph{calculate\_slopes}, \emph{OBC}}{}
The original calc\_slope\_function() that calculated slopes using interface positions only, not accounting for density variations.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Interface position {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{calculate\_slopes} :: {[}in{]} If true, calculate slopes internally otherwise use slopes stored in CS

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_none}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_slope_functions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_slope\_functions}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_qg\_leith\_viscosity() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{calc\_qg\_leith\_viscosity()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_qg_leith_viscosity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{calc\_qg\_leith\_viscosity}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{k}, \emph{div\_xx\_dx}, \emph{div\_xx\_dy}, \emph{vort\_xy\_dx}, \emph{vort\_xy\_dy}}{}
Calculates the Leith Laplacian and bi\sphinxhyphen{}harmonic viscosity coefficients.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{k} :: {[}in{]} Layer for which to calculate vorticity magnitude

\item {} 
\sphinxstylestrong{div\_xx\_dx} :: {[}in{]} x\sphinxhyphen{}derivative of horizontal divergence (d/dx(du/dx + dv/dy)) {[}L\sphinxhyphen{}1 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{div\_xx\_dy} :: {[}in{]} y\sphinxhyphen{}derivative of horizontal divergence (d/dy(du/dx + dv/dy)) {[}L\sphinxhyphen{}1 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vort\_xy\_dx} :: {[}inout{]} x\sphinxhyphen{}derivative of vertical vorticity (d/dx(dv/dx \sphinxhyphen{} du/dy)) {[}L\sphinxhyphen{}1 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vort\_xy\_dy} :: {[}inout{]} y\sphinxhyphen{}derivative of vertical vorticity (d/dy(dv/dx \sphinxhyphen{} du/dy)) {[}L\sphinxhyphen{}1 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 s\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{varmix\_init() (fortran subroutine in module mom\_lateral\_mixing\_coeffs)@\spxentry{varmix\_init()}\spxextra{fortran subroutine in module mom\_lateral\_mixing\_coeffs}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/varmix_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs/}}\sphinxbfcode{\sphinxupquote{varmix\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initializes the variables mixing coefficients container.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cs} :: Variable mixing coefficients

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_marine\_ice module reference}
\label{\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice}}\label{\detokenize{api/generated/modules/mom_marine_ice:mom-marine-ice-module-reference}}\label{\detokenize{api/generated/modules/mom_marine_ice::doc}}\index{mom\_marine\_ice (module)@\spxentry{mom\_marine\_ice}\spxextra{module}|spxpagem}
Routines incorporating the effects of marine ice (sea\sphinxhyphen{}ice and icebergs) into the ocean model dynamics and thermodynamics.

{\hyperref[\detokenize{api/generated/modules/mom_marine_ice:detamom-marine-ice}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_marine_ice:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/marine_ice_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marine\_ice\_cs}}}}}
&
Control structure for MOM\_marine\_ice.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_marine_ice:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/iceberg_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{iceberg\_forces()}}}}}
&
add\_berg\_flux\_to\_shelf adds rigidity and ice\sphinxhyphen{}area coverage due to icebergs to the forces type fields, and adds ice\sphinxhyphen{}areal coverage and modifies various thermodynamic fluxes due to the presence of icebergs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/iceberg_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{iceberg\_fluxes()}}}}}
&
iceberg\_fluxes adds ice\sphinxhyphen{}area\sphinxhyphen{}coverage and modifies various thermodynamic fluxes due to the presence of icebergs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/marine_ice_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marine\_ice\_init()}}}}}
&
Initialize control structure for MOM\_marine\_ice.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_marine_ice:detailed-description}}\label{\detokenize{api/generated/modules/mom_marine_ice:detamom-marine-ice}}
Routines incorporating the effects of marine ice (sea\sphinxhyphen{}ice and icebergs) into the ocean model dynamics and thermodynamics.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_marine_ice:type-documentation}}\index{marine\_ice\_cs (fortran type in module mom\_marine\_ice)@\spxentry{marine\_ice\_cs}\spxextra{fortran type in module mom\_marine\_ice}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/marine_ice_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_marine\_ice/}}\sphinxbfcode{\sphinxupquote{marine\_ice\_cs}}}
Control structure for MOM\_marine\_ice.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_iceberg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The viscosity of the icebergs {[}L4 Z\sphinxhyphen{}2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]} (for ice rigidity)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{berg\_area\_threshold}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fraction of grid cell which iceberg must occupy so that fluxes below are set to zero. (0.5 is a good value to use.) Not applied for negative values.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_heat\_fusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Latent heat of fusion {[}Q \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{density\_iceberg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A typical density of icebergs {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]} (for ice rigidity)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_marine_ice:function-subroutine-documentation}}\index{iceberg\_forces() (fortran subroutine in module mom\_marine\_ice)@\spxentry{iceberg\_forces()}\spxextra{fortran subroutine in module mom\_marine\_ice}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/iceberg_forces}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_marine\_ice/}}\sphinxbfcode{\sphinxupquote{iceberg\_forces}}}{\emph{G}, \emph{forces}, \emph{use\_ice\_shelf}, \emph{sfc\_state}, \emph{time\_step}, \emph{CS}}{}
add\_berg\_flux\_to\_shelf adds rigidity and ice\sphinxhyphen{}area coverage due to icebergs to the forces type fields, and adds ice\sphinxhyphen{}areal coverage and modifies various thermodynamic fluxes due to the presence of icebergs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{use\_ice\_shelf} :: {[}in{]} If true, this configuration uses ice shelves.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The coupling time step {[}s{]}.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for MOM\_marine\_ice

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{iceberg\_fluxes() (fortran subroutine in module mom\_marine\_ice)@\spxentry{iceberg\_fluxes()}\spxextra{fortran subroutine in module mom\_marine\_ice}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/iceberg_fluxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_marine\_ice/}}\sphinxbfcode{\sphinxupquote{iceberg\_fluxes}}}{\emph{G}, \emph{US}, \emph{fluxes}, \emph{use\_ice\_shelf}, \emph{sfc\_state}, \emph{time\_step}, \emph{CS}}{}
iceberg\_fluxes adds ice\sphinxhyphen{}area\sphinxhyphen{}coverage and modifies various thermodynamic fluxes due to the presence of icebergs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure with pointers to themodynamic, tracer and mass exchange forcing fields

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{use\_ice\_shelf} :: {[}in{]} If true, this configuration uses ice shelves.

\item {} 
\sphinxstylestrong{time\_step} :: {[}in{]} The coupling time step {[}s{]}.

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for MOM\_marine\_ice

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{marine\_ice\_init() (fortran subroutine in module mom\_marine\_ice)@\spxentry{marine\_ice\_init()}\spxextra{fortran subroutine in module mom\_marine\_ice}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/marine_ice_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_marine\_ice/}}\sphinxbfcode{\sphinxupquote{marine\_ice\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initialize control structure for MOM\_marine\_ice.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Runtime parameter handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cs} :: Pointer to the control structure for MOM\_marine\_ice

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_meke module reference}
\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke}}\label{\detokenize{api/generated/modules/mom_meke:mom-meke-module-reference}}\label{\detokenize{api/generated/modules/mom_meke::doc}}\index{mom\_meke (module)@\spxentry{mom\_meke}\spxextra{module}|spxpagem}
Implements the Mesoscale Eddy Kinetic Energy framework with topographic beta effect included in computing beta in Rhines scale.

{\hyperref[\detokenize{api/generated/modules/mom_meke:detamom-meke}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_meke:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_cs}}}}}
&
Control structure that contains MEKE parameters and diagnostics handles.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_meke:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_forward\_meke()}}}}}
&
Integrates forward\sphinxhyphen{}in\sphinxhyphen{}time the MEKE eddy energy equation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_equilibrium()}}}}}
&
Calculates the equilibrium solutino where the source depends only on MEKE diffusivity and there is no lateral diffusion of MEKE.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium_restoring}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_equilibrium\_restoring()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_lengthscales()}}}}}
&
Calculates the eddy mixing length scale and \(\gamma_b\) and \(\gamma_t\) functions that are ratios of either bottom or barotropic eddy energy to the column eddy energy, respectively.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_lengthscales\_0d()}}}}}
&
Calculates the eddy mixing length scale and \(\gamma_b\) and \(\gamma_t\) functions that are ratios of either bottom or barotropic eddy energy to the column eddy energy, respectively.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_init()}}}}}
&
Initializes the MOM\_MEKE module and reads parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_alloc_register_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_alloc\_register\_restart()}}}}}
&
Allocates memory and register restart fields for the MOM\_MEKE module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_end()}}}}}
&
Deallocates any variables allocated in MEKE\_init or MEKE\_alloc\_register\_restart.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_meke:detailed-description}}\label{\detokenize{api/generated/modules/mom_meke:detamom-meke}}

\paragraph{The Mesoscale Eddy Kinetic Energy (MEKE) framework}
\label{\detokenize{api/generated/modules/mom_meke:the-mesoscale-eddy-kinetic-energy-meke-framework}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke}}
The MEKE framework accounts for the mean potential energy removed by the first order closures used to parameterize mesoscale eddies. It requires closure at the second order, namely dissipation and transport of eddy energy.

Monitoring the sub\sphinxhyphen{}grid scale eddy energy budget provides a means to predict a sub\sphinxhyphen{}grid eddy\sphinxhyphen{}velocity scale which can be used in the lower order closures.


\subparagraph{MEKE equations}
\label{\detokenize{api/generated/modules/mom_meke:meke-equations}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-equations}}
The eddy kinetic energy equation is:
\begin{equation*}
\begin{split}\partial_{\tilde{t}} E = \overbrace{ \dot{E}_b + \gamma_\eta \dot{E}_\eta + \gamma_v \dot{E}_v }^\text{sources} - \overbrace{ ( \lambda + C_d | U_d | \gamma_b^2 ) E }^\text{local dissipation} + \overbrace{ \nabla \cdot ( ( \kappa_E + \gamma_M \kappa_M ) \nabla E - \kappa_4 \nabla^3 E ) }^\text{smoothing}\end{split}
\end{equation*}
where \(E\) is the eddy kinetic energy (variable \sphinxcode{\sphinxupquote{MEKE}} ) with units of m $^{\text{2}}$s $^{\text{\sphinxhyphen{}2}}$, and \(\tilde{t} = a t\) is a scaled time. The non\sphinxhyphen{}dimensional factor \(a\geq 1\) is used to accelerate towards equilibrium.

The MEKE equation is two\sphinxhyphen{}dimensional and obtained by depth averaging the the three\sphinxhyphen{}dimensional eddy energy equation. In the following expressions
\(\left< \phi \right> = \frac{1}{H} \int^\eta_{-D} \phi \, dz\) maps three dimensional terms into the two\sphinxhyphen{}dimensional quantities needed.


\subparagraph{MEKE source terms}
\label{\detokenize{api/generated/modules/mom_meke:meke-source-terms}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-source-terms}}
The source term
\(\dot{E}_b\) is a constant background source of energy intended to avoid the limit \(E\rightarrow 0\) .

The “GM” source term
\begin{equation*}
\begin{split}\dot{E}_\eta = - \left< \overline{w^\prime b^\prime} \right> = \left< \kappa_h N^2S^2 \right> \approx \left< \kappa_h g\prime |\nabla_\sigma \eta|^2 \right>\end{split}
\end{equation*}
equals the mean potential energy removed by the Gent\sphinxhyphen{}McWilliams closure, and is excluded/included in the MEKE budget by the efficiency parameter \(\gamma_\eta \in [0,1]\) .

The “frictional” source term
\begin{equation*}
\begin{split}\dot{E}_{v} = \left< \partial_i u_j \tau_{ij} \right>\end{split}
\end{equation*}
equals the mean kinetic energy removed by lateral viscous fluxes, and is excluded/included in the MEKE budget by the efficiency parameter \(\gamma_v \in [0,1]\) .


\subparagraph{MEKE dissipation terms}
\label{\detokenize{api/generated/modules/mom_meke:meke-dissipation-terms}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-dissipation-terms}}
The local dissipation of
\(E\) is parameterized through a linear damping, \(\lambda\) , and bottom drag, \(C_d | U_d | \gamma_b^2\) . The \(\gamma_b\) accounts for the weak projection of the column\sphinxhyphen{}mean eddy velocty to the bottom. In other words, the bottom velocity is estimated as \(\gamma_b U_e\) . The bottom drag coefficient, \(C_d\) is the same as that used in the bottom friction in the mean model equations.

The bottom drag velocity scale,
\(U_d\) , has contributions from the resolved state and \(E\) :
\begin{equation*}
\begin{split}U_d = \sqrt{ U_b^2 + |u|^2_{z=-D} + |\gamma_b U_e|^2 } .\end{split}
\end{equation*}
where the eddy velocity scale, \(U_e\) , is given by:
\begin{equation*}
\begin{split}U_e = \sqrt{ 2 E } .\end{split}
\end{equation*}
\(U_b\) is a constant background bottom velocity scale and is typically not used (i.e. set to zero).

Following Jansen et al., 2015, the projection of eddy energy on to the bottom is given by the ratio of bottom energy to column mean energy:
\begin{equation*}
\begin{split}\gamma_b^2 = \frac{E_b}{E} = \gamma_{d0} + \left( 1 + c_{b} \frac{L_d}{L_f} \right)^{-\frac{4}{5}} ,\end{split}
\end{equation*}\begin{equation*}
\begin{split}\gamma_b^2 \leftarrow \max{\left( \gamma_b^2, \gamma_{min}^2 \right)} .\end{split}
\end{equation*}

\subparagraph{MEKE smoothing terms}
\label{\detokenize{api/generated/modules/mom_meke:meke-smoothing-terms}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-smoothing}}
\(E\) is laterally diffused by a diffusivity \(\kappa_E + \gamma_M \kappa_M\) where \(\kappa_E\) is a constant diffusivity and the term \(\gamma_M \kappa_M\) is a “self diffusion” using the diffusivity calculated in the section {\hyperref[\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-diffusivity}]{\sphinxcrossref{\DUrole{std,std-ref}{Diffusivity derived from MEKE}}}} . \(\kappa_4\) is a constant bi\sphinxhyphen{}harmonic diffusivity.


\subparagraph{Diffusivity derived from MEKE}
\label{\detokenize{api/generated/modules/mom_meke:diffusivity-derived-from-meke}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-diffusivity}}
The predicted eddy velocity scale,
\(U_e\) , can be combined with a mixing length scale to form a diffusivity. The primary use of a MEKE derived diffusivity is for use in thickness diffusion (module {\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse()}}}}}) and optionally in along isopycnal mixing of tracers (module ) and optionally in along isopycnal mixing of tracers (module {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff()}}}}}). The original form used (enabled with MEKE\_OLD\_LSCALE=True):). The original form used (enabled with MEKE\_OLD\_LSCALE=True):
\begin{equation*}
\begin{split}\kappa_M = \gamma_\kappa \sqrt{ \gamma_t^2 U_e^2 A_\Delta }\end{split}
\end{equation*}
where
\(A_\Delta\) is the area of the grid cell. Following Jansen et al., 2015, we now use
\begin{equation*}
\begin{split}\kappa_M = \gamma_\kappa l_M \sqrt{ \gamma_t^2 U_e^2 }\end{split}
\end{equation*}
where
\(\gamma_\kappa \in [0,1]\) is a non\sphinxhyphen{}dimensional factor and, following Jansen et al., 2015, \(\gamma_t^2\) is the ratio of barotropic eddy energy to column mean eddy energy given by
\begin{equation*}
\begin{split}\gamma_t^2 = \frac{E_t}{E} = \left( 1 + c_{t} \frac{L_d}{L_f} \right)^{-\frac{1}{4}} ,\end{split}
\end{equation*}\begin{equation*}
\begin{split}\gamma_t^2 \leftarrow \max{\left( \gamma_t^2, \gamma_{min}^2 \right)} .\end{split}
\end{equation*}
The length\sphinxhyphen{}scale is a configurable combination of multiple length scales:
\begin{equation*}
\begin{split}l_M = \left( \frac{\alpha_d}{L_d} + \frac{\alpha_f}{L_f} + \frac{\alpha_R}{L_R} + \frac{\alpha_e}{L_e} + \frac{\alpha_\Delta}{L_\Delta} + \frac{\delta[L_c]}{L_c} \right)^{-1}\end{split}
\end{equation*}
where

\begin{eqnarray*} L_d & = & \sqrt{\frac{c_g^2}{f^2+2\beta c_g}} \sim \frac{ c_g }{f} \\\\ L_R & = & \sqrt{\frac{U_e}{\beta^*}} \\\\ L_e & = & \frac{U_e}{|S| N} \\\\ L_f & = & \frac{H}{c_d} \\\\ L_\Delta & = & \sqrt{A_\Delta} . \end{eqnarray*}

\(L_c\) is a constant and \(\delta[L_c]\) is the impulse function so that the term \(\frac{\delta[L_c]}{L_c}\) evaluates to \(\frac{1}{L_c}\) when \(L_c\) is non\sphinxhyphen{}zero but is dropped if \(L_c=0\) .

\(\beta^*\) is the effective \(\beta\) that combines both the planetary vorticity gradient (i.e. \(\beta=\nabla f\) ) and the topographic \(\beta\) effect, with the latter weighed by a weighting constant, \(c_\beta\) , that varies from 0 to 1, so that \(c_\beta=0\) means the topographic \(\beta\) effect is ignored, while \(c_\beta=1\) means it is fully considered. The new \(\beta^*\) therefore takes the form of
\begin{equation*}
\begin{split}\beta^* = \sqrt{( \partial_xf - c_\beta\frac{f}{D}\partial_xD )^2 + ( \partial_yf - c_\beta\frac{f}{D}\partial_yD )^2}\end{split}
\end{equation*}
where \(D\) is water column depth at T points.


\subparagraph{Viscosity derived from MEKE}
\label{\detokenize{api/generated/modules/mom_meke:viscosity-derived-from-meke}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-viscosity}}
As for
\(\kappa_M\) , the predicted eddy velocity scale can be used to form a harmonic eddy viscosity,
\begin{equation*}
\begin{split}\kappa_u = \gamma_u \sqrt{ U_e^2 A_\Delta }\end{split}
\end{equation*}
as well as a biharmonic eddy viscosity,
\begin{equation*}
\begin{split}\kappa_4 = \gamma_4 \sqrt{ U_e^2 A_\Delta^3 }\end{split}
\end{equation*}

\subparagraph{Limit cases for local source\sphinxhyphen{}dissipative balance}
\label{\detokenize{api/generated/modules/mom_meke:limit-cases-for-local-source-dissipative-balance}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-limit-case}}
Note that in steady\sphinxhyphen{}state (or when
\(a>>1\) ) and there is no diffusion of \(E\) then
\begin{equation*}
\begin{split}\overline{E} \approx \frac{ \dot{E}_b + \gamma_\eta \dot{E}_\eta + \gamma_v \dot{E}_v }{ \lambda + C_d|U_d|\gamma_b^2 } .\end{split}
\end{equation*}
In the linear drag limit, where
\(U_e << \min(U_b, |u|_{z=-D}, C_d^{-1}\lambda)\) , the equilibrium becomes \(\overline{E} \approx \frac{ \dot{E}_b + \gamma_\eta \dot{E}_\eta + \gamma_v \dot{E}_v }{ \lambda + C_d \sqrt{ U_b^2 + |u|^2_{z=-D} } }\) .

In the nonlinear drag limit, where
\(U_e >> \max(U_b, |u|_{z=-D}, C_d^{-1}\lambda)\) , the equilibrium becomes \(\overline{E} \approx \left( \frac{ \dot{E}_b + \gamma_\eta \dot{E}_\eta + \gamma_v \dot{E}_v }{ \sqrt{2} C_d \gamma_b^3 } \right)^\frac{2}{3}\) .


\subparagraph{MEKE module parameters}
\label{\detokenize{api/generated/modules/mom_meke:meke-module-parameters}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-module-parameters}}

\begin{savenotes}\sphinxattablestart
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Module parameter
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{USE\_MEKE}}
\\
\hline
\(a\)
&
\sphinxcode{\sphinxupquote{MEKE\_DTSCALE}}
\\
\hline
\(\dot{E}_b\)
&
\sphinxcode{\sphinxupquote{MEKE\_BGSRC}}
\\
\hline
\(\gamma_\eta\)
&
\sphinxcode{\sphinxupquote{MEKE\_GMCOEFF}}
\\
\hline
\(\gamma_v\)
&
\sphinxcode{\sphinxupquote{MEKE\_FrCOEFF}}
\\
\hline
\(\lambda\)
&
\sphinxcode{\sphinxupquote{MEKE\_DAMPING}}
\\
\hline
\(U_b\)
&
\sphinxcode{\sphinxupquote{MEKE\_USCALE}}
\\
\hline
\(\gamma_{d0}\)
&
\sphinxcode{\sphinxupquote{MEKE\_CD\_SCALE}}
\\
\hline
\(c_{b}\)
&
\sphinxcode{\sphinxupquote{MEKE\_CB}}
\\
\hline
\(c_{t}\)
&
\sphinxcode{\sphinxupquote{MEKE\_CT}}
\\
\hline
\(\kappa_E\)
&
\sphinxcode{\sphinxupquote{MEKE\_KH}}
\\
\hline
\(\kappa_4\)
&
\sphinxcode{\sphinxupquote{MEKE\_K4}}
\\
\hline
\(\gamma_\kappa\)
&
\sphinxcode{\sphinxupquote{MEKE\_KHCOEFF}}
\\
\hline
\(\gamma_M\)
&
\sphinxcode{\sphinxupquote{MEKE\_KHMEKE\_FAC}}
\\
\hline
\(\gamma_u\)
&
\sphinxcode{\sphinxupquote{MEKE\_VISCOSITY\_COEFF\_KU}}
\\
\hline
\(\gamma_4\)
&
\sphinxcode{\sphinxupquote{MEKE\_VISCOSITY\_COEFF\_AU}}
\\
\hline
\(\gamma_{min}^2\)
&
\sphinxcode{\sphinxupquote{MEKE\_MIN\_GAMMA2}}
\\
\hline
\(\alpha_d\)
&
\sphinxcode{\sphinxupquote{MEKE\_ALPHA\_DEFORM}}
\\
\hline
\(\alpha_f\)
&
\sphinxcode{\sphinxupquote{MEKE\_ALPHA\_FRICT}}
\\
\hline
\(\alpha_R\)
&
\sphinxcode{\sphinxupquote{MEKE\_ALPHA\_RHINES}}
\\
\hline
\(\alpha_e\)
&
\sphinxcode{\sphinxupquote{MEKE\_ALPHA\_EADY}}
\\
\hline
\(\alpha_\Delta\)
&
\sphinxcode{\sphinxupquote{MEKE\_ALPHA\_GRID}}
\\
\hline
\(L_c\)
&
\sphinxcode{\sphinxupquote{MEKE\_FIXED\_MIXING\_LENGTH}}
\\
\hline
\(c_\beta\)
&
\sphinxcode{\sphinxupquote{MEKE\_TOPOGRAPHIC\_BETA}}
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{MEKE\_KHTH\_FAC}}
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{MEKE\_KHTR\_FAC}}
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Model parameter
\\
\hline
\(C_d\)
&
\sphinxcode{\sphinxupquote{CDRAG}}
\\
\hline
\end{tabulary}
\par
\sphinxattableend\end{savenotes}


\subparagraph{References}
\label{\detokenize{api/generated/modules/mom_meke:references}}\label{\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-references}}
Jansen, M. F., A. J. Adcroft, R. Hallberg, and I. M. Held, 2015: Parameterization of eddy fluxes based on a mesoscale energy budget. Ocean Modelling, 92, 28
41, \sphinxurl{http://doi.org/10.1016/j.ocemod.2015.05.007}.

Marshall, D. P., and A. J. Adcroft, 2010: Parameterization of ocean eddies: Potential vorticity mixing, energetics and Arnold first stability theorem. Ocean Modelling, 32, 188
204, \sphinxurl{http://doi.org/10.1016/j.ocemod.2010.02.001}.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_meke:type-documentation}}\index{meke\_cs (fortran type in module mom\_meke)@\spxentry{meke\_cs}\spxextra{fortran type in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_cs}}}
Control structure that contains MEKE parameters and diagnostics handles.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_meke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ue}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ub}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ut}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gm\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mom\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gme\_snk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khmeke\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khmeke\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ku}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_au}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_le}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gamma\_b}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gamma\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lrhines}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_leady}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_meke\_equilibrium}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{equilibrium\_value}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The equilbrium value of MEKE to be calculated at each time step {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_frcoeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Efficiency of conversion of ME into MEKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_gmcoeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Efficiency of conversion of PE into MEKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_gmecoeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Efficiency of conversion of MEKE into ME by GME {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_damping}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Local depth\sphinxhyphen{}independent MEKE dissipation rate {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_cd\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ratio of the bottom eddy velocity to the column mean eddy velocity, i.e. sqrt(2*MEKE). This should be less than 1 to account for the surface intensification of MEKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_cb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient in the

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_min\_gamma}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum value of gamma\_b\textasciicircum{}2 allowed {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_ct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient in the

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{visc\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true use the vertvisc\_type to calculate bottom drag.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_geometric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the GM coefficient formulation from the GEOMETRIC framework (Marshall et al., 2012)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_geometric\_alpha}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The nondimensional coefficient governing the efficiency of the GEOMETRIC thickness diffusion.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_equilibrium\_alt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use an alternative calculation for the equilibrium value of MEKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_equilibrium\_restoring}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, restore MEKE back to its equilibrium value, which is calculated at each time step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gm\_src\_alt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the GM energy conversion form S\textasciicircum{}2*N\textasciicircum{}2*kappa rather than the streamfunction for the MEKE GM source term.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rd\_as\_max\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true the length scale can not exceed the first baroclinic deformation radius.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_old\_lscale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use the old formula for mixing length scale.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_min\_lscale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use simple minimum for mixing length scale.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdrag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The bottom drag coefficient for MEKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_bgsrc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Background energy source for MEKE {[}L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W kg\sphinxhyphen{}1{]} (= m2 s\sphinxhyphen{}3).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_dtscale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Scale factor to accelerate time\sphinxhyphen{}stepping {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_khcoeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Scaling factor to convert MEKE into Kh {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_uscale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: MEKE velocity scale for bottom drag {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Background lateral diffusion of MEKE {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_k4}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Background bi\sphinxhyphen{}harmonic diffusivity (of MEKE) {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khmeke\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A factor relating MEKEKh to the diffusivity used for MEKE itself {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{viscosity\_coeff\_ku}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The scaling coefficient in the expression for viscosity used to parameterize lateral harmonic momentum mixing by unresolved eddies represented by MEKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{viscosity\_coeff\_au}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The scaling coefficient in the expression for viscosity used to parameterize lateral biharmonic momentum mixing by unresolved eddies represented by MEKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lfixed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fixed mixing length scale {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adeform}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weighting towards deformation scale of mixing length {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{arhines}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weighting towards Rhines scale of mixing length {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{africt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weighting towards frictional arrest scale of mixing length {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{aeady}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weighting towards Eady scale of mixing length {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{agrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weighting towards grid scale of mixing length {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_advection\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling in front of the advection of MEKE {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_topographic\_beta}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weight for how much topographic beta is considered when computing beta in Rhines scale {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_restoring\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Inverse of the timescale used to nudge MEKE toward its equilibrium value {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh\_flux\_enabled}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, lateral diffusive MEKE flux is enabled.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{initialize}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, invokes a steady state solver to calculate MEKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write out checksums of data for debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A type that regulates diagnostics output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_clock\_pass}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Clock for group pass calls.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_meke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Group halo pass handle for MEKEMEKE and maybe MEKEKh\_diff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Group halo pass handle for MEKEKh, MEKEKu, and/or MEKEAu.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_meke:function-subroutine-documentation}}\index{step\_forward\_meke() (fortran subroutine in module mom\_meke)@\spxentry{step\_forward\_meke()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{step\_forward\_meke}}}{\emph{MEKE}, \emph{h}, \emph{SN\_u}, \emph{SN\_v}, \emph{visc}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{hu}, \emph{hv}}{}
Integrates forward\sphinxhyphen{}in\sphinxhyphen{}time the MEKE eddy energy equation. See {\hyperref[\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-equations}]{\sphinxcrossref{\DUrole{std,std-ref}{MEKE equations}}}}
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{meke} :: MEKE data.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{sn\_u} :: {[}in{]} Eady growth rate at u\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{sn\_v} :: {[}in{]} Eady growth rate at v\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} The vertical viscosity type.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Model(baroclinic) time\sphinxhyphen{}step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: MEKE control structure.

\item {} 
\sphinxstylestrong{hu} :: {[}in{]} Accumlated zonal mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}.

\item {} 
\sphinxstylestrong{hv} :: {[}in{]} Accumlated meridional mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_equilibrium}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium_restoring}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_equilibrium\_restoring}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_lengthscales}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_equilibrium() (fortran subroutine in module mom\_meke)@\spxentry{meke\_equilibrium()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_equilibrium}}}{\emph{CS}, \emph{MEKE}, \emph{G}, \emph{GV}, \emph{US}, \emph{SN\_u}, \emph{SN\_v}, \emph{drag\_rate\_visc}, \emph{I\_mass}}{}
Calculates the equilibrium solutino where the source depends only on MEKE diffusivity and there is no lateral diffusion of MEKE. Results is in MEKEMEKE.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: MEKE control structure.

\item {} 
\sphinxstylestrong{meke} :: A structure with MEKE data.

\item {} 
\sphinxstylestrong{sn\_u} :: {[}in{]} Eady growth rate at u\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{sn\_v} :: {[}in{]} Eady growth rate at v\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{drag\_rate\_visc} :: {[}in{]} Mean flow velocity contribution to the MEKE drag rate {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{i\_mass} :: {[}in{]} Inverse of column mass {[}R\sphinxhyphen{}1 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_lengthscales\_0d}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_forward\_meke}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_equilibrium\_restoring() (fortran subroutine in module mom\_meke)@\spxentry{meke\_equilibrium\_restoring()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium_restoring}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_equilibrium\_restoring}}}{\emph{CS}, \emph{G}, \emph{US}, \emph{SN\_u}, \emph{SN\_v}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type.

\item {} 
\sphinxstylestrong{cs} :: MEKE control structure.

\item {} 
\sphinxstylestrong{sn\_u} :: {[}in{]} Eady growth rate at u\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{sn\_v} :: {[}in{]} Eady growth rate at v\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_forward\_meke}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_lengthscales() (fortran subroutine in module mom\_meke)@\spxentry{meke\_lengthscales()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_lengthscales}}}{\emph{CS}, \emph{MEKE}, \emph{G}, \emph{GV}, \emph{US}, \emph{SN\_u}, \emph{SN\_v}, \emph{EKE}, \emph{bottomFac2}, \emph{barotrFac2}, \emph{LmixScale}}{}
Calculates the eddy mixing length scale and
\(\gamma_b\) and \(\gamma_t\) functions that are ratios of either bottom or barotropic eddy energy to the column eddy energy, respectively. See {\hyperref[\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-equations}]{\sphinxcrossref{\DUrole{std,std-ref}{MEKE equations}}}} .
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: MEKE control structure.

\item {} 
\sphinxstylestrong{meke} :: MEKE data.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{sn\_u} :: {[}in{]} Eady growth rate at u\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{sn\_v} :: {[}in{]} Eady growth rate at v\sphinxhyphen{}points {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{eke} :: {[}in{]} Eddy kinetic energy {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bottomfac2} :: {[}out{]} gamma\_b\textasciicircum{}2

\item {} 
\sphinxstylestrong{barotrfac2} :: {[}out{]} gamma\_t\textasciicircum{}2

\item {} 
\sphinxstylestrong{lmixscale} :: {[}out{]} Eddy mixing length {[}L \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_lengthscales\_0d}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/step_forward_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step\_forward\_meke}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_lengthscales\_0d() (fortran subroutine in module mom\_meke)@\spxentry{meke\_lengthscales\_0d()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_lengthscales\_0d}}}{\emph{CS}, \emph{US}, \emph{area}, \emph{beta}, \emph{depth}, \emph{Rd\_dx}, \emph{SN}, \emph{EKE}, \emph{bottomFac2}, \emph{barotrFac2}, \emph{LmixScale}, \emph{Lrhines}, \emph{Leady}}{}
Calculates the eddy mixing length scale and
\(\gamma_b\) and \(\gamma_t\) functions that are ratios of either bottom or barotropic eddy energy to the column eddy energy, respectively. See {\hyperref[\detokenize{api/generated/modules/mom_meke:namespacemom-meke-1section-meke-equations}]{\sphinxcrossref{\DUrole{std,std-ref}{MEKE equations}}}} .
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: MEKE control structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{area} :: {[}in{]} Grid cell area {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{beta} :: {[}in{]} Planetary beta = \(\nabla f\) {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Ocean depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{rd\_dx} :: {[}in{]} Resolution Ld/dx {[}nondim{]}.

\item {} 
\sphinxstylestrong{sn} :: {[}in{]} Eady growth rate {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{eke} :: {[}in{]} Eddy kinetic energy {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{bottomfac2} :: {[}out{]} gamma\_b\textasciicircum{}2

\item {} 
\sphinxstylestrong{barotrfac2} :: {[}out{]} gamma\_t\textasciicircum{}2

\item {} 
\sphinxstylestrong{lmixscale} :: {[}out{]} Eddy mixing length {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{lrhines} :: {[}out{]} Rhines length scale {[}L \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{leady} :: {[}out{]} Eady length scale {[}L \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_equilibrium}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_equilibrium}}}}} {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_lengthscales}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_lengthscales}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_init() (fortran function in module mom\_meke)@\spxentry{meke\_init()}\spxextra{fortran function in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{MEKE}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initializes the MOM\_MEKE module and reads parameters. Returns True if module is to be used, otherwise returns False.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file parser structure.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics structure.

\item {} 
\sphinxstylestrong{cs} :: MEKE control structure.

\item {} 
\sphinxstylestrong{meke} :: MEKE\sphinxhyphen{}related fields.

\item {} 
\sphinxstylestrong{restart\_cs} :: Restart control structure for MOM\_MEKE.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_alloc\_register\_restart() (fortran subroutine in module mom\_meke)@\spxentry{meke\_alloc\_register\_restart()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_alloc_register_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_alloc\_register\_restart}}}{\emph{HI}, \emph{param\_file}, \emph{MEKE}, \emph{restart\_CS}}{}
Allocates memory and register restart fields for the MOM\_MEKE module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file parser structure.

\item {} 
\sphinxstylestrong{meke} :: A structure with MEKE\sphinxhyphen{}related fields.

\item {} 
\sphinxstylestrong{restart\_cs} :: Restart control structure for MOM\_MEKE.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{meke\_end() (fortran subroutine in module mom\_meke)@\spxentry{meke\_end()}\spxextra{fortran subroutine in module mom\_meke}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke:f/mom_meke/meke_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_meke/}}\sphinxbfcode{\sphinxupquote{meke\_end}}}{\emph{MEKE}, \emph{CS}}{}
Deallocates any variables allocated in MEKE\_init or MEKE\_alloc\_register\_restart.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{meke} :: A structure with MEKE\sphinxhyphen{}related fields.

\item {} 
\sphinxstylestrong{cs} :: The control structure for MOM\_MEKE.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_meke\_types module reference}
\label{\detokenize{api/generated/modules/mom_meke_types:f/mom_meke_types}}\label{\detokenize{api/generated/modules/mom_meke_types:mom-meke-types-module-reference}}\label{\detokenize{api/generated/modules/mom_meke_types::doc}}\index{mom\_meke\_types (module)@\spxentry{mom\_meke\_types}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/mom_meke_types:detamom-meke-types}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_meke_types:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_meke_types:f/mom_meke_types/meke_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meke\_type}}}}}
&
This type is used to exchange information related to the MEKE calculations.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_meke_types:detailed-description}}\label{\detokenize{api/generated/modules/mom_meke_types:detamom-meke-types}}
\textless{}undocumented\textgreater{}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_meke_types:type-documentation}}\index{meke\_type (fortran type in module mom\_meke\_types)@\spxentry{meke\_type}\spxextra{fortran type in module mom\_meke\_types}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_meke_types:f/mom_meke_types/meke_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_meke\_types/}}\sphinxbfcode{\sphinxupquote{meke\_type}}}
This type is used to exchange information related to the MEKE calculations.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Vertically averaged eddy kinetic energy {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gm\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: MEKE source due to thickness mixing (GM) {[}R Z L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mom\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: MEKE source from lateral friction in the momentum equations {[}R Z L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gme\_snk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: MEKE sink from GME backscatter in the momentum equations {[}R Z L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The MEKE\sphinxhyphen{}derived lateral mixing coefficient {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh\_diff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Uses the non\sphinxhyphen{}MEKE\sphinxhyphen{}derived thickness diffusion coefficient to diffuse.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rd\_dx\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The deformation radius compared with the grid spacing {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ku}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The MEKE\sphinxhyphen{}derived lateral viscosity coefficient {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. This viscosity can be negative when representing backscatter from unresolved eddies (see Jansen and Held, 2014).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{au}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The MEKE\sphinxhyphen{}derived lateral biharmonic viscosity coefficient {[}L4 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m4 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khth\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Multiplier to map Kh(MEKE) to KhTh {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr\_fac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Multiplier to map Kh(MEKE) to KhTr {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{backscatter\_ro\_pow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Power in Rossby number function for backscatter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{backscatter\_ro\_c}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient in Rossby number function for backscatter.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_mixed\_layer\_restrat module reference}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:mom-mixed-layer-restrat-module-reference}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat::doc}}\index{mom\_mixed\_layer\_restrat (module)@\spxentry{mom\_mixed\_layer\_restrat}\spxextra{module}|spxpagem}
Parameterization of mixed layer restratification by unresolved mixed\sphinxhyphen{}layer eddies.

{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:detamom-mixed-layer-restrat}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_cs}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat()}}}}}
&
Driver for the mixed\sphinxhyphen{}layer restratification parameterization.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_general}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_general()}}}}}
&
Calculates a restratifying flow in the mixed layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_bml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_bml()}}}}}
&
Calculates a restratifying flow assuming a 2\sphinxhyphen{}layer bulk mixed layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_init()}}}}}
&
Initialize the mixed layer restratification module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_register\_restarts()}}}}}
&
Allocate and register fields in the mixed layer restratification structure for restarts.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:detailed-description}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:detamom-mixed-layer-restrat}}

\paragraph{Mixed\sphinxhyphen{}layer eddy parameterization module}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:mixed-layer-eddy-parameterization-module}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:namespacemom-mixed-layer-restrat-1section-mle}}
The subroutines in this file implement a parameterization of unresolved viscous mixed layer restratification of the mixed layer as described in Fox\sphinxhyphen{}Kemper et al., 2008, and whose impacts are described in Fox\sphinxhyphen{}Kemper et al., 2011. This is derived in part from the older parameterization that is described in Hallberg (Aha Hulikoa, 2003), which this new parameterization surpasses, which in turn is based on the sub\sphinxhyphen{}inertial mixed layer theory of Young (JPO, 1994). There is no net horizontal volume transport due to this parameterization, and no direct effect below the mixed layer.

This parameterization sets the restratification timescale to agree with high\sphinxhyphen{}resolution studies of mixed layer restratification.

The run\sphinxhyphen{}time parameter FOX\_KEMPER\_ML\_RESTRAT\_COEF is a non\sphinxhyphen{}dimensional number of order a few tens, proportional to the ratio of the deformation radius or the grid scale (whichever is smaller to the dominant horizontal length\sphinxhyphen{}scale of the sub\sphinxhyphen{}meso\sphinxhyphen{}scale mixed layer instabilities.


\subparagraph{“Sub\sphinxhyphen{}meso” in a nutshell}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:sub-meso-in-a-nutshell}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:namespacemom-mixed-layer-restrat-1section-mle-nutshell}}
The parameterization is colloquially referred to as “sub\sphinxhyphen{}meso”.

The original Fox\sphinxhyphen{}Kemper et al., (2008b) paper proposed a quasi\sphinxhyphen{}Stokes advection described by the stream function (eq. 5 of Fox\sphinxhyphen{}Kemper et al., 2011):
\begin{equation*}
\begin{split}{\bf \Psi}_o = C_e \frac{ H^2 \nabla \bar{b} \times \hat{\bf z} }{ |f| } \mu(z)\end{split}
\end{equation*}
where the vertical profile function is
\begin{equation*}
\begin{split}\mu(z) = \max \left\{ 0, \left[ 1 - \left(\frac{2z}{H}+1\right)^2 \right] \left[ 1 + \frac{5}{21} \left(\frac{2z}{H}+1\right)^2 \right] \right\}\end{split}
\end{equation*}
and \(H\) is the mixed\sphinxhyphen{}layer depth, \(f\) is the local Coriolis parameter, \(C_e \sim 0.06-0.08\) and \(\nabla \bar{b}\) is a depth mean buoyancy gradient averaged over the mixed layer.

For use in coarse\sphinxhyphen{}resolution models, an upscaling of the buoyancy gradients and adaption for the equator leads to the following parameterization (eq. 6 of Fox\sphinxhyphen{}Kemper et al., 2011):
\begin{equation*}
\begin{split}{\bf \Psi} = C_e \Gamma_\Delta \frac{\Delta s}{l_f} \frac{ H^2 \nabla \bar{b} \times \hat{\bf z} } { \sqrt{ f^2 + \tau^{-2}} } \mu(z)\end{split}
\end{equation*}
where \(\Delta s\) is the minimum of grid\sphinxhyphen{}scale and deformation radius, \(l_f\) is the width of the mixed\sphinxhyphen{}layer fronts, and \(\Gamma_\Delta=1\) . \(\tau\) is a time\sphinxhyphen{}scale for mixing momentum across the mixed layer. \(l_f\) is thought to be of order hundreds of meters.

The upscaling factor
\(\frac{\Delta s}{l_f}\) can be a global constant, model parameter FOX\_KEMPER\_ML\_RESTRAT, so that in practice the parameterization is:
\begin{equation*}
\begin{split}{\bf \Psi} = C_e \Gamma_\Delta \frac{ H^2 \nabla \bar{b} \times \hat{\bf z} }{ \sqrt{ f^2 + \tau^{-2}} } \mu(z)\end{split}
\end{equation*}
with non\sphinxhyphen{}unity \(\Gamma_\Delta\) .

\(C_e\) is hard\sphinxhyphen{}coded as 0.0625. \(\tau\) is calculated from the surface friction velocity \(u^*\) .
.. admonition:: Todo
\begin{quote}

Explain expression for momentum mixing time\sphinxhyphen{}scale.
\end{quote}


\subparagraph{Time\sphinxhyphen{}filtering of mixed\sphinxhyphen{}layer depth}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:time-filtering-of-mixed-layer-depth}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:namespacemom-mixed-layer-restrat-1section-mle-filtering}}
Using the instantaneous mixed\sphinxhyphen{}layer depth is inconsistent with the finite life\sphinxhyphen{}time of mixed\sphinxhyphen{}layer instabilities. We provide a one\sphinxhyphen{}sided running\sphinxhyphen{}mean filter of mixed\sphinxhyphen{}layer depth,
\(H\) , of the form:
\begin{equation*}
\begin{split}\bar{H} \leftarrow \max \left( H, \frac{ \Delta t H + \tau_h \bar{H} }{ \Delta t + \tau_h } \right)\end{split}
\end{equation*}
which allows the effective mixed\sphinxhyphen{}layer depth seen by the parameterization, \(\bar{H}\) , to instantaneously deepen but to decay with time\sphinxhyphen{}scale \(\tau_h\) . \(\bar{H}\) is substituted for \(H\) in the above equations.


\subparagraph{Defining the mixed\sphinxhyphen{}layer\sphinxhyphen{}depth}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:defining-the-mixed-layer-depth}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:namespacemom-mixed-layer-restrat-1section-mle-mld}}
If the parameter MLE\_USE\_PBL\_MLD=True then the mixed\sphinxhyphen{}layer depth is defined/diagnosed by the boundary\sphinxhyphen{}layer parameterization (e.g. ePBL, KPP, etc.).

If the parameter MLE\_USE\_PBL\_MLD=False then the mixed\sphinxhyphen{}layer depth is diagnosed in this module as the depth of a given density difference,
\(\Delta \rho\) , with the surface where the density difference is the parameter MLE\_DENSITY\_DIFF.


\subparagraph{References}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:references}}\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:namespacemom-mixed-layer-restrat-1section-mle-ref}}
Fox\sphinxhyphen{}Kemper, B., Ferrari, R. and Hallberg, R., 2008: Parameterization of Mixed Layer Eddies. Part I: Theory and Diagnosis J. Phys. Oceangraphy, 38 (6), p1145\sphinxhyphen{}1165.
\sphinxurl{https://doi.org/10.1175/2007JPO3792.1}

Fox\sphinxhyphen{}Kemper, B. and Ferrari, R. 2008: Parameterization of Mixed Layer Eddies. Part II: Prognosis and Impact J. Phys. Oceangraphy, 38 (6), p1166\sphinxhyphen{}1179.
\sphinxurl{https://doi.org/10.1175/2007JPO3788.1}

B. Fox\sphinxhyphen{}Kemper, G. Danabasoglu, R. Ferrari, S.M. Griffies, R.W. Hallberg, M.M. Holland, M.E. Maltrud, S. Peacock, and B.L. Samuels, 2011: Parameterization of mixed layer eddies. III: Implementation and impact in global ocean climate simulations. Ocean Modell., 39(1), p61\sphinxhyphen{}78.
\sphinxurl{https://doi.org/10.1016/j.ocemod.2010.09.002}


\begin{savenotes}\sphinxattablestart
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Module parameter
\\
\hline
\(\Gamma_\Delta\)
&
FOX\_KEMPER\_ML\_RESTRAT
\\
\hline
\(l_f\)
&
MLE\_FRONT\_LENGTH
\\
\hline
\(\tau_h\)
&
MLE\_MLD\_DECAY\_TIME
\\
\hline
\(\Delta \rho\)
&
MLE\_DENSITY\_DIFF
\\
\hline
\end{tabulary}
\par
\sphinxattableend\end{savenotes}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:type-documentation}}\index{mixedlayer\_restrat\_cs (fortran type in module mom\_mixed\_layer\_restrat)@\spxentry{mixedlayer\_restrat\_cs}\spxextra{fortran type in module mom\_mixed\_layer\_restrat}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat\_cs}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat()}}}}}.
.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_urestrat\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vrestrat\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_mld}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_rml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_udml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vdml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_restrat\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A non\sphinxhyphen{}dimensional factor by which the instability is enhanced over what would be predicted based on the resolved gradients {[}nondim{]}. This increases with grid spacing\textasciicircum{}2, up to something of order 500.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_restrat\_coef2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: As for ml\_restrat\_coef but using the slow filtered MLD {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{front\_length}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If non\sphinxhyphen{}zero, is the frontal\sphinxhyphen{}length scale {[}L \textasciitilde{}\textgreater{} m{]} used to calculate the upscaling of buoyancy gradients that is otherwise represented by the parameter FOX\_KEMPER\_ML\_RESTRAT\_COEF. If MLE\_FRONT\_LENGTH is non\sphinxhyphen{}zero, it is recommended to set FOX\_KEMPER\_ML\_RESTRAT\_COEF=1.0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mle\_use\_pbl\_mld}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the MLD provided by the PBL parameterization. if false, MLE will calculate a MLD based on a density difference based on the parameter MLE\_DENSITY\_DIFF.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mle\_mld\_decay\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Time\sphinxhyphen{}scale to use in a running\sphinxhyphen{}mean when MLD is retreating {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mle\_mld\_decay\_time2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Time\sphinxhyphen{}scale to use in a running\sphinxhyphen{}mean when filtered MLD is retreating {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mle\_density\_diff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Density difference used in detecting mixed\sphinxhyphen{}layer depth {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mle\_tail\_dh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fraction by which to extend the mixed\sphinxhyphen{}layer restratification depth used for a smoother stream function at the base of the mixed\sphinxhyphen{}layer {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mle\_mld\_stretch}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling coefficient for stretching/shrinking the MLD used in the MLE scheme {[}nondim{]}. This simply multiplies MLD wherever used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate checksums of fields for debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_filtered}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Time\sphinxhyphen{}filtered MLD {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_filtered\_slow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Slower time\sphinxhyphen{}filtered MLD {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:function-subroutine-documentation}}\index{mixedlayer\_restrat() (fortran subroutine in module mom\_mixed\_layer\_restrat)@\spxentry{mixedlayer\_restrat()}\spxextra{fortran subroutine in module mom\_mixed\_layer\_restrat}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat}}}{\emph{h}, \emph{uhtr}, \emph{vhtr}, \emph{tv}, \emph{forces}, \emph{dt}, \emph{MLD}, \emph{VarMix}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Driver for the mixed\sphinxhyphen{}layer restratification parameterization. The code branches between two different implementations depending on whether the bulk\sphinxhyphen{}mixed layer or a general coordinate are in use.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Accumulated zonal mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Accumulated meridional mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables structure

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{mld} :: Mixed layer depth provided by the PBL scheme {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{varmix} :: Container for derived fields

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_bml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_bml}}}}} {\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_general}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat\_general}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_restrat\_general() (fortran subroutine in module mom\_mixed\_layer\_restrat)@\spxentry{mixedlayer\_restrat\_general()}\spxextra{fortran subroutine in module mom\_mixed\_layer\_restrat}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_general}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat\_general}}}{\emph{h}, \emph{uhtr}, \emph{vhtr}, \emph{tv}, \emph{forces}, \emph{dt}, \emph{MLD\_in}, \emph{VarMix}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calculates a restratifying flow in the mixed layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Accumulated zonal mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Accumulated meridional mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables structure

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{mld\_in} :: Mixed layer depth provided by the PBL scheme {[}Z \textasciitilde{}\textgreater{} m{]} (not H)

\item {} 
\sphinxstylestrong{varmix} :: Container for derived fields

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_update\_remap\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_restrat\_bml() (fortran subroutine in module mom\_mixed\_layer\_restrat)@\spxentry{mixedlayer\_restrat\_bml()}\spxextra{fortran subroutine in module mom\_mixed\_layer\_restrat}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_bml}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat\_bml}}}{\emph{h}, \emph{uhtr}, \emph{vhtr}, \emph{tv}, \emph{forces}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calculates a restratifying flow assuming a 2\sphinxhyphen{}layer bulk mixed layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Accumulated zonal mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Accumulated meridional mass flux {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables structure

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mixedlayer\_restrat}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_restrat\_init() (fortran function in module mom\_mixed\_layer\_restrat)@\spxentry{mixedlayer\_restrat\_init()}\spxextra{fortran function in module mom\_mixed\_layer\_restrat}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initialize the mixed layer restratification module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file to parse

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Regulate diagnostics

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mixedlayer\_restrat\_register\_restarts() (fortran subroutine in module mom\_mixed\_layer\_restrat)@\spxentry{mixedlayer\_restrat\_register\_restarts()}\spxextra{fortran subroutine in module mom\_mixed\_layer\_restrat}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_mixed_layer_restrat:f/mom_mixed_layer_restrat/mixedlayer_restrat_register_restarts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_mixed\_layer\_restrat/}}\sphinxbfcode{\sphinxupquote{mixedlayer\_restrat\_register\_restarts}}}{\emph{HI}, \emph{param\_file}, \emph{CS}, \emph{restart\_CS}}{}
Allocate and register fields in the mixed layer restratification structure for restarts.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file to parse

\item {} 
\sphinxstylestrong{cs} :: Module control structure

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_neutral\_diffusion module reference}
\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion}}\label{\detokenize{api/generated/modules/mom_neutral_diffusion:mom-neutral-diffusion-module-reference}}\label{\detokenize{api/generated/modules/mom_neutral_diffusion::doc}}\index{mom\_neutral\_diffusion (module)@\spxentry{mom\_neutral\_diffusion}\spxextra{module}|spxpagem}
A column\sphinxhyphen{}wise toolbox for implementing neutral diffusion.

{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:detamom-neutral-diffusion}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_neutral_diffusion:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_cs}}}}}
&
The control structure for the MOM\_neutral\_diffusion module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_neutral_diffusion:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_init()}}}}}
&
Read parameters and allocate control structure for neutral\_diffusion module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_calc\_coeffs()}}}}}
&
Calculate remapping factors for u/v columns used to map adjoining columns to a shared coordinate space.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion()}}}}}
&
Update tracer concentration due to neutral diffusion; layer thickness unchanged by this update.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interface\_scalar()}}}}}
&
Returns interface scalar, Si, for a column of layer values, S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_edge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_edge()}}}}}
&
Returns the PPM quasi\sphinxhyphen{}fourth order edge value at k+1/2 following equation 1.6 in Colella \& Woodward, 1984: JCP 54, 174\sphinxhyphen{}201.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_ave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_ave()}}}}}
&
Returns the average of a PPM reconstruction between two fractional positions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/signum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{signum()}}}}}
&
A true signum function that returns either \sphinxhyphen{}abs(a), when x\textless{}0; or abs(a) when x\textgreater{}0; or 0 when x=0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/plm_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_diff()}}}}}
&
Returns PLM slopes for a column where the slopes are the difference in value across each cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fv_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fv\_diff()}}}}}
&
Returns the cell\sphinxhyphen{}centered second\sphinxhyphen{}order finite volume (unlimited PLM) slope using three consecutive cell widths and average values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fvlsq_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fvlsq\_slope()}}}}}
&
Returns the cell\sphinxhyphen{}centered second\sphinxhyphen{}order weighted least squares slope using three consecutive cell widths and average values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_continuous()}}}}}
&
Returns positions within left/right columns of combined interfaces using continuous reconstructions of T/S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interpolate_for_nondim_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_for\_nondim\_position()}}}}}
&
Returns the non\sphinxhyphen{}dimensional position between Pneg and Ppos where the interpolated density difference equals zero.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous()}}}}}
&
Higher order version of find\_neutral\_surface\_positions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/mark_unstable_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mark\_unstable\_cells()}}}}}
&
Sweep down through the column and mark as stable if the bottom interface of a cell is denser than the top.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{search\_other\_column()}}}}}
&
Searches the “other” (searched) column for the position of the neutral surface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/increment_interface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_interface()}}}}}
&
Increments the interface which was just connected and also set flags if the bottom is reached.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_pos\_linear()}}}}}
&
Search a layer to find where delta\_rho = 0 based on a linear interpolation of alpha and beta of the top and bottom being searched and polynomial reconstructions of T and S.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_full}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_pos\_full()}}}}}
&
Use the full equation of state to calculate the difference in locally referenced potential density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs()}}}}}
&
Calculate the difference in density between two points in a variety of ways.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/delta_rho_from_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delta\_rho\_from\_derivs()}}}}}
&
Calculate delta rho from derivatives and gradients of properties \(\Delta \rho = \frac{1}{2}\left[ (\alpha_1 + \alpha_2)*(T_1-T_2) + (\beta_1 + \beta_2)*(S_1-S_2) + (\gamma^{-1}_1 + \gamma^{-1}_2)*(P_1-P_2) \right]\) .
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absolute\_position()}}}}}
&
Converts non\sphinxhyphen{}dimensional position within a layer to absolute position (for debugging)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_positions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absolute\_positions()}}}}}
&
Converts non\sphinxhyphen{}dimensional positions within layers to absolute positions (for debugging)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux()}}}}}
&
Returns a single column of neutral diffusion fluxes of a tracer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_t_eval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_t\_eval()}}}}}
&
Evaluate various parts of the reconstructions to calculate gradient\sphinxhyphen{}based flux limter.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_left_right_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_left\_right\_edge\_values()}}}}}
&
Discontinuous PPM reconstructions of the left/right edge values within a cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_unit\_tests()}}}}}
&
Returns true if unit tests of neutral\_diffusion functions fail.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous()}}}}}
&
Returns true if unit tests of neutral\_diffusion functions fail.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fv_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fv\_diff()}}}}}
&
Returns true if a test of \sphinxcode{\sphinxupquote{fv\_diff()}} fails, and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fvlsq_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fvlsq\_slope()}}}}}
&
Returns true if a test of \sphinxcode{\sphinxupquote{fvlsq\_slope()}} fails, and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_ifndp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_ifndp()}}}}}
&
Returns true if a test of \sphinxcode{\sphinxupquote{interpolate\_for\_nondim\_position()}} fails, and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_data1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_data1d()}}}}}
&
Returns true if comparison of Po and Ptrue fails, and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_data1di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_data1di()}}}}}
&
Returns true if comparison of Po and Ptrue fails, and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_nsp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_nsp()}}}}}
&
Returns true if output of find\_neutral\_surface\_positions() does not match correct values, and conditionally writes results to stream.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/compare_nsp_row}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{compare\_nsp\_row()}}}}}
&
Compares a single row, k, of output from find\_neutral\_surface\_positions()
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_rnp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_rnp()}}}}}
&
Compares output position from refine\_nondim\_position with an expected value.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_end()}}}}}
&
Deallocates neutral\_diffusion control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_neutral_diffusion:detailed-description}}\label{\detokenize{api/generated/modules/mom_neutral_diffusion:detamom-neutral-diffusion}}
A column\sphinxhyphen{}wise toolbox for implementing neutral diffusion.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_neutral_diffusion:type-documentation}}\index{neutral\_diffusion\_cs (fortran type in module mom\_neutral\_diffusion)@\spxentry{neutral\_diffusion\_cs}\spxextra{fortran type in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion\_cs}}}
The control structure for the MOM\_neutral\_diffusion module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkp1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of interfaces for a column = nk + 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nsurf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of neutral surfaces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{deg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Degree of polynomial used for reconstructions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{continuous\_reconstruction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if using continuous PPM reconstruction at interfaces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose debugging messages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hard\_fail\_heff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Bring down the model if a problem with heff is detected.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_iter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Maximum number of iterations if refine\_position is defined.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drho\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convergence criterion representing density difference from true neutrality {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convergence criterion for how small an update of the position can be.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_pres}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Reference pressure, negative if using locally referenced neutral density {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interior\_only}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, only applies neutral diffusion in the ocean interior. That is, the algorithm will exclude the surface and bottom boundary layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{upol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional position with left layer uKoL\sphinxhyphen{}1, u\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{upor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional position with right layer uKoR\sphinxhyphen{}1, u\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ukol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Index of left interface corresponding to neutral surface, at a u\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ukor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Index of right interface corresponding to neutral surface, at a u\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uheff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Effective thickness at u\sphinxhyphen{}point {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vpol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional position with left layer uKoL\sphinxhyphen{}1, v\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vpor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Non\sphinxhyphen{}dimensional position with right layer uKoR\sphinxhyphen{}1, v\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vkol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Index of left interface corresponding to neutral surface, at a v\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vkor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Index of right interface corresponding to neutral surface, at a v\sphinxhyphen{}point.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vheff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Effective thickness at v\sphinxhyphen{}point {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ppoly\_coeffs\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Polynomial coefficients for temperature.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ppoly\_coeffs\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Polynomial coefficients for salinity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drdt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dRho/dT {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]} at interfaces

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dRho/dS {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]} at interfaces

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tint}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Interface T {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sint}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Interface S {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pint}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Interface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Top edge reconstruction of temperature {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Top edge reconstruction of salinity {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Interface pressures {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drdt\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dRho/dT {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]} at top edge

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drds\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: dRho/dS {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]} at top edge

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ns}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Number of interfacs in a column.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stable\_cell}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: True if the cell is stably stratified wrt to the next cell.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{r\_to\_kg\_m3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A rescaling factor translating density to kg m\sphinxhyphen{}3 for use in diagnostic messages {[}kg m\sphinxhyphen{}3 R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} 1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{neutral\_pos\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Method to find the position of a neutral surface within the layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{delta\_rho\_form}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: Determine which (if any) approximation is made to the equation describing the difference in density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uheff\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vheff\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eos}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(eos\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Equation of state parameters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: Remapping control structure used to create sublayers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers for remapping from the end of 2018. Otherwise, use more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kpp\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(kpp\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: KPP control structure needed to get BLD.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energetic\_pbl\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(energetic\_pbl\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ePBL control structure needed to get MLD

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_neutral_diffusion:function-subroutine-documentation}}\index{neutral\_diffusion\_init() (fortran function in module mom\_neutral\_diffusion)@\spxentry{neutral\_diffusion\_init()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{EOS}, \emph{diabatic\_CSp}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Read parameters and allocate control structure for neutral\_diffusion module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Time structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eos} :: {[}in{]} Equation of state

\item {} 
\sphinxstylestrong{diabatic\_csp} :: KPP control structure needed to get BLD

\item {} 
\sphinxstylestrong{cs} :: Neutral diffusion control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/extract_diabatic_member}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::extract\_diabatic\_member}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_remapping::remappingdefaultscheme}} \sphinxcode{\sphinxupquote{mom\_remapping::remappingschemesdoc}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neutral\_diffusion\_calc\_coeffs() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{neutral\_diffusion\_calc\_coeffs()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion\_calc\_coeffs}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{T}, \emph{S}, \emph{CS}, \emph{p\_surf}}{}
Calculate remapping factors for u/v columns used to map adjoining columns to a shared coordinate space.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{cs} :: Neutral diffusion control structure

\item {} 
\sphinxstylestrong{p\_surf} :: {[}in{]} Surface pressure to include in pressures used for equation of state calculations {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/boundary_k_range}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::boundary\_k\_range}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_get_mld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_get\_mld}}}}} {\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polynomial\_functions::evaluation\_polynomial}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interface\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_get_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_get\_bld}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/mark_unstable_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mark\_unstable\_cells}}}}} \sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::surface}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neutral\_diffusion() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{neutral\_diffusion()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{Coef\_x}, \emph{Coef\_y}, \emph{dt}, \emph{Reg}, \emph{US}, \emph{CS}}{}
Update tracer concentration due to neutral diffusion; layer thickness unchanged by this update.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{coef\_x} :: {[}in{]} dt * Kh * dy / dx at u\sphinxhyphen{}points {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{coef\_y} :: {[}in{]} dt * Kh * dx / dy at v\sphinxhyphen{}points {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Tracer time step * I\_numitts {[}T \textasciitilde{}\textgreater{} s{]} (I\_numitts in tracer\_hordiff)

\item {} 
\sphinxstylestrong{reg} :: Tracer registry

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Neutral diffusion control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{interface\_scalar() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{interface\_scalar()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{interface\_scalar}}}{\emph{nk}, \emph{h}, \emph{S}, \emph{Si}, \emph{i\_method}, \emph{h\_neglect}}{}
Returns interface scalar, Si, for a column of layer values, S.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Layer scalar (conc, e.g. ppt)

\item {} 
\sphinxstylestrong{si} :: {[}inout{]} Interface scalar (conc, e.g. ppt)

\item {} 
\sphinxstylestrong{i\_method} :: {[}in{]} =1 use average of PLM edges =2 use continuous PPM edge interpolation

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/plm_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_edge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_edge}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_calc\_coeffs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_edge() (fortran function in module mom\_neutral\_diffusion)@\spxentry{ppm\_edge()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_edge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{ppm\_edge}}}{\emph{hkm1}, \emph{hk}, \emph{hkp1}, \emph{hkp2}, \emph{Ak}, \emph{Akp1}, \emph{Pk}, \emph{Pkp1}, \emph{h\_neglect}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the PPM quasi\sphinxhyphen{}fourth order edge value at k+1/2 following equation 1.6 in Colella \& Woodward, 1984: JCP 54, 174\sphinxhyphen{}201.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hkm1} :: {[}in{]} Width of cell k\sphinxhyphen{}1

\item {} 
\sphinxstylestrong{hk} :: {[}in{]} Width of cell k

\item {} 
\sphinxstylestrong{hkp1} :: {[}in{]} Width of cell k+1

\item {} 
\sphinxstylestrong{hkp2} :: {[}in{]} Width of cell k+2

\item {} 
\sphinxstylestrong{ak} :: {[}in{]} Average scalar value of cell k

\item {} 
\sphinxstylestrong{akp1} :: {[}in{]} Average scalar value of cell k+1

\item {} 
\sphinxstylestrong{pk} :: {[}in{]} PLM slope for cell k

\item {} 
\sphinxstylestrong{pkp1} :: {[}in{]} PLM slope for cell k+1

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interface\_scalar}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_ave() (fortran function in module mom\_neutral\_diffusion)@\spxentry{ppm\_ave()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_ave}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{ppm\_ave}}}{\emph{xL}, \emph{xR}, \emph{aL}, \emph{aR}, \emph{aMean}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the average of a PPM reconstruction between two fractional positions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{xl} :: {[}in{]} Fraction position of left bound (0,1)

\item {} 
\sphinxstylestrong{xr} :: {[}in{]} Fraction position of right bound (0,1)

\item {} 
\sphinxstylestrong{al} :: {[}in{]} Left edge scalar value, at x=0

\item {} 
\sphinxstylestrong{ar} :: {[}in{]} Right edge scalar value, at x=1

\item {} 
\sphinxstylestrong{amean} :: {[}in{]} Average scalar value of cell

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{signum() (fortran function in module mom\_neutral\_diffusion)@\spxentry{signum()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/signum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{signum}}}{\emph{a}, \emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A true signum function that returns either \sphinxhyphen{}abs(a), when x\textless{}0; or abs(a) when x\textgreater{}0; or 0 when x=0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a} :: {[}in{]} The magnitude argument

\item {} 
\sphinxstylestrong{x} :: {[}in{]} The sign (or zero) argument

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/plm_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_left_right_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_left\_right\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{plm\_diff() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{plm\_diff()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/plm_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{plm\_diff}}}{\emph{nk}, \emph{h}, \emph{S}, \emph{c\_method}, \emph{b\_method}, \emph{diff}}{}
Returns PLM slopes for a column where the slopes are the difference in value across each cell. The limiting follows equation 1.8 in Colella \& Woodward, 1984: JCP 54, 174\sphinxhyphen{}201.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Layer salinity (conc, e.g. ppt)

\item {} 
\sphinxstylestrong{c\_method} :: {[}in{]} Method to use for the centered difference

\item {} 
\sphinxstylestrong{b\_method} :: {[}in{]} =1, use PCM in first/last cell, =2 uses linear extrapolation

\item {} 
\sphinxstylestrong{diff} :: {[}inout{]} Scalar difference across layer (conc, e.g. ppt) determined by the following values for c\_method:

\end{itemize}

\end{description}\end{quote}

Field list ends without a blank line; unexpected unindent.

\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Second order finite difference (not recommended)

\item {} 
Second order finite volume (used in original PPM)

\item {} 
Finite\sphinxhyphen{}volume weighted least squares linear fit

\end{enumerate}

\begin{sphinxadmonition}{note}{Todo}

The use of c\_method to choose a scheme is inefficient and should eventually be moved up the call tree.
\end{sphinxadmonition}
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fv_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fv\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fvlsq_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fvlsq\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/signum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{signum}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interface\_scalar}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fv\_diff() (fortran function in module mom\_neutral\_diffusion)@\spxentry{fv\_diff()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fv_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{fv\_diff}}}{\emph{hkm1}, \emph{hk}, \emph{hkp1}, \emph{Skm1}, \emph{Sk}, \emph{Skp1}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the cell\sphinxhyphen{}centered second\sphinxhyphen{}order finite volume (unlimited PLM) slope using three consecutive cell widths and average values. Slope is returned as a difference across the central cell (i.e. units of scalar S). Discretization follows equation 1.7 in Colella \& Woodward, 1984: JCP 54, 174\sphinxhyphen{}201.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hkm1} :: {[}in{]} Left cell width

\item {} 
\sphinxstylestrong{hk} :: {[}in{]} Center cell width

\item {} 
\sphinxstylestrong{hkp1} :: {[}in{]} Right cell width

\item {} 
\sphinxstylestrong{skm1} :: {[}in{]} Left cell average value

\item {} 
\sphinxstylestrong{sk} :: {[}in{]} Center cell average value

\item {} 
\sphinxstylestrong{skp1} :: {[}in{]} Right cell average value

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/plm_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fv_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fv\_diff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fvlsq\_slope() (fortran function in module mom\_neutral\_diffusion)@\spxentry{fvlsq\_slope()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fvlsq_slope}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{fvlsq\_slope}}}{\emph{hkm1}, \emph{hk}, \emph{hkp1}, \emph{Skm1}, \emph{Sk}, \emph{Skp1}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the cell\sphinxhyphen{}centered second\sphinxhyphen{}order weighted least squares slope using three consecutive cell widths and average values. Slope is returned as a gradient (i.e. units of scalar S over width units).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hkm1} :: {[}in{]} Left cell width

\item {} 
\sphinxstylestrong{hk} :: {[}in{]} Center cell width

\item {} 
\sphinxstylestrong{hkp1} :: {[}in{]} Right cell width

\item {} 
\sphinxstylestrong{skm1} :: {[}in{]} Left cell average value

\item {} 
\sphinxstylestrong{sk} :: {[}in{]} Center cell average value

\item {} 
\sphinxstylestrong{skp1} :: {[}in{]} Right cell average value

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/plm_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fvlsq_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fvlsq\_slope}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_neutral\_surface\_positions\_continuous() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{find\_neutral\_surface\_positions\_continuous()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_continuous}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{find\_neutral\_surface\_positions\_continuous}}}{\emph{nk}, \emph{Pl}, \emph{Tl}, \emph{Sl}, \emph{dRdTl}, \emph{dRdSl}, \emph{Pr}, \emph{Tr}, \emph{Sr}, \emph{dRdTr}, \emph{dRdSr}, \emph{PoL}, \emph{PoR}, \emph{KoL}, \emph{KoR}, \emph{hEff}, \emph{bl\_kl}, \emph{bl\_kr}, \emph{bl\_zl}, \emph{bl\_zr}}{}
Returns positions within left/right columns of combined interfaces using continuous reconstructions of T/S.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{pl} :: {[}in{]} Left\sphinxhyphen{}column interface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units

\item {} 
\sphinxstylestrong{tl} :: {[}in{]} Left\sphinxhyphen{}column interface potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{sl} :: {[}in{]} Left\sphinxhyphen{}column interface salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{drdtl} :: {[}in{]} Left\sphinxhyphen{}column dRho/dT {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drdsl} :: {[}in{]} Left\sphinxhyphen{}column dRho/dS {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pr} :: {[}in{]} Right\sphinxhyphen{}column interface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units

\item {} 
\sphinxstylestrong{tr} :: {[}in{]} Right\sphinxhyphen{}column interface potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{sr} :: {[}in{]} Right\sphinxhyphen{}column interface salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{drdtr} :: {[}in{]} Left\sphinxhyphen{}column dRho/dT {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drdsr} :: {[}in{]} Left\sphinxhyphen{}column dRho/dS {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pol} :: {[}inout{]} Fractional position of neutral surface within layer KoL of left column

\item {} 
\sphinxstylestrong{por} :: {[}inout{]} Fractional position of neutral surface within layer KoR of right column

\item {} 
\sphinxstylestrong{kol} :: {[}inout{]} Index of first left interface above neutral surface

\item {} 
\sphinxstylestrong{kor} :: {[}inout{]} Index of first right interface above neutral surface

\item {} 
\sphinxstylestrong{heff} :: {[}inout{]} Effective thickness between two neutral surfaces {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units following Pl and Pr.

\item {} 
\sphinxstylestrong{bl\_kl} :: {[}in{]} Layer index of the boundary layer (left)

\item {} 
\sphinxstylestrong{bl\_kr} :: {[}in{]} Layer index of the boundary layer (right)

\item {} 
\sphinxstylestrong{bl\_zl} :: {[}in{]} Nondimensional position of the boundary layer (left)

\item {} 
\sphinxstylestrong{bl\_zr} :: {[}in{]} Nondimensional position of the boundary layer (right)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absolute\_position}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interpolate_for_nondim_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_for\_nondim\_position}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{interpolate\_for\_nondim\_position() (fortran function in module mom\_neutral\_diffusion)@\spxentry{interpolate\_for\_nondim\_position()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interpolate_for_nondim_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{interpolate\_for\_nondim\_position}}}{\emph{dRhoNeg}, \emph{Pneg}, \emph{dRhoPos}, \emph{Ppos}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the non\sphinxhyphen{}dimensional position between Pneg and Ppos where the interpolated density difference equals zero. The result is always bounded to be between 0 and 1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{drhoneg} :: {[}in{]} Negative density difference {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{pneg} :: {[}in{]} Position of negative density difference {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}nondim{]}

\item {} 
\sphinxstylestrong{drhopos} :: {[}in{]} Positive density difference {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{ppos} :: {[}in{]} Position of positive density difference {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{search\_other\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_ifndp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_ifndp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_neutral\_surface\_positions\_discontinuous() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{find\_neutral\_surface\_positions\_discontinuous()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous}}}{\emph{CS}, \emph{nk}, \emph{Pres\_l}, \emph{hcol\_l}, \emph{Tl}, \emph{Sl}, \emph{ppoly\_T\_l}, \emph{ppoly\_S\_l}, \emph{stable\_l}, \emph{Pres\_r}, \emph{hcol\_r}, \emph{Tr}, \emph{Sr}, \emph{ppoly\_T\_r}, \emph{ppoly\_S\_r}, \emph{stable\_r}, \emph{PoL}, \emph{PoR}, \emph{KoL}, \emph{KoR}, \emph{hEff}, \emph{zeta\_bot\_L}, \emph{zeta\_bot\_R}, \emph{k\_bot\_L}, \emph{k\_bot\_R}, \emph{hard\_fail\_heff}}{}
Higher order version of find\_neutral\_surface\_positions. Returns positions within left/right columns of combined interfaces using intracell reconstructions of T/S. Note that the polynomial reconstrcutions of T and S are optional to aid with unit testing, but will always be passed otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Neutral diffusion control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{pres\_l} :: {[}in{]} Left\sphinxhyphen{}column interface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{hcol\_l} :: {[}in{]} Left\sphinxhyphen{}column layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} or other units

\item {} 
\sphinxstylestrong{tl} :: {[}in{]} Left\sphinxhyphen{}column top interface potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{sl} :: {[}in{]} Left\sphinxhyphen{}column top interface salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{ppoly\_t\_l} :: {[}in{]} Left\sphinxhyphen{}column coefficients of T reconstruction {[}degC{]}

\item {} 
\sphinxstylestrong{ppoly\_s\_l} :: {[}in{]} Left\sphinxhyphen{}column coefficients of S reconstruction {[}ppt{]}

\item {} 
\sphinxstylestrong{stable\_l} :: {[}in{]} True where the left\sphinxhyphen{}column is stable

\item {} 
\sphinxstylestrong{pres\_r} :: {[}in{]} Right\sphinxhyphen{}column interface pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{hcol\_r} :: {[}in{]} Left\sphinxhyphen{}column layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} or other units

\item {} 
\sphinxstylestrong{tr} :: {[}in{]} Right\sphinxhyphen{}column top interface potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{sr} :: {[}in{]} Right\sphinxhyphen{}column top interface salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{ppoly\_t\_r} :: {[}in{]} Right\sphinxhyphen{}column coefficients of T reconstruction {[}degC{]}

\item {} 
\sphinxstylestrong{ppoly\_s\_r} :: {[}in{]} Right\sphinxhyphen{}column coefficients of S reconstruction {[}ppt{]}

\item {} 
\sphinxstylestrong{stable\_r} :: {[}in{]} True where the right\sphinxhyphen{}column is stable

\item {} 
\sphinxstylestrong{pol} :: {[}inout{]} Fractional position of neutral surface within layer KoL of left column {[}nondim{]}

\item {} 
\sphinxstylestrong{por} :: {[}inout{]} Fractional position of neutral surface within layer KoR of right column {[}nondim{]}

\item {} 
\sphinxstylestrong{kol} :: {[}inout{]} Index of first left interface above neutral surface

\item {} 
\sphinxstylestrong{kor} :: {[}inout{]} Index of first right interface above neutral surface

\item {} 
\sphinxstylestrong{heff} :: {[}inout{]} Effective thickness between two neutral surfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} or other units taken from hcol\_l

\item {} 
\sphinxstylestrong{zeta\_bot\_l} :: {[}in{]} Non\sphinxhyphen{}dimensional distance to where the boundary layer intersetcs the cell (left) {[}nondim{]}

\item {} 
\sphinxstylestrong{zeta\_bot\_r} :: {[}in{]} Non\sphinxhyphen{}dimensional distance to where the boundary layer intersetcs the cell (right) {[}nondim{]}

\item {} 
\sphinxstylestrong{k\_bot\_l} :: {[}in{]} k\sphinxhyphen{}index for the boundary layer (left) {[}nondim{]}

\item {} 
\sphinxstylestrong{k\_bot\_r} :: {[}in{]} k\sphinxhyphen{}index for the boundary layer (right) {[}nondim{]}

\item {} 
\sphinxstylestrong{hard\_fail\_heff} :: {[}in{]} If true (default) bring down the model if the neutral surfaces ever cross {[}logical{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/increment_interface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{increment\_interface}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{search\_other\_column}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mark\_unstable\_cells() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{mark\_unstable\_cells()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/mark_unstable_cells}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{mark\_unstable\_cells}}}{\emph{CS}, \emph{nk}, \emph{T}, \emph{S}, \emph{P}, \emph{stable\_cell}}{}
Sweep down through the column and mark as stable if the bottom interface of a cell is denser than the top.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Neutral diffusion control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels in a column

\item {} 
\sphinxstylestrong{t} :: {[}in{]} Temperature at interfaces {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity at interfaces {[}ppt{]}

\item {} 
\sphinxstylestrong{p} :: {[}in{]} Pressure at interfaces {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{stable\_cell} :: {[}out{]} True if this cell is unstably stratified

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{search\_other\_column() (fortran function in module mom\_neutral\_diffusion)@\spxentry{search\_other\_column()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{search\_other\_column}}}{\emph{CS}, \emph{ksurf}, \emph{pos\_last}, \emph{T\_from}, \emph{S\_from}, \emph{P\_from}, \emph{T\_top}, \emph{S\_top}, \emph{P\_top}, \emph{T\_bot}, \emph{S\_bot}, \emph{P\_bot}, \emph{T\_poly}, \emph{S\_poly}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Searches the “other” (searched) column for the position of the neutral surface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Neutral diffusion control structure

\item {} 
\sphinxstylestrong{ksurf} :: {[}in{]} Current index of neutral surface

\item {} 
\sphinxstylestrong{pos\_last} :: {[}in{]} Last position within the current layer, used as the lower bound in the root finding algorithm {[}nondim{]}

\item {} 
\sphinxstylestrong{t\_from} :: {[}in{]} Temperature at the searched from interface {[}degC{]}

\item {} 
\sphinxstylestrong{s\_from} :: {[}in{]} Salinity at the searched from interface {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_from} :: {[}in{]} Pressure at the searched from interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{t\_top} :: {[}in{]} Temperature at the searched to top interface {[}degC{]}

\item {} 
\sphinxstylestrong{s\_top} :: {[}in{]} Salinity at the searched to top interface {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_top} :: {[}in{]} Pressure at the searched to top interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{t\_bot} :: {[}in{]} Temperature at the searched to bottom interface {[}degC{]}

\item {} 
\sphinxstylestrong{s\_bot} :: {[}in{]} Salinity at the searched to bottom interface {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_bot} :: {[}in{]} Pressure at the searched to bottom interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{t\_poly} :: {[}in{]} Temperature polynomial reconstruction coefficients {[}degC{]}

\item {} 
\sphinxstylestrong{s\_poly} :: {[}in{]} Salinity polynomial reconstruction coefficients {[}ppt{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_full}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_pos\_full}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_pos\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interpolate_for_nondim_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_for\_nondim\_position}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{increment\_interface() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{increment\_interface()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/increment_interface}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{increment\_interface}}}{\emph{nk}, \emph{kl}, \emph{ki}, \emph{reached\_bottom}, \emph{searching\_this\_column}, \emph{searching\_other\_column}}{}
Increments the interface which was just connected and also set flags if the bottom is reached.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of vertical levels

\item {} 
\sphinxstylestrong{kl} :: {[}inout{]} Current layer (potentially updated)

\item {} 
\sphinxstylestrong{ki} :: {[}inout{]} Current interface

\item {} 
\sphinxstylestrong{reached\_bottom} :: {[}inout{]} Updated when kl == nk and ki == 2

\item {} 
\sphinxstylestrong{searching\_this\_column} :: {[}inout{]} Updated when kl == nk and ki == 2

\item {} 
\sphinxstylestrong{searching\_other\_column} :: {[}inout{]} Updated when kl == nk and ki == 2

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_neutral\_pos\_linear() (fortran function in module mom\_neutral\_diffusion)@\spxentry{find\_neutral\_pos\_linear()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{find\_neutral\_pos\_linear}}}{\emph{CS}, \emph{z0}, \emph{T\_ref}, \emph{S\_ref}, \emph{dRdT\_ref}, \emph{dRdS\_ref}, \emph{dRdT\_top}, \emph{dRdS\_top}, \emph{dRdT\_bot}, \emph{dRdS\_bot}, \emph{ppoly\_T}, \emph{ppoly\_S}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Search a layer to find where delta\_rho = 0 based on a linear interpolation of alpha and beta of the top and bottom being searched and polynomial reconstructions of T and S. Compressibility is not needed because either, we are assuming incompressibility in the equation of state for this module or alpha and beta are calculated having been displaced to the average pressures of the two pressures We need Newton’s method because the T and S reconstructions make delta\_rho a polynomial function of z if using PPM or higher. If Newton’s method would search fall out of the interval {[}0,1{]}, a bisection step would be taken instead. Also this linearization of alpha, beta means that second derivatives of the EOS are not needed. Note that delta in variable names below refers to horizontal differences and ‘d’ refers to vertical differences.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Control structure with parameters for this module

\item {} 
\sphinxstylestrong{z0} :: {[}in{]} Lower bound of position, also serves as the initial guess {[}nondim{]}

\item {} 
\sphinxstylestrong{t\_ref} :: {[}in{]} Temperature at the searched from interface {[}degC{]}

\item {} 
\sphinxstylestrong{s\_ref} :: {[}in{]} Salinity at the searched from interface {[}ppt{]}

\item {} 
\sphinxstylestrong{drdt\_ref} :: {[}in{]} dRho/dT at the searched from interface {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds\_ref} :: {[}in{]} dRho/dS at the searched from interface {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drdt\_top} :: {[}in{]} dRho/dT at top of layer being searched {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds\_top} :: {[}in{]} dRho/dS at top of layer being searched {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drdt\_bot} :: {[}in{]} dRho/dT at bottom of layer being searched {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds\_bot} :: {[}in{]} dRho/dS at bottom of layer being searched {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly\_t} :: {[}in{]} Coefficients of the polynomial reconstruction of T within the layer to be searched {[}degC{]}.

\item {} 
\sphinxstylestrong{ppoly\_s} :: {[}in{]} Coefficients of the polynomial reconstruction of S within the layer to be searched {[}ppt{]}.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Position where drho = 0 {[}nondim{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{search\_other\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_neutral\_pos\_full() (fortran function in module mom\_neutral\_diffusion)@\spxentry{find\_neutral\_pos\_full()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_full}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{find\_neutral\_pos\_full}}}{\emph{CS}, \emph{z0}, \emph{T\_ref}, \emph{S\_ref}, \emph{P\_ref}, \emph{P\_top}, \emph{P\_bot}, \emph{ppoly\_T}, \emph{ppoly\_S}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Use the full equation of state to calculate the difference in locally referenced potential density. The derivatives in this case are not trivial to calculate, so instead we use a regula falsi method.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Control structure with parameters for this module

\item {} 
\sphinxstylestrong{z0} :: {[}in{]} Lower bound of position, also serves as the initial guess {[}nondim{]}

\item {} 
\sphinxstylestrong{t\_ref} :: {[}in{]} Temperature at the searched from interface {[}degC{]}

\item {} 
\sphinxstylestrong{s\_ref} :: {[}in{]} Salinity at the searched from interface {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} Pressure at the searched from interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{p\_top} :: {[}in{]} Pressure at top of layer being searched {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{p\_bot} :: {[}in{]} Pressure at bottom of layer being searched {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{ppoly\_t} :: {[}in{]} Coefficients of the polynomial reconstruction of T within the layer to be searched {[}degC{]}

\item {} 
\sphinxstylestrong{ppoly\_s} :: {[}in{]} Coefficients of the polynomial reconstruction of T within the layer to be searched {[}ppt{]}

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Position where drho = 0 {[}nondim{]}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{search\_other\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_delta\_rho\_and\_derivs() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{calc\_delta\_rho\_and\_derivs()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs}}}{\emph{CS}, \emph{T1}, \emph{S1}, \emph{p1\_in}, \emph{T2}, \emph{S2}, \emph{p2\_in}, \emph{drho}, \emph{drdt1\_out}, \emph{drds1\_out}, \emph{drdt2\_out}, \emph{drds2\_out}}{}
Calculate the difference in density between two points in a variety of ways.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Neutral diffusion control structure

\item {} 
\sphinxstylestrong{t1} :: {[}in{]} Temperature at point 1 {[}degC{]}

\item {} 
\sphinxstylestrong{s1} :: {[}in{]} Salinity at point 1 {[}ppt{]}

\item {} 
\sphinxstylestrong{p1\_in} :: {[}in{]} Pressure at point 1 {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{t2} :: {[}in{]} Temperature at point 2 {[}degC{]}

\item {} 
\sphinxstylestrong{s2} :: {[}in{]} Salinity at point 2 {[}ppt{]}

\item {} 
\sphinxstylestrong{p2\_in} :: {[}in{]} Pressure at point 2 {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drho} :: {[}out{]} Difference in density between the two points {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{drdt1\_out} :: {[}out{]} drho\_dt at point 1 {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds1\_out} :: {[}out{]} drho\_ds at point 1 {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drdt2\_out} :: {[}out{]} drho\_dt at point 2 {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds2\_out} :: {[}out{]} drho\_ds at point 2 {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/delta_rho_from_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delta\_rho\_from\_derivs}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_full}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_pos\_full}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/mark_unstable_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mark\_unstable\_cells}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/search_other_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{search\_other\_column}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{delta\_rho\_from\_derivs() (fortran function in module mom\_neutral\_diffusion)@\spxentry{delta\_rho\_from\_derivs()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/delta_rho_from_derivs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{delta\_rho\_from\_derivs}}}{\emph{T1}, \emph{S1}, \emph{P1}, \emph{dRdT1}, \emph{dRdS1}, \emph{T2}, \emph{S2}, \emph{P2}, \emph{dRdT2}, \emph{dRdS2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Calculate delta rho from derivatives and gradients of properties
\(\Delta \rho = \frac{1}{2}\left[ (\alpha_1 + \alpha_2)*(T_1-T_2) + (\beta_1 + \beta_2)*(S_1-S_2) + (\gamma^{-1}_1 + \gamma^{-1}_2)*(P_1-P_2) \right]\) .
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{t1} :: Temperature at point 1 {[}degC{]}

\item {} 
\sphinxstylestrong{s1} :: Salinity at point 1 {[}ppt{]}

\item {} 
\sphinxstylestrong{p1} :: Pressure at point 1 {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drdt1} :: The partial derivative of density with temperature at point 1 {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds1} :: The partial derivative of density with salinity at point 1 {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{t2} :: Temperature at point 2 {[}degC{]}

\item {} 
\sphinxstylestrong{s2} :: Salinity at point 2 {[}ppt{]}

\item {} 
\sphinxstylestrong{p2} :: Pressure at point 2 {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{drdt2} :: The partial derivative of density with temperature at point 2 {[}R degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 degC\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{drds2} :: The partial derivative of density with salinity at point 2 {[}R ppt\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3 ppt\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/calc_delta_rho_and_derivs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_delta\_rho\_and\_derivs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{absolute\_position() (fortran function in module mom\_neutral\_diffusion)@\spxentry{absolute\_position()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{absolute\_position}}}{\emph{n}, \emph{ns}, \emph{Pint}, \emph{Karr}, \emph{NParr}, \emph{k\_surface}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Converts non\sphinxhyphen{}dimensional position within a layer to absolute position (for debugging)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{ns} :: {[}in{]} Number of neutral surfaces

\item {} 
\sphinxstylestrong{pint} :: {[}in{]} Position of interfaces {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units

\item {} 
\sphinxstylestrong{karr} :: {[}in{]} Index of interface above position

\item {} 
\sphinxstylestrong{nparr} :: {[}in{]} Non\sphinxhyphen{}dimensional position within layer Karr(:) {[}nondim{]}

\item {} 
\sphinxstylestrong{k\_surface} :: {[}in{]} k\sphinxhyphen{}interface to query

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The absolute position of a location {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units following Pint

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_positions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absolute\_positions}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_continuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{absolute\_positions() (fortran function in module mom\_neutral\_diffusion)@\spxentry{absolute\_positions()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{absolute\_positions}}}{\emph{n}, \emph{ns}, \emph{Pint}, \emph{Karr}, \emph{NParr}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Converts non\sphinxhyphen{}dimensional positions within layers to absolute positions (for debugging)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{ns} :: {[}in{]} Number of neutral surfaces

\item {} 
\sphinxstylestrong{pint} :: {[}in{]} Position of interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units

\item {} 
\sphinxstylestrong{karr} :: {[}in{]} Indexes of interfaces about positions

\item {} 
\sphinxstylestrong{nparr} :: {[}in{]} Non\sphinxhyphen{}dimensional positions within layers Karr(:)

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Absolute positions {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]} or other units following Pint

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absolute\_position}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neutral\_surface\_flux() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{neutral\_surface\_flux()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_surface\_flux}}}{\emph{nk}, \emph{nsurf}, \emph{deg}, \emph{hl}, \emph{hr}, \emph{Tl}, \emph{Tr}, \emph{PiL}, \emph{PiR}, \emph{KoL}, \emph{KoR}, \emph{hEff}, \emph{Flx}, \emph{continuous}, \emph{h\_neglect}, \emph{remap\_CS}, \emph{h\_neglect\_edge}}{}
Returns a single column of neutral diffusion fluxes of a tracer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{nsurf} :: {[}in{]} Number of neutral surfaces

\item {} 
\sphinxstylestrong{deg} :: {[}in{]} Degree of polynomial reconstructions

\item {} 
\sphinxstylestrong{hl} :: {[}in{]} Left\sphinxhyphen{}column layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hr} :: {[}in{]} Right\sphinxhyphen{}column layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tl} :: {[}in{]} Left\sphinxhyphen{}column layer tracer (conc, e.g. degC)

\item {} 
\sphinxstylestrong{tr} :: {[}in{]} Right\sphinxhyphen{}column layer tracer (conc, e.g. degC)

\item {} 
\sphinxstylestrong{pil} :: {[}in{]} Fractional position of neutral surface within layer KoL of left column

\item {} 
\sphinxstylestrong{pir} :: {[}in{]} Fractional position of neutral surface within layer KoR of right column

\item {} 
\sphinxstylestrong{kol} :: {[}in{]} Index of first left interface above neutral surface

\item {} 
\sphinxstylestrong{kor} :: {[}in{]} Index of first right interface above neutral surface

\item {} 
\sphinxstylestrong{heff} :: {[}in{]} Effective thickness between two neutral surfaces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{flx} :: {[}inout{]} Flux of tracer between pairs of neutral layers (conc H)

\item {} 
\sphinxstylestrong{continuous} :: {[}in{]} True if using continuous reconstruction

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{remap\_cs} :: {[}in{]} Remapping control structure used to create sublayers

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width used for edge value calculations if continuous is false {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interface\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_t_eval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_t\_eval}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_ave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_ave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_left_right_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_left\_right\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/signum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{signum}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neutral\_surface\_t\_eval() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{neutral\_surface\_t\_eval()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_t_eval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_surface\_t\_eval}}}{\emph{nk}, \emph{ns}, \emph{k\_sub}, \emph{Ks}, \emph{Ps}, \emph{T\_mean}, \emph{T\_int}, \emph{deg}, \emph{iMethod}, \emph{T\_poly}, \emph{T\_top}, \emph{T\_bot}, \emph{T\_sub}, \emph{T\_top\_int}, \emph{T\_bot\_int}, \emph{T\_layer}}{}
Evaluate various parts of the reconstructions to calculate gradient\sphinxhyphen{}based flux limter.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of cell everages

\item {} 
\sphinxstylestrong{ns} :: {[}in{]} Number of neutral surfaces

\item {} 
\sphinxstylestrong{k\_sub} :: {[}in{]} Index of current neutral layer

\item {} 
\sphinxstylestrong{ks} :: {[}in{]} List of the layers associated with each neutral surface

\item {} 
\sphinxstylestrong{ps} :: {[}in{]} List of the positions within a layer of each surface

\item {} 
\sphinxstylestrong{t\_mean} :: {[}in{]} Cell average of tracer

\item {} 
\sphinxstylestrong{t\_int} :: {[}in{]} Cell interface values of tracer from reconstruction

\item {} 
\sphinxstylestrong{deg} :: {[}in{]} Degree of reconstruction polynomial (e.g. 1 is linear)

\item {} 
\sphinxstylestrong{imethod} :: {[}in{]} Method of integration to use

\item {} 
\sphinxstylestrong{t\_poly} :: {[}in{]} Coefficients of polynomial reconstructions

\item {} 
\sphinxstylestrong{t\_top} :: {[}out{]} Tracer value at top (across discontinuity if necessary)

\item {} 
\sphinxstylestrong{t\_bot} :: {[}out{]} Tracer value at bottom (across discontinuity if necessary)

\item {} 
\sphinxstylestrong{t\_sub} :: {[}out{]} Average of the tracer value over the sublayer

\item {} 
\sphinxstylestrong{t\_top\_int} :: {[}out{]} Tracer value at top interface of neutral layer

\item {} 
\sphinxstylestrong{t\_bot\_int} :: {[}out{]} Tracer value at bottom interface of neutral layer

\item {} 
\sphinxstylestrong{t\_layer} :: {[}out{]} Cell\sphinxhyphen{}average that the the reconstruction belongs to

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_left\_right\_edge\_values() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{ppm\_left\_right\_edge\_values()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ppm_left_right_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{ppm\_left\_right\_edge\_values}}}{\emph{nk}, \emph{Tl}, \emph{Ti}, \emph{aL}, \emph{aR}}{}
Discontinuous PPM reconstructions of the left/right edge values within a cell.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of levels

\item {} 
\sphinxstylestrong{tl} :: {[}in{]} Layer tracer (conc, e.g. degC)

\item {} 
\sphinxstylestrong{ti} :: {[}in{]} Interface tracer (conc, e.g. degC)

\item {} 
\sphinxstylestrong{al} :: {[}inout{]} Left edge value of tracer (conc, e.g. degC)

\item {} 
\sphinxstylestrong{ar} :: {[}inout{]} Right edge value of tracer (conc, e.g. degC)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/signum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{signum}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neutral\_diffusion\_unit\_tests() (fortran function in module mom\_neutral\_diffusion)@\spxentry{neutral\_diffusion\_unit\_tests()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion\_unit\_tests}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if unit tests of neutral\_diffusion functions fail. Otherwise returns false.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ndiff\_unit\_tests\_continuous() (fortran function in module mom\_neutral\_diffusion)@\spxentry{ndiff\_unit\_tests\_continuous()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if unit tests of neutral\_diffusion functions fail. Otherwise returns false.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/absolute_positions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absolute\_positions}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interface_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interface\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_surface_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_surface\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_data1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_data1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fv_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fv\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fvlsq_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fvlsq\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_ifndp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_ifndp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_nsp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_nsp}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ndiff\_unit\_tests\_discontinuous() (fortran function in module mom\_neutral\_diffusion)@\spxentry{ndiff\_unit\_tests\_discontinuous()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} It true, write results to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_pos_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_pos\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/find_neutral_surface_positions_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_neutral\_surface\_positions\_discontinuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/mark_unstable_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mark\_unstable\_cells}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_nsp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_nsp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_rnp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_rnp}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neutral\_diffusion\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_fv\_diff() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_fv\_diff()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fv_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_fv\_diff}}}{\emph{verbose}, \emph{hkm1}, \emph{hk}, \emph{hkp1}, \emph{Skm1}, \emph{Sk}, \emph{Skp1}, \emph{Ptrue}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if a test of \sphinxcode{\sphinxupquote{fv\_diff()}} fails, and conditionally writes results to stream.
fails, and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{hkm1} :: {[}in{]} Left cell width {[}nondim{]}

\item {} 
\sphinxstylestrong{hk} :: {[}in{]} Center cell width {[}nondim{]}

\item {} 
\sphinxstylestrong{hkp1} :: {[}in{]} Right cell width {[}nondim{]}

\item {} 
\sphinxstylestrong{skm1} :: {[}in{]} Left cell average value

\item {} 
\sphinxstylestrong{sk} :: {[}in{]} Center cell average value

\item {} 
\sphinxstylestrong{skp1} :: {[}in{]} Right cell average value

\item {} 
\sphinxstylestrong{ptrue} :: {[}in{]} True answer {[}nondim{]}

\item {} 
\sphinxstylestrong{title} :: {[}in{]} Title for messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fv_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fv\_diff}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_fvlsq\_slope() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_fvlsq\_slope()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_fvlsq_slope}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_fvlsq\_slope}}}{\emph{verbose}, \emph{hkm1}, \emph{hk}, \emph{hkp1}, \emph{Skm1}, \emph{Sk}, \emph{Skp1}, \emph{Ptrue}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if a test of \sphinxcode{\sphinxupquote{fvlsq\_slope()}} fails, and conditionally writes results to stream.
fails, and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{hkm1} :: {[}in{]} Left cell width

\item {} 
\sphinxstylestrong{hk} :: {[}in{]} Center cell width

\item {} 
\sphinxstylestrong{hkp1} :: {[}in{]} Right cell width

\item {} 
\sphinxstylestrong{skm1} :: {[}in{]} Left cell average value

\item {} 
\sphinxstylestrong{sk} :: {[}in{]} Center cell average value

\item {} 
\sphinxstylestrong{skp1} :: {[}in{]} Right cell average value

\item {} 
\sphinxstylestrong{ptrue} :: {[}in{]} True answer

\item {} 
\sphinxstylestrong{title} :: {[}in{]} Title for messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/fvlsq_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fvlsq\_slope}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_ifndp() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_ifndp()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_ifndp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_ifndp}}}{\emph{verbose}, \emph{rhoNeg}, \emph{Pneg}, \emph{rhoPos}, \emph{Ppos}, \emph{Ptrue}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if a test of \sphinxcode{\sphinxupquote{interpolate\_for\_nondim\_position()}} fails, and conditionally writes results to stream.
fails, and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{rhoneg} :: {[}in{]} Lighter density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{pneg} :: {[}in{]} Interface position of lighter density {[}nondim{]}

\item {} 
\sphinxstylestrong{rhopos} :: {[}in{]} Heavier density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{ppos} :: {[}in{]} Interface position of heavier density {[}nondim{]}

\item {} 
\sphinxstylestrong{ptrue} :: {[}in{]} True answer {[}nondim{]}

\item {} 
\sphinxstylestrong{title} :: {[}in{]} Title for messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/interpolate_for_nondim_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_for\_nondim\_position}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_data1d() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_data1d()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_data1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_data1d}}}{\emph{verbose}, \emph{nk}, \emph{Po}, \emph{Ptrue}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if comparison of Po and Ptrue fails, and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers

\item {} 
\sphinxstylestrong{po} :: {[}in{]} Calculated answer

\item {} 
\sphinxstylestrong{ptrue} :: {[}in{]} True answer

\item {} 
\sphinxstylestrong{title} :: {[}in{]} Title for messages

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_data1di() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_data1di()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_data1di}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_data1di}}}{\emph{verbose}, \emph{nk}, \emph{Po}, \emph{Ptrue}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if comparison of Po and Ptrue fails, and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers

\item {} 
\sphinxstylestrong{po} :: {[}in{]} Calculated answer

\item {} 
\sphinxstylestrong{ptrue} :: {[}in{]} True answer

\item {} 
\sphinxstylestrong{title} :: {[}in{]} Title for messages

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_nsp() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_nsp()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_nsp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_nsp}}}{\emph{verbose}, \emph{ns}, \emph{KoL}, \emph{KoR}, \emph{pL}, \emph{pR}, \emph{hEff}, \emph{KoL0}, \emph{KoR0}, \emph{pL0}, \emph{pR0}, \emph{hEff0}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if output of find\_neutral\_surface\_positions() does not match correct values, and conditionally writes results to stream.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{ns} :: {[}in{]} Number of surfaces

\item {} 
\sphinxstylestrong{kol} :: {[}in{]} Index of first left interface above neutral surface

\item {} 
\sphinxstylestrong{kor} :: {[}in{]} Index of first right interface above neutral surface

\item {} 
\sphinxstylestrong{pl} :: {[}in{]} Fractional position of neutral surface within layer KoL of left column

\item {} 
\sphinxstylestrong{pr} :: {[}in{]} Fractional position of neutral surface within layer KoR of right column

\item {} 
\sphinxstylestrong{heff} :: {[}in{]} Effective thickness between two neutral surfaces {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{kol0} :: {[}in{]} Correct value for KoL

\item {} 
\sphinxstylestrong{kor0} :: {[}in{]} Correct value for KoR

\item {} 
\sphinxstylestrong{pl0} :: {[}in{]} Correct value for pL

\item {} 
\sphinxstylestrong{pr0} :: {[}in{]} Correct value for pR

\item {} 
\sphinxstylestrong{heff0} :: {[}in{]} Correct value for hEff

\item {} 
\sphinxstylestrong{title} :: {[}in{]} Title for messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/compare_nsp_row}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{compare\_nsp\_row}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_continuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_continuous}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{compare\_nsp\_row() (fortran function in module mom\_neutral\_diffusion)@\spxentry{compare\_nsp\_row()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/compare_nsp_row}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{compare\_nsp\_row}}}{\emph{KoL}, \emph{KoR}, \emph{pL}, \emph{pR}, \emph{KoL0}, \emph{KoR0}, \emph{pL0}, \emph{pR0}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Compares a single row, k, of output from find\_neutral\_surface\_positions()
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{kol} :: {[}in{]} Index of first left interface above neutral surface

\item {} 
\sphinxstylestrong{kor} :: {[}in{]} Index of first right interface above neutral surface

\item {} 
\sphinxstylestrong{pl} :: {[}in{]} Fractional position of neutral surface within layer KoL of left column

\item {} 
\sphinxstylestrong{pr} :: {[}in{]} Fractional position of neutral surface within layer KoR of right column

\item {} 
\sphinxstylestrong{kol0} :: {[}in{]} Correct value for KoL

\item {} 
\sphinxstylestrong{kor0} :: {[}in{]} Correct value for KoR

\item {} 
\sphinxstylestrong{pl0} :: {[}in{]} Correct value for pL

\item {} 
\sphinxstylestrong{pr0} :: {[}in{]} Correct value for pR

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_nsp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_nsp}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_rnp() (fortran function in module mom\_neutral\_diffusion)@\spxentry{test\_rnp()}\spxextra{fortran function in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/test_rnp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{test\_rnp}}}{\emph{expected\_pos}, \emph{test\_pos}, \emph{title}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Compares output position from refine\_nondim\_position with an expected value.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{expected\_pos} :: {[}in{]} The expected position

\item {} 
\sphinxstylestrong{test\_pos} :: {[}in{]} The position returned by the code

\item {} 
\sphinxstylestrong{title} :: {[}in{]} A label for this test

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/ndiff_unit_tests_discontinuous}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ndiff\_unit\_tests\_discontinuous}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neutral\_diffusion\_end() (fortran subroutine in module mom\_neutral\_diffusion)@\spxentry{neutral\_diffusion\_end()}\spxextra{fortran subroutine in module mom\_neutral\_diffusion}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion/}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion\_end}}}{\emph{CS}}{}
Deallocates neutral\_diffusion control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Neutral diffusion control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_obsolete\_diagnostics module reference}
\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics}}\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:mom-obsolete-diagnostics-module-reference}}\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics::doc}}\index{mom\_obsolete\_diagnostics (module)@\spxentry{mom\_obsolete\_diagnostics}\spxextra{module}|spxpagem}
Provides a mechanism for recording diagnostic variables that are no longer valid, along with their replacement name if appropriate.

{\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:detamom-obsolete-diagnostics}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/register_obsolete_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_obsolete\_diagnostics()}}}}}
&
Scan through the diag\_table searching for obsolete parameters and issue informational messages and optionallly a FATAL error.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/found_in_diagtable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{found\_in\_diagtable()}}}}}
&
Fakes a register of a diagnostic to find out if an obsolete parameter appears in the diag\_table.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:detailed-description}}\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:detamom-obsolete-diagnostics}}
Provides a mechanism for recording diagnostic variables that are no longer valid, along with their replacement name if appropriate.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:function-subroutine-documentation}}\index{register\_obsolete\_diagnostics() (fortran subroutine in module mom\_obsolete\_diagnostics)@\spxentry{register\_obsolete\_diagnostics()}\spxextra{fortran subroutine in module mom\_obsolete\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/register_obsolete_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics/}}\sphinxbfcode{\sphinxupquote{register\_obsolete\_diagnostics}}}{\emph{param\_file}, \emph{diag}}{}
Scan through the diag\_table searching for obsolete parameters and issue informational messages and optionallly a FATAL error.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} The parameter file handle.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure used to control diagnostics.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/found_in_diagtable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{found\_in\_diagtable}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{found\_in\_diagtable() (fortran function in module mom\_obsolete\_diagnostics)@\spxentry{found\_in\_diagtable()}\spxextra{fortran function in module mom\_obsolete\_diagnostics}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/found_in_diagtable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_obsolete\_diagnostics/}}\sphinxbfcode{\sphinxupquote{found\_in\_diagtable}}}{\emph{diag}, \emph{varName}, \emph{newVarName}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Fakes a register of a diagnostic to find out if an obsolete parameter appears in the diag\_table.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure used to control diagnostics.

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The obsolete diagnostic name

\item {} 
\sphinxstylestrong{newvarname} :: {[}in{]} The valid name of this diagnostic

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_diagnostics:f/mom_obsolete_diagnostics/register_obsolete_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_obsolete\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_obsolete\_params module reference}
\label{\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params}}\label{\detokenize{api/generated/modules/mom_obsolete_params:mom-obsolete-params-module-reference}}\label{\detokenize{api/generated/modules/mom_obsolete_params::doc}}\index{mom\_obsolete\_params (module)@\spxentry{mom\_obsolete\_params}\spxextra{module}|spxpagem}
Methods for testing for, and list of, obsolete run\sphinxhyphen{}time parameters.

{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:detamom-obsolete-params}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_obsolete_params:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_obsolete\_params()}}}}}
&
Scans input parameter file for list obsolete parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_logical()}}}}}
&
Test for presence of obsolete LOGICAL in parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_char()}}}}}
&
Test for presence of obsolete STRING in parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_real()}}}}}
&
Test for presence of obsolete REAL in parameter file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_int()}}}}}
&
Test for presence of obsolete INTEGER in parameter file.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_obsolete_params:detailed-description}}\label{\detokenize{api/generated/modules/mom_obsolete_params:detamom-obsolete-params}}
Methods for testing for, and list of, obsolete run\sphinxhyphen{}time parameters.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_obsolete_params:function-subroutine-documentation}}\index{find\_obsolete\_params() (fortran subroutine in module mom\_obsolete\_params)@\spxentry{find\_obsolete\_params()}\spxextra{fortran subroutine in module mom\_obsolete\_params}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_obsolete\_params/}}\sphinxbfcode{\sphinxupquote{find\_obsolete\_params}}}{\emph{param\_file}}{}
Scans input parameter file for list obsolete parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} Structure containing parameter file data.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_char}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_logical}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_logical}}}}} {\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{obsolete\_logical() (fortran subroutine in module mom\_obsolete\_params)@\spxentry{obsolete\_logical()}\spxextra{fortran subroutine in module mom\_obsolete\_params}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_logical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_obsolete\_params/}}\sphinxbfcode{\sphinxupquote{obsolete\_logical}}}{\emph{param\_file}, \emph{varname}, \emph{warning\_val}, \emph{hint}}{}
Test for presence of obsolete LOGICAL in parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Structure containing parameter file data.

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} Name of obsolete LOGICAL parameter.

\item {} 
\sphinxstylestrong{warning\_val} :: {[}in{]} An allowed value that causes a warning instead of an error.

\item {} 
\sphinxstylestrong{hint} :: {[}in{]} A hint to the user about what to do.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_obsolete\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{obsolete\_char() (fortran subroutine in module mom\_obsolete\_params)@\spxentry{obsolete\_char()}\spxextra{fortran subroutine in module mom\_obsolete\_params}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_obsolete\_params/}}\sphinxbfcode{\sphinxupquote{obsolete\_char}}}{\emph{param\_file}, \emph{varname}, \emph{warning\_val}, \emph{hint}}{}
Test for presence of obsolete STRING in parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Structure containing parameter file data.

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} Name of obsolete STRING parameter.

\item {} 
\sphinxstylestrong{warning\_val} :: {[}in{]} An allowed value that causes a warning instead of an error.

\item {} 
\sphinxstylestrong{hint} :: {[}in{]} A hint to the user about what to do.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_obsolete\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{obsolete\_real() (fortran subroutine in module mom\_obsolete\_params)@\spxentry{obsolete\_real()}\spxextra{fortran subroutine in module mom\_obsolete\_params}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_obsolete\_params/}}\sphinxbfcode{\sphinxupquote{obsolete\_real}}}{\emph{param\_file}, \emph{varname}, \emph{warning\_val}, \emph{hint}}{}
Test for presence of obsolete REAL in parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Structure containing parameter file data.

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} Name of obsolete REAL parameter.

\item {} 
\sphinxstylestrong{warning\_val} :: {[}in{]} An allowed value that causes a warning instead of an error.

\item {} 
\sphinxstylestrong{hint} :: {[}in{]} A hint to the user about what to do.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_obsolete\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{obsolete\_int() (fortran subroutine in module mom\_obsolete\_params)@\spxentry{obsolete\_int()}\spxextra{fortran subroutine in module mom\_obsolete\_params}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/obsolete_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_obsolete\_params/}}\sphinxbfcode{\sphinxupquote{obsolete\_int}}}{\emph{param\_file}, \emph{varname}, \emph{warning\_val}, \emph{hint}}{}
Test for presence of obsolete INTEGER in parameter file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Structure containing parameter file data.

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} Name of obsolete INTEGER parameter.

\item {} 
\sphinxstylestrong{warning\_val} :: {[}in{]} An allowed value that causes a warning instead of an error.

\item {} 
\sphinxstylestrong{hint} :: {[}in{]} A hint to the user about what to do.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_obsolete_params:f/mom_obsolete_params/find_obsolete_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_obsolete\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_ocmip2\_cfc module reference}
\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc}}\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:mom-ocmip2-cfc-module-reference}}\label{\detokenize{api/generated/modules/mom_ocmip2_cfc::doc}}\index{mom\_ocmip2\_cfc (module)@\spxentry{mom\_ocmip2\_cfc}\spxextra{module}|spxpagem}
Simulates CFCs using the OCMIP2 protocols.

{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:detamom-ocmip2-cfc}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocmip2\_cfc\_cs}}}}}
&
The control structure for the OCMPI2\_CFC tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/register_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_ocmip2\_cfc()}}}}}
&
Register the OCMIP2 CFC tracers to be used with MOM and read the parameters that are used with this tracer package.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/flux_init_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flux\_init\_ocmip2\_cfc()}}}}}
&
This subroutine initializes the air\sphinxhyphen{}sea CFC fluxes, and optionally returns the indicies of these fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/initialize_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ocmip2\_cfc()}}}}}
&
Initialize the OCMP2 CFC tracer fields and set up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/init_tracer_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_tracer\_cfc()}}}}}
&
This subroutine initializes a tracer array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocmip2\_cfc\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion, souces and sinks and any other column tracer physics or chemistry to the OCMIP2 CFC tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocmip2\_cfc\_stock()}}}}}
&
This function calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocmip2\_cfc\_surface\_state()}}}}}
&
This subroutine extracts the surface CFC concentrations and other fields that are shared with the atmosphere to calculate CFC fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocmip2\_cfc\_end()}}}}}
&
Deallocate any memory associated with the OCMIP2 CFC tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:detailed-description}}\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:detamom-ocmip2-cfc}}
By Robert Hallberg, 2007.

This module contains the code that is needed to set up and use CFC\sphinxhyphen{}11 and CFC\sphinxhyphen{}12 in a fully coupled or ice\sphinxhyphen{}ocean model context using the OCMIP2 protocols


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:type-documentation}}\index{ocmip2\_cfc\_cs (fortran type in module mom\_ocmip2\_cfc)@\spxentry{ocmip2\_cfc\_cs}\spxextra{fortran type in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{ocmip2\_cfc\_cs}}}
The control structure for the OCMPI2\_CFC tracer package.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a1\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a1\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a2\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a2\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a3\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a3\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a4\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a4\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d1\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d1\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d2\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d2\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d3\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d3\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d4\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d4\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e1\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e1\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e2\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e2\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e3\_11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{e3\_12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficients used in the CFC11 and CFC12 solubility calculation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file in which the CFC initial values can be found, or an empty string for internal initilaization.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the IC\_file is in Z\sphinxhyphen{}space. The default is false..

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM6 tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc11}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The CFC11 concentration {[}mol m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc12}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The CFC12 concentration {[}mol m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc11\_ic\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The initial value assigned to CFC11 {[}mol m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc12\_ic\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The initial value assigned to CFC12 {[}mol m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc11\_land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of CFC11 used where land is masked out {[}mol m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc12\_land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of CFC12 used where land is masked out {[}mol m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracers\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, tracers may be reset via the initialization code if they are not found in the restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc11\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=16)}\sphinxstyleemphasis{{]}} :: CFC11 variable name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc12\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=16)}\sphinxstyleemphasis{{]}} :: CFC12 variable name.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_cfc\_11\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Index returned by aof\_set\_coupler\_flux that is used to pack and unpack surface boundary condition arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_cfc\_12\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Index returned by aof\_set\_coupler\_flux that is used to pack and unpack surface boundary condition arrays.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Model restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc11\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)}\sphinxstyleemphasis{{]}} :: A set of metadata for the CFC11 tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfc12\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)}\sphinxstyleemphasis{{]}} :: A set of metadata for the CFC12 tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:function-subroutine-documentation}}\index{register\_ocmip2\_cfc() (fortran function in module mom\_ocmip2\_cfc)@\spxentry{register\_ocmip2\_cfc()}\spxextra{fortran function in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/register_ocmip2_cfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{register\_ocmip2\_cfc}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register the OCMIP2 CFC tracers to be used with MOM and read the parameters that are used with this tracer package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer to the tracer registry.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/flux_init_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flux\_init\_ocmip2\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{flux\_init\_ocmip2\_cfc() (fortran subroutine in module mom\_ocmip2\_cfc)@\spxentry{flux\_init\_ocmip2\_cfc()}\spxextra{fortran subroutine in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/flux_init_ocmip2_cfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{flux\_init\_ocmip2\_cfc}}}{\emph{CS}, \emph{verbosity}}{}
This subroutine initializes the air\sphinxhyphen{}sea CFC fluxes, and optionally returns the indicies of these fluxes. It can safely be called multiple times.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: An optional pointer to the control structure for this module; if not present, the flux indicies are not stored.

\item {} 
\sphinxstylestrong{verbosity} :: {[}in{]} A 0\sphinxhyphen{}9 integer indicating a level of verbosity.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/register_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_ocmip2\_cfc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ocmip2\_cfc() (fortran subroutine in module mom\_ocmip2\_cfc)@\spxentry{initialize\_ocmip2\_cfc()}\spxextra{fortran subroutine in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/initialize_ocmip2_cfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{initialize\_ocmip2\_cfc}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}}{}
Initialize the OCMP2 CFC tracer fields and set up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_OCMIP2\_CFC.

\item {} 
\sphinxstylestrong{sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/init_tracer_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_tracer\_cfc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{init\_tracer\_cfc() (fortran subroutine in module mom\_ocmip2\_cfc)@\spxentry{init\_tracer\_cfc()}\spxextra{fortran subroutine in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/init_tracer_cfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{init\_tracer\_cfc}}}{\emph{h}, \emph{tr}, \emph{name}, \emph{land\_val}, \emph{IC\_val}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine initializes a tracer array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tr} :: {[}out{]} The tracer concentration array

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The tracer name

\item {} 
\sphinxstylestrong{land\_val} :: {[}in{]} A value the tracer takes over land

\item {} 
\sphinxstylestrong{ic\_val} :: {[}in{]} The initial condition value for the tracer

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_OCMIP2\_CFC.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::tracer\_z\_init}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/initialize_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ocmip2\_cfc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocmip2\_cfc\_column\_physics() (fortran subroutine in module mom\_ocmip2\_cfc)@\spxentry{ocmip2\_cfc\_column\_physics()}\spxextra{fortran subroutine in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{ocmip2\_cfc\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine applies diapycnal diffusion, souces and sinks and any other column tracer physics or chemistry to the OCMIP2 CFC tracers. CFCs are relatively simple, as they are passive tracers with only a surface flux as a source.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_OCMIP2\_CFC.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocmip2\_cfc\_stock() (fortran function in module mom\_ocmip2\_cfc)@\spxentry{ocmip2\_cfc\_stock()}\spxextra{fortran function in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{ocmip2\_cfc\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This function calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_OCMIP2\_CFC.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} The names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} The coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocmip2\_cfc\_surface\_state() (fortran subroutine in module mom\_ocmip2\_cfc)@\spxentry{ocmip2\_cfc\_surface\_state()}\spxextra{fortran subroutine in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{ocmip2\_cfc\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface CFC concentrations and other fields that are shared with the atmosphere to calculate CFC fluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_OCMIP2\_CFC.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocmip2\_cfc\_end() (fortran subroutine in module mom\_ocmip2\_cfc)@\spxentry{ocmip2\_cfc\_end()}\spxextra{fortran subroutine in module mom\_ocmip2\_cfc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc/}}\sphinxbfcode{\sphinxupquote{ocmip2\_cfc\_end}}}{\emph{CS}}{}
Deallocate any memory associated with the OCMIP2 CFC tracer package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_OCMIP2\_CFC.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{MOM\_oda\_driver\_mod module reference}
\label{\detokenize{api/generated/modules/MOM_oda_driver_mod:f/MOM_oda_driver_mod}}\label{\detokenize{api/generated/modules/MOM_oda_driver_mod:mom-oda-driver-mod-module-reference}}\label{\detokenize{api/generated/modules/MOM_oda_driver_mod::doc}}\index{MOM\_oda\_driver\_mod (module)@\spxentry{MOM\_oda\_driver\_mod}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/MOM_oda_driver_mod:detamom-oda-driver-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/MOM_oda_driver_mod:detailed-description}}\label{\detokenize{api/generated/modules/MOM_oda_driver_mod:detamom-oda-driver-mod}}

\paragraph{The Ocean data assimilation (DA) and Ensemble Framework}
\label{\detokenize{api/generated/modules/MOM_oda_driver_mod:the-ocean-data-assimilation-da-and-ensemble-framework}}\label{\detokenize{api/generated/modules/MOM_oda_driver_mod:namespacemom-oda-driver-mod-1section-oda}}
The DA framework implements ensemble capability in MOM6. Currently, this framework is enabled using the cpp directive ENSEMBLE\_OCEAN. The ensembles need to be generated at the level of the calling routine for oda\_init or above. The ensemble instances may exist on overlapping or non\sphinxhyphen{}overlapping processors. The ensemble information is accessed via the FMS ensemble manager. An independent PE layout is used to gather (prior) ensemble member information where this information is stored in the ODA control structure. This module was developed in collaboration with Feiyu Lu and Tony Rosati in the GFDL prediction group for use in their coupled ensemble framework. These interfaces should be suitable for interfacing MOM6 to other data assimilation packages as well.


\subsection{mom\_oda\_driver\_mod module reference}
\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod}}\label{\detokenize{api/generated/modules/mom_oda_driver_mod:mom-oda-driver-mod-module-reference}}\label{\detokenize{api/generated/modules/mom_oda_driver_mod::doc}}\index{mom\_oda\_driver\_mod (module)@\spxentry{mom\_oda\_driver\_mod}\spxextra{module}|spxpagem}
Interfaces for MOM6 ensembles and data assimilation.

{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:detamom-oda-driver-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_oda_driver_mod:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oda\_cs}}}}}
&
Control structure that contains a transpose of the ocean state across ensemble members.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/ptr_mpp_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ptr\_mpp\_domain}}}}}
&
A structure with a pointer to a domain2d, to allow for the creation of arrays of pointers.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_oda_driver_mod:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_oda()}}}}}
&
initialize First\_guess (prior) and Analysis grid information for all ensemble members
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_prior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_prior\_tracer()}}}}}
&
Copy ensemble member tracers to ensemble vector.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/get_posterior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_posterior\_tracer()}}}}}
&
Returns posterior adjustments or full state Note that only those PEs associated with an ensemble member receive data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oda()}}}}}
&
Gather observations and sall ODA routines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oda\_end()}}}}}
&
Finalize DA module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_ocean_ensemble}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_ocean\_ensemble()}}}}}
&
Initialize DA module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_analysis_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_analysis\_time()}}}}}
&
Set the next analysis time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/save_obs_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save\_obs\_diff()}}}}}
&
Write observation differences to a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/apply_oda_tracer_increments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_oda\_tracer\_increments()}}}}}
&
Apply increments to tracers.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_oda_driver_mod:detailed-description}}\label{\detokenize{api/generated/modules/mom_oda_driver_mod:detamom-oda-driver-mod}}
Interfaces for MOM6 ensembles and data assimilation.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_oda_driver_mod:type-documentation}}\index{oda\_cs (fortran type in module mom\_oda\_driver\_mod)@\spxentry{oda\_cs}\spxextra{fortran type in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{oda\_cs}}}
Control structure that contains a transpose of the ocean state across ensemble members.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocean\_prior}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_control\_struct )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ensemble ocean prior states in DA space

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocean\_posterior}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_control\_struct )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ensemble ocean posterior states or increments to prior in DA space

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of vertical layers used for DA

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: MOM6 grid type and decomposition for the DA.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{domains}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ptr\_mpp\_domain )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to mpp\_domain objects for ensemble members.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(verticalgrid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: vertical grid for DA

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure containing various unit conversion factors for DA

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mpp\_domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(domain2d)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to a mpp domain object for DA.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oda\_grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( grid\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: local tracer grid

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} for DA

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(thermo\_var\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: pointer to thermodynamic variables

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ni}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: global i\sphinxhyphen{}direction grid size

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: global j\sphinxhyphen{}direction grid size

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{reentrant\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: grid is reentrant in the x direction

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{reentrant\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: grid is reentrant in the y direction

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tripolar\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: grid is folded at its north edge

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{symmetric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Values at C\sphinxhyphen{}grid locations are symmetric.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{assim\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Method: NO\_ASSIM,EAKF\_ASSIM or OI\_ASSIM.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ensemble\_size}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Size of the ensemble.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ensemble\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: id of the current ensemble member

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ensemble\_pelist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: PE list for ensemble members.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{filter\_pelist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: PE list for ensemble members.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{assim\_frequency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: analysis interval in hours

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{profiles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_profile\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: pointer to linked list of all available profiles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cprofiles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_profile\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: pointer to linked list of current profiles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kdroot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( kd\_root )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure for storing nearest neighbors.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ALE control structure for DA.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ale\_algorithm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: true is using ALE remapping

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regridcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(regridding\_cs)}\sphinxstyleemphasis{{]}} :: ALE control structure for regridding.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remapcs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: ALE control structure for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: Current Analysis time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{{]}} :: Diagnostics control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ptr\_mpp\_domain (fortran type in module mom\_oda\_driver\_mod)@\spxentry{ptr\_mpp\_domain}\spxextra{fortran type in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/ptr_mpp_domain}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{ptr\_mpp\_domain}}}
A structure with a pointer to a domain2d, to allow for the creation of arrays of pointers.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mpp\_domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(domain2d)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: pointer to an mpp domain2d

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_oda_driver_mod:function-subroutine-documentation}}\index{init\_oda() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{init\_oda()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{init\_oda}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{CS}}{}
initialize First\_guess (prior) and Analysis grid information for all ensemble members
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: domain and grid information for ocean model

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} The DA control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initthicknesstocoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_initthicknesstocoord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_updateverticalgridtype}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_updateverticalgridtype}}}}} {\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_dyngrid_to_mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_transcribe\_grid::copy\_dyngrid\_to\_mom\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/create_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::create\_dyn\_horgrid}}}}} \sphinxcode{\sphinxupquote{eakf\_assim}} {\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}} {\hyperref[\detokenize{api/generated/modules/mom_hor_index:f/mom_hor_index/hor_index_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_hor\_index::hor\_index\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_ocean_ensemble}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_ocean\_ensemble}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::initialize\_remapping}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domains_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::mom\_domains\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/mom_grid_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::mom\_grid\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::mom\_initialize\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}} \sphinxcode{\sphinxupquote{no\_assim}} {\hyperref[\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod/ocean_da_core_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_da\_core\_mod::ocean\_da\_core\_init}}}}} \sphinxcode{\sphinxupquote{oi\_assim}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/set_axes_info}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::set\_axes\_info}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid_initialize:f/mom_grid_initialize/set_grid_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid\_initialize::set\_grid\_metrics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_scaling::unit\_scaling\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgridinit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_verticalgrid::verticalgridinit}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_prior\_tracer() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{set\_prior\_tracer()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_prior_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{set\_prior\_tracer}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{h}, \emph{tv}, \emph{CS}}{}
Copy ensemble member tracers to ensemble vector.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: domain and grid information for ocean model

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{cs} :: ocean DA control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_posterior\_tracer() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{get\_posterior\_tracer()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/get_posterior_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{get\_posterior\_tracer}}}{\emph{Time}, \emph{CS}, \emph{h}, \emph{tv}, \emph{increment}}{}
Returns posterior adjustments or full state Note that only those PEs associated with an ensemble member receive data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} the current model time

\item {} 
\sphinxstylestrong{cs} :: ocean DA control structure

\item {} 
\sphinxstylestrong{h} :: Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{increment} :: {[}in{]} True if returning increment only

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_ocean_ensemble}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_ocean\_ensemble}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{oda() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{oda()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{oda}}}{\emph{Time}, \emph{CS}}{}
Gather observations and sall ODA routines.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} the current model time

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} the ocean DA control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod/get_profiles}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_da\_core\_mod::get\_profiles}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{oda\_end() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{oda\_end()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{oda\_end}}}{\emph{CS}}{}
Finalize DA module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} the ocean DA control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{init\_ocean\_ensemble() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{init\_ocean\_ensemble()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_ocean_ensemble}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{init\_ocean\_ensemble}}}{\emph{CS}, \emph{Grid}, \emph{GV}, \emph{ens\_size}}{}
Initialize DA module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Pointer to ODA control structure

\item {} 
\sphinxstylestrong{grid} :: Pointer to ocean analysis grid

\item {} 
\sphinxstylestrong{gv} :: Pointer to DA vertical grid

\item {} 
\sphinxstylestrong{ens\_size} :: {[}in{]} ensemble size

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/get_posterior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_posterior\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_analysis\_time() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{set\_analysis\_time()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_analysis_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{set\_analysis\_time}}}{\emph{Time}, \emph{CS}}{}
Set the next analysis time.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} the current model time

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} the DA control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{save\_obs\_diff() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{save\_obs\_diff()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/save_obs_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{save\_obs\_diff}}}{\emph{filename}, \emph{CS}}{}
Write observation differences to a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} name of output file

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} pointer to DA control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/close_profile_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod::close\_profile\_file}}}}} {\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/write_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod::write\_profile}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_oda\_tracer\_increments() (fortran subroutine in module mom\_oda\_driver\_mod)@\spxentry{apply\_oda\_tracer\_increments()}\spxextra{fortran subroutine in module mom\_oda\_driver\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/apply_oda_tracer_increments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod/}}\sphinxbfcode{\sphinxupquote{apply\_oda\_tracer\_increments}}}{\emph{dt}, \emph{G}, \emph{tv}, \emph{h}, \emph{CS}}{}
Apply increments to tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The tracer timestep {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} the data assimilation structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_offline\_aux module reference}
\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux}}\label{\detokenize{api/generated/modules/mom_offline_aux:mom-offline-aux-module-reference}}\label{\detokenize{api/generated/modules/mom_offline_aux::doc}}\index{mom\_offline\_aux (module)@\spxentry{mom\_offline\_aux}\spxextra{module}|spxpagem}
Contains routines related to offline transport of tracers. These routines are likely to be called from the MOM\_offline\_main module.

{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:detamom-offline-aux}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_offline_aux:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_h_horizontal_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_h\_horizontal\_flux()}}}}}
&
This updates thickness based on the convergence of horizontal mass fluxes NOTE: Only used in non\sphinxhyphen{}ALE mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_h_vertical_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_h\_vertical\_flux()}}}}}
&
Updates layer thicknesses due to vertical mass transports NOTE: Only used in non\sphinxhyphen{}ALE configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/limit_mass_flux_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{limit\_mass\_flux\_3d()}}}}}
&
This routine limits the mass fluxes so that the a layer cannot be completely depleted.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_barotropic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{distribute\_residual\_uh\_barotropic()}}}}}
&
In the case where offline advection has failed to converge, redistribute the u\sphinxhyphen{}flux into remainder of the water column as a barotropic equivalent.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_barotropic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{distribute\_residual\_vh\_barotropic()}}}}}
&
Redistribute the v\sphinxhyphen{}flux as a barotropic equivalent.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_upwards}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{distribute\_residual\_uh\_upwards()}}}}}
&
In the case where offline advection has failed to converge, redistribute the u\sphinxhyphen{}flux into layers above.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_upwards}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{distribute\_residual\_vh\_upwards()}}}}}
&
In the case where offline advection has failed to converge, redistribute the u\sphinxhyphen{}flux into layers above.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/offline_add_diurnal_sw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_add\_diurnal\_sw()}}}}}
&
add\_diurnal\_SW adjusts the shortwave fluxes in an forcying\_type variable to add a synthetic diurnal cycle. Adapted from SIS2
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_offline_from_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_offline\_from\_files()}}}}}
&
Controls the reading in 3d mass fluxes, diffusive fluxes, and other fields stored in a previous integration of the online model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_offline_from_arrays}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_offline\_from\_arrays()}}}}}
&
Fields for offline transport are copied from the stored arrays read during initialization.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/next_modulo_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{next\_modulo\_time()}}}}}
&
Calculates the next timelevel to read from the input fields.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_offline_aux:detailed-description}}\label{\detokenize{api/generated/modules/mom_offline_aux:detamom-offline-aux}}
Contains routines related to offline transport of tracers. These routines are likely to be called from the MOM\_offline\_main module.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_offline_aux:function-subroutine-documentation}}\index{update\_h\_horizontal\_flux() (fortran subroutine in module mom\_offline\_aux)@\spxentry{update\_h\_horizontal\_flux()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_h_horizontal_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{update\_h\_horizontal\_flux}}}{\emph{G}, \emph{GV}, \emph{uhtr}, \emph{vhtr}, \emph{h\_pre}, \emph{h\_new}}{}
This updates thickness based on the convergence of horizontal mass fluxes NOTE: Only used in non\sphinxhyphen{}ALE mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{uhtr} :: {[}in{]} Accumulated mass flux through zonal face {[}kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}in{]} Accumulated mass flux through meridional face {[}kg{]}

\item {} 
\sphinxstylestrong{h\_pre} :: {[}in{]} Previous layer thicknesses {[}kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}inout{]} Updated layer thicknesses {[}kg m\sphinxhyphen{}2{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_h\_vertical\_flux() (fortran subroutine in module mom\_offline\_aux)@\spxentry{update\_h\_vertical\_flux()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_h_vertical_flux}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{update\_h\_vertical\_flux}}}{\emph{G}, \emph{GV}, \emph{ea}, \emph{eb}, \emph{h\_pre}, \emph{h\_new}}{}
Updates layer thicknesses due to vertical mass transports NOTE: Only used in non\sphinxhyphen{}ALE configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} Mass of fluid entrained from the layer

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} Mass of fluid entrained from the layer

\item {} 
\sphinxstylestrong{h\_pre} :: {[}in{]} Layer thicknesses at the end of the previous

\item {} 
\sphinxstylestrong{h\_new} :: {[}inout{]} Updated layer thicknesses {[}kg m\sphinxhyphen{}2{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{limit\_mass\_flux\_3d() (fortran subroutine in module mom\_offline\_aux)@\spxentry{limit\_mass\_flux\_3d()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/limit_mass_flux_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{limit\_mass\_flux\_3d}}}{\emph{G}, \emph{GV}, \emph{uh}, \emph{vh}, \emph{ea}, \emph{eb}, \emph{h\_pre}}{}
This routine limits the mass fluxes so that the a layer cannot be completely depleted. NOTE: Only used in non\sphinxhyphen{}ALE mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} Mass flux through zonal face {[}kg{]}

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} Mass flux through meridional face {[}kg{]}

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} Mass of fluid entrained from the layer

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} Mass of fluid entrained from the layer

\item {} 
\sphinxstylestrong{h\_pre} :: {[}in{]} Layer thicknesses at the end of the previous

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{distribute\_residual\_uh\_barotropic() (fortran subroutine in module mom\_offline\_aux)@\spxentry{distribute\_residual\_uh\_barotropic()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_barotropic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{distribute\_residual\_uh\_barotropic}}}{\emph{G}, \emph{GV}, \emph{hvol}, \emph{uh}}{}
In the case where offline advection has failed to converge, redistribute the u\sphinxhyphen{}flux into remainder of the water column as a barotropic equivalent.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{hvol} :: {[}in{]} Mass of water in the cells at the end

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} Zonal mass transport within a timestep {[}kg{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{distribute\_residual\_vh\_barotropic() (fortran subroutine in module mom\_offline\_aux)@\spxentry{distribute\_residual\_vh\_barotropic()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_barotropic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{distribute\_residual\_vh\_barotropic}}}{\emph{G}, \emph{GV}, \emph{hvol}, \emph{vh}}{}
Redistribute the v\sphinxhyphen{}flux as a barotropic equivalent.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{hvol} :: {[}in{]} Mass of water in the cells at the end

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} Meridional mass transport within a timestep {[}kg{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{distribute\_residual\_uh\_upwards() (fortran subroutine in module mom\_offline\_aux)@\spxentry{distribute\_residual\_uh\_upwards()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_upwards}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{distribute\_residual\_uh\_upwards}}}{\emph{G}, \emph{GV}, \emph{hvol}, \emph{uh}}{}
In the case where offline advection has failed to converge, redistribute the u\sphinxhyphen{}flux into layers above.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{hvol} :: {[}in{]} Mass of water in the cells at the end

\item {} 
\sphinxstylestrong{uh} :: {[}inout{]} Zonal mass transport within a timestep {[}kg{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_redistribute\_residual}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{distribute\_residual\_vh\_upwards() (fortran subroutine in module mom\_offline\_aux)@\spxentry{distribute\_residual\_vh\_upwards()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_upwards}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{distribute\_residual\_vh\_upwards}}}{\emph{G}, \emph{GV}, \emph{hvol}, \emph{vh}}{}
In the case where offline advection has failed to converge, redistribute the u\sphinxhyphen{}flux into layers above.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: ocean vertical grid structure

\item {} 
\sphinxstylestrong{hvol} :: {[}in{]} Mass of water in the cells at the end

\item {} 
\sphinxstylestrong{vh} :: {[}inout{]} Meridional mass transport within a timestep {[}kg{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_redistribute\_residual}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_add\_diurnal\_sw() (fortran subroutine in module mom\_offline\_aux)@\spxentry{offline\_add\_diurnal\_sw()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/offline_add_diurnal_sw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{offline\_add\_diurnal\_sw}}}{\emph{fluxes}, \emph{G}, \emph{Time\_start}, \emph{Time\_end}}{}
add\_diurnal\_SW adjusts the shortwave fluxes in an forcying\_type variable to add a synthetic diurnal cycle. Adapted from SIS2
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} The type with atmospheric fluxes to be adjusted.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean lateral grid type.

\item {} 
\sphinxstylestrong{time\_start} :: {[}in{]} The start time for this step.

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} The ending time for this step.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_offline\_from\_files() (fortran subroutine in module mom\_offline\_aux)@\spxentry{update\_offline\_from\_files()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_offline_from_files}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{update\_offline\_from\_files}}}{\emph{G}, \emph{GV}, \emph{nk\_input}, \emph{mean\_file}, \emph{sum\_file}, \emph{snap\_file}, \emph{surf\_file}, \emph{h\_end}, \emph{uhtr}, \emph{vhtr}, \emph{temp\_mean}, \emph{salt\_mean}, \emph{mld}, \emph{Kd}, \emph{fluxes}, \emph{ridx\_sum}, \emph{ridx\_snap}, \emph{read\_mld}, \emph{read\_sw}, \emph{read\_ts\_uvh}, \emph{do\_ale\_in}}{}
Controls the reading in 3d mass fluxes, diffusive fluxes, and other fields stored in a previous integration of the online model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Horizontal grid type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid type

\item {} 
\sphinxstylestrong{nk\_input} :: {[}in{]} Number of levels in input file

\item {} 
\sphinxstylestrong{mean\_file} :: {[}in{]} Name of file with averages fields

\item {} 
\sphinxstylestrong{sum\_file} :: {[}in{]} Name of file with summed fields

\item {} 
\sphinxstylestrong{snap\_file} :: {[}in{]} Name of file with snapshot fields

\item {} 
\sphinxstylestrong{surf\_file} :: {[}in{]} Name of file with surface fields

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Zonal mass fluxes {[}kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Meridional mass fluxes {[}kg{]}

\item {} 
\sphinxstylestrong{h\_end} :: {[}inout{]} End of timestep layer thickness

\item {} 
\sphinxstylestrong{temp\_mean} :: {[}inout{]} Averaged temperature

\item {} 
\sphinxstylestrong{salt\_mean} :: {[}inout{]} Averaged salinity

\item {} 
\sphinxstylestrong{mld} :: {[}inout{]} Averaged mixed layer depth

\item {} 
\sphinxstylestrong{kd} :: {[}inout{]} Diapycnal diffusivities at interfaces

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Fields with surface fluxes

\item {} 
\sphinxstylestrong{ridx\_sum} :: {[}in{]} Read index for sum, mean, and surf files

\item {} 
\sphinxstylestrong{ridx\_snap} :: {[}in{]} Read index for snapshot file

\item {} 
\sphinxstylestrong{read\_mld} :: {[}in{]} True if reading in MLD

\item {} 
\sphinxstylestrong{read\_sw} :: {[}in{]} True if reading in radiative fluxes

\item {} 
\sphinxstylestrong{read\_ts\_uvh} :: {[}in{]} True if reading in uh, vh, and h

\item {} 
\sphinxstylestrong{do\_ale\_in} :: {[}in{]} True if using ALE algorithms

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_offline\_from\_arrays() (fortran subroutine in module mom\_offline\_aux)@\spxentry{update\_offline\_from\_arrays()}\spxextra{fortran subroutine in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/update_offline_from_arrays}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{update\_offline\_from\_arrays}}}{\emph{G}, \emph{GV}, \emph{nk\_input}, \emph{ridx\_sum}, \emph{mean\_file}, \emph{sum\_file}, \emph{snap\_file}, \emph{uhtr}, \emph{vhtr}, \emph{hend}, \emph{uhtr\_all}, \emph{vhtr\_all}, \emph{hend\_all}, \emph{temp}, \emph{salt}, \emph{temp\_all}, \emph{salt\_all}}{}
Fields for offline transport are copied from the stored arrays read during initialization.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Horizontal grid type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid type

\item {} 
\sphinxstylestrong{nk\_input} :: {[}in{]} Number of levels in input file

\item {} 
\sphinxstylestrong{ridx\_sum} :: {[}in{]} Index to read from

\item {} 
\sphinxstylestrong{mean\_file} :: {[}in{]} Name of file with averages fields

\item {} 
\sphinxstylestrong{sum\_file} :: {[}in{]} Name of file with summed fields

\item {} 
\sphinxstylestrong{snap\_file} :: {[}in{]} Name of file with snapshot fields

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Zonal mass fluxes {[}kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Meridional mass fluxes {[}kg{]}

\item {} 
\sphinxstylestrong{hend} :: {[}inout{]} End of timestep layer thickness {[}kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uhtr\_all} :: {[}inout{]} Zonal mass fluxes {[}kg{]}

\item {} 
\sphinxstylestrong{vhtr\_all} :: {[}inout{]} Meridional mass fluxes {[}kg{]}

\item {} 
\sphinxstylestrong{hend\_all} :: {[}inout{]} End of timestep layer thickness {[}kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{temp} :: {[}inout{]} Temperature array

\item {} 
\sphinxstylestrong{salt} :: {[}inout{]} Salinity array

\item {} 
\sphinxstylestrong{temp\_all} :: {[}inout{]} Temperature array

\item {} 
\sphinxstylestrong{salt\_all} :: {[}inout{]} Salinity array

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{next\_modulo\_time() (fortran function in module mom\_offline\_aux)@\spxentry{next\_modulo\_time()}\spxextra{fortran function in module mom\_offline\_aux}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/next_modulo_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_offline\_aux/}}\sphinxbfcode{\sphinxupquote{next\_modulo\_time}}}{\emph{inidx}, \emph{numtime}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Calculates the next timelevel to read from the input fields. This allows the ‘looping’ of the fields.

\end{fulllineitems}



\subsection{mom\_offline\_main module reference}
\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main}}\label{\detokenize{api/generated/modules/mom_offline_main:mom-offline-main-module-reference}}\label{\detokenize{api/generated/modules/mom_offline_main::doc}}\index{mom\_offline\_main (module)@\spxentry{mom\_offline\_main}\spxextra{module}|spxpagem}
The routines here implement the offline tracer algorithm used in MOM6. These are called from step\_offline Some routines called here can be found in the MOM\_offline\_aux module.

{\hyperref[\detokenize{api/generated/modules/mom_offline_main:detamom-offline-main}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_offline_main:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_transport\_cs}}}}}
&
The control structure for the offline transport module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_offline_main:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_advection\_ale()}}}}}
&
3D advection is done by doing flux\sphinxhyphen{}limited nonlinear horizontal advection interspersed with an ALE regridding/remapping step. The loop in this routine is exited if remaining residual transports are below a runtime\sphinxhyphen{}specified value or a maximum number of iterations is reached.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_redistribute\_residual()}}}}}
&
In the case where the main advection routine did not converge, something needs to be done with the remaining transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/remaining_transport_sum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remaining\_transport\_sum()}}}}}
&
Sums any non\sphinxhyphen{}negligible remaining transport to check for advection convergence.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_diabatic\_ale()}}}}}
&
The vertical/diabatic driver for offline tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_into_ocean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_fw\_fluxes\_into\_ocean()}}}}}
&
Apply positive freshwater fluxes (into the ocean) and update netMassOut with only the negative (out of the ocean) fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_out_ocean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_fw\_fluxes\_out\_ocean()}}}}}
&
Apply negative freshwater fluxes (out of the ocean)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_advection\_layer()}}}}}
&
When in layer mode, 3D horizontal advection using stored mass fluxes must be used.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/update_offline_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_offline\_fields()}}}}}
&
Update fields used in this round of offline transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/register_diags_offline_transport}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_diags\_offline\_transport()}}}}}
&
Initialize additional diagnostics required for offline tracer transport.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/post_offline_convergence_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_offline\_convergence\_diags()}}}}}
&
Posts diagnostics related to offline convergence diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/extract_offline_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_offline\_main()}}}}}
&
Extracts members of the offline main control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/insert_offline_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{insert\_offline\_main()}}}}}
&
Inserts (assigns values to) members of the offline main control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_transport\_init()}}}}}
&
Initializes the control structure for offline transport and reads in some of the.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/read_all_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_all\_input()}}}}}
&
Coordinates the allocation and reading in all time levels of uh, vh, hend, temp, and salt from files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_transport\_end()}}}}}
&
Deallocates (if necessary) arrays within the offline control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_offline_main:detailed-description}}\label{\detokenize{api/generated/modules/mom_offline_main:detamom-offline-main}}

\paragraph{Offline Tracer Transport in MOM6}
\label{\detokenize{api/generated/modules/mom_offline_main:offline-tracer-transport-in-mom6}}\label{\detokenize{api/generated/modules/mom_offline_main:namespacemom-offline-main-1offline-overview}}
‘Offline tracer modeling’ uses physical fields (e.g. mass transports and layer thicknesses) saved from a previous integration of the physical model to transport passive tracers. These fields are accumulated or averaged over a period of time (in this test case, 1 day) and used to integrate portions of the MOM6 code base that handle the 3d advection and diffusion of passive tracers.

The distribution of tracers in the ocean modeled offline should not be expected to match an online simulation. Accumulating transports over more than one online model timestep implicitly assumes homogeneity over that time period and essentially aliases over processes that occur with higher frequency. For example, consider the case of a surface boundary layer with a strong diurnal cycle. An offline simulation with a 1 day timestep, captures the net transport into or out of that layer, but not the exact cycling. This effective aliasing may also complicate online model configurations which strongly\sphinxhyphen{}eddying regions. In this case, the offline model timestep must be limited to some fraction of the eddy correlation timescale. Lastly, the nonlinear advection scheme which applies limited mass\sphinxhyphen{}transports over a sequence of iterations means that tracers are not transported along exactly the same path as they are in the online model.

This capability has currently targeted the Baltic\_ALE\_z test case, though some work has also been done with the OM4 1/2 degree configuration. Work is ongoing to develop recommendations and best practices for investigators seeking to use MOM6 for offline tracer modeling.


\paragraph{Implementation of offline routine in MOM6}
\label{\detokenize{api/generated/modules/mom_offline_main:implementation-of-offline-routine-in-mom6}}\label{\detokenize{api/generated/modules/mom_offline_main:namespacemom-offline-main-1offline-technical}}
The subroutine step\_tracers that coordinates this can be found in \sphinxcode{\sphinxupquote{MOM.F90}}
and is only called using the solo ocean driver. This is to avoid issues with coupling to other climate components that may be relying on fluxes from the ocean to be coupled more often than the offline time step. Other routines related to offline tracer modeling can be found in tracers/MOM\_offline\_control.F90

As can also be seen in the comments for the step\_tracers subroutine, an offline time step comprises the following steps:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Using the layer thicknesses and tracer concentrations from the previous timestep, half of the accumulated vertical mixing (eatr and ebtr) is applied in the call to tracer\_column\_fns. For tracers whose source/sink terms need dt, this value is set to 1/2 dt\_offline

\item {} 
Half of the accumulated surface freshwater fluxes are applied START ITERATION

\item {} 
Accumulated mass fluxes are used to do horizontal transport. The number of iterations used in advect\_tracer is limited to 2 (e.g x\sphinxhyphen{}\textgreater{}y\sphinxhyphen{}\textgreater{}x\sphinxhyphen{}\textgreater{}y). The remaining mass fluxes are stored for later use and resulting layer thicknesses fed into the next step

\item {} 
Tracers and the h\sphinxhyphen{}grid are regridded and remapped in a call to ALE. This allows for layers which might ‘vanish’ because of horizontal mass transport to be ‘reinflated’ and essentially allows for the vertical transport of tracers

\item {} 
Check that transport is done if the remaining mass fluxes equals 0 or if the max number of iterations has been reached END ITERATION

\item {} 
Repeat steps 1 and 2

\item {} 
Redistribute any residual mass fluxes that remain after the advection iterations in a barotropic manner, progressively upward through the water column.

\item {} 
Force a remapping to the stored layer thicknesses that correspond to the snapshot of the online model at the end of an accumulation interval

\item {} 
Reset T/S and h to their stored snapshotted values to prevent model drift

\end{enumerate}


\paragraph{Evaluating the utility of an offline tracer model}
\label{\detokenize{api/generated/modules/mom_offline_main:evaluating-the-utility-of-an-offline-tracer-model}}\label{\detokenize{api/generated/modules/mom_offline_main:namespacemom-offline-main-1offline-evaluation}}
How well an offline tracer model can be used as an alternative to integrating tracers online with the prognostic model must be evaluated for each application. This efficacy may be related to the native coordinate of the online model, to the length of the offline timestep, and to the behavior of the tracer itself.

A framework for formally regression testing the offline capability still needs to be developed. However, as a simple way of testing whether the offline model is nominally behaving as expected, the total inventory of the advection test tracers (tr1, tr2, etc.) should be conserved between time steps except for the last 4 decimal places. As a general guideline, an offline timestep of 5 days or less.


\paragraph{Runtime parameters for offline tracers}
\label{\detokenize{api/generated/modules/mom_offline_main:runtime-parameters-for-offline-tracers}}\label{\detokenize{api/generated/modules/mom_offline_main:namespacemom-offline-main-1offline-parameters}}\begin{itemize}
\item {} 
OFFLINEDIR: Input directory where the offline fields can be found

\item {} 
OFF\_SUM\_FILE: Filename where the accumulated fields can be found (e.g. horizontal mass transports)

\item {} 
OFF\_SNAP\_FILE: Filename where snapshot fields can be found (e.g. end of timestep layer thickness)

\item {} 
START\_INDEX: Which timelevel of the input files to read first

\item {} 
NUMTIME: How many timelevels to read before ‘looping’ back to 1

\item {} 
FIELDS\_ARE\_OFFSET: True if the time\sphinxhyphen{}averaged fields and snapshot fields are offset by one time level, probably not needed \sphinxhyphen{}NUM\_OFF\_ITER: Maximum number of iterations to do for the nonlinear advection scheme \sphinxhyphen{}REDISTRIBUTE\_METHOD: Redistributes any remaining horizontal fluxes throughout the rest of water column. Options are ‘barotropic’ which “evenly distributes flux throughout the entire water column,’upwards’ which adds the maximum of the remaining flux in each layer above, and ‘none’ which does no redistribution”

\end{itemize}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_offline_main:type-documentation}}\index{offline\_transport\_cs (fortran type in module mom\_offline\_main)@\spxentry{offline\_transport\_cs}\spxextra{fortran type in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_transport\_cs}}}
The control structure for the offline transport module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ebr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hdiff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhr\_redist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhr\_redist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhr\_end}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhr\_end}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_pre\_distribute}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_post\_distribute}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_redist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_eta\_diff\_end}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhtr\_regrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhtr\_regrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_temp\_regrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_salt\_regrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_regrid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic manager IDs for some fields that may be of interest when doing offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ale\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ale\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ALE control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diabatic\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the diabatic control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Structure that regulates diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_obc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the open boundary condition control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_adv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_advect\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer advection control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{opacity\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(opacity\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the opacity control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_flow\_control\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to control structure that orchestrates the calling of tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(thermo\_var\_ptrs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure pointing to various thermodynamic variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to a structure containing metrics and related information.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(verticalgrid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to structure containing information about the vertical grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure containing various unit conversion factors

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{optics}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(optics\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the optical properties type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_aux\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diabatic\_aux\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the diabatic\_aux control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{start\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Variables related to reading in fields from online run.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iter\_no}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Timelevel to start.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{numtime}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: How many timelevels in the input fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{accumulated\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: Length of time accumulated in the current offline interval.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertical\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The next value of accumulate\_time at which to apply vertical processes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ridx\_sum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Read index offset of the summed variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ridx\_snap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Read index offset of the snapshot variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk\_input}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of input levels in the input fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{offlinedir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Directory where offline fields are stored.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{surf\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Contains surface fields (2d arrays)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{snap\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Snapshotted fields (layer thicknesses)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sum\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Fields which are accumulated over time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mean\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Fields averaged over time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{redistribute\_method}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=20)}\sphinxstyleemphasis{{]}} :: ‘barotropic’ if evenly distributing extra flow throughout entire watercolumn, ‘upwards’, if trying to do it just in the layers above ‘both’ if both methods are used

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld\_var\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=20)}\sphinxstyleemphasis{{]}} :: Name of the mixed layer depth variable to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fields\_are\_offset}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the time\sphinxhyphen{}averaged fields and snapshot fields are offset by one time level.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x\_before\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Which horizontal direction is advected first.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{print\_adv\_offline}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Prints out some updates each advection sub interation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{skip\_diffusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Skips horizontal diffusion of tracers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Read in averaged values for shortwave radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_mld}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Check to see whether mixed layer depths should be read in.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diurnal\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Adds a synthetic diurnal cycle on shortwave radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose debugging messages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{redistribute\_barotropic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Redistributes column\sphinxhyphen{}summed residual transports throughout a column weighted by thickness.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{redistribute\_upwards}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Redistributes remaining fluxes only in layers above the current one based as the max allowable transport in that cell.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_all\_ts\_uvh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, then all timelevels of temperature, salinity, mass transports, and Layer thicknesses are read during initialization Variables controlling some of the numerical considerations of offline transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_off\_iter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of advection iterations per offline step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_vert\_iter}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of vertical iterations per offline step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{off\_ale\_mod}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Sets how frequently the ALE step is done during the advection.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_offline}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Timestep used for offline tracers {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_offline\_vertical}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Timestep used for calls to tracer vertical physics {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evap\_cfl\_limit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}. This is Copied from diabatic\_CS controlling how tracers follow freshwater fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{minimum\_forcing\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. This is copied from diabatic\_CS controlling how tracers follow freshwater fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Runtime parameter specifying the maximum value of vertical diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_residual}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum amount of total mass flux before exiting the main advection routine.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_clock\_read\_fields}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A CPU time clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_clock\_offline\_diabatic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A CPU time clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_clock\_offline\_adv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A CPU time clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_clock\_redistribute}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A CPU time clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uhtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Zonal transport that may need to be stored between calls to step\_MOM.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vhtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Meridional transport that may need to be stored between calls to step\_MOM.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eatr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Amount of fluid entrained from the layer above within one time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ebtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Amount of fluid entrained from the layer below within one time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Vertical diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_end}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Thicknesses at the end of offline timestep.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netmassin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Freshwater fluxes into the ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{netmassout}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Freshwater fluxes out of the ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Mixed layer depths at thickness points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uhtr\_all}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Entire field of zonal transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vhtr\_all}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Entire field of mericional transport.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hend\_all}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Entire field of layer thicknesses.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{temp\_all}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Entire field of temperatures.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_all}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Entire field of salinities.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_offline_main:function-subroutine-documentation}}\index{offline\_advection\_ale() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_advection\_ale()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_ale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_advection\_ale}}}{\emph{fluxes}, \emph{Time\_start}, \emph{time\_interval}, \emph{CS}, \emph{id\_clock\_ale}, \emph{h\_pre}, \emph{uhtr}, \emph{vhtr}, \emph{converged}}{}
3D advection is done by doing flux\sphinxhyphen{}limited nonlinear horizontal advection interspersed with an ALE regridding/remapping step. The loop in this routine is exited if remaining residual transports are below a runtime\sphinxhyphen{}specified value or a maximum number of iterations is reached.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} pointers to forcing fields

\item {} 
\sphinxstylestrong{time\_start} :: {[}in{]} starting time of a segment, as a time type

\item {} 
\sphinxstylestrong{time\_interval} :: {[}in{]} time interval

\item {} 
\sphinxstylestrong{cs} :: control structure for offline module

\item {} 
\sphinxstylestrong{id\_clock\_ale} :: {[}in{]} Clock for ALE routines

\item {} 
\sphinxstylestrong{h\_pre} :: {[}inout{]} layer thicknesses before advection

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Zonal mass transport {[}H m2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Meridional mass transport {[}H m2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{converged} :: {[}out{]} True if the iterations have converged

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_advect::advect\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_main_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_main\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/remaining_transport_sum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remaining\_transport\_sum}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_redistribute\_residual() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_redistribute\_residual()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_redistribute\_residual}}}{\emph{CS}, \emph{h\_pre}, \emph{uhtr}, \emph{vhtr}, \emph{converged}}{}
In the case where the main advection routine did not converge, something needs to be done with the remaining transport. Two different ways are offered, ‘barotropic’ means that the residual is distributed equally throughout the water column. ‘upwards’ attempts to redistribute the transport in the layers above and will eventually work down the entire water column.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: control structure from initialize\_MOM

\item {} 
\sphinxstylestrong{h\_pre} :: {[}inout{]} layer thicknesses before advection

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Zonal mass transport

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Meridional mass transport

\item {} 
\sphinxstylestrong{converged} :: {[}in{]} True if the iterations have converged

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_advect::advect\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_uh_upwards}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::distribute\_residual\_uh\_upwards}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_aux:f/mom_offline_aux/distribute_residual_vh_upwards}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_aux::distribute\_residual\_vh\_upwards}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/remaining_transport_sum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remaining\_transport\_sum}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remaining\_transport\_sum() (fortran function in module mom\_offline\_main)@\spxentry{remaining\_transport\_sum()}\spxextra{fortran function in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/remaining_transport_sum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{remaining\_transport\_sum}}}{\emph{CS}, \emph{uhtr}, \emph{vhtr}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Sums any non\sphinxhyphen{}negligible remaining transport to check for advection convergence.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: control structure for offline module

\item {} 
\sphinxstylestrong{uhtr} :: {[}in{]} Zonal mass transport

\item {} 
\sphinxstylestrong{vhtr} :: {[}in{]} Meridional mass transport

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_advection\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_redistribute\_residual}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_diabatic\_ale() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_diabatic\_ale()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_diabatic_ale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_diabatic\_ale}}}{\emph{fluxes}, \emph{Time\_start}, \emph{Time\_end}, \emph{CS}, \emph{h\_pre}, \emph{eatr}, \emph{ebtr}}{}
The vertical/diabatic driver for offline tracers. First the eatr/ebtr associated with the interpolated vertical diffusivities are calculated and then any tracer column functions are done which can include vertical diffuvities and source/sink terms.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} pointers to forcing fields

\item {} 
\sphinxstylestrong{time\_start} :: {[}in{]} starting time of a segment, as a time type

\item {} 
\sphinxstylestrong{time\_end} :: {[}in{]} time interval

\item {} 
\sphinxstylestrong{cs} :: control structure from initialize\_MOM

\item {} 
\sphinxstylestrong{h\_pre} :: {[}inout{]} layer thicknesses before advection {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eatr} :: {[}inout{]} Entrainment from layer above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ebtr} :: {[}inout{]} Entrainment from layer below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_fw\_fluxes\_into\_ocean() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_fw\_fluxes\_into\_ocean()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_into_ocean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_fw\_fluxes\_into\_ocean}}}{\emph{G}, \emph{GV}, \emph{CS}, \emph{fluxes}, \emph{h}, \emph{in\_flux\_optional}}{}
Apply positive freshwater fluxes (into the ocean) and update netMassOut with only the negative (out of the ocean) fluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Offline control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Surface fluxes container

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{in\_flux\_optional} :: {[}in{]} The total time\sphinxhyphen{}integrated amount

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_fw\_fluxes\_out\_ocean() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_fw\_fluxes\_out\_ocean()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_out_ocean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_fw\_fluxes\_out\_ocean}}}{\emph{G}, \emph{GV}, \emph{CS}, \emph{fluxes}, \emph{h}, \emph{out\_flux\_optional}}{}
Apply negative freshwater fluxes (out of the ocean)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Offline control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Surface fluxes container

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{out\_flux\_optional} :: {[}in{]} The total time\sphinxhyphen{}integrated amount

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chkinv}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_advection\_layer() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_advection\_layer()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_layer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_advection\_layer}}}{\emph{fluxes}, \emph{Time\_start}, \emph{time\_interval}, \emph{CS}, \emph{h\_pre}, \emph{eatr}, \emph{ebtr}, \emph{uhtr}, \emph{vhtr}}{}
When in layer mode, 3D horizontal advection using stored mass fluxes must be used. Horizontal advection is done via tracer\_advect, whereas the vertical component is actually handled by vertdiff in tracer\_column\_fns.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} pointers to forcing fields

\item {} 
\sphinxstylestrong{time\_start} :: {[}in{]} starting time of a segment, as a time type

\item {} 
\sphinxstylestrong{time\_interval} :: {[}in{]} Offline transport time interval

\item {} 
\sphinxstylestrong{cs} :: Control structure for offline module

\item {} 
\sphinxstylestrong{h\_pre} :: {[}inout{]} layer thicknesses before advection

\item {} 
\sphinxstylestrong{eatr} :: {[}inout{]} Entrainment from layer above

\item {} 
\sphinxstylestrong{ebtr} :: {[}inout{]} Entrainment from layer below

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Zonal mass transport

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Meridional mass transport

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_advect::advect\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_column\_fns}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_offline\_fields() (fortran subroutine in module mom\_offline\_main)@\spxentry{update\_offline\_fields()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/update_offline_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{update\_offline\_fields}}}{\emph{CS}, \emph{h}, \emph{fluxes}, \emph{do\_ale}}{}
Update fields used in this round of offline transport. First fields are updated from files or from arrays read during initialization. Then if in an ALE\sphinxhyphen{}dependent coordinate, regrid/remap fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for offline module

\item {} 
\sphinxstylestrong{h} :: The regridded layer thicknesses

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Pointers to forcing fields

\item {} 
\sphinxstylestrong{do\_ale} :: {[}in{]} True if using ALE

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_diags\_offline\_transport() (fortran subroutine in module mom\_offline\_main)@\spxentry{register\_diags\_offline\_transport()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/register_diags_offline_transport}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{register\_diags\_offline\_transport}}}{\emph{Time}, \emph{diag}, \emph{CS}}{}
Initialize additional diagnostics required for offline tracer transport.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for offline module

\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Structure that regulates diagnostic output

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_offline\_convergence\_diags() (fortran subroutine in module mom\_offline\_main)@\spxentry{post\_offline\_convergence\_diags()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/post_offline_convergence_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{post\_offline\_convergence\_diags}}}{\emph{CS}, \emph{h\_off}, \emph{h\_end}, \emph{uhtr}, \emph{vhtr}}{}
Posts diagnostics related to offline convergence diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Offline control structure

\item {} 
\sphinxstylestrong{h\_off} :: {[}inout{]} Thicknesses at end of offline step

\item {} 
\sphinxstylestrong{h\_end} :: {[}inout{]} Stored thicknesses

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Remaining zonal mass transport

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Remaining meridional mass transport

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_offline\_main() (fortran subroutine in module mom\_offline\_main)@\spxentry{extract\_offline\_main()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/extract_offline_main}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{extract\_offline\_main}}}{\emph{CS}, \emph{uhtr}, \emph{vhtr}, \emph{eatr}, \emph{ebtr}, \emph{h\_end}, \emph{accumulated\_time}, \emph{vertical\_time}, \emph{dt\_offline}, \emph{dt\_offline\_vertical}, \emph{skip\_diffusion}}{}
Extracts members of the offline main control structure. All arguments are optional except the control structure itself.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Offline control structure

\item {} 
\sphinxstylestrong{uhtr} :: Remaining zonal mass transport {[}H m2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: Remaining meridional mass transport {[}H m2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{eatr} :: Amount of fluid entrained from the layer above within one time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ebtr} :: Amount of fluid entrained from the layer below within one time step {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_end} :: Thicknesses at the end of offline timestep {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{accumulated\_time} :: Length of time accumulated in the current offline interval

\item {} 
\sphinxstylestrong{vertical\_time} :: The next value of accumulate\_time at which to vertical processes

\item {} 
\sphinxstylestrong{dt\_offline} :: {[}out{]} Timestep used for offline tracers {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{dt\_offline\_vertical} :: {[}out{]} Timestep used for calls to tracer vertical physics {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{skip\_diffusion} :: {[}out{]} Skips horizontal diffusion of tracers

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{insert\_offline\_main() (fortran subroutine in module mom\_offline\_main)@\spxentry{insert\_offline\_main()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/insert_offline_main}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{insert\_offline\_main}}}{\emph{CS}, \emph{ALE\_CSp}, \emph{diabatic\_CSp}, \emph{diag}, \emph{OBC}, \emph{tracer\_adv\_CSp}, \emph{tracer\_flow\_CSp}, \emph{tracer\_Reg}, \emph{tv}, \emph{G}, \emph{GV}, \emph{x\_before\_y}, \emph{debug}}{}
Inserts (assigns values to) members of the offline main control structure. All arguments are optional except for the CS itself.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Offline control structure

\item {} 
\sphinxstylestrong{ale\_csp} :: {[}in{]} A pointer to the ALE control structure

\item {} 
\sphinxstylestrong{diabatic\_csp} :: {[}in{]} A pointer to the diabatic control structure

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A pointer to the structure that regulates diagnostic output

\item {} 
\sphinxstylestrong{obc} :: {[}in{]} A pointer to the open boundary condition control structure

\item {} 
\sphinxstylestrong{tracer\_adv\_csp} :: {[}in{]} A pointer to the tracer advection control structure

\item {} 
\sphinxstylestrong{tracer\_flow\_csp} :: {[}in{]} A pointer to the tracer flow control control structure

\item {} 
\sphinxstylestrong{tracer\_reg} :: {[}in{]} A pointer to the tracer registry

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{x\_before\_y} :: {[}in{]} Indicates which horizontal direction is advected first

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true, write verbose debugging messages

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_transport\_init() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_transport\_init()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_transport\_init}}}{\emph{param\_file}, \emph{CS}, \emph{diabatic\_CSp}, \emph{G}, \emph{GV}, \emph{US}}{}
Initializes the control structure for offline transport and reads in some of the.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: Offline control structure

\item {} 
\sphinxstylestrong{diabatic\_csp} :: {[}in{]} The diabatic control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/extract_diabatic_member}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::extract\_diabatic\_member}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/read_all_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_all\_input}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_all\_input() (fortran subroutine in module mom\_offline\_main)@\spxentry{read\_all\_input()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/read_all_input}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{read\_all\_input}}}{\emph{CS}}{}
Coordinates the allocation and reading in all time levels of uh, vh, hend, temp, and salt from files. Used when read\_all\_ts\_uvh.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} Control structure for offline module

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offline\_transport\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{offline\_transport\_end() (fortran subroutine in module mom\_offline\_main)@\spxentry{offline\_transport\_end()}\spxextra{fortran subroutine in module mom\_offline\_main}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_offline\_main/}}\sphinxbfcode{\sphinxupquote{offline\_transport\_end}}}{\emph{CS}}{}
Deallocates (if necessary) arrays within the offline control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for offline module

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_opacity module reference}
\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity}}\label{\detokenize{api/generated/modules/mom_opacity:mom-opacity-module-reference}}\label{\detokenize{api/generated/modules/mom_opacity::doc}}\index{mom\_opacity (module)@\spxentry{mom\_opacity}\spxextra{module}|spxpagem}
Routines used to calculate the opacity of the ocean.

{\hyperref[\detokenize{api/generated/modules/mom_opacity:detamom-opacity}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_opacity:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_cs}}}}}
&
The control structure with paramters for the MOM\_opacity module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{optics\_type}}}}}
&
This type is used to store information about ocean optical properties.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_opacity:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/set_opacity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_opacity()}}}}}
&
This sets the opacity of sea water based based on one of several different schemes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_from_chl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_from\_chl()}}}}}
&
This sets the “blue” band opacity based on chloophyll A concencentrations The red portion is lumped into the net heating at the surface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_morel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_morel()}}}}}
&
This sets the blue\sphinxhyphen{}wavelength opacity according to the scheme proposed by Morel and Antoine (1994).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/sw_pen_frac_morel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sw\_pen\_frac\_morel()}}}}}
&
This sets the penetrating shortwave fraction according to the scheme proposed by Morel and Antoine (1994).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_manizza}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_manizza()}}}}}
&
This sets the blue\sphinxhyphen{}wavelength opacity according to the scheme proposed by Manizza, M.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/extract_optics_slice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_optics\_slice()}}}}}
&
This subroutine returns a 2\sphinxhyphen{}d slice at constant j of fields from an {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{optics\_type()}}}}}, with the potential for rescaling these fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/extract_optics_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_optics\_fields()}}}}}
&
Set arguments to fields from the optics type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{optics\_nbands()}}}}}
&
Return the number of bands of penetrating shortwave radiation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/absorbremainingsw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{absorbremainingsw()}}}}}
&
Apply shortwave heating below the boundary layer (when running with the bulk mixed layer inhereted from GOLD) or throughout the water column.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/sumswoverbands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sumswoverbands()}}}}}
&
This subroutine calculates the total shortwave heat flux integrated over bands as a function of depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_init()}}}}}
&
This routine initalizes the opacity module, including an {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{optics\_type()}}}}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_end()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_opacity:detailed-description}}\label{\detokenize{api/generated/modules/mom_opacity:detamom-opacity}}
opacity\_from\_chl: In this routine, the Morel (modified) or Manizza (modified) schemes use the “blue” band in the paramterizations to determine the e\sphinxhyphen{}folding depth of the incoming shortwave attenuation. The red portion is lumped into the net heating at the surface.

Morel, A., 1988: Optical modeling of the upper ocean in relation to its biogenous matter content (case\sphinxhyphen{}i waters)., J. Geo. Res., 93, 10,749\sphinxhyphen{}10,768.

Manizza, M., C. LeQuere, A. J. Watson, and E. T. Buitenhuis, 2005: Bio\sphinxhyphen{}optical feedbacks among phytoplankton, upper ocean physics and sea\sphinxhyphen{}ice in a global model, Geophys. Res. Let., 32, L05603, doi:10.1029/2004GL020778.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_opacity:type-documentation}}\index{opacity\_cs (fortran type in module mom\_opacity)@\spxentry{opacity\_cs}\spxextra{fortran type in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{opacity\_cs}}}
The control structure with paramters for the MOM\_opacity module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sw\_pen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sw\_vis\_pen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_opacity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_pen\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use one of the CHL\_A schemes (specified by OPACITY\_SCHEME) to determine the e\sphinxhyphen{}folding depth of incoming shortwave radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{opacity\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer indicating which scheme should be used to translate water properties into the opacity (i.e., the e\sphinxhyphen{}folding depth) and (perhaps) the number of bands of penetrating shortwave radiation to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pen\_sw\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The vertical absorption e\sphinxhyphen{}folding depth of the penetrating shortwave radiation {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pen\_sw\_scale\_2nd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The vertical absorption e\sphinxhyphen{}folding depth of the (2nd) penetrating shortwave radiation {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_1st\_exp\_ratio}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Ratio for 1st exp decay in Two Exp decay opacity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pen\_sw\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of shortwave radiation that is penetrating with a constant e\sphinxhyphen{}folding approach.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{blue\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fraction of the penetrating shortwave radiation that is in the blue band {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{opacity\_land\_value}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value to use for opacity over land {[}m\sphinxhyphen{}1{]}. The default is 10 m\sphinxhyphen{}1 \sphinxhyphen{} a value for muddy water.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{optics\_type (fortran type in module mom\_opacity)@\spxentry{optics\_type}\spxextra{fortran type in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{optics\_type}}}
This type is used to store information about ocean optical properties.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nbands}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of penetrating bands of SW radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{opacity\_band}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: SW optical depth per unit thickness {[}m\sphinxhyphen{}1{]} The number of radiation bands is most rapidly varying (first) index.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_pen\_band}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: shortwave radiation {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} at the surface in each of the nbands bands that penetrates beyond the surface. The most rapidly varying dimension is the band.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_wavelength\_band}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The minimum wavelength in each band of penetrating shortwave radiation {[}nm{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_wavelength\_band}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The maximum wavelength in each band of penetrating shortwave radiation {[}nm{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pensw\_flux\_absorb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A heat flux that is small enough to be completely absorbed in the next sufficiently thick layer {[}H degC T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} degC m s\sphinxhyphen{}1 or degC kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pensw\_absorb\_invlen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The inverse of the thickness that is used to absorb the remaining shortwave heat flux when it drops below PEN\_SW\_FLUX\_ABSORB {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_opacity:function-subroutine-documentation}}\index{set\_opacity() (fortran subroutine in module mom\_opacity)@\spxentry{set\_opacity()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/set_opacity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{set\_opacity}}}{\emph{optics}, \emph{sw\_total}, \emph{sw\_vis\_dir}, \emph{sw\_vis\_dif}, \emph{sw\_nir\_dir}, \emph{sw\_nir\_dif}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{chl\_2d}, \emph{chl\_3d}}{}
This sets the opacity of sea water based based on one of several different schemes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{optics} :: {[}inout{]} An optics structure that has values set based on the opacities.

\item {} 
\sphinxstylestrong{sw\_total} :: Total shortwave flux into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_vis\_dir} :: Visible, direct shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_vis\_dif} :: Visible, diffuse shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_nir\_dir} :: Near\sphinxhyphen{}IR, direct shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_nir\_dif} :: Near\sphinxhyphen{}IR, diffuse shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure earlier set up by opacity\_init.

\item {} 
\sphinxstylestrong{chl\_2d} :: {[}in{]} Vertically uniform chlorophyll\sphinxhyphen{}A concentractions {[}mg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{chl\_3d} :: {[}in{]} The chlorophyll\sphinxhyphen{}A concentractions of each layer {[}mg m\sphinxhyphen{}3{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{double\_exp}} \sphinxcode{\sphinxupquote{manizza\_05}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{op\_diag\_len}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_from_chl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_from\_chl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/query_averaging_enabled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::query\_averaging\_enabled}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{opacity\_from\_chl() (fortran subroutine in module mom\_opacity)@\spxentry{opacity\_from\_chl()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_from_chl}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{opacity\_from\_chl}}}{\emph{optics}, \emph{sw\_total}, \emph{sw\_vis\_dir}, \emph{sw\_vis\_dif}, \emph{sw\_nir\_dir}, \emph{sw\_nir\_dif}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{chl\_2d}, \emph{chl\_3d}}{}
This sets the “blue” band opacity based on chloophyll A concencentrations The red portion is lumped into the net heating at the surface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{optics} :: {[}inout{]} An optics structure that has values set based on the opacities.

\item {} 
\sphinxstylestrong{sw\_total} :: Total shortwave flux into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_vis\_dir} :: Visible, direct shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_vis\_dif} :: Visible, diffuse shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_nir\_dir} :: Near\sphinxhyphen{}IR, direct shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sw\_nir\_dif} :: Near\sphinxhyphen{}IR, diffuse shortwave into the ocean {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure.

\item {} 
\sphinxstylestrong{chl\_2d} :: {[}in{]} Vertically uniform chlorophyll\sphinxhyphen{}A concentractions {[}mg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{chl\_3d} :: {[}in{]} A 3\sphinxhyphen{}d field of chlorophyll\sphinxhyphen{}A concentractions {[}mg m\sphinxhyphen{}3{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{manizza\_05}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{morel\_88}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_morel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_morel}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/sw_pen_frac_morel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sw\_pen\_frac\_morel}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/set_opacity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_opacity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{opacity\_morel() (fortran function in module mom\_opacity)@\spxentry{opacity\_morel()}\spxextra{fortran function in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_morel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{opacity\_morel}}}{\emph{chl\_data}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This sets the blue\sphinxhyphen{}wavelength opacity according to the scheme proposed by Morel and Antoine (1994).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{chl\_data} :: {[}in{]} The chlorophyll\sphinxhyphen{}A concentration in mg m\sphinxhyphen{}3.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned opacity {[}m\sphinxhyphen{}1{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_from_chl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_from\_chl}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sw\_pen\_frac\_morel() (fortran function in module mom\_opacity)@\spxentry{sw\_pen\_frac\_morel()}\spxextra{fortran function in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/sw_pen_frac_morel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{sw\_pen\_frac\_morel}}}{\emph{chl\_data}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This sets the penetrating shortwave fraction according to the scheme proposed by Morel and Antoine (1994).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{chl\_data} :: {[}in{]} The chlorophyll\sphinxhyphen{}A concentration in mg m\sphinxhyphen{}3.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned penetrating shortwave fraction {[}nondim{]}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_from_chl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{opacity\_from\_chl}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{opacity\_manizza() (fortran function in module mom\_opacity)@\spxentry{opacity\_manizza()}\spxextra{fortran function in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_manizza}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{opacity\_manizza}}}{\emph{chl\_data}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This sets the blue\sphinxhyphen{}wavelength opacity according to the scheme proposed by Manizza, M. et al, 2005.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{chl\_data} :: {[}in{]} The chlorophyll\sphinxhyphen{}A concentration in mg m\sphinxhyphen{}3.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned opacity {[}m\sphinxhyphen{}1{]}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_optics\_slice() (fortran subroutine in module mom\_opacity)@\spxentry{extract\_optics\_slice()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/extract_optics_slice}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{extract\_optics\_slice}}}{\emph{optics}, \emph{j}, \emph{G}, \emph{GV}, \emph{opacity}, \emph{opacity\_scale}, \emph{penSW\_top}, \emph{penSW\_scale}}{}
This subroutine returns a 2\sphinxhyphen{}d slice at constant j of fields from an {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{optics\_type()}}}}}, with the potential for rescaling these fields.
, with the potential for rescaling these fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{optics} :: {[}in{]} An optics structure that has values of opacities and shortwave fluxes.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index to extract

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{opacity} :: {[}out{]} The opacity in each band, i\sphinxhyphen{}point, and layer

\item {} 
\sphinxstylestrong{opacity\_scale} :: {[}in{]} A factor by which to rescale the opacity.

\item {} 
\sphinxstylestrong{pensw\_top} :: {[}out{]} The shortwave radiation {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{pensw\_scale} :: {[}in{]} A factor by which to rescale the shortwave flux.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::extractfluxes1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_optics\_fields() (fortran subroutine in module mom\_opacity)@\spxentry{extract\_optics\_fields()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/extract_optics_fields}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{extract\_optics\_fields}}}{\emph{optics}, \emph{nbands}}{}
Set arguments to fields from the optics type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{optics} :: {[}in{]} An optics structure that has values of opacities and shortwave fluxes.

\item {} 
\sphinxstylestrong{nbands} :: {[}out{]} The number of penetrating bands of SW radiation

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{optics\_nbands() (fortran function in module mom\_opacity)@\spxentry{optics\_nbands()}\spxextra{fortran function in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_nbands}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{optics\_nbands}}}{\emph{optics}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Return the number of bands of penetrating shortwave radiation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{optics} :: {[}in{]} An optics structure that has values of opacities and shortwave fluxes.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The number of penetrating bands of SW radiation

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/extractfluxes1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::extractfluxes1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{absorbremainingsw() (fortran subroutine in module mom\_opacity)@\spxentry{absorbremainingsw()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/absorbremainingsw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{absorbremainingsw}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{opacity\_band}, \emph{nsw}, \emph{optics}, \emph{j}, \emph{dt}, \emph{H\_limit\_fluxes}, \emph{adjustAbsorptionProfile}, \emph{absorbAllSW}, \emph{T}, \emph{Pen\_SW\_bnd}, \emph{eps}, \emph{ksort}, \emph{htot}, \emph{Ttot}, \emph{TKE}, \emph{dSV\_dT}}{}
Apply shortwave heating below the boundary layer (when running with the bulk mixed layer inhereted from GOLD) or throughout the water column.

In addition, it causes all of the remaining SW radiation to be absorbed, provided that the total water column thickness is greater than H\_limit\_fluxes. For thinner water columns, the heating is scaled down proportionately, the assumption being that the remaining heating (which is left in Pen\_SW) should go into an (absent for now) ocean bottom sediment layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} Number of bands of penetrating shortwave radiation.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{opacity\_band} :: {[}in{]} Opacity in each band of penetrating shortwave radiation {[}H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1 or m2 kg\sphinxhyphen{}1{]}. The indicies are band, i, k.

\item {} 
\sphinxstylestrong{optics} :: {[}in{]} An optics structure that has values of opacities and shortwave fluxes.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{h\_limit\_fluxes} :: {[}in{]} If the total ocean depth is less than this, they are scaled away to avoid numerical instabilities {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. This would not be necessary if a finite heat capacity mud\sphinxhyphen{}layer were added.

\item {} 
\sphinxstylestrong{adjustabsorptionprofile} :: {[}in{]} If true, apply heating above the layers in which it should have occurred to get the correct mean depth (and potential energy change) of the shortwave that should be absorbed by each layer.

\item {} 
\sphinxstylestrong{absorballsw} :: {[}in{]} If true, apply heating above the layers in which it should have occurred to get the correct mean depth (and potential energy change) of the shortwave that should be absorbed by each layer.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Layer potential/conservative temperatures {[}degC{]}

\item {} 
\sphinxstylestrong{pen\_sw\_bnd} :: {[}inout{]} Penetrating shortwave heating in each band that hits the bottom and will will be redistributed through the water column {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}, size nsw x G isd: G ied.

\item {} 
\sphinxstylestrong{eps} :: {[}in{]} Small thickness that must remain in each layer, and which will not be subject to heating {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ksort} :: {[}in{]} Density\sphinxhyphen{}sorted k\sphinxhyphen{}indicies.

\item {} 
\sphinxstylestrong{htot} :: {[}in{]} Total mixed layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ttot} :: {[}inout{]} Depth integrated mixed layer temperature {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dsv\_dt} :: {[}in{]} The partial derivative of specific volume with temperature {[}R\sphinxhyphen{}1 degC\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tke} :: {[}inout{]} The TKE sink from mixing the heating throughout a layer {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/applyboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::applyboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_bulk_mixed_layer:f/mom_bulk_mixed_layer/bulkmixedlayer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bulk\_mixed\_layer::bulkmixedlayer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sumswoverbands() (fortran subroutine in module mom\_opacity)@\spxentry{sumswoverbands()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/sumswoverbands}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{sumswoverbands}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{nsw}, \emph{optics}, \emph{j}, \emph{dt}, \emph{H\_limit\_fluxes}, \emph{absorbAllSW}, \emph{iPen\_SW\_bnd}, \emph{netPen}}{}
This subroutine calculates the total shortwave heat flux integrated over bands as a function of depth. This routine is only called for computing buoyancy fluxes for use in KPP. This routine does not updat e the state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{nsw} :: {[}in{]} The number of bands of penetrating shortwave radiation, perhaps from optics\_nbands(optics),

\item {} 
\sphinxstylestrong{optics} :: {[}in{]} An optics structure that has values set based on the opacities.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index to work on.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{h\_limit\_fluxes} :: {[}in{]} the total depth at which the surface fluxes start to be limited to avoid excessive heating of a thin ocean {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{absorballsw} :: {[}in{]} If true, ensure that all shortwave radiation is absorbed in the ocean water column.

\item {} 
\sphinxstylestrong{ipen\_sw\_bnd} :: {[}in{]} The incident penetrating shortwave heating in each band that hits the bottom and will be redistributed through the water column {[}degC H \textasciitilde{}\textgreater{} degC m or degC kg m\sphinxhyphen{}2{]}; size nsw x G isd: G ied.

\item {} 
\sphinxstylestrong{netpen} :: {[}inout{]} Net penetrating shortwave heat flux at each

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/calculatebuoyancyflux1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::calculatebuoyancyflux1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{opacity\_init() (fortran subroutine in module mom\_opacity)@\spxentry{opacity\_init()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{opacity\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{optics}}{}
This routine initalizes the opacity module, including an {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/optics_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{optics\_type()}}}}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} model vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\item {} 
\sphinxstylestrong{optics} :: An optics structure that has parameters set and arrays allocated here.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{double\_exp}} \sphinxcode{\sphinxupquote{double\_exp\_string}} \sphinxcode{\sphinxupquote{manizza\_05}} \sphinxcode{\sphinxupquote{manizza\_05\_string}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{morel\_88}} \sphinxcode{\sphinxupquote{morel\_88\_string}} \sphinxcode{\sphinxupquote{no\_scheme}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}} \sphinxcode{\sphinxupquote{single\_exp}} \sphinxcode{\sphinxupquote{single\_exp\_string}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{opacity\_end() (fortran subroutine in module mom\_opacity)@\spxentry{opacity\_end()}\spxextra{fortran subroutine in module mom\_opacity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_opacity/}}\sphinxbfcode{\sphinxupquote{opacity\_end}}}{\emph{CS}, \emph{optics}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: An opacity control structure that should be deallocated.

\item {} 
\sphinxstylestrong{optics} :: An optics type structure that should be deallocated.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_open\_boundary module reference}
\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary}}\label{\detokenize{api/generated/modules/mom_open_boundary:mom-open-boundary-module-reference}}\label{\detokenize{api/generated/modules/mom_open_boundary::doc}}\index{mom\_open\_boundary (module)@\spxentry{mom\_open\_boundary}\spxextra{module}|spxpagem}
Controls where open boundary conditions are applied.

{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:detamom-open-boundary}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_open_boundary:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/file_obc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{file\_obc\_cs}}}}}
&
Control structure for open boundaries that read from files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_registry_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_registry\_type}}}}}
&
Type to carry basic OBC information needed for updating values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_segment_data_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_segment\_data\_type}}}}}
&
Open boundary segment data from files (mostly).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_segment_tracer_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_segment\_tracer\_type}}}}}
&
Tracer on OBC segment data structure, for putting into a segment tracer registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_segment_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_segment\_type}}}}}
&
Open boundary segment data structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_struct_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_struct\_type}}}}}
&
Type to carry something (what{]} for the OBC registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/ocean_obc_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_obc\_type}}}}}
&
Open\sphinxhyphen{}boundary data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{segment\_tracer\_registry\_type}}}}}
&
Registry type for tracers on segments.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_open_boundary:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config()}}}}}
&
Enables OBC module and reads configuration parameters This routine is called from MOM\_initialize\_fixed which occurs before the initialization of the vertical coordinate and ALE\_init.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_segment\_data()}}}}}
&
Allocate space for reading OBC data from files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_obc\_tides()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_segment_indices}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_segment\_indices()}}}}}
&
Define indices for segment and store in hor\_index\_type using global segment bounds corresponding to q\sphinxhyphen{}points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_u_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_u\_point\_obc()}}}}}
&
Parse an OBC\_SEGMENT\_\%\%\% string starting with “I=” and configure placement and type of OBC accordingly.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_v_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_v\_point\_obc()}}}}}
&
Parse an OBC\_SEGMENT\_\%\%\% string starting with “J=” and configure placement and type of OBC accordingly.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_str()}}}}}
&
Parse an OBC\_SEGMENT\_\%\%\% string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_manifest_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_manifest\_str()}}}}}
&
Parse an OBC\_SEGMENT\_\%\%\_DATA string and determine its fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_data_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_data\_str()}}}}}
&
Parse an OBC\_SEGMENT\_\%\%\_DATA string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_for_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_for\_tracer\_reservoirs()}}}}}
&
Parse all the OBC\_SEGMENT\_\%\%\_DATA strings again to see which need tracer reservoirs (all pes need to know).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_param\_real()}}}}}
&
Parse an OBC\_SEGMENT\_\%\%\_PARAMS string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_init()}}}}}
&
Initialize open boundary control structure and do any necessary rescaling of OBC fields that have been read from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_query}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_query()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_dealloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_dealloc()}}}}}
&
Deallocate open boundary data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_end()}}}}}
&
Close open boundary data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_impose_normal_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_impose\_normal\_slope()}}}}}
&
Sets the slope of bathymetry normal to an open bounndary to zero.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_impose_land_mask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_impose\_land\_mask()}}}}}
&
Reconcile masks and open boundaries, deallocate OBC on PEs where it is not needed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_obc_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_obc\_tracer\_reservoirs()}}}}}
&
Make sure the OBC tracer reservoirs are initialized.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/radiation_open_bdry_conds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{radiation\_open\_bdry\_conds()}}}}}
&
Apply radiation conditions to 3D u,v at open boundaries.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_apply_normal_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_apply\_normal\_flow()}}}}}
&
Applies OBC values stored in segments to 3d u,v fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_zero_normal_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_zero\_normal\_flow()}}}}}
&
Applies zero values to 3d u,v fields on OBC segments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/gradient_at_q_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gradient\_at\_q\_points()}}}}}
&
Calculate the tangential gradient of the normal flow at the boundary q\sphinxhyphen{}points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/set_tracer_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_tracer\_data()}}}}}
&
Sets the initial values of the tracer open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/lookup_seg_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lookup\_seg\_field()}}}}}
&
Needs documentation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/allocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_obc\_segment\_data()}}}}}
&
Allocate segment data fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/deallocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_obc\_segment\_data()}}}}}
&
Deallocate segment data fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_test_extern_uv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_test\_extern\_uv()}}}}}
&
Set tangential velocities outside of open boundaries to silly values (used for checking the interior state is independent of values outside of the domain).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_test_extern_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_test\_extern\_h()}}}}}
&
Set thicknesses outside of open boundaries to silly values (used for checking the interior state is independent of values outside of the domain).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_obc\_segment\_data()}}}}}
&
Update the OBC values on the segments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_ramp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_obc\_ramp()}}}}}
&
Update the OBC ramp value as a function of time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_obc()}}}}}
&
register open boundary objects for boundary updates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_registry\_init()}}}}}
&
This routine include declares and sets the variable “version”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_file_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_file\_obc()}}}}}
&
Add file to OBC registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/file_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{file\_obc\_end()}}}}}
&
Clean up the file OBC from registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{segment\_tracer\_registry\_init()}}}}}
&
Initialize the segment tracer registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_segment_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_segment\_tracer()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{segment\_tracer\_registry\_end()}}}}}
&
Clean up the segment tracer registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_temp_salt_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_temp\_salt\_segments()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/fill_temp_salt_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_temp\_salt\_segments()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/mask_outside_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mask\_outside\_obcs()}}}}}
&
Find the region outside of all open boundary segments and make sure it is set to land mask.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/flood_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flood\_fill()}}}}}
&
flood the cin, cout values
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/flood_fill2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flood\_fill2()}}}}}
&
flood the cin, cout values
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_register\_restarts()}}}}}
&
Register OBC segment data for restarts.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_segment_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_segment\_tracer\_reservoirs()}}}}}
&
Update the OBC tracer reservoirs after the tracers have been updated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/adjustsegmentetatofitbathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustsegmentetatofitbathymetry()}}}}}
&
Adjust interface heights to fit the bathymetry and diagnose layer thickness.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_config()}}}}}
&
This is more of a rotate initialization than an actual rotate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_segment\_config()}}}}}
&
Rotate the OBC segment configuration data from the input to model index map.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_init()}}}}}
&
Initialize the segments and field\sphinxhyphen{}related data of a rotated OBC.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_segment\_data()}}}}}
&
Rotate an OBC segment’s fields from the input to the model index map.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_open_boundary:detailed-description}}\label{\detokenize{api/generated/modules/mom_open_boundary:detamom-open-boundary}}
This module implements some aspects of internal open boundary conditions in MOM.

A small fragment of the grid is shown below:

j+1 x \textasciicircum{} x \textasciicircum{} x At x: q, CoriolisBu j+1 \textgreater{} o \textgreater{} o \textgreater{} At \textasciicircum{}: v, tauy j x \textasciicircum{} x \textasciicircum{} x At \textgreater{}: u, taux j \textgreater{} o \textgreater{} o \textgreater{} At o: h, bathyT, buoy, tr, T, S, Rml, ustar j\sphinxhyphen{}1 x \textasciicircum{} x \textasciicircum{} x i\sphinxhyphen{}1 i i+1 At x \& \textasciicircum{}: i i+1 At \textgreater{} \& o:

The boundaries always run through q grid points (x).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_open_boundary:type-documentation}}\index{file\_obc\_cs (fortran type in module mom\_open\_boundary)@\spxentry{file\_obc\_cs}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/file_obc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{file\_obc\_cs}}}
Control structure for open boundaries that read from files. Probably lots to update here.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_flow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Placeholder for now…

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_registry\_type (fortran type in module mom\_open\_boundary)@\spxentry{obc\_registry\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_registry_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{obc\_registry\_type}}}
Type to carry basic OBC information needed for updating values.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nobc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of registered open boundary types.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ob}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( obc\_struct\_type )(50)}\sphinxstyleemphasis{{]}} :: array of registered boundary types.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{locked}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: New OBC types may be registered if locked=.false. When locked=.true.,no more boundaries can be registered.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_segment\_data\_type (fortran type in module mom\_open\_boundary)@\spxentry{obc\_segment\_data\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_segment_data_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{obc\_segment\_data\_type}}}
Open boundary segment data from files (mostly).
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: handle from FMS associated with segment data on disk

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fid\_dz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: handle from FMS associated with segment thicknesses on disk

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=8)}\sphinxstyleemphasis{{]}} :: a name identifier for the segment data

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{buffer\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: buffer for segment data located at cell faces and on the original vertical grid

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of vertical levels in the source data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dz\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: vertical grid cell spacing of the incoming segment data, set in {[}Z \textasciitilde{}\textgreater{} m{]} then scaled to {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{buffer\_dst}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: buffer src data remapped to the target vertical grid

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{value}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: constant value if fid is equal to \sphinxhyphen{}1

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_segment\_tracer\_type (fortran type in module mom\_open\_boundary)@\spxentry{obc\_segment\_tracer\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_segment_tracer_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{obc\_segment\_tracer\_type}}}
Tracer on OBC segment data structure, for putting into a segment tracer registry.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: tracer concentration array

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc\_inflow\_conc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: tracer concentration for generic inflows

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{{]}} :: tracer name used for error messages

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: metadata describing the tracer

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tres}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: tracer reservoir array

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: reservoir values have been set when True

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_segment\_type (fortran type in module mom\_open\_boundary)@\spxentry{obc\_segment\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_segment_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{obc\_segment\_type}}}
Open boundary segment data structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flather}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, applies Flather + Chapman radiation of barotropic gravity waves.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{radiation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, 1D Orlanksi radiation boundary conditions are applied. If False, a gradient condition is applied.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{radiation\_tan}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, 1D Orlanksi radiation boundary conditions are applied to tangential flows.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{radiation\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, 1D Orlanksi radiation boundary conditions are applied to dudv and dvdx.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oblique}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Oblique waves supported at radiation boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oblique\_tan}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, 2D radiation boundary conditions are applied to tangential flows.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oblique\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, 2D radiation boundary conditions are applied to dudv and dvdx.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Optional supplement to radiation boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_tan}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Optional supplement to nudge tangential velocity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Optional supplement to nudge normal gradient of tangential velocity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Boundary normal velocity fixed to external value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified\_tan}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Boundary tangential velocity fixed to external value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Boundary gradient of tangential velocity fixed to external value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{open}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Boundary is open for continuity solver.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gradient}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Zero gradient at boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not any external OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external u OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uamp\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external u amplitude OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uphase\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external u phase OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external v OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vamp\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external v amplitude OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vphase\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external v phase OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external T OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external S OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external zeta OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zamp\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external zeta amplitude OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zphase\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external zeta phase OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_values\_needed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Whether or not external gradient OBC fields are needed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{direction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Boundary faces one of the four directions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_n\_or\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the OB is facing North or South and exists on this PE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_e\_or\_w}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the OB is facing East or West and exists on this PE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_e\_or\_w\_2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the OB is facing East or West anywhere.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{field}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( obc\_segment\_data\_type )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: OBC data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_fields}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of OBC data fields (e.g. u\_normal,u\_parallel and eta for Flather)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{field\_names}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: field names for this segment

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}indices of boundary segment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ie\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}indices of boundary segment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{js\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}indices of boundary segment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{je\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}indices of boundary segment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uamp\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Save where uamp is in segmentfield.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uphase\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Save where uphase is in segmentfield.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vamp\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Save where vamp is in segmentfield.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vphase\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Save where vphase is in segmentfield.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zamp\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Save where zamp is in segmentfield.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zphase\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Save where zphase is in segmentfield.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{velocity\_nudging\_timescale\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Nudging timescale on inflow {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{velocity\_nudging\_timescale\_out}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Nudging timescale on outflow {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{on\_pe}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: true if segment is located in the computational domain

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{temp\_segment\_data\_exists}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: true if temperature data arrays are present

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_segment\_data\_exists}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: true if salinity data arrays are present

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The external gravity wave speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} at OBC\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{htot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The total column thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} at OBC\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The cell thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} at OBC\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{normal\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The layer velocity normal to the OB segment {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tangential\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The layer velocity tangential to the OB segment {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tangential\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The gradient of the velocity tangential to the OB segment {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{normal\_trans}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The layer transport normal to the OB segment {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{normal\_vel\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The barotropic velocity normal to the OB segment {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eta}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The sea\sphinxhyphen{}surface elevation along the segment {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grad\_normal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The gradient of the normal flow along the segment times the grid spacing {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grad\_tan}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The gradient of the tangential flow along the segment times the grid spacing {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grad\_gradient}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The gradient of the gradient of tangential flow along the segment times the grid spacing {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rx\_norm\_rad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The previous normal phase speed use for EW radiation OBC, in grid points per timestep {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ry\_norm\_rad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The previous normal phase speed use for NS radiation OBC, in grid points per timestep {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rx\_norm\_obl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The previous normal radiation coefficient for EW oblique OBCs {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ry\_norm\_obl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The previous normal radiation coefficient for NS oblique OBCs {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cff\_normal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The denominator for oblique radiation for normal velocity {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_normal\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The layer velocity normal to the OB segment that values should be nudged towards {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_tangential\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The layer velocity tangential to the OB segment that values should be nudged towards {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_tangential\_grad}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The layer dvdx or dudy towards which nudging can occur {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( segment\_tracer\_registry\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry for the segment.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hor\_index\_type)}\sphinxstyleemphasis{{]}} :: Horizontal index ranges.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_invlscale\_out}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An effective inverse length scale for restoring the tracer concentration in a ficticious reservior towards interior values when flow is exiting the domain {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_invlscale\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An effective inverse length scale for restoring the tracer concentration towards an externally imposed value when flow is entering {[}L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_struct\_type (fortran type in module mom\_open\_boundary)@\spxentry{obc\_struct\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_struct_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{obc\_struct\_type}}}
Type to carry something (what{]} for the OBC registry.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{{]}} :: OBC name used for error messages.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_obc\_type (fortran type in module mom\_open\_boundary)@\spxentry{ocean\_obc\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/ocean_obc_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{ocean\_obc\_type}}}
Open\sphinxhyphen{}boundary data.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{number\_of\_segments}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of open\sphinxhyphen{}boundary segments.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of model layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{open\_u\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any zonal velocity points in the global domain use open BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{open\_v\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any meridional velocity points in the global domain use open BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flather\_u\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any zonal velocity points in the global domain use Flather BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flather\_v\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any meridional velocity points in the global domain use Flather BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oblique\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any velocity points in the global domain use oblique BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_u\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any velocity points in the global domain use nudged BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nudged\_v\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any velocity points in the global domain use nudged BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified\_u\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any zonal velocity points in the global domain use specified BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified\_v\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any meridional velocity points in the global domain use specified BCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{radiation\_bcs\_exist\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if radiations BCs are in use anywhere.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{user\_bcs\_set\_globally}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if any OBC\_USER\_CONFIG is set for input from user directory.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{update\_obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Is OBC data time\sphinxhyphen{}dependent.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{needs\_io\_for\_data}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Is any i/o needed for OBCs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zero\_vorticity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, sets relative vorticity to zero on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{freeslip\_vorticity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, sets normal gradient of tangential velocity to zero in the relative vorticity on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{computed\_vorticity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, uses external data for tangential velocity in the relative vorticity on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified\_vorticity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, uses external data for tangential velocity gradients in the relative vorticity on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zero\_strain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, sets strain to zero on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{freeslip\_strain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, sets normal gradient of tangential velocity to zero in the strain on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{computed\_strain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, uses external data for tangential velocity to compute normal gradient in the strain on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{specified\_strain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, uses external data for tangential velocity gradients to compute strain on open boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zero\_biharmonic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, zeros the Laplacian of flow on open boundaries for use in the biharmonic viscosity term.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{brushcutter\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, read data on supergrid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_x\_reservoirs\_used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Dimensioned by the number of tracers, set globally,.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_y\_reservoirs\_used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Dimensioned by the number of tracers, set globally,.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of tracers

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n\_tide\_constituents}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of tidal constituents to add to the boundary.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{add\_tide\_constituents}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, add tidal constituents to the boundary elevation and velocity. Will be set to true if n\_tide\_constituents \textgreater{} 0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_names}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=2)(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Names of tidal constituents to add to the boundary data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_frequencies}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Angular frequencies of chosen tidal constituents {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_eq\_phases}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Equilibrium phases of chosen tidal constituents {[}rad{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_fn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Amplitude modulation of boundary tides by nodal cycle {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_un}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Phase modulation of boundary tides by nodal cycle {[}rad{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{add\_eq\_phase}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, add the equilibrium phase argument to the specified boundary tidal phase.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{add\_nodal\_terms}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, insert terms for the 18.6 year modulation when calculating tidal boundary conditions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_ref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: Reference date (t = 0) for tidal forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_longitudes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(astro\_longitudes)}\sphinxstyleemphasis{{]}} :: Lunar and solar longitudes used to calculate tidal forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{segment}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( obc\_segment\_type )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: List of segment objects.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{segnum\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Segment number of u\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{segnum\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Segment number of v\sphinxhyphen{}points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gamma\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The relative weighting for the baroclinic radiation velocities (or speed of characteristics) at the new time level (1) or the running mean (0) for velocities. Valid values range from 0 to 1, with a default of 0.3.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rx\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum magnitude of the baroclinic radiation velocity (or speed of characteristics) in units of grid points per timestep {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc\_pe}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Is there an open boundary on this tile?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ALE remapping control structure for segments only.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( obc\_registry\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Registry type for boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rx\_normal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage for normal phase speed for EW radiation OBCs in units of.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ry\_normal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage for normal phase speed for NS radiation OBCs in units of.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rx\_oblique}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage for oblique boundary condition restarts {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ry\_oblique}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage for oblique boundary condition restarts {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cff\_normal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage for oblique boundary condition restarts {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tres\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage of tracer reservoirs for restarts {[}conc L \textasciitilde{}\textgreater{} conc m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tres\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array storage of tracer reservoirs for restarts {[}conc L \textasciitilde{}\textgreater{} conc m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{silly\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A silly value of thickness outside of the domain that can be used to test the independence of the OBCs to this external data {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{silly\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A silly value of velocity outside of the domain that can be used to test the independence of the OBCs to this external data {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ramp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If True, ramp from zero to the external values for SSH.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ramping\_is\_activated}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the ramping has been initialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ramp\_timescale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If ramp is True, use this timescale for ramping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{trunc\_ramp\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If ramp is True, time after which ramp is done.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ramp\_value}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If ramp is True, where we are on the ramp from zero to one.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ramp\_start\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: Time when model was started.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{segment\_tracer\_registry\_type (fortran type in module mom\_open\_boundary)@\spxentry{segment\_tracer\_registry\_type}\spxextra{fortran type in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{segment\_tracer\_registry\_type}}}
Registry type for tracers on segments.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntseg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of registered tracer segments

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( obc\_segment\_tracer\_type )(50)}\sphinxstyleemphasis{{]}} :: array of registered tracers

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{locked}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: New tracers may be registered if locked=.false. When locked=.true.,no more tracers can be registered. Not sure who should lock it or when…

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_open_boundary:function-subroutine-documentation}}\index{open\_boundary\_config() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_config()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_config}}}{\emph{G}, \emph{US}, \emph{param\_file}, \emph{OBC}}{}
Enables OBC module and reads configuration parameters This routine is called from MOM\_initialize\_fixed which occurs before the initialization of the vertical coordinate and ALE\_init. Therefore segment data are not fully initialized here. The remainder of the segment data are initialized in a later call to update\_open\_boundary\_data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_obc\_tides}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::initialize\_remapping}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/mask_outside_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mask\_outside\_obcs}}}}} \sphinxcode{\sphinxupquote{mdl}} \sphinxcode{\sphinxupquote{obc\_none}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_dealloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_dealloc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_query}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_query}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/remove_spaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::remove\_spaces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_u_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_u\_point\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_v_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_v\_point\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_segment\_data() (fortran subroutine in module mom\_open\_boundary)@\spxentry{initialize\_segment\_data()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_segment_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{initialize\_segment\_data}}}{\emph{G}, \emph{OBC}, \emph{PF}}{}
Allocate space for reading OBC data from files. It sets up the required vertical remapping. In the process, it does funky stuff with the MPI processes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{obc} :: {[}inout{]} Open boundary control structure

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file handle

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_data_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_data\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_manifest_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_manifest\_str}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_obc\_tides() (fortran subroutine in module mom\_open\_boundary)@\spxentry{initialize\_obc\_tides()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{initialize\_obc\_tides}}}{\emph{OBC}, \emph{param\_file}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/astro_longitudes_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::astro\_longitudes\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/eq_phase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::eq\_phase}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/nodal_fu}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::nodal\_fu}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_frequency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::tidal\_frequency}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setup\_segment\_indices() (fortran subroutine in module mom\_open\_boundary)@\spxentry{setup\_segment\_indices()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_segment_indices}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{setup\_segment\_indices}}}{\emph{G}, \emph{seg}, \emph{Is\_obc}, \emph{Ie\_obc}, \emph{Js\_obc}, \emph{Je\_obc}}{}
Define indices for segment and store in hor\_index\_type using global segment bounds corresponding to q\sphinxhyphen{}points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} grid type

\item {} 
\sphinxstylestrong{seg} :: {[}inout{]} Open boundary segment

\item {} 
\sphinxstylestrong{is\_obc} :: {[}in{]} Q\sphinxhyphen{}point global i\sphinxhyphen{}index of start of segment

\item {} 
\sphinxstylestrong{ie\_obc} :: {[}in{]} Q\sphinxhyphen{}point global i\sphinxhyphen{}index of end of segment

\item {} 
\sphinxstylestrong{js\_obc} :: {[}in{]} Q\sphinxhyphen{}point global j\sphinxhyphen{}index of start of segment

\item {} 
\sphinxstylestrong{je\_obc} :: {[}in{]} Q\sphinxhyphen{}point global j\sphinxhyphen{}index of end of segment

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_segment\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_u_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_u\_point\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_v_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_v\_point\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setup\_u\_point\_obc() (fortran subroutine in module mom\_open\_boundary)@\spxentry{setup\_u\_point\_obc()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_u_point_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{setup\_u\_point\_obc}}}{\emph{OBC}, \emph{G}, \emph{US}, \emph{segment\_str}, \emph{l\_seg}, \emph{PF}, \emph{reentrant\_y}}{}
Parse an OBC\_SEGMENT\_\%\%\% string starting with “I=” and configure placement and type of OBC accordingly.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{segment\_str} :: {[}in{]} A string in form of “I=\%,J=\%:\%,string”

\item {} 
\sphinxstylestrong{l\_seg} :: {[}in{]} which segment is this?

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{reentrant\_y} :: {[}in{]} is the domain reentrant in y?

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/allocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_obc\_segment\_data}}}}} \sphinxcode{\sphinxupquote{mdl}} \sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_segment_indices}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_segment\_indices}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setup\_v\_point\_obc() (fortran subroutine in module mom\_open\_boundary)@\spxentry{setup\_v\_point\_obc()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_v_point_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{setup\_v\_point\_obc}}}{\emph{OBC}, \emph{G}, \emph{US}, \emph{segment\_str}, \emph{l\_seg}, \emph{PF}, \emph{reentrant\_x}}{}
Parse an OBC\_SEGMENT\_\%\%\% string starting with “J=” and configure placement and type of OBC accordingly.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{segment\_str} :: {[}in{]} A string in form of “J=\%,I=\%:\%,string”

\item {} 
\sphinxstylestrong{l\_seg} :: {[}in{]} which segment is this?

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{reentrant\_x} :: {[}in{]} is the domain reentrant in x?

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/allocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_obc\_segment\_data}}}}} \sphinxcode{\sphinxupquote{mdl}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_segment_indices}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_segment\_indices}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{parse\_segment\_str() (fortran subroutine in module mom\_open\_boundary)@\spxentry{parse\_segment\_str()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_str}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{parse\_segment\_str}}}{\emph{ni\_global}, \emph{nj\_global}, \emph{segment\_str}, \emph{l}, \emph{m}, \emph{n}, \emph{action\_str}, \emph{reentrant}}{}
Parse an OBC\_SEGMENT\_\%\%\% string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ni\_global} :: {[}in{]} Number of h\sphinxhyphen{}points in zonal direction

\item {} 
\sphinxstylestrong{nj\_global} :: {[}in{]} Number of h\sphinxhyphen{}points in meridional direction

\item {} 
\sphinxstylestrong{segment\_str} :: {[}in{]} A string in form of “I=l,J=m:n,string” or “J=l,I=m,n,string”

\item {} 
\sphinxstylestrong{l} :: {[}out{]} The value of I=l, if segment\_str begins with I=l, or the value of J=l

\item {} 
\sphinxstylestrong{m} :: {[}out{]} The value of J=m, if segment\_str begins with I=, or the value of I=m

\item {} 
\sphinxstylestrong{n} :: {[}out{]} The value of J=n, if segment\_str begins with I=, or the value of I=n

\item {} 
\sphinxstylestrong{action\_str} :: {[}out{]} The “string” part of segment\_str

\item {} 
\sphinxstylestrong{reentrant} :: {[}in{]} is domain reentrant in relevant direction?

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extract\_word}}}}} \sphinxcode{\sphinxupquote{interpret\_int\_expr}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_u_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_u\_point\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_v_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_v\_point\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{parse\_segment\_manifest\_str() (fortran subroutine in module mom\_open\_boundary)@\spxentry{parse\_segment\_manifest\_str()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_manifest_str}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{parse\_segment\_manifest\_str}}}{\emph{segment\_str}, \emph{num\_fields}, \emph{fields}}{}
Parse an OBC\_SEGMENT\_\%\%\_DATA string and determine its fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{segment\_str} :: {[}in{]} A string in form of “VAR1=file:foo1.nc(varnam1),VAR2=file:foo2.nc(varnam2),…”

\item {} 
\sphinxstylestrong{num\_fields} :: {[}out{]} The number of fields in the segment data

\item {} 
\sphinxstylestrong{fields} :: {[}out{]} List of fieldnames for each segment

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extract\_word}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_segment\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_for_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_for\_tracer\_reservoirs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{parse\_segment\_data\_str() (fortran subroutine in module mom\_open\_boundary)@\spxentry{parse\_segment\_data\_str()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_data_str}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{parse\_segment\_data\_str}}}{\emph{segment\_str}, \emph{idx}, \emph{var}, \emph{value}, \emph{filename}, \emph{fieldname}}{}
Parse an OBC\_SEGMENT\_\%\%\_DATA string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{segment\_str} :: {[}in{]} A string in form of “VAR1=file:foo1.nc(varnam1),VAR2=file:foo2.nc(varnam2),…”

\item {} 
\sphinxstylestrong{idx} :: {[}in{]} Index of segment\_str record

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The name of the variable for which parameters are needed

\item {} 
\sphinxstylestrong{filename} :: {[}out{]} The name of the input file if using “file” method

\item {} 
\sphinxstylestrong{fieldname} :: {[}out{]} The name of the variable in the input file if using “file” method

\item {} 
\sphinxstylestrong{value} :: {[}out{]} A constant value if using the “value” method

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extract\_word}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_segment\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_for_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_for\_tracer\_reservoirs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{parse\_for\_tracer\_reservoirs() (fortran subroutine in module mom\_open\_boundary)@\spxentry{parse\_for\_tracer\_reservoirs()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_for_tracer_reservoirs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{parse\_for\_tracer\_reservoirs}}}{\emph{OBC}, \emph{PF}, \emph{use\_temperature}}{}
Parse all the OBC\_SEGMENT\_\%\%\_DATA strings again to see which need tracer reservoirs (all pes need to know).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: {[}inout{]} Open boundary control structure

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{use\_temperature} :: {[}in{]} If true, T and S are used

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_data_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_data\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_manifest_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_segment\_manifest\_str}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_register\_restarts}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{parse\_segment\_param\_real() (fortran subroutine in module mom\_open\_boundary)@\spxentry{parse\_segment\_param\_real()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_param_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{parse\_segment\_param\_real}}}{\emph{segment\_str}, \emph{var}, \emph{param\_value}, \emph{debug}}{}
Parse an OBC\_SEGMENT\_\%\%\_PARAMS string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{segment\_str} :: {[}in{]} A string in form of “VAR1=file:foo1.nc(varnam1),VAR2=file:foo2.nc(varnam2),…”

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The name of the variable for which parameters are needed

\item {} 
\sphinxstylestrong{param\_value} :: {[}out{]} The value of the parameter

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If present and true, write verbose debugging messages

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extract\_word}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_init() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_init()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_init}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{OBC}, \emph{restart\_CSp}}{}
Initialize open boundary control structure and do any necessary rescaling of OBC fields that have been read from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Container for vertical grid information

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{restart\_csp} :: Restart structure, data intent(inout)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_query() (fortran function in module mom\_open\_boundary)@\spxentry{open\_boundary\_query()}\spxextra{fortran function in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_query}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_query}}}{\emph{OBC}, \emph{apply\_open\_OBC}, \emph{apply\_specified\_OBC}, \emph{apply\_Flather\_OBC}, \emph{apply\_nudged\_OBC}, \emph{needs\_ext\_seg\_data}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{apply\_open\_obc} :: {[}in{]} Returns True if open\_*\_BCs\_exist\_globally is true

\item {} 
\sphinxstylestrong{apply\_specified\_obc} :: {[}in{]} Returns True if specified\_*\_BCs\_exist\_globally is true

\item {} 
\sphinxstylestrong{apply\_flather\_obc} :: {[}in{]} Returns True if Flather\_*\_BCs\_exist\_globally is true

\item {} 
\sphinxstylestrong{apply\_nudged\_obc} :: {[}in{]} Returns True if nudged\_*\_BCs\_exist\_globally is true

\item {} 
\sphinxstylestrong{needs\_ext\_seg\_data} :: {[}in{]} Returns True if external segment data needed

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_dealloc() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_dealloc()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_dealloc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_dealloc}}}{\emph{OBC}}{}
Deallocate open boundary data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{obc} :: Open boundary control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/deallocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_obc\_segment\_data}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_end() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_end()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_end}}}{\emph{OBC}}{}
Close open boundary data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{obc} :: Open boundary control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_dealloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_dealloc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_impose\_normal\_slope() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_impose\_normal\_slope()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_impose_normal_slope}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_impose\_normal\_slope}}}{\emph{OBC}, \emph{G}, \emph{depth}}{}
Sets the slope of bathymetry normal to an open bounndary to zero.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{depth} :: {[}inout{]} Bathymetry at h\sphinxhyphen{}points

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_impose\_land\_mask() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_impose\_land\_mask()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_impose_land_mask}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_impose\_land\_mask}}}{\emph{OBC}, \emph{G}, \emph{areaCu}, \emph{areaCv}, \emph{US}}{}
Reconcile masks and open boundaries, deallocate OBC on PEs where it is not needed. Also adjust u\sphinxhyphen{} and v\sphinxhyphen{}point cell area on specified open boundaries and mask all points outside open boundaries.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{areacu} :: {[}inout{]} Area of a u\sphinxhyphen{}cell {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{areacv} :: {[}inout{]} Area of a u\sphinxhyphen{}cell {[}L2 \textasciitilde{}\textgreater{} m2{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} \sphinxcode{\sphinxupquote{obc\_none}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setup\_obc\_tracer\_reservoirs() (fortran subroutine in module mom\_open\_boundary)@\spxentry{setup\_obc\_tracer\_reservoirs()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_obc_tracer_reservoirs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{setup\_obc\_tracer\_reservoirs}}}{\emph{G}, \emph{OBC}}{}
Make sure the OBC tracer reservoirs are initialized.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/fill_temp_salt_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_temp\_salt\_segments}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{radiation\_open\_bdry\_conds() (fortran subroutine in module mom\_open\_boundary)@\spxentry{radiation\_open\_bdry\_conds()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/radiation_open_bdry_conds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{radiation\_open\_bdry\_conds}}}{\emph{OBC}, \emph{u\_new}, \emph{u\_old}, \emph{v\_new}, \emph{v\_old}, \emph{G}, \emph{US}, \emph{dt}}{}
Apply radiation conditions to 3D u,v at open boundaries.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{u\_new} :: {[}inout{]} On exit, new u values on open boundaries On entry, the old time\sphinxhyphen{}level v but including barotropic accelerations {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{u\_old} :: {[}in{]} Original unadjusted u {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v\_new} :: {[}inout{]} On exit, new v values on open boundaries. On entry, the old time\sphinxhyphen{}level v but including barotropic accelerations {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_old} :: {[}in{]} Original unadjusted v {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Appropriate timestep {[}T \textasciitilde{}\textgreater{} s{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/gradient_at_q_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gradient\_at\_q\_points}}}}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_apply_normal_flow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_apply\_normal\_flow}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_apply\_normal\_flow() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_apply\_normal\_flow()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_apply_normal_flow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_apply\_normal\_flow}}}{\emph{OBC}, \emph{G}, \emph{u}, \emph{v}}{}
Applies OBC values stored in segments to 3d u,v fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} u field to update on open boundaries {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} v field to update on open boundaries {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/radiation_open_bdry_conds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{radiation\_open\_bdry\_conds}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_zero\_normal\_flow() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_zero\_normal\_flow()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_zero_normal_flow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_zero\_normal\_flow}}}{\emph{OBC}, \emph{G}, \emph{u}, \emph{v}}{}
Applies zero values to 3d u,v fields on OBC segments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} u field to update on open boundaries

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} v field to update on open boundaries

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{gradient\_at\_q\_points() (fortran subroutine in module mom\_open\_boundary)@\spxentry{gradient\_at\_q\_points()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/gradient_at_q_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{gradient\_at\_q\_points}}}{\emph{G}, \emph{segment}, \emph{uvel}, \emph{vvel}}{}
Calculate the tangential gradient of the normal flow at the boundary q\sphinxhyphen{}points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{segment} :: OBC segment structure

\item {} 
\sphinxstylestrong{uvel} :: {[}in{]} zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vvel} :: {[}in{]} meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/radiation_open_bdry_conds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{radiation\_open\_bdry\_conds}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_tracer\_data() (fortran subroutine in module mom\_open\_boundary)@\spxentry{set\_tracer\_data()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/set_tracer_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{set\_tracer\_data}}}{\emph{OBC}, \emph{tv}, \emph{h}, \emph{G}, \emph{PF}, \emph{tracer\_Reg}}{}
Sets the initial values of the tracer open boundary conditions. Redoing this elsewhere.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Thickness

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{tracer\_reg} :: Tracer registry

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}}

\end{description}\end{quote}

\end{fulllineitems}

\index{lookup\_seg\_field() (fortran function in module mom\_open\_boundary)@\spxentry{lookup\_seg\_field()}\spxextra{fortran function in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/lookup_seg_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{lookup\_seg\_field}}}{\emph{OBC\_seg}, \emph{field}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Needs documentation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc\_seg} :: OBC segment

\item {} 
\sphinxstylestrong{field} :: {[}in{]} The field name

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{allocate\_obc\_segment\_data() (fortran subroutine in module mom\_open\_boundary)@\spxentry{allocate\_obc\_segment\_data()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/allocate_obc_segment_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{allocate\_obc\_segment\_data}}}{\emph{OBC}, \emph{segment}}{}
Allocate segment data fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{segment} :: {[}inout{]} Open boundary segment

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_u_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_u\_point\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_v_point_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_v\_point\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{deallocate\_obc\_segment\_data() (fortran subroutine in module mom\_open\_boundary)@\spxentry{deallocate\_obc\_segment\_data()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/deallocate_obc_segment_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{deallocate\_obc\_segment\_data}}}{\emph{OBC}, \emph{segment}}{}
Deallocate segment data fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{segment} :: {[}inout{]} Open boundary segment

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{segment\_tracer\_registry\_end}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_dealloc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_dealloc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_test\_extern\_uv() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_test\_extern\_uv()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_test_extern_uv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_test\_extern\_uv}}}{\emph{G}, \emph{OBC}, \emph{u}, \emph{v}}{}
Set tangential velocities outside of open boundaries to silly values (used for checking the interior state is independent of values outside of the domain).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_test\_extern\_h() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_test\_extern\_h()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_test_extern_h}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_test\_extern\_h}}}{\emph{G}, \emph{GV}, \emph{OBC}, \emph{h}}{}
Set thicknesses outside of open boundaries to silly values (used for checking the interior state is independent of values outside of the domain).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_obc\_segment\_data() (fortran subroutine in module mom\_open\_boundary)@\spxentry{update\_obc\_segment\_data()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_segment_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{update\_obc\_segment\_data}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{OBC}, \emph{tv}, \emph{h}, \emph{Time}}{}
Update the OBC values on the segments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/adjustsegmentetatofitbathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustsegmentetatofitbathymetry}}}}} \sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_obc\_ramp() (fortran subroutine in module mom\_open\_boundary)@\spxentry{update\_obc\_ramp()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_ramp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{update\_obc\_ramp}}}{\emph{Time}, \emph{OBC}, \emph{activate}}{}
Update the OBC ramp 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.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{activate} :: {[}in{]} Specifiy whether to record the value of Time as the beginning of the ramp period

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_obc() (fortran subroutine in module mom\_open\_boundary)@\spxentry{register\_obc()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{register\_obc}}}{\emph{name}, \emph{param\_file}, \emph{Reg}}{}
register open boundary objects for boundary updates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} OBC name used for error messages

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} file to parse for model parameter values

\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obc\_registry\_init}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/register_dyed_channel_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_initialization::register\_dyed\_channel\_obc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_file_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_file\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{obc\_registry\_init() (fortran subroutine in module mom\_open\_boundary)@\spxentry{obc\_registry\_init()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/obc_registry_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{obc\_registry\_init}}}{\emph{param\_file}, \emph{Reg}}{}
This routine include declares and sets the variable “version”.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} open file to parse for model parameters

\item {} 
\sphinxstylestrong{reg} :: pointer to OBC registry

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_obc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_file\_obc() (fortran function in module mom\_open\_boundary)@\spxentry{register\_file\_obc()}\spxextra{fortran function in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_file_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{register\_file\_obc}}}{\emph{param\_file}, \emph{CS}, \emph{OBC\_Reg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Add file to OBC registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file.

\item {} 
\sphinxstylestrong{cs} :: file control structure.

\item {} 
\sphinxstylestrong{obc\_reg} :: OBC registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_obc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/call_obc_register}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::call\_obc\_register}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{file\_obc\_end() (fortran subroutine in module mom\_open\_boundary)@\spxentry{file\_obc\_end()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/file_obc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{file\_obc\_end}}}{\emph{CS}}{}
Clean up the file OBC from registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: OBC file control structure.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/obc_register_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::obc\_register\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{segment\_tracer\_registry\_init() (fortran subroutine in module mom\_open\_boundary)@\spxentry{segment\_tracer\_registry\_init()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{segment\_tracer\_registry\_init}}}{\emph{param\_file}, \emph{segment}}{}
Initialize the segment tracer registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} open file to parse for model parameters

\item {} 
\sphinxstylestrong{segment} :: {[}inout{]} the segment

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_segment_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_segment\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_segment\_tracer() (fortran subroutine in module mom\_open\_boundary)@\spxentry{register\_segment\_tracer()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_segment_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{register\_segment\_tracer}}}{\emph{tr\_ptr}, \emph{param\_file}, \emph{GV}, \emph{segment}, \emph{OBC\_scalar}, \emph{OBC\_array}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{tr\_ptr} :: A target that can be used to set a pointer to the stored value of tr. This target must be an enduring part of the control structure, because the tracer registry will use this memory, but it also means that any updates to this structure in the calling module will be available subsequently to the tracer registry.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} file to parse for model parameter values

\item {} 
\sphinxstylestrong{segment} :: {[}inout{]} current segment data structure

\item {} 
\sphinxstylestrong{obc\_scalar} :: {[}in{]} If present, use scalar value for segment tracer inflow concentration.

\item {} 
\sphinxstylestrong{obc\_array} :: {[}in{]} If true, use array values for segment tracer inflow concentration.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{segment\_tracer\_registry\_init}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization/dyed_obcs_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obcs\_initialization::dyed\_obcs\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_temp_salt_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_temp\_salt\_segments}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{segment\_tracer\_registry\_end() (fortran subroutine in module mom\_open\_boundary)@\spxentry{segment\_tracer\_registry\_end()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/segment_tracer_registry_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{segment\_tracer\_registry\_end}}}{\emph{Reg}}{}
Clean up the segment tracer registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{reg} :: pointer to tracer registry

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/deallocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_obc\_segment\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_temp\_salt\_segments() (fortran subroutine in module mom\_open\_boundary)@\spxentry{register\_temp\_salt\_segments()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_temp_salt_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{register\_temp\_salt\_segments}}}{\emph{GV}, \emph{OBC}, \emph{tr\_Reg}, \emph{param\_file}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{tr\_reg} :: Tracer registry

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} file to parse for model parameter values

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_segment_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_segment\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_name_lookup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::tracer\_name\_lookup}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fill\_temp\_salt\_segments() (fortran subroutine in module mom\_open\_boundary)@\spxentry{fill\_temp\_salt\_segments()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/fill_temp_salt_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{fill\_temp\_salt\_segments}}}{\emph{G}, \emph{OBC}, \emph{tv}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamics structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_obc_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_obc\_tracer\_reservoirs}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mask\_outside\_obcs() (fortran subroutine in module mom\_open\_boundary)@\spxentry{mask\_outside\_obcs()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/mask_outside_obcs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{mask\_outside\_obcs}}}{\emph{G}, \emph{US}, \emph{param\_file}, \emph{OBC}}{}
Find the region outside of all open boundary segments and make sure it is set to land mask. Gonna need to know global land mask as well to get it right…
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/flood_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flood\_fill}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/flood_fill2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flood\_fill2}}}}} \sphinxcode{\sphinxupquote{mdl}} \sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} \sphinxcode{\sphinxupquote{obc\_none}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_config}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{flood\_fill() (fortran subroutine in module mom\_open\_boundary)@\spxentry{flood\_fill()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/flood_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{flood\_fill}}}{\emph{G}, \emph{color}, \emph{cin}, \emph{cout}, \emph{cland}}{}
flood the cin, cout values
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{color} :: {[}inout{]} For sorting inside from outside

\item {} 
\sphinxstylestrong{cin} :: {[}in{]} color for inside the domain

\item {} 
\sphinxstylestrong{cout} :: {[}in{]} color for outside the domain

\item {} 
\sphinxstylestrong{cland} :: {[}in{]} color for inside the land mask

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/mask_outside_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mask\_outside\_obcs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{flood\_fill2() (fortran subroutine in module mom\_open\_boundary)@\spxentry{flood\_fill2()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/flood_fill2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{flood\_fill2}}}{\emph{G}, \emph{color}, \emph{cin}, \emph{cout}, \emph{cland}}{}
flood the cin, cout values
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{color} :: {[}inout{]} For sorting inside from outside

\item {} 
\sphinxstylestrong{cin} :: {[}in{]} color for inside the domain

\item {} 
\sphinxstylestrong{cout} :: {[}in{]} color for outside the domain

\item {} 
\sphinxstylestrong{cland} :: {[}in{]} color for inside the land mask

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/mask_outside_obcs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mask\_outside\_obcs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_boundary\_register\_restarts() (fortran subroutine in module mom\_open\_boundary)@\spxentry{open\_boundary\_register\_restarts()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_register_restarts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{open\_boundary\_register\_restarts}}}{\emph{HI}, \emph{GV}, \emph{OBC}, \emph{Reg}, \emph{param\_file}, \emph{restart\_CSp}, \emph{use\_temperature}}{}
Register OBC segment data for restarts.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal indices

\item {} 
\sphinxstylestrong{gv} :: Container for vertical grid information

\item {} 
\sphinxstylestrong{obc} :: OBC data structure, data intent(inout)

\item {} 
\sphinxstylestrong{reg} :: pointer to tracer registry

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{restart\_csp} :: Restart structure, data intent(inout)

\item {} 
\sphinxstylestrong{use\_temperature} :: {[}in{]} If true, T and S are used

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_for_tracer_reservoirs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse\_for\_tracer\_reservoirs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_segment\_tracer\_reservoirs() (fortran subroutine in module mom\_open\_boundary)@\spxentry{update\_segment\_tracer\_reservoirs()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_segment_tracer_reservoirs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{update\_segment\_tracer\_reservoirs}}}{\emph{G}, \emph{GV}, \emph{uhr}, \emph{vhr}, \emph{h}, \emph{OBC}, \emph{dt}, \emph{Reg}}{}
Update the OBC tracer reservoirs after the tracers have been updated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{uhr} :: {[}in{]} accumulated volume/mass flux through the zonal face {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhr} :: {[}in{]} accumulated volume/mass flux through the meridional face {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness after advection {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{obc} :: Open boundary structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{reg} :: pointer to tracer registry

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjustsegmentetatofitbathymetry() (fortran subroutine in module mom\_open\_boundary)@\spxentry{adjustsegmentetatofitbathymetry()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/adjustsegmentetatofitbathymetry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{adjustsegmentetatofitbathymetry}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{segment}, \emph{fld}}{}
Adjust interface heights to fit the bathymetry and diagnose layer thickness.

If the bottom most interface is below the topography then the bottom\sphinxhyphen{}most layers are contracted to GVAngstrom\_m. If the bottom most interface is above the topography then the entire column is dilated (expanded) to fill the void.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{segment} :: {[}inout{]} pointer to segment type

\item {} 
\sphinxstylestrong{fld} :: {[}in{]} field index to adjust thickness

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_obc\_segment\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_obc\_config() (fortran subroutine in module mom\_open\_boundary)@\spxentry{rotate\_obc\_config()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_config}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{rotate\_obc\_config}}}{\emph{OBC\_in}, \emph{G\_in}, \emph{OBC}, \emph{G}, \emph{turns}}{}
This is more of a rotate initialization than an actual rotate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc\_in} :: {[}in{]} Input OBC

\item {} 
\sphinxstylestrong{g\_in} :: {[}in{]} Input grid metric

\item {} 
\sphinxstylestrong{obc} :: {[}inout{]} Rotated OBC

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Rotated grid metric

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/allocate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_obc\_segment\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_segment\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_segment\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_obc\_segment\_config() (fortran subroutine in module mom\_open\_boundary)@\spxentry{rotate\_obc\_segment\_config()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_config}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{rotate\_obc\_segment\_config}}}{\emph{segment\_in}, \emph{G\_in}, \emph{segment}, \emph{G}, \emph{turns}}{}
Rotate the OBC segment configuration data from the input to model index map.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{segment\_in} :: {[}in{]} Input OBC segment

\item {} 
\sphinxstylestrong{g\_in} :: {[}in{]} Input grid metric

\item {} 
\sphinxstylestrong{segment} :: {[}inout{]} Rotated OBC segment

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Rotated grid metric

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{obc\_direction\_e}} \sphinxcode{\sphinxupquote{obc\_direction\_n}} \sphinxcode{\sphinxupquote{obc\_direction\_s}} \sphinxcode{\sphinxupquote{obc\_direction\_w}} \sphinxcode{\sphinxupquote{obc\_none}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/setup_segment_indices}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_segment\_indices}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_config}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_obc\_init() (fortran subroutine in module mom\_open\_boundary)@\spxentry{rotate\_obc\_init()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{rotate\_obc\_init}}}{\emph{OBC\_in}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{tv}, \emph{restart\_CSp}, \emph{OBC}}{}
Initialize the segments and field\sphinxhyphen{}related data of a rotated OBC.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc\_in} :: {[}in{]} OBC on input map

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Rotated grid metric

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid

\item {} 
\sphinxstylestrong{us} :: {[}in{]} Unit scaling

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Input parameters

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Tracer fields

\item {} 
\sphinxstylestrong{restart\_csp} :: {[}in{]} Restart CS

\item {} 
\sphinxstylestrong{obc} :: {[}inout{]} Rotated OBC

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/fill_temp_salt_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_temp\_salt\_segments}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_boundary\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_segment\_data}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_obc\_segment\_data() (fortran subroutine in module mom\_open\_boundary)@\spxentry{rotate\_obc\_segment\_data()}\spxextra{fortran subroutine in module mom\_open\_boundary}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_segment_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_open\_boundary/}}\sphinxbfcode{\sphinxupquote{rotate\_obc\_segment\_data}}}{\emph{segment\_in}, \emph{segment}, \emph{turns}}{}
Rotate an OBC segment’s fields from the input to the model index map.
\begin{quote}\begin{description}
\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/rotate_obc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_obc\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_pointaccel module reference}
\label{\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel}}\label{\detokenize{api/generated/modules/mom_pointaccel:mom-pointaccel-module-reference}}\label{\detokenize{api/generated/modules/mom_pointaccel::doc}}\index{mom\_pointaccel (module)@\spxentry{mom\_pointaccel}\spxextra{module}|spxpagem}
Debug accelerations at a given point.

{\hyperref[\detokenize{api/generated/modules/mom_pointaccel:detamom-pointaccel}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_pointaccel:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/pointaccel_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pointaccel\_cs}}}}}
&
The control structure for the MOM\_PointAccel module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_pointaccel:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/write_u_accel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_u\_accel()}}}}}
&
This subroutine writes to an output file all of the accelerations that have been applied to a column of zonal velocities over the previous timestep.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/write_v_accel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_v\_accel()}}}}}
&
This subroutine writes to an output file all of the accelerations that have been applied to a column of meridional velocities over the previous timestep.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/pointaccel_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pointaccel\_init()}}}}}
&
This subroutine initializes the parameters regulating how truncations are logged.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_pointaccel:detailed-description}}\label{\detokenize{api/generated/modules/mom_pointaccel:detamom-pointaccel}}
The two subroutines in this file write out all of the terms in the u\sphinxhyphen{} or v\sphinxhyphen{}momentum balance at a given point. Usually these subroutines are called after the velocities exceed some threshold, in order to determine which term is culpable. often this is done for debugging purposes.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_pointaccel:type-documentation}}\index{pointaccel\_cs (fortran type in module mom\_pointaccel)@\spxentry{pointaccel\_cs}\spxextra{fortran type in module mom\_pointaccel}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/pointaccel_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_pointaccel/}}\sphinxbfcode{\sphinxupquote{pointaccel\_cs}}}
The control structure for the MOM\_PointAccel module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_trunc\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The complete path to the file in which a column’s worth of u\sphinxhyphen{}accelerations are written if u\sphinxhyphen{}velocity truncations occur.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_trunc\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The complete path to the file in which a column’s worth of v\sphinxhyphen{}accelerations are written if v\sphinxhyphen{}velocity truncations occur.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number for an opened u\sphinxhyphen{}truncation files, or \sphinxhyphen{}1 if it has not yet been opened.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number for an opened v\sphinxhyphen{}truncation files, or \sphinxhyphen{}1 if it has not yet been opened.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cols\_written}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of columns whose output has been written by this PE during the current run.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_writes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of times any PE can write out a column’s worth of accelerations during a run.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_av}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Time average u\sphinxhyphen{}velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_av}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Time average velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Previous u\sphinxhyphen{}velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Previous v\sphinxhyphen{}velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Temperature {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Salinity {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_accel\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Barotropic u\sphinxhyphen{}acclerations {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_accel\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Barotropic v\sphinxhyphen{}acclerations {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pbce}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: pbce times eta gives the baroclinic pressure anomaly in each layer due to free surface height anomalies {[}m2 s\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 or m4 kg\sphinxhyphen{}1 s\sphinxhyphen{}2{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_pointaccel:function-subroutine-documentation}}\index{write\_u\_accel() (fortran subroutine in module mom\_pointaccel)@\spxentry{write\_u\_accel()}\spxextra{fortran subroutine in module mom\_pointaccel}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/write_u_accel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pointaccel/}}\sphinxbfcode{\sphinxupquote{write\_u\_accel}}}{\emph{I}, \emph{j}, \emph{um}, \emph{hin}, \emph{ADp}, \emph{CDp}, \emph{dt\_in\_T}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{vel\_rpt}, \emph{str}, \emph{a}, \emph{hv}}{}
This subroutine writes to an output file all of the accelerations that have been applied to a column of zonal velocities over the previous timestep. This subroutine is called from vertvisc.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{i} :: {[}in{]} The zonal index of the column to be documented.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The meridional index of the column to be documented.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{um} :: {[}in{]} The new zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hin} :: {[}in{]} The layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{adp} :: {[}in{]} A structure pointing to the various accelerations in the momentum equations.

\item {} 
\sphinxstylestrong{cdp} :: {[}in{]} A structure with pointers to various terms in the continuity equations.

\item {} 
\sphinxstylestrong{dt\_in\_t} :: {[}in{]} The ocean dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to PointAccel\_init.

\item {} 
\sphinxstylestrong{vel\_rpt} :: {[}in{]} The velocity magnitude that triggers a report {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{str} :: {[}in{]} The surface wind stress integrated over a time step divided by the Boussinesq density {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{a} :: {[}in{]} The layer coupling coefficients from vertvisc {[}Z s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hv} :: {[}in{]} The layer thicknesses at velocity grid points,

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_v\_accel() (fortran subroutine in module mom\_pointaccel)@\spxentry{write\_v\_accel()}\spxextra{fortran subroutine in module mom\_pointaccel}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/write_v_accel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pointaccel/}}\sphinxbfcode{\sphinxupquote{write\_v\_accel}}}{\emph{i}, \emph{J}, \emph{vm}, \emph{hin}, \emph{ADp}, \emph{CDp}, \emph{dt\_in\_T}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{vel\_rpt}, \emph{str}, \emph{a}, \emph{hv}}{}
This subroutine writes to an output file all of the accelerations that have been applied to a column of meridional velocities over the previous timestep. This subroutine is called from vertvisc.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{i} :: {[}in{]} The zonal index of the column to be documented.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The meridional index of the column to be documented.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{vm} :: {[}in{]} The new meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hin} :: {[}in{]} The layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{adp} :: {[}in{]} A structure pointing to the various accelerations in the momentum equations.

\item {} 
\sphinxstylestrong{cdp} :: {[}in{]} A structure with pointers to various terms in the continuity equations.

\item {} 
\sphinxstylestrong{dt\_in\_t} :: {[}in{]} The ocean dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to PointAccel\_init.

\item {} 
\sphinxstylestrong{vel\_rpt} :: {[}in{]} The velocity magnitude that triggers a report {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{str} :: {[}in{]} The surface wind stress integrated over a time step divided by the Boussinesq density {[}m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{a} :: {[}in{]} The layer coupling coefficients from vertvisc {[}Z s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hv} :: {[}in{]} The layer thicknesses at velocity grid points,

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pointaccel\_init() (fortran subroutine in module mom\_pointaccel)@\spxentry{pointaccel\_init()}\spxextra{fortran subroutine in module mom\_pointaccel}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pointaccel:f/mom_pointaccel/pointaccel_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pointaccel/}}\sphinxbfcode{\sphinxupquote{pointaccel\_init}}}{\emph{MIS}, \emph{Time}, \emph{G}, \emph{param\_file}, \emph{diag}, \emph{dirs}, \emph{CS}}{}
This subroutine initializes the parameters regulating how truncations are logged.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mis} :: {[}in{]} For “MOM Internal State” a set of pointers

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} A structure containing several relevant directory paths.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_pressureforce module reference}
\label{\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce}}\label{\detokenize{api/generated/modules/mom_pressureforce:mom-pressureforce-module-reference}}\label{\detokenize{api/generated/modules/mom_pressureforce::doc}}\index{mom\_pressureforce (module)@\spxentry{mom\_pressureforce}\spxextra{module}|spxpagem}
A thin wrapper for Boussinesq/non\sphinxhyphen{}Boussinesq forms of the pressure force calculation.

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce:detamom-pressureforce}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_pressureforce:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_cs}}}}}
&
Pressure force control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_pressureforce:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce()}}}}}
&
A thin layer between the model and the Boussinesq and non\sphinxhyphen{}Boussinesq pressure force routines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_init()}}}}}
&
Initialize the pressure force control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_end()}}}}}
&
Deallocate the pressure force control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_pressureforce:detailed-description}}\label{\detokenize{api/generated/modules/mom_pressureforce:detamom-pressureforce}}
This thin module provides a branch to two forms of the horizontal accelerations due to pressure gradients. The two options currently available are a Montgomery potential form (used in traditional isopycnal layer models), and the analytic finite volume form.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_pressureforce:type-documentation}}\index{pressureforce\_cs (fortran type in module mom\_pressureforce)@\spxentry{pressureforce\_cs}\spxextra{fortran type in module mom\_pressureforce}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_pressureforce/}}\sphinxbfcode{\sphinxupquote{pressureforce\_cs}}}
Pressure force control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{analytic\_fv\_pgf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the analytic finite volume form (Adcroft et al., Ocean Mod. 2008) of the PGF.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressureforce\_fv\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pressureforce\_fv\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for the analytically integrated finite volume pressure force.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pressureforce\_mont\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pressureforce\_mont\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for the Montgomery potential form of pressure force.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_pressureforce:function-subroutine-documentation}}\index{pressureforce() (fortran subroutine in module mom\_pressureforce)@\spxentry{pressureforce()}\spxextra{fortran subroutine in module mom\_pressureforce}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce/}}\sphinxbfcode{\sphinxupquote{pressureforce}}}{\emph{h}, \emph{tv}, \emph{PFu}, \emph{PFv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{ALE\_CSp}, \emph{p\_atm}, \emph{pbce}, \emph{eta}}{}
A thin layer between the model and the Boussinesq and non\sphinxhyphen{}Boussinesq pressure force routines.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{pfu} :: {[}out{]} Zonal pressure force acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{pfv} :: {[}out{]} Meridional pressure force acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: Pressure force control structure

\item {} 
\sphinxstylestrong{ale\_csp} :: ALE control structure

\item {} 
\sphinxstylestrong{p\_atm} :: The pressure at the ice\sphinxhyphen{}ocean or

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in each layer

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} The bottom mass used to calculate PFu and PFv,

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_init() (fortran subroutine in module mom\_pressureforce)@\spxentry{pressureforce\_init()}\spxextra{fortran subroutine in module mom\_pressureforce}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce/}}\sphinxbfcode{\sphinxupquote{pressureforce\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{tides\_CSp}}{}
Initialize the pressure force control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cs} :: Pressure force control structure

\item {} 
\sphinxstylestrong{tides\_csp} :: Tide control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_end() (fortran subroutine in module mom\_pressureforce)@\spxentry{pressureforce\_end()}\spxextra{fortran subroutine in module mom\_pressureforce}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce:f/mom_pressureforce/pressureforce_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce/}}\sphinxbfcode{\sphinxupquote{pressureforce\_end}}}{\emph{CS}}{}
Deallocate the pressure force control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Pressure force control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_pressureforce\_fv module reference}
\label{\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv}}\label{\detokenize{api/generated/modules/mom_pressureforce_fv:mom-pressureforce-fv-module-reference}}\label{\detokenize{api/generated/modules/mom_pressureforce_fv::doc}}\index{mom\_pressureforce\_fv (module)@\spxentry{mom\_pressureforce\_fv}\spxextra{module}|spxpagem}
Finite volume pressure gradient (integrated by quadrature or analytically)

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:detamom-pressureforce-fv}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_pressureforce_fv:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_fv\_cs}}}}}
&
Finite volume pressure gradient control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_pressureforce_fv:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_fv\_nonbouss()}}}}}
&
Non\sphinxhyphen{}Boussinesq analytically\sphinxhyphen{}integrated finite volume form of pressure gradient.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_fv\_bouss()}}}}}
&
Boussinesq analytically\sphinxhyphen{}integrated finite volume form of pressure gradient.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_fv\_init()}}}}}
&
Initializes the finite volume pressure gradient control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_fv\_end()}}}}}
&
Deallocates the finite volume pressure gradient control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_pressureforce_fv:detailed-description}}\label{\detokenize{api/generated/modules/mom_pressureforce_fv:detamom-pressureforce-fv}}
Provides the Boussinesq and non\sphinxhyphen{}Boussinesq forms of horizontal accelerations due to pressure gradients using a vertically integrated finite volume form, as described by Adcroft et al., 2008. Integration in the vertical is made either by quadrature or analytically.

This form eliminates the thermobaric instabilities that had been a problem with previous forms of the pressure gradient force calculation, as described by Hallberg, 2005.

Adcroft, A., R. Hallberg, and M. Harrison, 2008: A finite volume discretization of the pressure gradient force using analytic integration. Ocean Modelling, 22, 106\sphinxhyphen{}113.
\sphinxurl{http://doi.org/10.1016/j.ocemod.2008.02.001}

Hallberg, 2005: A thermobaric instability of Lagrangian vertical coordinate ocean models. Ocean Modelling, 8, 279\sphinxhyphen{}300.
\sphinxurl{http://dx.doi.org/10.1016/j.ocemod.2004.01.001}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_pressureforce_fv:type-documentation}}\index{pressureforce\_fv\_cs (fortran type in module mom\_pressureforce\_fv)@\spxentry{pressureforce\_fv\_cs}\spxextra{fortran type in module mom\_pressureforce\_fv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv/}}\sphinxbfcode{\sphinxupquote{pressureforce\_fv\_cs}}}
Finite volume pressure gradient control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply tidal momentum forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gfs\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling of the surface pressure gradients to allow the use of a reduced gravity model {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usemasswghtinterp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use mass weighting in T/S interpolation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{boundary\_extrap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Indicate whether high\sphinxhyphen{}order boundary extrapolation should be used within boundary cells.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{reconstruct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, polynomial profiles of T \& S will be reconstructed and used in the integrals for the finite volume pressure gradient calculation. The default depends on whether regridding is being used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{recon\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Order of the polynomial of the reconstruction of T \& S for the finite volume pressure gradient calculation. By the default (1) is for a piecewise linear method.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stanley\_t2\_det\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The coefficient correlating SGS temperature variance with the mean temperature gradient in the deterministic part of the Stanley form of the Brankart correction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_e\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tvar\_sgs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Tides control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_pressureforce_fv:function-subroutine-documentation}}\index{pressureforce\_fv\_nonbouss() (fortran subroutine in module mom\_pressureforce\_fv)@\spxentry{pressureforce\_fv\_nonbouss()}\spxextra{fortran subroutine in module mom\_pressureforce\_fv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv/}}\sphinxbfcode{\sphinxupquote{pressureforce\_fv\_nonbouss}}}{\emph{h}, \emph{tv}, \emph{PFu}, \emph{PFv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{ALE\_CSp}, \emph{p\_atm}, \emph{pbce}, \emph{eta}}{}
Non\sphinxhyphen{}Boussinesq analytically\sphinxhyphen{}integrated finite volume form of pressure gradient.

Determines the acceleration due to hydrostatic pressure forces, using the analytic finite volume form of the Pressure gradient, and does not make the Boussinesq approximation.

To work, the following fields must be set outside of the usual (is:ie,js:je) range before this subroutine is called: h(isB:ie+1,jsB:je+1), T(isB:ie+1,jsB:je+1), and S(isB:ie+1,jsB:je+1).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} kg/m2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{pfu} :: {[}out{]} Zonal acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{pfv} :: {[}out{]} Meridional acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: Finite volume PGF control structure

\item {} 
\sphinxstylestrong{ale\_csp} :: ALE control structure

\item {} 
\sphinxstylestrong{p\_atm} :: The pressure at the ice\sphinxhyphen{}ocean or atmosphere\sphinxhyphen{}ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in each layer due to eta anomalies {[}L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 or m4 s\sphinxhyphen{}2 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} The bottom mass used to calculate PFu and PFv {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}, with any tidal contributions or compressibility compensation.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/calc_tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::calc\_tidal\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::set\_pbce\_nonbouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_plm\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_ppm\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_fv\_bouss() (fortran subroutine in module mom\_pressureforce\_fv)@\spxentry{pressureforce\_fv\_bouss()}\spxextra{fortran subroutine in module mom\_pressureforce\_fv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv/}}\sphinxbfcode{\sphinxupquote{pressureforce\_fv\_bouss}}}{\emph{h}, \emph{tv}, \emph{PFu}, \emph{PFv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{ALE\_CSp}, \emph{p\_atm}, \emph{pbce}, \emph{eta}}{}
Boussinesq analytically\sphinxhyphen{}integrated finite volume form of pressure gradient.

Determines the acceleration due to hydrostatic pressure forces, using the finite volume form of the terms and analytic integrals in depth.

To work, the following fields must be set outside of the usual (is:ie,js:je) range before this subroutine is called: h(isB:ie+1,jsB:je+1), T(isB:ie+1,jsB:je+1), and S(isB:ie+1,jsB:je+1).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{pfu} :: {[}out{]} Zonal acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{pfv} :: {[}out{]} Meridional acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: Finite volume PGF control structure

\item {} 
\sphinxstylestrong{ale\_csp} :: ALE control structure

\item {} 
\sphinxstylestrong{p\_atm} :: The pressure at the ice\sphinxhyphen{}ocean or atmosphere\sphinxhyphen{}ocean interface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in each layer due to eta anomalies {[}L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2 or m4 s\sphinxhyphen{}2 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} The bottom mass used to calculate PFu and PFv {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}, with any tidal contributions or compressibility compensation.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/calc_tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::calc\_tidal\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::set\_pbce\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_plm\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_ppm\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_fv\_init() (fortran subroutine in module mom\_pressureforce\_fv)@\spxentry{pressureforce\_fv\_init()}\spxextra{fortran subroutine in module mom\_pressureforce\_fv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv/}}\sphinxbfcode{\sphinxupquote{pressureforce\_fv\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{tides\_CSp}}{}
Initializes the finite volume pressure gradient control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cs} :: Finite volume PGF control structure

\item {} 
\sphinxstylestrong{tides\_csp} :: Tides control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_fv\_end() (fortran subroutine in module mom\_pressureforce\_fv)@\spxentry{pressureforce\_fv\_end()}\spxextra{fortran subroutine in module mom\_pressureforce\_fv}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv/}}\sphinxbfcode{\sphinxupquote{pressureforce\_fv\_end}}}{\emph{CS}}{}
Deallocates the finite volume pressure gradient control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Finite volume pressure control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_pressureforce\_mont module reference}
\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont}}\label{\detokenize{api/generated/modules/mom_pressureforce_mont:mom-pressureforce-mont-module-reference}}\label{\detokenize{api/generated/modules/mom_pressureforce_mont::doc}}\index{mom\_pressureforce\_mont (module)@\spxentry{mom\_pressureforce\_mont}\spxextra{module}|spxpagem}
Provides the Montgomery potential form of pressure gradient.

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:detamom-pressureforce-mont}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_pressureforce_mont:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_cs}}}}}
&
Control structure for the Montgomery potential form of pressure gradient.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_pressureforce_mont:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_nonbouss()}}}}}
&
Non\sphinxhyphen{}Boussinesq Montgomery\sphinxhyphen{}potential form of pressure gradient.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_bouss()}}}}}
&
Boussinesq Montgomery\sphinxhyphen{}potential form of pressure gradient.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_pbce\_bouss()}}}}}
&
Determines the partial derivative of the acceleration due to pressure forces with the free surface height.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_pbce\_nonbouss()}}}}}
&
Determines the partial derivative of the acceleration due to pressure forces with the column mass.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_init()}}}}}
&
Initialize the Montgomery\sphinxhyphen{}potential form of PGF control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_end()}}}}}
&
Deallocates the Montgomery\sphinxhyphen{}potential form of PGF control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_pressureforce_mont:detailed-description}}\label{\detokenize{api/generated/modules/mom_pressureforce_mont:detamom-pressureforce-mont}}
Provides the Boussunesq and non\sphinxhyphen{}Boussinesq forms of the horizontal accelerations due to pressure gradients using the Montgomery potential. A second\sphinxhyphen{}order accurate, centered scheme is used. If a split time stepping scheme is used, the vertical decomposition into barotropic and baroclinic contributions described by Hallberg (J Comp Phys 1997) is used. With a nonlinear equation of state, compressibility is added along the lines proposed by Sun et al. (JPO 1999), but with compressibility coefficients based on a fit to a user\sphinxhyphen{}provided reference profile.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_pressureforce_mont:type-documentation}}\index{pressureforce\_mont\_cs (fortran type in module mom\_pressureforce\_mont)@\spxentry{pressureforce\_mont\_cs}\spxextra{fortran type in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{pressureforce\_mont\_cs}}}
Control structure for the Montgomery potential form of pressure gradient.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfu\_bc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_pfv\_bc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_e\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply tidal momentum forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gfs\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Ratio between gravity applied to top interface and the gravitational acceleration of the planet {[}nondim{]}. Usually this ratio is 1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pfu\_bc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal accelerations due to pressure gradients deriving from density gradients within layers {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pfv\_bc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional accelerations due to pressure gradients deriving from density gradients within layers {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tides\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The tidal forcing control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_pressureforce_mont:function-subroutine-documentation}}\index{pressureforce\_mont\_nonbouss() (fortran subroutine in module mom\_pressureforce\_mont)@\spxentry{pressureforce\_mont\_nonbouss()}\spxextra{fortran subroutine in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{pressureforce\_mont\_nonbouss}}}{\emph{h}, \emph{tv}, \emph{PFu}, \emph{PFv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{p\_atm}, \emph{pbce}, \emph{eta}}{}
Non\sphinxhyphen{}Boussinesq Montgomery\sphinxhyphen{}potential form of pressure gradient.

Determines the acceleration due to pressure forces in a non\sphinxhyphen{}Boussinesq fluid using the compressibility compensated (if appropriate) Montgomery\sphinxhyphen{}potential form described in Hallberg (Ocean Mod., 2005).

To work, the following fields must be set outside of the usual (is:ie,js:je) range before this subroutine is called: h(isB:ie+1,jsB:je+1), T(isB:ie+1,jsB:je+1), and S(isB:ie+1,jsB:je+1).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness, {[}H \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables.

\item {} 
\sphinxstylestrong{pfu} :: {[}out{]} Zonal acceleration due to pressure gradients (equal to \sphinxhyphen{}dM/dx) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{pfv} :: {[}out{]} Meridional acceleration due to pressure gradients (equal to \sphinxhyphen{}dM/dy) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: Control structure for Montgomery potential PGF

\item {} 
\sphinxstylestrong{p\_atm} :: The pressure at the ice\sphinxhyphen{}ocean or atmosphere\sphinxhyphen{}ocean {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} Free surface height {[}H \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/calc_tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::calc\_tidal\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/int_specific_vol_dp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::int\_specific\_vol\_dp}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/query_compressible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::query\_compressible}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_pbce\_nonbouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_mont\_bouss() (fortran subroutine in module mom\_pressureforce\_mont)@\spxentry{pressureforce\_mont\_bouss()}\spxextra{fortran subroutine in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_bouss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{pressureforce\_mont\_bouss}}}{\emph{h}, \emph{tv}, \emph{PFu}, \emph{PFv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{p\_atm}, \emph{pbce}, \emph{eta}}{}
Boussinesq Montgomery\sphinxhyphen{}potential form of pressure gradient.

Determines the acceleration due to pressure forces.

To work, the following fields must be set outside of the usual (is:ie,js:je) range before this subroutine is called: h(isB:ie+1,jsB:je+1), T(isB:ie+1,jsB:je+1), and S(isB:ie+1,jsB:je+1).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables.

\item {} 
\sphinxstylestrong{pfu} :: {[}out{]} Zonal acceleration due to pressure gradients (equal to \sphinxhyphen{}dM/dx) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{pfv} :: {[}out{]} Meridional acceleration due to pressure gradients (equal to \sphinxhyphen{}dM/dy) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s2{]}.

\item {} 
\sphinxstylestrong{cs} :: Control structure for Montgomery potential PGF

\item {} 
\sphinxstylestrong{p\_atm} :: The pressure at the ice\sphinxhyphen{}ocean or atmosphere\sphinxhyphen{}ocean {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in each layer due to free surface height anomalies {[}L2 T\sphinxhyphen{}2 H\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{eta} :: {[}out{]} Free surface height {[}H \textasciitilde{}\textgreater{} m{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/calc_tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_forcing::calc\_tidal\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/query_compressible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::query\_compressible}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_pbce\_bouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_pbce\_bouss() (fortran subroutine in module mom\_pressureforce\_mont)@\spxentry{set\_pbce\_bouss()}\spxextra{fortran subroutine in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_bouss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{set\_pbce\_bouss}}}{\emph{e}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{Rho0}, \emph{GFS\_scale}, \emph{pbce}, \emph{rho\_star}}{}
Determines the partial derivative of the acceleration due to pressure forces with the free surface height.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Interface height {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{rho0} :: {[}in{]} The “Boussinesq” ocean density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{gfs\_scale} :: {[}in{]} Ratio between gravity applied to top interface and the gravitational acceleration of the planet {[}nondim{]}. Usually this ratio is 1.

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in each layer due

\item {} 
\sphinxstylestrong{rho\_star} :: {[}in{]} The layer densities (maybe compressibility

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_bouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_pbce\_nonbouss() (fortran subroutine in module mom\_pressureforce\_mont)@\spxentry{set\_pbce\_nonbouss()}\spxextra{fortran subroutine in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/set_pbce_nonbouss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{set\_pbce\_nonbouss}}}{\emph{p}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{GFS\_scale}, \emph{pbce}, \emph{alpha\_star}}{}
Determines the partial derivative of the acceleration due to pressure forces with the column mass.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{p} :: {[}in{]} Interface pressures {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{gfs\_scale} :: {[}in{]} Ratio between gravity applied to top interface and the gravitational acceleration of the planet {[}nondim{]}. Usually this ratio is 1.

\item {} 
\sphinxstylestrong{pbce} :: {[}out{]} The baroclinic pressure anomaly in each layer due to free surface height anomalies {[}L2 H\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m4 kg\sphinxhyphen{}1 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{alpha\_star} :: {[}in{]} The layer specific volumes (maybe compressibility compensated) {[}R\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 kg\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_nonbouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pressureforce\_mont\_nonbouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_mont\_init() (fortran subroutine in module mom\_pressureforce\_mont)@\spxentry{pressureforce\_mont\_init()}\spxextra{fortran subroutine in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{pressureforce\_mont\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{tides\_CSp}}{}
Initialize the Montgomery\sphinxhyphen{}potential form of PGF control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cs} :: Montgomery PGF control structure

\item {} 
\sphinxstylestrong{tides\_csp} :: Tides control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pressureforce\_mont\_end() (fortran subroutine in module mom\_pressureforce\_mont)@\spxentry{pressureforce\_mont\_end()}\spxextra{fortran subroutine in module mom\_pressureforce\_mont}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont/}}\sphinxbfcode{\sphinxupquote{pressureforce\_mont\_end}}}{\emph{CS}}{}
Deallocates the Montgomery\sphinxhyphen{}potential form of PGF control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for Montgomery potential PGF

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_random module reference}
\label{\detokenize{api/generated/modules/mom_random:f/mom_random}}\label{\detokenize{api/generated/modules/mom_random:mom-random-module-reference}}\label{\detokenize{api/generated/modules/mom_random::doc}}\index{mom\_random (module)@\spxentry{mom\_random}\spxextra{module}|spxpagem}
Provides gridded random number capability.

{\hyperref[\detokenize{api/generated/modules/mom_random:detamom-random}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_random:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/prng}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{prng}}}}}
&
Container for pseudo\sphinxhyphen{}random number generators.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_random:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_01}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_01()}}}}}
&
Returns a random number between 0 and 1.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_norm()}}}}}
&
Returns an approximately normally distributed random number with mean 0 and variance 1.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_01}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_01()}}}}}
&
Generates random numbers between 0 and 1 for each cell of the model grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_norm()}}}}}
&
Returns an approximately normally distributed random number with mean 0 and variance 1 for each cell of the model grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_0d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_0d\_constructor()}}}}}
&
Constructor for scalar PRNG.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_constructor()}}}}}
&
Constructor for gridded PRNG.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_time()}}}}}
&
Return a seed derived as hash of values in Time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_index()}}}}}
&
Create seed from position index.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_destruct}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_destruct()}}}}}
&
Destructor for PRNG.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests()}}}}}
&
Runs some statistical tests on the PRNG.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/test_fn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fn()}}}}}
&
Convenience function for reporting result of test.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_random:detailed-description}}\label{\detokenize{api/generated/modules/mom_random:detamom-random}}
Provides MOM6 wrappers to the FMS implementation of the Mersenne twister.

Example usage:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
type(PRNG)  ::  rng
real  ::  rn
call  random\PYGZus{}0d\PYGZus{}constructor(rng,  Time,  seed)  !  Call  this  each  time\PYGZhy{}step
rn  =  random\PYGZus{}01(rng)
rn  =  random\PYGZus{}norm(rng)

type(PRNG)  ::  rng
real,  dimension(:,:)  ::  rn2d
call  random\PYGZus{}2d\PYGZus{}constructor(rng,  HI,  Time,  seed)  !  Call  this  each  time\PYGZhy{}step
call  random\PYGZus{}2d\PYGZus{}01(rng,  HI,  rn2d)
call  random\PYGZus{}2d\PYGZus{}norm(rng,  HI,  rn2d)

Note:  reproducibility  across  restarts  is  implemented  by  using  time\PYGZhy{}derived
seeds  to  pass  to  the  Mersenne  twister.  It  is  therefore  important  that  any
PRNG  type  be  re\PYGZhy{}initialized  each  time\PYGZhy{}step.
\end{sphinxVerbatim}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_random:type-documentation}}\index{prng (fortran type in module mom\_random)@\spxentry{prng}\spxextra{fortran type in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/prng}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{prng}}}
Container for pseudo\sphinxhyphen{}random number generators.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stream0d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(randomnumbersequence)}\sphinxstyleemphasis{{]}} :: Scalar random number generator for whole model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stream2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(randomnumbersequence)(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Random number generator for each cell on horizontal grid.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_random:function-subroutine-documentation}}\index{random\_01() (fortran function in module mom\_random)@\spxentry{random\_01()}\spxextra{fortran function in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_01}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_01}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns a random number between 0 and 1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} Container for pseudo\sphinxhyphen{}random number generators

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_norm() (fortran function in module mom\_random)@\spxentry{random\_norm()}\spxextra{fortran function in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_norm}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns an approximately normally distributed random number with mean 0 and variance 1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} Container for pseudo\sphinxhyphen{}random number generators

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_2d\_01() (fortran subroutine in module mom\_random)@\spxentry{random\_2d\_01()}\spxextra{fortran subroutine in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_01}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_2d\_01}}}{\emph{CS}, \emph{HI}, \emph{rand}}{}
Generates random numbers between 0 and 1 for each cell of the model grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Container for pseudo\sphinxhyphen{}random number generators

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{rand} :: {[}out{]} Random numbers between 0 and 1

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_2d\_norm() (fortran subroutine in module mom\_random)@\spxentry{random\_2d\_norm()}\spxextra{fortran subroutine in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_2d\_norm}}}{\emph{CS}, \emph{HI}, \emph{rand}}{}
Returns an approximately normally distributed random number with mean 0 and variance 1 for each cell of the model grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Container for pseudo\sphinxhyphen{}random number generators

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{rand} :: {[}out{]} Random numbers between 0 and 1

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_0d\_constructor() (fortran subroutine in module mom\_random)@\spxentry{random\_0d\_constructor()}\spxextra{fortran subroutine in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_0d_constructor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_0d\_constructor}}}{\emph{CS}, \emph{Time}, \emph{seed}}{}
Constructor for scalar PRNG. Can be used to reset the sequence.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Container for pseudo\sphinxhyphen{}random number generators

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{seed} :: {[}in{]} Seed for PRNG

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_time}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_2d\_constructor() (fortran subroutine in module mom\_random)@\spxentry{random\_2d\_constructor()}\spxextra{fortran subroutine in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_constructor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_2d\_constructor}}}{\emph{CS}, \emph{HI}, \emph{Time}, \emph{seed}}{}
Constructor for gridded PRNG. Can be used to reset the sequence.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Container for pseudo\sphinxhyphen{}random number generators

\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{seed} :: {[}in{]} Seed for PRNG

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_index}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_time}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{seed\_from\_time() (fortran function in module mom\_random)@\spxentry{seed\_from\_time()}\spxextra{fortran function in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{seed\_from\_time}}}{\emph{Time}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Return a seed derived as hash of values in Time.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_0d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_0d\_constructor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_constructor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{seed\_from\_index() (fortran function in module mom\_random)@\spxentry{seed\_from\_index()}\spxextra{fortran function in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_index}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{seed\_from\_index}}}{\emph{HI}, \emph{i}, \emph{j}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Create seed from position index.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} Horizontal index structure

\item {} 
\sphinxstylestrong{i} :: {[}in{]} i\sphinxhyphen{}index (of h\sphinxhyphen{}cell)

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index (of h\sphinxhyphen{}cell)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_constructor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_destruct() (fortran subroutine in module mom\_random)@\spxentry{random\_destruct()}\spxextra{fortran subroutine in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_destruct}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_destruct}}}{\emph{CS}}{}
Destructor for PRNG.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Container for pseudo\sphinxhyphen{}random number generators

\end{description}\end{quote}

\end{fulllineitems}

\index{random\_unit\_tests() (fortran function in module mom\_random)@\spxentry{random\_unit\_tests()}\spxextra{fortran function in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{random\_unit\_tests}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Runs some statistical tests on the PRNG.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: True if results should be written to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_01}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_01}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_0d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_0d\_constructor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_01}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_01}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_constructor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_constructor}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_2d_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_2d\_norm}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_norm}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_index}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_index}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/seed_from_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seed\_from\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/test_fn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_fn}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_fn() (fortran function in module mom\_random)@\spxentry{test\_fn()}\spxextra{fortran function in module mom\_random}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_random:f/mom_random/test_fn}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_random/}}\sphinxbfcode{\sphinxupquote{test\_fn}}}{\emph{verbose}, \emph{good}, \emph{label}, \emph{rvalue}, \emph{ivalue}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Convenience function for reporting result of test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} Verbosity

\item {} 
\sphinxstylestrong{good} :: {[}in{]} True if pass, false otherwise

\item {} 
\sphinxstylestrong{label} :: {[}in{]} Label for messages

\item {} 
\sphinxstylestrong{rvalue} :: {[}in{]} Result of calculation

\item {} 
\sphinxstylestrong{ivalue} :: {[}in{]} Result of calculation

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{random\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_regridding module reference}
\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding}}\label{\detokenize{api/generated/modules/mom_regridding:mom-regridding-module-reference}}\label{\detokenize{api/generated/modules/mom_regridding::doc}}\index{mom\_regridding (module)@\spxentry{mom\_regridding}\spxextra{module}|spxpagem}
Generates vertical grids as part of the ALE algorithm.

{\hyperref[\detokenize{api/generated/modules/mom_regridding:detamom-regridding}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_regridding:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_cs}}}}}
&
Regridding control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_regridding:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding()}}}}}
&
Initialization and configures a regridding control structure based on customizable run\sphinxhyphen{}time parameters.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_def}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid\_def()}}}}}
&
Do some basic checks on the vertical grid definition file, variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_regridding()}}}}}
&
Deallocation of regridding memory.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main()}}}}}
&
Dispatching regridding routine for orchestrating regridding \& remapping.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/calc_h_new_by_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_h\_new\_by\_dz()}}}}}
&
Calculates h\_new from h + delta\_k dzInterface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_remapping_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_remapping\_grid()}}}}}
&
Check that the total thickness of two grids match.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid\_column()}}}}}
&
Check that the total thickness of new and old grids are consistent.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion()}}}}}
&
Returns the change in interface position motion after filtering and assuming the top and bottom interfaces do not move.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_zstar\_grid()}}}}}
&
Builds a z*\sphinxhyphen{}ccordinate grid with partial steps (Adcroft and Campin, 2004).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_sigma_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_sigma\_grid()}}}}}
&
This routine builds a grid based on terrain\sphinxhyphen{}following coordinates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_rho_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_grid()}}}}}
&
This routine builds a new grid based on a given set of target interface densities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_hycom1()}}}}}
&
Builds a simple HyCOM\sphinxhyphen{}like grid with the deepest location of potential density interpolated from the column profile and a clipping of depth for each interface to a fixed z* or p* grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_adaptive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_adaptive()}}}}}
&
This subroutine builds an adaptive grid that follows density surfaces where possible, subject to constraints on the smoothness of interface heights.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_slight()}}}}}
&
Builds a grid that tracks density interfaces for water that is denser than the surface density plus an increment of some number of layers, and uses all lighter layers uniformly above this location.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_interface\_motion()}}}}}
&
Adjust dz\_Interface to ensure non\sphinxhyphen{}negative future thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_arbitrary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_arbitrary()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/inflate_vanished_layers_old}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inflate\_vanished\_layers\_old()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/convective_adjustment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convective\_adjustment()}}}}}
&
Achieve convective adjustment by swapping layers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/uniformresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uniformresolution()}}}}}
&
Return a uniform resolution vector in the units of the coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initcoord()}}}}}
&
Initialize the coordinate resolutions by calling the appropriate initialization routine for the specified coordinate mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/setcoordinateresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setcoordinateresolution()}}}}}
&
Set the fixed resolution data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities_from_gv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_target\_densities\_from\_gv()}}}}}
&
Set target densities based on the old Rlay variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_target\_densities()}}}}}
&
Set target densities based on vector of interface values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_depths}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_regrid\_max\_depths()}}}}}
&
Set maximum interface depths based on a vector of input values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_regrid\_max\_thickness()}}}}}
&
Set maximum layer thicknesses based on a vector of input values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getcoordinateresolution()}}}}}
&
Query the fixed resolution data.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateinterfaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getcoordinateinterfaces()}}}}}
&
Query the target coordinate interface positions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getcoordinateunits()}}}}}
&
Query the target coordinate units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateshortname}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getcoordinateshortname()}}}}}
&
Query the short name of the coordinate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_regrid\_params()}}}}}
&
Can be used to set any of the parameters for MOM\_regridding.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_regrid_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_regrid\_size()}}}}}
&
Returns the number of levels/layers in the regridding control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_zlike_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_zlike\_cs()}}}}}
&
This returns a copy of the zlike\_CS stored in the regridding control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_sigma_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_sigma\_cs()}}}}}
&
This returns a copy of the sigma\_CS stored in the regridding control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_rho_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_rho\_cs()}}}}}
&
This returns a copy of the rho\_CS stored in the regridding control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getstaticthickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getstaticthickness()}}}}}
&
Return coordinate\sphinxhyphen{}derived thicknesses for fixed coordinate systems.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/dz_function1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dz\_function1()}}}}}
&
Parses a string and generates a dz(:) profile that goes like k**power.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/rho_function1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rho\_function1()}}}}}
&
Parses a string and generates a rho\_target(:) profile with refined resolution downward and returns the number of levels.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_regridding:detailed-description}}\label{\detokenize{api/generated/modules/mom_regridding:detamom-regridding}}
A vertical grid is defined solely by the cell thicknesses,
\(h\) . Most calculations in this module start with the coordinate at the bottom of the column set to \sphinxhyphen{}depth, and use a increasing value of coordinate with decreasing k. This is consistent with the rest of MOM6 that uses position, \(z\) which is a negative quantity for most of the ocean.

A change in grid is define through a change in position of the interfaces:
\begin{equation*}
\begin{split}z^n_{k+1/2} = z^{n-1}_{k+1/2} + \Delta z_{k+1/2}\end{split}
\end{equation*}
with the positive upward coordinate convention
\begin{equation*}
\begin{split}z_{k-1/2} = z_{k+1/2} + h_k\end{split}
\end{equation*}
so that
\begin{equation*}
\begin{split}h^n_k = h^{n-1}_k + ( \Delta z_{k-1/2} - \Delta z_{k+1/2} )\end{split}
\end{equation*}
Original date of creation: 2008.06.09 by L. White


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_regridding:type-documentation}}\index{regridding\_cs (fortran type in module mom\_regridding)@\spxentry{regridding\_cs}\spxextra{fortran type in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{regridding\_cs}}}
Regridding control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coordinateresolution}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: This array is set by function setCoordinateResolution() It contains the “resolution” or delta coordinate of the target coordinate. It has the units of the target coordinate, e.g. {[}Z \textasciitilde{}\textgreater{} m{]} for z*, non\sphinxhyphen{}dimensional for sigma, etc.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coord\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: This is a scaling factor that restores coordinateResolution to values in the natural units for output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{target\_density}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: This array is set by function

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{target\_density\_set}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: A flag to indicate that the target\_density arrays has been filled with data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_interface\_depths}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: This array is set by function

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_layer\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: This array is set by function

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of layers/levels in generated grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regridding\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Indicates which grid to use in the vertical (z*, sigma, target interface densities)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interp\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(interp\_cs\_type)}\sphinxstyleemphasis{{]}} :: Interpolation control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed when building the new grid through regridding {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_pressure}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Reference pressure for potential density calculations {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{old\_grid\_weight}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Weight given to old coordinate when blending between new and old grids {[}nondim{]} Used only below depth\_of\_time\_filter\_shallow, with a cubic variation from zero to full effect between depth\_of\_time\_filter\_shallow and depth\_of\_time\_filter\_deep.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_of\_time\_filter\_shallow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Depth above which no time\sphinxhyphen{}filtering of grid is applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_of\_time\_filter\_deep}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Depth below which time\sphinxhyphen{}filtering of grid is applied at full effect {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{compressibility\_fraction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Fraction (between 0 and 1) of compressibility to add to potential density profiles when interpolating for target grid positions. {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{set\_maximum\_depths}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, each interface is given a maximum depth based on a rescaling of the indexing of coordinateResolution.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_depth\_index\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling factor (\textgreater{} 1) of the rate at which the coordinateResolution list is traversed to set the minimum depth of interfaces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{integrate\_downward\_for\_e}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, integrate for interface positions from the top downward. If false, integrate from the bottom upward, as does the rest of the model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. If false, use more robust forms of the same remapping expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zlike\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(zlike\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for z\sphinxhyphen{}like coordinate generator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sigma\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(sigma\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for sigma coordinate generator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(rho\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for rho coordinate generator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hycom\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(hycom\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for hybrid coordinate generator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slight\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(slight\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for Slight\sphinxhyphen{}coordinate generator.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adapt\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(adapt\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for adaptive coordinate generator.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_regridding:function-subroutine-documentation}}\index{initialize\_regridding() (fortran subroutine in module mom\_regridding)@\spxentry{initialize\_regridding()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{initialize\_regridding}}}{\emph{CS}, \emph{GV}, \emph{US}, \emph{max\_depth}, \emph{param\_file}, \emph{mdl}, \emph{coord\_mode}, \emph{param\_prefix}, \emph{param\_suffix}}{}
Initialization and configures a regridding control structure based on customizable run\sphinxhyphen{}time parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} The maximum depth of the ocean {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file

\item {} 
\sphinxstylestrong{mdl} :: {[}in{]} Name of calling module.

\item {} 
\sphinxstylestrong{coord\_mode} :: {[}in{]} Coordinate mode

\item {} 
\sphinxstylestrong{param\_prefix} :: {[}in{]} String to prefix to parameter names. If empty, causes main model parameters to be used.

\item {} 
\sphinxstylestrong{param\_suffix} :: {[}in{]} String to append to parameter names.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_def}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid\_def}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/dz_function1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dz\_function1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extract\_integer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extract\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extractword}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::extractword}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initcoord}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}} \sphinxcode{\sphinxupquote{regriddingdefaultboundaryextrapolation}} \sphinxcode{\sphinxupquote{regriddingdefaultinterpscheme}} \sphinxcode{\sphinxupquote{regriddingdefaultminthickness}} \sphinxcode{\sphinxupquote{regriddinginterpschemedoc}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/rho_function1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rho\_function1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_depths}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_regrid\_max\_depths}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_regrid\_max\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_regrid\_params}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_target\_densities}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities_from_gv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_target\_densities\_from\_gv}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/setcoordinateresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setcoordinateresolution}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/uniformresolution}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uniformresolution}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_grid\_def() (fortran subroutine in module mom\_regridding)@\spxentry{check\_grid\_def()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_def}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{check\_grid\_def}}}{\emph{filename}, \emph{varname}, \emph{expected\_units}, \emph{msg}, \emph{ierr}}{}
Do some basic checks on the vertical grid definition file, variable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} File name

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} Variable name

\item {} 
\sphinxstylestrong{expected\_units} :: {[}in{]} Expected units of variable

\item {} 
\sphinxstylestrong{msg} :: {[}inout{]} Message to use for errors

\item {} 
\sphinxstylestrong{ierr} :: {[}out{]} True if an error occurs

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_regridding() (fortran subroutine in module mom\_regridding)@\spxentry{end\_regridding()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/end_regridding}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{end\_regridding}}}{\emph{CS}}{}
Deallocation of regridding memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/end_coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt::end\_coord\_adapt}}}}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/end_coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::end\_coord\_hycom}}}}} {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/end_coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::end\_coord\_sigma}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/end_coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::end\_coord\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/end_coord_zlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::end\_coord\_zlike}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{regridding\_main() (fortran subroutine in module mom\_regridding)@\spxentry{regridding\_main()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{regridding\_main}}}{\emph{remapCS}, \emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{tv}, \emph{h\_new}, \emph{dzInterface}, \emph{frac\_shelf\_h}, \emph{conv\_adjust}}{}
Dispatching regridding routine for orchestrating regridding \& remapping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{remapcs} :: {[}in{]} Remapping parameters and options

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Current 3D grid obtained after the last time step

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamical variables (T, S, …)

\item {} 
\sphinxstylestrong{h\_new} :: {[}inout{]} New 3D grid consistent with target coordinate

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} The change in position of each interface

\item {} 
\sphinxstylestrong{frac\_shelf\_h} :: Fractional ice shelf coverage

\item {} 
\sphinxstylestrong{conv\_adjust} :: {[}in{]} If true, do convective adjustment

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_adaptive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_adaptive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_arbitrary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_arbitrary}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_hycom1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_rho_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_sigma_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_sigma\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_zstar\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/calc_h_new_by_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_h\_new\_by\_dz}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_remapping_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_remapping\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/convective_adjustment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convective\_adjustment}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_temp\_salt\_initialize\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_h\_new\_by\_dz() (fortran subroutine in module mom\_regridding)@\spxentry{calc\_h\_new\_by\_dz()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/calc_h_new_by_dz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{calc\_h\_new\_by\_dz}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{dzInterface}, \emph{h\_new}}{}
Calculates h\_new from h + delta\_k dzInterface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Old layer thicknesses (arbitrary units)

\item {} 
\sphinxstylestrong{dzinterface} :: {[}in{]} Change in interface positions (same as h)

\item {} 
\sphinxstylestrong{h\_new} :: {[}inout{]} New layer thicknesses (same as h)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_hycom1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_remapping\_grid() (fortran subroutine in module mom\_regridding)@\spxentry{check\_remapping\_grid()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_remapping_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{check\_remapping\_grid}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{dzInterface}, \emph{msg}}{}
Check that the total thickness of two grids match.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dzinterface} :: {[}in{]} Change in interface positions {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} Message to append to errors

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_grid\_column}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_grid\_column() (fortran subroutine in module mom\_regridding)@\spxentry{check\_grid\_column()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_grid_column}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{check\_grid\_column}}}{\emph{nk}, \emph{depth}, \emph{h}, \emph{dzInterface}, \emph{msg}}{}
Check that the total thickness of new and old grids are consistent.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of bottom {[}Z \textasciitilde{}\textgreater{} m{]} or arbitrary units

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Cell thicknesses {[}Z \textasciitilde{}\textgreater{} m{]} or arbitrary units

\item {} 
\sphinxstylestrong{dzinterface} :: {[}in{]} Change in interface positions (same units as h)

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} Message to append to errors

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/check_remapping_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_remapping\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{filtered\_grid\_motion() (fortran subroutine in module mom\_regridding)@\spxentry{filtered\_grid\_motion()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{filtered\_grid\_motion}}}{\emph{CS}, \emph{nk}, \emph{z\_old}, \emph{z\_new}, \emph{dz\_g}}{}
Returns the change in interface position motion after filtering and assuming the top and bottom interfaces do not move. The filtering is a function of depth, and is applied as the integrated average filtering over the trajectory of the interface. By design, this code can not give tangled interfaces provided that z\_old and z\_new are not already tangled.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{z\_old} :: {[}in{]} Old grid position {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{z\_new} :: {[}in{]} New grid position {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dz\_g} :: {[}inout{]} Change in interface positions {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_adaptive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_adaptive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_hycom1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_rho_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_rho\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_sigma_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_sigma\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_zstar\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_zstar\_grid() (fortran subroutine in module mom\_regridding)@\spxentry{build\_zstar\_grid()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_zstar\_grid}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{dzInterface}, \emph{frac\_shelf\_h}}{}
Builds a z*\sphinxhyphen{}ccordinate grid with partial steps (Adcroft and Campin, 2004). z* is defined as z* = (z\sphinxhyphen{}eta)/(H+eta)*H s.t. z*=0 when z=eta and z*=\sphinxhyphen{}H when z=\sphinxhyphen{}H .
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} The change in interface depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{frac\_shelf\_h} :: Fractional ice shelf coverage {[}nondim{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_interface\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/build_zstar_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::build\_zstar\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_sigma\_grid() (fortran subroutine in module mom\_regridding)@\spxentry{build\_sigma\_grid()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_sigma_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_sigma\_grid}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}, \emph{dzInterface}}{}
This routine builds a grid based on terrain\sphinxhyphen{}following coordinates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} The change in interface depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/build_sigma_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::build\_sigma\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_rho\_grid() (fortran subroutine in module mom\_regridding)@\spxentry{build\_rho\_grid()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_rho_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_rho\_grid}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{tv}, \emph{dzInterface}, \emph{remapCS}, \emph{CS}}{}
This routine builds a new grid based on a given set of target interface densities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} The change in interface depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{remapcs} :: {[}in{]} The remapping control structure

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_grid\_hycom1() (fortran subroutine in module mom\_regridding)@\spxentry{build\_grid\_hycom1()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_grid\_hycom1}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{tv}, \emph{h\_new}, \emph{dzInterface}, \emph{CS}}{}
Builds a simple HyCOM\sphinxhyphen{}like grid with the deepest location of potential density interpolated from the column profile and a clipping of depth for each interface to a fixed z* or p* grid. This should probably be (optionally?) changed to find the nearest location of the target density.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Existing model thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{h\_new} :: {[}inout{]} New layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} Changes in interface position

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_interface\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/build_hycom1_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::build\_hycom1\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/calc_h_new_by_dz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_h\_new\_by\_dz}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_grid\_adaptive() (fortran subroutine in module mom\_regridding)@\spxentry{build\_grid\_adaptive()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_adaptive}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_grid\_adaptive}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{tv}, \emph{dzInterface}, \emph{remapCS}, \emph{CS}}{}
This subroutine builds an adaptive grid that follows density surfaces where possible, subject to constraints on the smoothness of interface heights.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} The change in interface depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{remapcs} :: {[}in{]} The remapping control structure

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_interface\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/build_adapt_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt::build\_adapt\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_grid\_slight() (fortran subroutine in module mom\_regridding)@\spxentry{build\_grid\_slight()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_grid\_slight}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{tv}, \emph{dzInterface}, \emph{CS}}{}
Builds a grid that tracks density interfaces for water that is denser than the surface density plus an increment of some number of layers, and uses all lighter layers uniformly above this location. Note that this amounts to interpolating to find the depth of an arbitrary (non\sphinxhyphen{}integer) interface index which should make the results vary smoothly in space to the extent that the surface density and interior stratification vary smoothly in space. Over shallow topography, this will tend to give a uniform sigma\sphinxhyphen{}like coordinate. For sufficiently shallow water, a minimum grid spacing is used to avoid certain instabilities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Existing model thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} Changes in interface position

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_interface\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/build_slight_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::build\_slight\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/filtered_grid_motion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{filtered\_grid\_motion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjust\_interface\_motion() (fortran subroutine in module mom\_regridding)@\spxentry{adjust\_interface\_motion()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/adjust_interface_motion}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{adjust\_interface\_motion}}}{\emph{CS}, \emph{nk}, \emph{h\_old}, \emph{dz\_int}}{}
Adjust dz\_Interface to ensure non\sphinxhyphen{}negative future thicknesses.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers in h\_old

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Minium allowed thickness of h {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dz\_int} :: {[}inout{]} Minium allowed thickness of h {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_adaptive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_adaptive}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_hycom1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_hycom1}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_grid\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_zstar_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_zstar\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_grid\_arbitrary() (fortran subroutine in module mom\_regridding)@\spxentry{build\_grid\_arbitrary()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/build_grid_arbitrary}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{build\_grid\_arbitrary}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{dzInterface}, \emph{h\_new}, \emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Original layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dzinterface} :: {[}inout{]} The change in interface depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{h\_new} :: {[}inout{]} New layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{inflate\_vanished\_layers\_old() (fortran subroutine in module mom\_regridding)@\spxentry{inflate\_vanished\_layers\_old()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/inflate_vanished_layers_old}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{inflate\_vanished\_layers\_old}}}{\emph{CS}, \emph{G}, \emph{GV}, \emph{h}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/old_inflate_layers_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::old\_inflate\_layers\_1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convective\_adjustment() (fortran subroutine in module mom\_regridding)@\spxentry{convective\_adjustment()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/convective_adjustment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{convective\_adjustment}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{tv}}{}
Achieve convective adjustment by swapping layers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure pointing to various thermodynamic variables

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_main}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{uniformresolution() (fortran function in module mom\_regridding)@\spxentry{uniformresolution()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/uniformresolution}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{uniformresolution}}}{\emph{nk}, \emph{coordMode}, \emph{maxDepth}, \emph{rhoLight}, \emph{rhoHeavy}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return a uniform resolution vector in the units of the coordinate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{coordmode} :: {[}in{]} A string indicating the coordinate mode. See the documenttion for {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts()}}}}} for the recognized values.for the recognized values.

\item {} 
\sphinxstylestrong{maxdepth} :: {[}in{]} The range of the grid values in some modes

\item {} 
\sphinxstylestrong{rholight} :: {[}in{]} The minimum value of the grid in RHO mode

\item {} 
\sphinxstylestrong{rhoheavy} :: {[}in{]} The maximum value of the grid in RHO mode

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned uniform resolution grid.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initcoord() (fortran subroutine in module mom\_regridding)@\spxentry{initcoord()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initcoord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{initcoord}}}{\emph{CS}, \emph{GV}, \emph{US}, \emph{coord\_mode}}{}
Initialize the coordinate resolutions by calling the appropriate initialization routine for the specified coordinate mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{coord\_mode} :: {[}in{]} A string indicating the coordinate mode. See the documentation for {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts()}}}}} for the recognized values.for the recognized values.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/init_coord_adapt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt::init\_coord\_adapt}}}}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/init_coord_hycom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::init\_coord\_hycom}}}}} {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/init_coord_sigma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::init\_coord\_sigma}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/init_coord_slight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::init\_coord\_slight}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/init_coord_zlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::init\_coord\_zlike}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setcoordinateresolution() (fortran subroutine in module mom\_regridding)@\spxentry{setcoordinateresolution()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/setcoordinateresolution}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{setcoordinateresolution}}}{\emph{dz}, \emph{CS}, \emph{scale}}{}
Set the fixed resolution data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dz} :: {[}in{]} A vector of vertical grid spacings

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor converting dz to coordRes

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_target\_densities\_from\_gv() (fortran subroutine in module mom\_regridding)@\spxentry{set\_target\_densities\_from\_gv()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities_from_gv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{set\_target\_densities\_from\_gv}}}{\emph{GV}, \emph{US}, \emph{CS}}{}
Set target densities based on the old Rlay variable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_target\_densities() (fortran subroutine in module mom\_regridding)@\spxentry{set\_target\_densities()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_target_densities}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{set\_target\_densities}}}{\emph{CS}, \emph{rho\_int}}{}
Set target densities based on vector of interface values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{rho\_int} :: {[}in{]} Interface densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_regrid\_max\_depths() (fortran subroutine in module mom\_regridding)@\spxentry{set\_regrid\_max\_depths()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_depths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{set\_regrid\_max\_depths}}}{\emph{CS}, \emph{max\_depths}, \emph{units\_to\_H}}{}
Set maximum interface depths based on a vector of input values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{max\_depths} :: {[}in{]} Maximum interface depths, in arbitrary units

\item {} 
\sphinxstylestrong{units\_to\_h} :: {[}in{]} A conversion factor for max\_depths into H units

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/set_hycom_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::set\_hycom\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/set_slight_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::set\_slight\_params}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_regrid\_max\_thickness() (fortran subroutine in module mom\_regridding)@\spxentry{set\_regrid\_max\_thickness()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_max_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{set\_regrid\_max\_thickness}}}{\emph{CS}, \emph{max\_h}, \emph{units\_to\_H}}{}
Set maximum layer thicknesses based on a vector of input values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{max\_h} :: {[}in{]} Maximum interface depths, in arbitrary units

\item {} 
\sphinxstylestrong{units\_to\_h} :: {[}in{]} A conversion factor for max\_h into H units

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/set_hycom_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::set\_hycom\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/set_slight_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::set\_slight\_params}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{getcoordinateresolution() (fortran function in module mom\_regridding)@\spxentry{getcoordinateresolution()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateresolution}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{getcoordinateresolution}}}{\emph{CS}, \emph{undo\_scaling}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Query the fixed resolution data.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{undo\_scaling} :: {[}in{]} If present and true, undo any internal rescaling of the resolution data.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{getcoordinateinterfaces() (fortran function in module mom\_regridding)@\spxentry{getcoordinateinterfaces()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateinterfaces}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{getcoordinateinterfaces}}}{\emph{CS}, \emph{undo\_scaling}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Query the target coordinate interface positions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{undo\_scaling} :: {[}in{]} If present and true, undo any internal rescaling of the resolution data.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Interface positions in target coordinate

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{getcoordinateunits() (fortran function in module mom\_regridding)@\spxentry{getcoordinateunits()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{getcoordinateunits}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=20)}\sphinxstyleemphasis{{]}}}
Query the target coordinate units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}}

\end{description}\end{quote}

\end{fulllineitems}

\index{getcoordinateshortname() (fortran function in module mom\_regridding)@\spxentry{getcoordinateshortname()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getcoordinateshortname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{getcoordinateshortname}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=20)}\sphinxstyleemphasis{{]}}}
Query the short name of the coordinate.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_regrid\_params() (fortran subroutine in module mom\_regridding)@\spxentry{set\_regrid\_params()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{set\_regrid\_params}}}{\emph{CS}, \emph{boundary\_extrapolation}, \emph{min\_thickness}, \emph{old\_grid\_weight}, \emph{interp\_scheme}, \emph{depth\_of\_time\_filter\_shallow}, \emph{depth\_of\_time\_filter\_deep}, \emph{compress\_fraction}, \emph{ref\_pressure}, \emph{dz\_min\_surface}, \emph{nz\_fixed\_surface}, \emph{Rho\_ML\_avg\_depth}, \emph{nlay\_ML\_to\_interior}, \emph{fix\_haloclines}, \emph{halocline\_filt\_len}, \emph{halocline\_strat\_tol}, \emph{integrate\_downward\_for\_e}, \emph{remap\_answers\_2018}, \emph{adaptTimeRatio}, \emph{adaptZoom}, \emph{adaptZoomCoeff}, \emph{adaptBuoyCoeff}, \emph{adaptAlpha}, \emph{adaptDoMin}, \emph{adaptDrho0}}{}
Can be used to set any of the parameters for MOM\_regridding.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\item {} 
\sphinxstylestrong{boundary\_extrapolation} :: {[}in{]} Extrapolate in boundary cells

\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Minimum thickness allowed when building the new grid {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{old\_grid\_weight} :: {[}in{]} Weight given to old coordinate when time\sphinxhyphen{}filtering grid

\item {} 
\sphinxstylestrong{interp\_scheme} :: {[}in{]} Interpolation method for state\sphinxhyphen{}dependent coordinates

\item {} 
\sphinxstylestrong{depth\_of\_time\_filter\_shallow} :: {[}in{]} Depth to start cubic {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{depth\_of\_time\_filter\_deep} :: {[}in{]} Depth to end cubic {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{compress\_fraction} :: {[}in{]} Fraction of compressibility to add to potential density {[}nondim{]}

\item {} 
\sphinxstylestrong{ref\_pressure} :: {[}in{]} The reference pressure for density\sphinxhyphen{}dependent coordinates {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{dz\_min\_surface} :: {[}in{]} The fixed resolution in the topmost SLight\_nkml\_min layers {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nz\_fixed\_surface} :: {[}in{]} The number of fixed\sphinxhyphen{}thickness layers at the top of the model

\item {} 
\sphinxstylestrong{rho\_ml\_avg\_depth} :: {[}in{]} Averaging depth over which to determine mixed layer potential density {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{nlay\_ml\_to\_interior} :: {[}in{]} Number of layers to offset the mixed layer density to find resolved stratification {[}nondim{]}

\item {} 
\sphinxstylestrong{fix\_haloclines} :: {[}in{]} Detect regions with much weaker stratification in the coordinate

\item {} 
\sphinxstylestrong{halocline\_filt\_len} :: {[}in{]} Length scale over which to filter T \& S when looking for spuriously unstable water mass profiles {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{halocline\_strat\_tol} :: {[}in{]} Value of the stratification ratio that defines a problematic halocline region.

\item {} 
\sphinxstylestrong{integrate\_downward\_for\_e} :: {[}in{]} If true, integrate for interface positions downward from the top.

\item {} 
\sphinxstylestrong{remap\_answers\_2018} :: {[}in{]} If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. Otherwise use more robust but mathematically equivalent expressions.

\item {} 
\sphinxstylestrong{adapttimeratio} :: {[}in{]} Ratio of the ALE timestep to the grid timescale {[}nondim{]}.

\item {} 
\sphinxstylestrong{adaptzoom} :: {[}in{]} Depth of near\sphinxhyphen{}surface zooming region {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{adaptzoomcoeff} :: {[}in{]} Coefficient of near\sphinxhyphen{}surface zooming diffusivity {[}nondim{]}.

\item {} 
\sphinxstylestrong{adaptbuoycoeff} :: {[}in{]} Coefficient of buoyancy diffusivity {[}nondim{]}.

\item {} 
\sphinxstylestrong{adaptalpha} :: {[}in{]} Scaling factor on optimization tendency {[}nondim{]}.

\item {} 
\sphinxstylestrong{adaptdomin} :: {[}in{]} If true, make a HyCOM\sphinxhyphen{}like mixed layer by preventing interfaces from being shallower than the depths specified by the regridding coordinate.

\item {} 
\sphinxstylestrong{adaptdrho0} :: {[}in{]} Reference density difference for stratification\sphinxhyphen{}dependent diffusion. {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}} {\hyperref[\detokenize{api/generated/modules/coord_adapt:f/coord_adapt/set_adapt_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_adapt::set\_adapt\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/set_hycom_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::set\_hycom\_params}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_extrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::set\_interp\_extrap}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::set\_interp\_scheme}}}}} {\hyperref[\detokenize{api/generated/modules/coord_sigma:f/coord_sigma/set_sigma_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_sigma::set\_sigma\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_slight:f/coord_slight/set_slight_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_slight::set\_slight\_params}}}}} {\hyperref[\detokenize{api/generated/modules/coord_zlike:f/coord_zlike/set_zlike_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_zlike::set\_zlike\_params}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_regrid\_size() (fortran function in module mom\_regridding)@\spxentry{get\_regrid\_size()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_regrid_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{get\_regrid\_size}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Returns the number of levels/layers in the regridding control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} Regridding control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_zlike\_cs() (fortran function in module mom\_regridding)@\spxentry{get\_zlike\_cs()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_zlike_cs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{get\_zlike\_cs}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(zlike\_cs)}\sphinxstyleemphasis{{]}}}
This returns a copy of the zlike\_CS stored in the regridding control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_sigma\_cs() (fortran function in module mom\_regridding)@\spxentry{get\_sigma\_cs()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_sigma_cs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{get\_sigma\_cs}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(sigma\_cs)}\sphinxstyleemphasis{{]}}}
This returns a copy of the sigma\_CS stored in the regridding control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_rho\_cs() (fortran function in module mom\_regridding)@\spxentry{get\_rho\_cs()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/get_rho_cs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{get\_rho\_cs}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(rho\_cs)}\sphinxstyleemphasis{{]}}}
This returns a copy of the rho\_CS stored in the regridding control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{getstaticthickness() (fortran function in module mom\_regridding)@\spxentry{getstaticthickness()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/getstaticthickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{getstaticthickness}}}{\emph{CS}, \emph{SSH}, \emph{depth}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return coordinate\sphinxhyphen{}derived thicknesses for fixed coordinate systems.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Regridding control structure

\item {} 
\sphinxstylestrong{ssh} :: {[}in{]} The sea surface height, in the same units as depth

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} The maximum depth of the grid, often {[}Z \textasciitilde{}\textgreater{} m{]}

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned thicknesses in the units of depth

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_adaptive}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_hycom1}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_slight}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_initthicknesstocoord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_initthicknesstocoord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dz\_function1() (fortran subroutine in module mom\_regridding)@\spxentry{dz\_function1()}\spxextra{fortran subroutine in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/dz_function1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{dz\_function1}}}{\emph{string}, \emph{dz}}{}
Parses a string and generates a dz(:) profile that goes like k**power.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} String with list of parameters in form dz\_min, H\_total, power, precision

\item {} 
\sphinxstylestrong{dz} :: {[}inout{]} Profile of nominal thicknesses

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rho\_function1() (fortran function in module mom\_regridding)@\spxentry{rho\_function1()}\spxextra{fortran function in module mom\_regridding}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/rho_function1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_regridding/}}\sphinxbfcode{\sphinxupquote{rho\_function1}}}{\emph{string}, \emph{rho\_target}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Parses a string and generates a rho\_target(:) profile with refined resolution downward and returns the number of levels.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} String with list of parameters in form dz\_min, H\_total, power, precision

\item {} 
\sphinxstylestrong{rho\_target} :: {[}inout{]} Profile of interface densities {[}kg m\sphinxhyphen{}3{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_regridding}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_regularize\_layers module reference}
\label{\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers}}\label{\detokenize{api/generated/modules/mom_regularize_layers:mom-regularize-layers-module-reference}}\label{\detokenize{api/generated/modules/mom_regularize_layers::doc}}\index{mom\_regularize\_layers (module)@\spxentry{mom\_regularize\_layers}\spxextra{module}|spxpagem}
Provides regularization of layers in isopycnal mode.

{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:detamom-regularize-layers}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_regularize_layers:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_layers\_cs}}}}}
&
This control structure holds parameters used by the MOM\_regularize\_layers module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_regularize_layers:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_layers()}}}}}
&
This subroutine partially steps the bulk mixed layer model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_surface()}}}}}
&
This subroutine ensures that there is a degree of horizontal smoothness in the depths of the near\sphinxhyphen{}surface interfaces.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/find_deficit_ratios}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_deficit\_ratios()}}}}}
&
This subroutine determines the amount by which the harmonic mean thickness at velocity points differ from the arithmetic means, relative to the the arithmetic means, after eliminating thickness variations that are solely due to topography and aggregating all interior layers into one.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_layers\_init()}}}}}
&
Initializes the regularize\_layers control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_regularize_layers:detailed-description}}\label{\detokenize{api/generated/modules/mom_regularize_layers:detamom-regularize-layers}}
Provides regularization of layers in isopycnal mode.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_regularize_layers:type-documentation}}\index{regularize\_layers\_cs (fortran type in module mom\_regularize\_layers)@\spxentry{regularize\_layers\_cs}\spxextra{fortran type in module mom\_regularize\_layers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_regularize\_layers/}}\sphinxbfcode{\sphinxupquote{regularize\_layers\_cs}}}
This control structure holds parameters used by the MOM\_regularize\_layers module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{regularize\_surface\_layers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, vertically restructure the near\sphinxhyphen{}surface layers when they have too much lateral variations to allow for sensible lateral barotropic transports.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{reg\_sfc\_detrain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, allow the buffer layers to detrain into the interior as a part of the restructuring when regularize\_surface\_layers is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{density\_match\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A relative tolerance for how well the densities must match with the target densities during detrainment when regularizing the near\sphinxhyphen{}surface layers {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_def\_tol1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of the relative thickness deficit at which to start modifying the structure, 0.5 by default (or a thickness ratio of 5.83) {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_def\_tol2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of the relative thickness deficit at which to the structure modification is in full force, now 20\% of the way from h\_def\_tol1 to 1 {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_def\_tol3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of the relative thickness deficit at which to start detrainment from the buffer layers to the interior, now 30\% of the way from h\_def\_tol1 to 1 {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_def\_tol4}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of the relative thickness deficit at which to do detrainment from the buffer layers to the interior at full force, now 50\% of the way from h\_def\_tol1 to 1 {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum mixed layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do more thorough checks for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_def\_rat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A diagnostic ID.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{allow\_clocks\_in\_omp\_loops}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, clocks can be called from inside loops that can be threaded. To run with multiple threads, set to False.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_regularize_layers:function-subroutine-documentation}}\index{regularize\_layers() (fortran subroutine in module mom\_regularize\_layers)@\spxentry{regularize\_layers()}\spxextra{fortran subroutine in module mom\_regularize\_layers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regularize\_layers/}}\sphinxbfcode{\sphinxupquote{regularize\_layers}}}{\emph{h}, \emph{tv}, \emph{dt}, \emph{ea}, \emph{eb}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine partially steps the bulk mixed layer model. The following processes are executed, in the order listed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} The amount of fluid moved downward into a

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} The amount of fluid moved upward into a layer

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to regularize\_layers\_init.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_pass}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_surface}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{regularize\_surface() (fortran subroutine in module mom\_regularize\_layers)@\spxentry{regularize\_surface()}\spxextra{fortran subroutine in module mom\_regularize\_layers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_surface}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regularize\_layers/}}\sphinxbfcode{\sphinxupquote{regularize\_surface}}}{\emph{h}, \emph{tv}, \emph{dt}, \emph{ea}, \emph{eb}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine ensures that there is a degree of horizontal smoothness in the depths of the near\sphinxhyphen{}surface interfaces.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} The amount of fluid moved downward into a

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} The amount of fluid moved upward into a layer

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to regularize\_layers\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/find_deficit_ratios}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_deficit\_ratios}}}}} \sphinxcode{\sphinxupquote{id\_clock\_eos}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_layers}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_deficit\_ratios() (fortran subroutine in module mom\_regularize\_layers)@\spxentry{find\_deficit\_ratios()}\spxextra{fortran subroutine in module mom\_regularize\_layers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/find_deficit_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regularize\_layers/}}\sphinxbfcode{\sphinxupquote{find\_deficit\_ratios}}}{\emph{e}, \emph{def\_rat\_u}, \emph{def\_rat\_v}, \emph{G}, \emph{GV}, \emph{CS}, \emph{def\_rat\_u\_2lay}, \emph{def\_rat\_v\_2lay}, \emph{halo}, \emph{h}}{}
This subroutine determines the amount by which the harmonic mean thickness at velocity points differ from the arithmetic means, relative to the the arithmetic means, after eliminating thickness variations that are solely due to topography and aggregating all interior layers into one.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Interface depths {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{def\_rat\_u} :: {[}out{]} The thickness deficit ratio at u points,

\item {} 
\sphinxstylestrong{def\_rat\_v} :: {[}out{]} The thickness deficit ratio at v points,

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to regularize\_layers\_init.

\item {} 
\sphinxstylestrong{def\_rat\_u\_2lay} :: {[}out{]} The thickness deficit ratio at u

\item {} 
\sphinxstylestrong{def\_rat\_v\_2lay} :: {[}out{]} The thickness deficit ratio at v

\item {} 
\sphinxstylestrong{halo} :: {[}in{]} An extra\sphinxhyphen{}wide halo size, 0 by default.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regularize\_surface}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{regularize\_layers\_init() (fortran subroutine in module mom\_regularize\_layers)@\spxentry{regularize\_layers\_init()}\spxextra{fortran subroutine in module mom\_regularize\_layers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_regularize_layers:f/mom_regularize_layers/regularize_layers_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_regularize\_layers/}}\sphinxbfcode{\sphinxupquote{regularize\_layers\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initializes the regularize\_layers control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}} \sphinxcode{\sphinxupquote{id\_clock\_eos}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_remapping module reference}
\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping}}\label{\detokenize{api/generated/modules/mom_remapping:mom-remapping-module-reference}}\label{\detokenize{api/generated/modules/mom_remapping::doc}}\index{mom\_remapping (module)@\spxentry{mom\_remapping}\spxextra{module}|spxpagem}
Provides column\sphinxhyphen{}wise vertical remapping functions.

{\hyperref[\detokenize{api/generated/modules/mom_remapping:detamom-remapping}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_remapping:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_cs}}}}}
&
Container for remapping parameters.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_remapping:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_set_param}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_set\_param()}}}}}
&
Set parameters within remapping object.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/extract_member_remapping_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_member\_remapping\_cs()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/buildgridfromh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buildgridfromh()}}}}}
&
Calculate edge coordinate x from cell width h.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/ispossumerrsignificant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ispossumerrsignificant()}}}}}
&
Compare two summation estimates of positive data and judge if due to more than round\sphinxhyphen{}off.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_h()}}}}}
&
Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w()}}}}}
&
Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_reconstructions\_1d()}}}}}
&
Creates polynomial reconstructions of u0 on the source grid h0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/check_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_reconstructions\_1d()}}}}}
&
Checks that edge values and reconstructions satisfy bounds.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells()}}}}}
&
Remaps column of n0 values u0 on grid h0 to grid h1 with n1 cells by calculating the n0+n1+1 sub\sphinxhyphen{}integrals of the intersection of h0 and h1, and the summing the appropriate integrals into the h1*u1 values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/average_value_ppoly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{average\_value\_ppoly()}}}}}
&
Returns the average value of a reconstruction within a single source cell, i0, between the non\sphinxhyphen{}dimensional positions xa and xb (xa\textless{}=xb) with dimensional separation dh.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_input_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_input\_bounds()}}}}}
&
Measure totals and bounds on source grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_output_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_output\_bounds()}}}}}
&
Measure totals and bounds on destination grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbyprojection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapbyprojection()}}}}}
&
Remaps column of values u0 on grid h0 to grid h1 by integrating over the projection of each h1 cell onto the h0 grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbydeltaz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapbydeltaz()}}}}}
&
Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/integraterecononinterval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{integraterecononinterval()}}}}}
&
Integrate the reconstructed column profile over a single cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dzfromh1h2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dzfromh1h2()}}}}}
&
Calculates the change in interface positions based on h1 and h2.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_remapping()}}}}}
&
Constructor for remapping control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/setreconstructiontype}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setreconstructiontype()}}}}}
&
Changes the method of reconstruction Use this routine to parse a string parameter specifying the reconstruction and re\sphinxhyphen{}allocates work arrays appropriately.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/end_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_remapping()}}}}}
&
Destrcutor for remapping control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests()}}}}}
&
Runs unit tests on remapping functions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/test_answer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_answer()}}}}}
&
Returns true if any cell of u and u\_true are not identical.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dumpgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumpgrid()}}}}}
&
Convenience function for printing grid to screen.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_remapping:detailed-description}}\label{\detokenize{api/generated/modules/mom_remapping:detamom-remapping}}
Provides column\sphinxhyphen{}wise vertical remapping functions.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_remapping:type-documentation}}\index{remapping\_cs (fortran type in module mom\_remapping)@\spxentry{remapping\_cs}\spxextra{fortran type in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapping\_cs}}}
Container for remapping parameters.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remapping\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Determines which reconstruction to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{degree}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Degree of polynomial reconstruction.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{boundary\_extrapolation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, extrapolate boundaries.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{check\_reconstruction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, reconstructions are checked for consistency.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{check\_remapping}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the result of remapping are checked for conservation and bounds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{force\_bounds\_in\_subcell}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the intermediate values used in remapping are forced to be bounded.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true use older, less acccurate expressions.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_remapping:function-subroutine-documentation}}\index{remapping\_set\_param() (fortran subroutine in module mom\_remapping)@\spxentry{remapping\_set\_param()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_set_param}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapping\_set\_param}}}{\emph{CS}, \emph{remapping\_scheme}, \emph{boundary\_extrapolation}, \emph{check\_reconstruction}, \emph{check\_remapping}, \emph{force\_bounds\_in\_subcell}, \emph{answers\_2018}}{}
Set parameters within remapping object.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Remapping control structure

\item {} 
\sphinxstylestrong{remapping\_scheme} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{boundary\_extrapolation} :: {[}in{]} Indicate to extrapolate in boundary cells

\item {} 
\sphinxstylestrong{check\_reconstruction} :: {[}in{]} Indicate to check reconstructions

\item {} 
\sphinxstylestrong{check\_remapping} :: {[}in{]} Indicate to check results of remapping

\item {} 
\sphinxstylestrong{force\_bounds\_in\_subcell} :: {[}in{]} Force subcells values to be bounded

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/setreconstructiontype}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setreconstructiontype}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_remapping}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_member\_remapping\_cs() (fortran subroutine in module mom\_remapping)@\spxentry{extract\_member\_remapping\_cs()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/extract_member_remapping_cs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{extract\_member\_remapping\_cs}}}{\emph{CS}, \emph{remapping\_scheme}, \emph{degree}, \emph{boundary\_extrapolation}, \emph{check\_reconstruction}, \emph{check\_remapping}, \emph{force\_bounds\_in\_subcell}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Control structure for remapping module

\item {} 
\sphinxstylestrong{remapping\_scheme} :: {[}out{]} Determines which reconstruction scheme to use

\item {} 
\sphinxstylestrong{degree} :: {[}out{]} Degree of polynomial reconstruction

\item {} 
\sphinxstylestrong{boundary\_extrapolation} :: {[}out{]} If true, extrapolate boundaries

\item {} 
\sphinxstylestrong{check\_reconstruction} :: {[}out{]} If true, reconstructions are checked for consistency.

\item {} 
\sphinxstylestrong{check\_remapping} :: {[}out{]} If true, the result of remapping are checked for conservation and bounds.

\item {} 
\sphinxstylestrong{force\_bounds\_in\_subcell} :: {[}out{]} If true, the intermediate values used in remapping are forced to be bounded.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{buildgridfromh() (fortran subroutine in module mom\_remapping)@\spxentry{buildgridfromh()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/buildgridfromh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{buildgridfromh}}}{\emph{nz}, \emph{h}, \emph{x}}{}
Calculate edge coordinate x from cell width h.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nz} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Cell widths

\item {} 
\sphinxstylestrong{x} :: {[}inout{]} Edge coordiantes starting at x(1)=0

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ispossumerrsignificant() (fortran function in module mom\_remapping)@\spxentry{ispossumerrsignificant()}\spxextra{fortran function in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/ispossumerrsignificant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{ispossumerrsignificant}}}{\emph{n1}, \emph{sum1}, \emph{n2}, \emph{sum2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Compare two summation estimates of positive data and judge if due to more than round\sphinxhyphen{}off. When two sums are calculated from different vectors that should add up to the same value, the results can differ by round off. The round off error can be bounded to be proportional to the number of operations. This function returns true if the difference between sum1 and sum2 is larger than than the estimated round off bound.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of values in sum1

\item {} 
\sphinxstylestrong{n2} :: {[}in{]} Number of values in sum2

\item {} 
\sphinxstylestrong{sum1} :: {[}in{]} Sum of n1 values

\item {} 
\sphinxstylestrong{sum2} :: {[}in{]} Sum of n2 values

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: True if difference in sums is large

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remapping\_core\_h() (fortran subroutine in module mom\_remapping)@\spxentry{remapping\_core\_h()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapping\_core\_h}}}{\emph{CS}, \emph{n0}, \emph{h0}, \emph{u0}, \emph{n1}, \emph{h1}, \emph{u1}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Remapping control structure

\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Cell widths on source grid

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Cell averages on source grid

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells on target grid

\item {} 
\sphinxstylestrong{h1} :: {[}in{]} Cell widths on target grid

\item {} 
\sphinxstylestrong{u1} :: {[}out{]} Cell averages on target grid

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h0.

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations in the same units as h0.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/check_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_input_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_input\_bounds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_output_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_output\_bounds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/apply_ale_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::apply\_ale\_sponge}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column_iteratively}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::build\_rho\_column\_iteratively}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_cvmix_tidal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::calculate\_cvmix\_tidal}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/cut_off_column_top}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::cut\_off\_column\_top}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_do_remap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_do\_remap}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/set_prior_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::set\_prior\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::update\_obc\_segment\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remapping\_core\_w() (fortran subroutine in module mom\_remapping)@\spxentry{remapping\_core\_w()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapping\_core\_w}}}{\emph{CS}, \emph{n0}, \emph{h0}, \emph{u0}, \emph{n1}, \emph{dx}, \emph{u1}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Remapping control structure

\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Cell widths on source grid

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Cell averages on source grid

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells on target grid

\item {} 
\sphinxstylestrong{dx} :: {[}in{]} Cell widths on target grid

\item {} 
\sphinxstylestrong{u1} :: {[}out{]} Cell averages on target grid

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h0.

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations in the same units as h0.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/check_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_input_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_input\_bounds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_output_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_output\_bounds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_reconstructions\_1d() (fortran subroutine in module mom\_remapping)@\spxentry{build\_reconstructions\_1d()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{build\_reconstructions\_1d}}}{\emph{CS}, \emph{n0}, \emph{h0}, \emph{u0}, \emph{ppoly\_r\_coefs}, \emph{ppoly\_r\_E}, \emph{ppoly\_r\_S}, \emph{iMethod}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Creates polynomial reconstructions of u0 on the source grid h0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Remapping control structure

\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Cell widths on source grid

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Cell averages on source grid

\item {} 
\sphinxstylestrong{ppoly\_r\_coefs} :: {[}out{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{ppoly\_r\_e} :: {[}out{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly\_r\_s} :: {[}out{]} Edge slope of polynomial

\item {} 
\sphinxstylestrong{imethod} :: {[}out{]} Integration method

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h0.

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations in the same units as h0.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h5}}}}} \sphinxcode{\sphinxupquote{integration\_pcm}} \sphinxcode{\sphinxupquote{integration\_plm}} \sphinxcode{\sphinxupquote{integration\_ppm}} \sphinxcode{\sphinxupquote{integration\_pqm}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/pcm_functions:f/pcm_functions/pcm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcm\_functions::pcm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_boundary_extrapolation_v1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions::pqm\_boundary\_extrapolation\_v1}}}}} {\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions::pqm\_reconstruction}}}}} \sphinxcode{\sphinxupquote{remapping\_pcm}} \sphinxcode{\sphinxupquote{remapping\_plm}} \sphinxcode{\sphinxupquote{remapping\_ppm\_h4}} \sphinxcode{\sphinxupquote{remapping\_ppm\_ih4}} \sphinxcode{\sphinxupquote{remapping\_pqm\_ih4ih3}} \sphinxcode{\sphinxupquote{remapping\_pqm\_ih6ih5}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_reconstructions\_1d() (fortran subroutine in module mom\_remapping)@\spxentry{check\_reconstructions\_1d()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/check_reconstructions_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{check\_reconstructions\_1d}}}{\emph{n0}, \emph{h0}, \emph{u0}, \emph{deg}, \emph{boundary\_extrapolation}, \emph{ppoly\_r\_coefs}, \emph{ppoly\_r\_E}, \emph{ppoly\_r\_S}}{}
Checks that edge values and reconstructions satisfy bounds.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Cell widths on source grid

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Cell averages on source grid

\item {} 
\sphinxstylestrong{deg} :: {[}in{]} Degree of polynomial reconstruction

\item {} 
\sphinxstylestrong{boundary\_extrapolation} :: {[}in{]} Extrapolate at boundaries if true

\item {} 
\sphinxstylestrong{ppoly\_r\_coefs} :: {[}out{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{ppoly\_r\_e} :: {[}out{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly\_r\_s} :: {[}out{]} Edge slope of polynomial

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remap\_via\_sub\_cells() (fortran subroutine in module mom\_remapping)@\spxentry{remap\_via\_sub\_cells()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remap\_via\_sub\_cells}}}{\emph{n0}, \emph{h0}, \emph{u0}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{n1}, \emph{h1}, \emph{method}, \emph{force\_bounds\_in\_subcell}, \emph{u1}, \emph{uh\_err}, \emph{ah\_sub}, \emph{aisub\_src}, \emph{aiss}, \emph{aise}}{}
Remaps column of n0 values u0 on grid h0 to grid h1 with n1 cells by calculating the n0+n1+1 sub\sphinxhyphen{}integrals of the intersection of h0 and h1, and the summing the appropriate integrals into the h1*u1 values. h0 and h1 must have the same units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Source grid widths (size n0)

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Source cell averages (size n0)

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}in{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}in{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells in target grid

\item {} 
\sphinxstylestrong{h1} :: {[}in{]} Target grid widths (size n1)

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{force\_bounds\_in\_subcell} :: {[}in{]} Force sub\sphinxhyphen{}cell values to be bounded

\item {} 
\sphinxstylestrong{u1} :: {[}out{]} Target cell averages (size n1)

\item {} 
\sphinxstylestrong{uh\_err} :: {[}out{]} Estimate of bound on error in sum of u*h

\item {} 
\sphinxstylestrong{ah\_sub} :: {[}out{]} h\_sub

\item {} 
\sphinxstylestrong{aisub\_src} :: {[}out{]} i\_sub\_src

\item {} 
\sphinxstylestrong{aiss} :: {[}out{]} isrc\_start

\item {} 
\sphinxstylestrong{aise} :: {[}out{]} isrc\_ens

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/average_value_ppoly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{average\_value\_ppoly}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_input_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_input\_bounds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_output_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{measure\_output\_bounds}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{old\_algorithm}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{average\_value\_ppoly() (fortran function in module mom\_remapping)@\spxentry{average\_value\_ppoly()}\spxextra{fortran function in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/average_value_ppoly}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{average\_value\_ppoly}}}{\emph{n0}, \emph{u0}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{method}, \emph{i0}, \emph{xa}, \emph{xb}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the average value of a reconstruction within a single source cell, i0, between the non\sphinxhyphen{}dimensional positions xa and xb (xa\textless{}=xb) with dimensional separation dh.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Cell means

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}in{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}in{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{i0} :: {[}in{]} Source cell index

\item {} 
\sphinxstylestrong{xa} :: {[}in{]} Non\sphinxhyphen{}dimensional start position within source cell

\item {} 
\sphinxstylestrong{xb} :: {[}in{]} Non\sphinxhyphen{}dimensional end position within source cell

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{integration\_pcm}} \sphinxcode{\sphinxupquote{integration\_plm}} \sphinxcode{\sphinxupquote{integration\_ppm}} \sphinxcode{\sphinxupquote{integration\_pqm}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/bulk_average}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::bulk\_average}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/fluxes_layer_method}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::fluxes\_layer\_method}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{measure\_input\_bounds() (fortran subroutine in module mom\_remapping)@\spxentry{measure\_input\_bounds()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_input_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{measure\_input\_bounds}}}{\emph{n0}, \emph{h0}, \emph{u0}, \emph{edge\_values}, \emph{h0tot}, \emph{h0err}, \emph{u0tot}, \emph{u0err}, \emph{u0min}, \emph{u0max}}{}
Measure totals and bounds on source grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Cell widths on source grid

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Cell averages on source grid

\item {} 
\sphinxstylestrong{edge\_values} :: {[}in{]} Cell edge values on source grid

\item {} 
\sphinxstylestrong{h0tot} :: {[}out{]} Sum of cell widths

\item {} 
\sphinxstylestrong{h0err} :: {[}out{]} Magnitude of round\sphinxhyphen{}off error in h0tot

\item {} 
\sphinxstylestrong{u0tot} :: {[}out{]} Sum of cell widths times values

\item {} 
\sphinxstylestrong{u0err} :: {[}out{]} Magnitude of round\sphinxhyphen{}off error in u0tot

\item {} 
\sphinxstylestrong{u0min} :: {[}out{]} Minimum value in reconstructions of u0

\item {} 
\sphinxstylestrong{u0max} :: {[}out{]} Maximum value in reconstructions of u0

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{measure\_output\_bounds() (fortran subroutine in module mom\_remapping)@\spxentry{measure\_output\_bounds()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/measure_output_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{measure\_output\_bounds}}}{\emph{n1}, \emph{h1}, \emph{u1}, \emph{h1tot}, \emph{h1err}, \emph{u1tot}, \emph{u1err}, \emph{u1min}, \emph{u1max}}{}
Measure totals and bounds on destination grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells on destination grid

\item {} 
\sphinxstylestrong{h1} :: {[}in{]} Cell widths on destination grid

\item {} 
\sphinxstylestrong{u1} :: {[}in{]} Cell averages on destination grid

\item {} 
\sphinxstylestrong{h1tot} :: {[}out{]} Sum of cell widths

\item {} 
\sphinxstylestrong{h1err} :: {[}out{]} Magnitude of round\sphinxhyphen{}off error in h1tot

\item {} 
\sphinxstylestrong{u1tot} :: {[}out{]} Sum of cell widths times values

\item {} 
\sphinxstylestrong{u1err} :: {[}out{]} Magnitude of round\sphinxhyphen{}off error in u1tot

\item {} 
\sphinxstylestrong{u1min} :: {[}out{]} Minimum value in reconstructions of u1

\item {} 
\sphinxstylestrong{u1max} :: {[}out{]} Maximum value in reconstructions of u1

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remapbyprojection() (fortran subroutine in module mom\_remapping)@\spxentry{remapbyprojection()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbyprojection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapbyprojection}}}{\emph{n0}, \emph{h0}, \emph{u0}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{n1}, \emph{h1}, \emph{method}, \emph{u1}, \emph{h\_neglect}}{}
Remaps column of values u0 on grid h0 to grid h1 by integrating over the projection of each h1 cell onto the h0 grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Source grid widths (size n0)

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Source cell averages (size n0)

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}in{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}in{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells in target grid

\item {} 
\sphinxstylestrong{h1} :: {[}in{]} Target grid widths (size n1)

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{u1} :: {[}out{]} Target cell averages (size n1)

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/integraterecononinterval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{integraterecononinterval}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remapbydeltaz() (fortran subroutine in module mom\_remapping)@\spxentry{remapbydeltaz()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbydeltaz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapbydeltaz}}}{\emph{n0}, \emph{h0}, \emph{u0}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{n1}, \emph{dx1}, \emph{method}, \emph{u1}, \emph{h1}, \emph{h\_neglect}}{}
Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx. The new grid is defined relative to the original grid by change dx1(:) = xNew(:) \sphinxhyphen{} xOld(:) and the remapping calculated so that hNew(k) qNew(k) = hOld(k) qOld(k) + F(k+1) \sphinxhyphen{} F(k) where F(k) = dx1(k) qAverage and where qAverage is the average qOld in the region zOld(k) to zNew(k).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Source grid sizes (size n0)

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Source cell averages (size n0)

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}in{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}in{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells in target grid

\item {} 
\sphinxstylestrong{dx1} :: {[}in{]} Target grid edge positions (size n1+1)

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{u1} :: {[}out{]} Target cell averages (size n1)

\item {} 
\sphinxstylestrong{h1} :: {[}out{]} Target grid widths (size n1)

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/integraterecononinterval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{integraterecononinterval}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{integraterecononinterval() (fortran subroutine in module mom\_remapping)@\spxentry{integraterecononinterval()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/integraterecononinterval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{integraterecononinterval}}}{\emph{n0}, \emph{h0}, \emph{u0}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{method}, \emph{xL}, \emph{xR}, \emph{hC}, \emph{uAve}, \emph{jStart}, \emph{xStart}, \emph{h\_neglect}}{}
Integrate the reconstructed column profile over a single cell.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells in source grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Source grid sizes (size n0)

\item {} 
\sphinxstylestrong{u0} :: {[}in{]} Source cell averages

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}in{]} Edge value of polynomial

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}in{]} Coefficients of polynomial

\item {} 
\sphinxstylestrong{method} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{xl} :: {[}in{]} Left edges of target cell

\item {} 
\sphinxstylestrong{xr} :: {[}in{]} Right edges of target cell

\item {} 
\sphinxstylestrong{hc} :: {[}in{]} Cell width hC = xR \sphinxhyphen{} xL

\item {} 
\sphinxstylestrong{uave} :: {[}out{]} Average value on target cell

\item {} 
\sphinxstylestrong{jstart} :: {[}inout{]} The index of the cell to start searching from On exit, contains index of last cell used

\item {} 
\sphinxstylestrong{xstart} :: {[}inout{]} The left edge position of cell jStart On first entry should be 0.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}} \sphinxcode{\sphinxupquote{integration\_pcm}} \sphinxcode{\sphinxupquote{integration\_plm}} \sphinxcode{\sphinxupquote{integration\_ppm}} \sphinxcode{\sphinxupquote{integration\_pqm}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbydeltaz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapbydeltaz}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbyprojection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapbyprojection}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dzfromh1h2() (fortran subroutine in module mom\_remapping)@\spxentry{dzfromh1h2()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dzfromh1h2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{dzfromh1h2}}}{\emph{n1}, \emph{h1}, \emph{n2}, \emph{h2}, \emph{dx}}{}
Calculates the change in interface positions based on h1 and h2.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{h1} :: {[}in{]} Cell widths of source grid (size n1)

\item {} 
\sphinxstylestrong{n2} :: {[}in{]} Number of cells on target grid

\item {} 
\sphinxstylestrong{h2} :: {[}in{]} Cell widths of target grid (size n2)

\item {} 
\sphinxstylestrong{dx} :: {[}out{]} Change in interface position (size n2+1)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_remap\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_remapping() (fortran subroutine in module mom\_remapping)@\spxentry{initialize\_remapping()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{initialize\_remapping}}}{\emph{CS}, \emph{remapping\_scheme}, \emph{boundary\_extrapolation}, \emph{check\_reconstruction}, \emph{check\_remapping}, \emph{force\_bounds\_in\_subcell}, \emph{answers\_2018}}{}
Constructor for remapping control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Remapping control structure

\item {} 
\sphinxstylestrong{remapping\_scheme} :: {[}in{]} Remapping scheme to use

\item {} 
\sphinxstylestrong{boundary\_extrapolation} :: {[}in{]} Indicate to extrapolate in boundary cells

\item {} 
\sphinxstylestrong{check\_reconstruction} :: {[}in{]} Indicate to check reconstructions

\item {} 
\sphinxstylestrong{check\_remapping} :: {[}in{]} Indicate to check results of remapping

\item {} 
\sphinxstylestrong{force\_bounds\_in\_subcell} :: {[}in{]} Force subcells values to be bounded

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_set_param}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_set\_param}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::initialize\_ale\_sponge\_fixed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/initialize_ale_sponge_varying}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::initialize\_ale\_sponge\_varying}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_constituents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::read\_tidal\_constituents}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_speed::wave\_speed\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setreconstructiontype() (fortran subroutine in module mom\_remapping)@\spxentry{setreconstructiontype()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/setreconstructiontype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{setreconstructiontype}}}{\emph{string}, \emph{CS}}{}
Changes the method of reconstruction Use this routine to parse a string parameter specifying the reconstruction and re\sphinxhyphen{}allocates work arrays appropriately. It is called from initialize\_remapping but can be called from an external module too.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} String to parse for method

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} Remapping control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{remapping\_pcm}} \sphinxcode{\sphinxupquote{remapping\_plm}} \sphinxcode{\sphinxupquote{remapping\_ppm\_h4}} \sphinxcode{\sphinxupquote{remapping\_ppm\_ih4}} \sphinxcode{\sphinxupquote{remapping\_pqm\_ih4ih3}} \sphinxcode{\sphinxupquote{remapping\_pqm\_ih6ih5}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_set_param}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_set\_param}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_remapping() (fortran subroutine in module mom\_remapping)@\spxentry{end\_remapping()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/end_remapping}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{end\_remapping}}}{\emph{CS}}{}
Destrcutor for remapping control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: {[}inout{]} Remapping control structure

\end{description}\end{quote}

\end{fulllineitems}

\index{remapping\_unit\_tests() (fortran function in module mom\_remapping)@\spxentry{remapping\_unit\_tests()}\spxextra{fortran function in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{remapping\_unit\_tests}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Runs unit tests on remapping functions. Should only be called from a single/root thread Returns True if a test fails, otherwise False.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/buildgridfromh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buildgridfromh}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dumpgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumpgrid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dzfromh1h2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dzfromh1h2}}}}} \sphinxcode{\sphinxupquote{hneglect\_dflt}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_remapping}}}}} \sphinxcode{\sphinxupquote{integration\_plm}} \sphinxcode{\sphinxupquote{integration\_ppm}} {\hyperref[\detokenize{api/generated/modules/pcm_functions:f/pcm_functions/pcm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcm\_functions::pcm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remap_via_sub_cells}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remap\_via\_sub\_cells}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbydeltaz}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapbydeltaz}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapbyprojection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapbyprojection}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_w}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_core\_w}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/test_answer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_answer}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_answer() (fortran function in module mom\_remapping)@\spxentry{test\_answer()}\spxextra{fortran function in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/test_answer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{test\_answer}}}{\emph{verbose}, \emph{n}, \emph{u}, \emph{u\_true}, \emph{label}, \emph{tol}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if any cell of u and u\_true are not identical. Returns false otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells in u

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Values to test

\item {} 
\sphinxstylestrong{u\_true} :: {[}in{]} Values to test against (correct answer)

\item {} 
\sphinxstylestrong{label} :: {[}in{]} Message

\item {} 
\sphinxstylestrong{tol} :: {[}in{]} The tolerance for differences between u and u\_true

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dumpgrid() (fortran subroutine in module mom\_remapping)@\spxentry{dumpgrid()}\spxextra{fortran subroutine in module mom\_remapping}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/dumpgrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_remapping/}}\sphinxbfcode{\sphinxupquote{dumpgrid}}}{\emph{n}, \emph{h}, \emph{x}, \emph{u}}{}
Convenience function for printing grid to screen.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Cell thickness

\item {} 
\sphinxstylestrong{x} :: {[}in{]} Interface delta

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Cell average values

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_restart module reference}
\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart}}\label{\detokenize{api/generated/modules/mom_restart:mom-restart-module-reference}}\label{\detokenize{api/generated/modules/mom_restart::doc}}\index{mom\_restart (module)@\spxentry{mom\_restart}\spxextra{module}|spxpagem}
The MOM6 facility for reading and writing restart files, and querying what has been read.

{\hyperref[\detokenize{api/generated/modules/mom_restart:detamom-restart}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_restart:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/field_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{field\_restart}}}}}
&
A structure with information about a single restart field.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/mom_restart_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart\_cs}}}}}
&
A restart registry and the control structure for restarts.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/obsolete_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{obsolete\_restart}}}}}
&
A structure to store information about restart fields that are no longer used.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/p0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p0d}}}}}
&
A type for making arrays of pointers to scalars.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/p1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1d}}}}}
&
A type for making arrays of pointers to 1\sphinxhyphen{}d arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/p2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p2d}}}}}
&
A type for making arrays of pointers to 2\sphinxhyphen{}d arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/p3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3d}}}}}
&
A type for making arrays of pointers to 3\sphinxhyphen{}d arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/p4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p4d}}}}}
&
A type for making arrays of pointers to 4\sphinxhyphen{}d arrays.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_restart:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_as_obsolete}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_as\_obsolete()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr3d()}}}}}
&
Register a 3\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr4d()}}}}}
&
Register a 4\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr2d()}}}}}
&
Register a 2\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr1d()}}}}}
&
Register a 1\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr0d()}}}}}
&
Register a 0\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_pair_ptr2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_pair\_ptr2d()}}}}}
&
Register a pair of rotationally equivalent 2d restart fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_pair_ptr3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_pair\_ptr3d()}}}}}
&
Register a pair of rotationally equivalent 3d restart fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_pair_ptr4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_pair\_ptr4d()}}}}}
&
Register a pair of rotationally equivalent 2d restart fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_4d()}}}}}
&
Register a 4\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_3d()}}}}}
&
Register a 3\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_2d()}}}}}
&
Register a 2\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_1d()}}}}}
&
Register a 1\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_0d()}}}}}
&
Register a 0\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name()}}}}}
&
query\_initialized\_name determines whether a named field has been successfully read from a restart file yet.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_0d()}}}}}
&
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_1d()}}}}}
&
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_2d()}}}}}
&
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_3d()}}}}}
&
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_4d()}}}}}
&
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_0d\_name()}}}}}
&
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_1d\_name()}}}}}
&
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_2d\_name()}}}}}
&
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_3d\_name()}}}}}
&
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_4d\_name()}}}}}
&
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save\_restart()}}}}}
&
save\_restart saves all registered variables to restart files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restore\_state()}}}}}
&
restore\_state reads the model state from previously generated files. All restart variables are read from the first file in the input filename list in which they are found.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_files_exist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_files\_exist()}}}}}
&
restart\_files\_exist determines whether any restart files exist.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/determine_is_new_run}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_is\_new\_run()}}}}}
&
determine\_is\_new\_run determines from the value of filename and the existence automatically named restart files in directory whether this would be a new, and as a side effect stores this information in CS.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/is_new_run}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_new\_run()}}}}}
&
is\_new\_run returns whether this is going to be a new run based on the information stored in CS by a previous call to determine\_is\_new\_run.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_restart\_units()}}}}}
&
open\_restart\_units determines the number of existing restart files and optionally opens them and returns unit ids, paths and whether the files are global or spatially decomposed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_init()}}}}}
&
Initialize this module and set up a restart control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_init\_end()}}}}}
&
Indicate that all variables have now been registered.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_end()}}}}}
&
Deallocate memory associated with a MOM\_restart\_CS variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/get_checksum_loop_ranges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_checksum\_loop\_ranges()}}}}}
&
Return bounds for computing checksums to store in restart files.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_restart:detailed-description}}\label{\detokenize{api/generated/modules/mom_restart:detamom-restart}}
The MOM6 facility for reading and writing restart files, and querying what has been read.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_restart:type-documentation}}\index{field\_restart (fortran type in module mom\_restart)@\spxentry{field\_restart}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/field_restart}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{field\_restart}}}
A structure with information about a single restart field.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vars}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Description of a field that is to be read from or written to the restart file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mand\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: If .true. the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: .true. if this field has been read from the restart file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: A name by which a variable may be queried.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_restart\_cs (fortran type in module mom\_restart)@\spxentry{mom\_restart\_cs}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/mom_restart_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{mom\_restart\_cs}}}
A restart registry and the control structure for restarts.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_ptr0d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p0d )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the fields that have been registered for restarts.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_ptr1d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p1d )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the fields that have been registered for restarts.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_ptr2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the fields that have been registered for restarts.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_ptr3d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p3d )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the fields that have been registered for restarts.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_ptr4d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p4d )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the fields that have been registered for restarts.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: restart is set to .true. if the run has been started from a full restart file. Otherwise some fields must be initialized approximately.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{novars}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of restart fields that have been registered.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_obsolete\_vars}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of obsolete restart fields that have been registered.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{parallel\_restartfiles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, each PE writes its own restart file, otherwise they are combined internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{large\_file\_support}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, NetCDF 3.6 or later is being used and large\sphinxhyphen{}file\sphinxhyphen{}support is enabled.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{new\_run}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the input filenames and restart file existence will result in a new run that is not initialized from restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{new\_run\_set}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, new\_run has been determined for this restart\_CS.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{checksum\_required}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, require the restart checksums to match and error out otherwise. Users may want to avoid this comparison if for example the restarts are made from a run with a different mask\_table than the current run, in which case the checksums will not match and cause crash.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restartfile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: The name or name root for MOM restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{turns}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Number of quarter turns from input to model domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_field}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( field\_restart )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: An array of descriptions of the registered fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_obsolete}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( obsolete\_restart )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: An array of obsolete restart fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_fields}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The maximum number of restart fields.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{obsolete\_restart (fortran type in module mom\_restart)@\spxentry{obsolete\_restart}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/obsolete_restart}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{obsolete\_restart}}}
A structure to store information about restart fields that are no longer used.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{field\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Name of restart field that is no longer in use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{replacement\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: Name of replacement restart field, if applicable.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p0d (fortran type in module mom\_restart)@\spxentry{p0d}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/p0d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{p0d}}}
A type for making arrays of pointers to scalars.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a scalar.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p1d (fortran type in module mom\_restart)@\spxentry{p1d}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/p1d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{p1d}}}
A type for making arrays of pointers to 1\sphinxhyphen{}d arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a 1d array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p2d (fortran type in module mom\_restart)@\spxentry{p2d}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/p2d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{p2d}}}
A type for making arrays of pointers to 2\sphinxhyphen{}d arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a 2d array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p3d (fortran type in module mom\_restart)@\spxentry{p3d}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/p3d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{p3d}}}
A type for making arrays of pointers to 3\sphinxhyphen{}d arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a 3d array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p4d (fortran type in module mom\_restart)@\spxentry{p4d}\spxextra{fortran type in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/p4d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{p4d}}}
A type for making arrays of pointers to 4\sphinxhyphen{}d arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a 4d array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_restart:function-subroutine-documentation}}\index{register\_restart\_field\_as\_obsolete() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_as\_obsolete()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_as_obsolete}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_as\_obsolete}}}{\emph{field\_name}, \emph{replacement\_name}, \emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{field\_name} :: {[}in{]} Name of restart field that is no longer in use

\item {} 
\sphinxstylestrong{replacement\_name} :: {[}in{]} Name of replacement restart field, if applicable

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_visc::set\_visc\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_ptr3d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_ptr3d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_ptr3d}}}{\emph{f\_ptr}, \emph{var\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a 3\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{var\_desc} :: {[}in{]} A structure with metadata about this variable

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_ptr4d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_ptr4d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_ptr4d}}}{\emph{f\_ptr}, \emph{var\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a 4\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{var\_desc} :: {[}in{]} A structure with metadata about this variable

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_4d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_ptr2d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_ptr2d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_ptr2d}}}{\emph{f\_ptr}, \emph{var\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a 2\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{var\_desc} :: {[}in{]} A structure with metadata about this variable

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_ptr1d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_ptr1d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_ptr1d}}}{\emph{f\_ptr}, \emph{var\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a 1\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{var\_desc} :: {[}in{]} A structure with metadata about this variable

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_ptr0d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_ptr0d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_ptr0d}}}{\emph{f\_ptr}, \emph{var\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a 0\sphinxhyphen{}d field for restarts, providing the metadata in a structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{var\_desc} :: {[}in{]} A structure with metadata about this variable

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_0d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_pair\_ptr2d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_pair\_ptr2d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_pair_ptr2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_pair\_ptr2d}}}{\emph{a\_ptr}, \emph{b\_ptr}, \emph{a\_desc}, \emph{b\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a pair of rotationally equivalent 2d restart fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_ptr} :: {[}in{]} First field pointer

\item {} 
\sphinxstylestrong{b\_ptr} :: {[}in{]} Second field pointer

\item {} 
\sphinxstylestrong{a\_desc} :: {[}in{]} First field descriptor

\item {} 
\sphinxstylestrong{b\_desc} :: {[}in{]} Second field descriptor

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, abort if field is missing

\item {} 
\sphinxstylestrong{cs} :: MOM restart control structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_pair\_ptr3d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_pair\_ptr3d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_pair_ptr3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_pair\_ptr3d}}}{\emph{a\_ptr}, \emph{b\_ptr}, \emph{a\_desc}, \emph{b\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a pair of rotationally equivalent 3d restart fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_ptr} :: {[}in{]} First field pointer

\item {} 
\sphinxstylestrong{b\_ptr} :: {[}in{]} Second field pointer

\item {} 
\sphinxstylestrong{a\_desc} :: {[}in{]} First field descriptor

\item {} 
\sphinxstylestrong{b\_desc} :: {[}in{]} Second field descriptor

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, abort if field is missing

\item {} 
\sphinxstylestrong{cs} :: MOM restart control structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_pair\_ptr4d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_pair\_ptr4d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_pair_ptr4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_pair\_ptr4d}}}{\emph{a\_ptr}, \emph{b\_ptr}, \emph{a\_desc}, \emph{b\_desc}, \emph{mandatory}, \emph{CS}}{}
Register a pair of rotationally equivalent 2d restart fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a\_ptr} :: {[}in{]} First field pointer

\item {} 
\sphinxstylestrong{b\_ptr} :: {[}in{]} Second field pointer

\item {} 
\sphinxstylestrong{a\_desc} :: {[}in{]} First field descriptor

\item {} 
\sphinxstylestrong{b\_desc} :: {[}in{]} Second field descriptor

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, abort if field is missing

\item {} 
\sphinxstylestrong{cs} :: MOM restart control structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_4d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_4d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_4d}}}{\emph{f\_ptr}, \emph{name}, \emph{mandatory}, \emph{CS}, \emph{longname}, \emph{units}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}}{}
Register a 4\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{name} :: {[}in{]} variable name to be used in the restart file

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} variable long name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} variable units

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}in{]} variable horizonal staggering, ‘h’ if absent

\item {} 
\sphinxstylestrong{z\_grid} :: {[}in{]} variable vertical staggering, ‘L’ if absent

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1, ‘s’ if absent

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr4d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_3d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_3d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_3d}}}{\emph{f\_ptr}, \emph{name}, \emph{mandatory}, \emph{CS}, \emph{longname}, \emph{units}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}}{}
Register a 3\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{name} :: {[}in{]} variable name to be used in the restart file

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} variable long name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} variable units

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}in{]} variable horizonal staggering, ‘h’ if absent

\item {} 
\sphinxstylestrong{z\_grid} :: {[}in{]} variable vertical staggering, ‘L’ if absent

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1, ‘s’ if absent

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr3d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_2d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_2d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_2d}}}{\emph{f\_ptr}, \emph{name}, \emph{mandatory}, \emph{CS}, \emph{longname}, \emph{units}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}}{}
Register a 2\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{name} :: {[}in{]} variable name to be used in the restart file

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} variable long name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} variable units

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}in{]} variable horizonal staggering, ‘h’ if absent

\item {} 
\sphinxstylestrong{z\_grid} :: {[}in{]} variable vertical staggering, ‘1’ if absent

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1, ‘s’ if absent

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr2d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_1d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_1d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_1d}}}{\emph{f\_ptr}, \emph{name}, \emph{mandatory}, \emph{CS}, \emph{longname}, \emph{units}, \emph{hor\_grid}, \emph{z\_grid}, \emph{t\_grid}}{}
Register a 1\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{name} :: {[}in{]} variable name to be used in the restart file

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} variable long name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} variable units

\item {} 
\sphinxstylestrong{hor\_grid} :: {[}in{]} variable horizonal staggering, ‘1’ if absent

\item {} 
\sphinxstylestrong{z\_grid} :: {[}in{]} variable vertical staggering, ‘L’ if absent

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1, ‘s’ if absent

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr1d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_restart\_field\_0d() (fortran subroutine in module mom\_restart)@\spxentry{register\_restart\_field\_0d()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{register\_restart\_field\_0d}}}{\emph{f\_ptr}, \emph{name}, \emph{mandatory}, \emph{CS}, \emph{longname}, \emph{units}, \emph{t\_grid}}{}
Register a 0\sphinxhyphen{}d field for restarts, providing the metadata as individual arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field to be read or written

\item {} 
\sphinxstylestrong{name} :: {[}in{]} variable name to be used in the restart file

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, the run will abort if this field is not successfully read from the restart file.

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in/out)

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} variable long name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} variable units

\item {} 
\sphinxstylestrong{t\_grid} :: {[}in{]} time description: s, p, or 1, ‘s’ if absent

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_ptr0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_restart\_field\_ptr0d}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_name() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_name()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_name}}}{\emph{name}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
query\_initialized\_name determines whether a named field has been successfully read from a restart file yet.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_0d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_1d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_2d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_3d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_4d\_name}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_0d() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_0d()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_0d}}}{\emph{f\_ptr}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_1d() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_1d()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_1d}}}{\emph{f\_ptr}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_2d() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_2d()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_2d}}}{\emph{f\_ptr}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_3d() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_3d()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_3d}}}{\emph{f\_ptr}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_4d() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_4d()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_4d}}}{\emph{f\_ptr}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_0d\_name() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_0d\_name()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_0d\_name}}}{\emph{f\_ptr}, \emph{name}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_1d\_name() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_1d\_name()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_1d\_name}}}{\emph{f\_ptr}, \emph{name}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_2d\_name() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_2d\_name()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_2d\_name}}}{\emph{f\_ptr}, \emph{name}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_3d\_name() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_3d\_name()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_3d\_name}}}{\emph{f\_ptr}, \emph{name}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{query\_initialized\_4d\_name() (fortran function in module mom\_restart)@\spxentry{query\_initialized\_4d\_name()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{query\_initialized\_4d\_name}}}{\emph{f\_ptr}, \emph{name}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Indicate whether the field pointed to by f\_ptr or with the specified variable name has been initialized from a restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} A pointer to the field that is being queried

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field that is being queried

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object (intent in)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{save\_restart() (fortran subroutine in module mom\_restart)@\spxentry{save\_restart()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{save\_restart}}}{\emph{directory}, \emph{time}, \emph{G}, \emph{CS}, \emph{time\_stamped}, \emph{filename}, \emph{GV}, \emph{num\_rest\_files}}{}
save\_restart saves all registered variables to restart files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory where the restart files are to be written

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to restart\_init.

\item {} 
\sphinxstylestrong{time\_stamped} :: {[}in{]} If present and true, add time\sphinxhyphen{}stamp to the restart file names.

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} A filename that overrides the name in CSrestartfile.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{num\_rest\_files} :: {[}out{]} number of restart files written

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/get_checksum_loop_ranges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_checksum\_loop\_ranges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/forcing_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::forcing\_save\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/forcing_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::forcing\_save\_restart}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{restore\_state() (fortran subroutine in module mom\_restart)@\spxentry{restore\_state()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{restore\_state}}}{\emph{filename}, \emph{directory}, \emph{day}, \emph{G}, \emph{CS}}{}
restore\_state reads the model state from previously generated files. All restart variables are read from the first file in the input filename list in which they are found.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The list of restart file names or a single character ‘r’ to read automatically named files.

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory in which to find restart files

\item {} 
\sphinxstylestrong{day} :: {[}out{]} The time of the restarted run

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to restart\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/get_checksum_loop_ranges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_checksum\_loop\_ranges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_restart\_units}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{restart\_files\_exist() (fortran function in module mom\_restart)@\spxentry{restart\_files\_exist()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_files_exist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{restart\_files\_exist}}}{\emph{filename}, \emph{directory}, \emph{G}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
restart\_files\_exist determines whether any restart files exist.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The list of restart file names or a single character ‘r’ to read automatically named files.

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory in which to find restart files

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to restart\_init.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The function result, which indicates whether any of the explicitly or automatically named restart files exist in directory.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_restart\_units}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{determine\_is\_new\_run() (fortran function in module mom\_restart)@\spxentry{determine\_is\_new\_run()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/determine_is_new_run}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{determine\_is\_new\_run}}}{\emph{filename}, \emph{directory}, \emph{G}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
determine\_is\_new\_run determines from the value of filename and the existence automatically named restart files in directory whether this would be a new, and as a side effect stores this information in CS.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The list of restart file names or a single character ‘r’ to read automatically named files.

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory in which to find restart files

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to restart\_init.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The function result, which indicates whether this is a new run, based on the value of filename and whether restart files exist.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_restart\_units}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_new\_run() (fortran function in module mom\_restart)@\spxentry{is\_new\_run()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/is_new_run}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{is\_new\_run}}}{\emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
is\_new\_run returns whether this is going to be a new run based on the information stored in CS by a previous call to determine\_is\_new\_run.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to restart\_init.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The function result, which indicates whether this is a new run, based on the value of filename and whether restart files exist.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{open\_restart\_units() (fortran function in module mom\_restart)@\spxentry{open\_restart\_units()}\spxextra{fortran function in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/open_restart_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{open\_restart\_units}}}{\emph{filename}, \emph{directory}, \emph{G}, \emph{CS}, \emph{units}, \emph{file\_paths}, \emph{global\_files}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
open\_restart\_units determines the number of existing restart files and optionally opens them and returns unit ids, paths and whether the files are global or spatially decomposed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The list of restart file names or a single character ‘r’ to read automatically named files.

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory in which to find restart files

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to restart\_init.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The mpp units of all opened files.

\item {} 
\sphinxstylestrong{file\_paths} :: {[}out{]} The full paths to open files.

\item {} 
\sphinxstylestrong{global\_files} :: {[}out{]} True if a file is global.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The number of files (both automatically named restart files and others explicitly in filename) that have been opened.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/determine_is_new_run}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_is\_new\_run}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_files_exist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_files\_exist}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restore\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{restart\_init() (fortran subroutine in module mom\_restart)@\spxentry{restart\_init()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{restart\_init}}}{\emph{param\_file}, \emph{CS}, \emph{restart\_root}}{}
Initialize this module and set up a restart control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object that is allocated here

\item {} 
\sphinxstylestrong{restart\_root} :: {[}in{]} A filename root that overrides the value

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{restart\_init\_end() (fortran subroutine in module mom\_restart)@\spxentry{restart\_init\_end()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{restart\_init\_end}}}{\emph{CS}}{}
Indicate that all variables have now been registered.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_end}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{restart\_end() (fortran subroutine in module mom\_restart)@\spxentry{restart\_end()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{restart\_end}}}{\emph{CS}}{}
Deallocate memory associated with a MOM\_restart\_CS variable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restart\_init\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{restart\_error() (fortran subroutine in module mom\_restart)@\spxentry{restart\_error()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_error}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{restart\_error}}}{\emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to a MOM\_restart\_CS object

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_0d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_0d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_0d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_1d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_1d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_2d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_2d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_2d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_3d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_3d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_3d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_4d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_4d_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_4d\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/query_initialized_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{query\_initialized\_name}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_checksum\_loop\_ranges() (fortran subroutine in module mom\_restart)@\spxentry{get\_checksum\_loop\_ranges()}\spxextra{fortran subroutine in module mom\_restart}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_restart:f/mom_restart/get_checksum_loop_ranges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_restart/}}\sphinxbfcode{\sphinxupquote{get\_checksum\_loop\_ranges}}}{\emph{G}, \emph{pos}, \emph{isL}, \emph{ieL}, \emph{jsL}, \emph{jeL}}{}
Return bounds for computing checksums to store in restart files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{pos} :: {[}in{]} An integer indicating staggering of variable

\item {} 
\sphinxstylestrong{isl} :: {[}out{]} i\sphinxhyphen{}start for checksum

\item {} 
\sphinxstylestrong{iel} :: {[}out{]} i\sphinxhyphen{}end for checksum

\item {} 
\sphinxstylestrong{jsl} :: {[}out{]} j\sphinxhyphen{}start for checksum

\item {} 
\sphinxstylestrong{jel} :: {[}out{]} j\sphinxhyphen{}end for checksum

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_safe\_alloc module reference}
\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc}}\label{\detokenize{api/generated/modules/mom_safe_alloc:mom-safe-alloc-module-reference}}\label{\detokenize{api/generated/modules/mom_safe_alloc::doc}}\index{mom\_safe\_alloc (module)@\spxentry{mom\_safe\_alloc}\spxextra{module}|spxpagem}
Convenience functions for safely allocating memory without accidentally reallocating pointer and causing memory leaks.

{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:detamom-safe-alloc}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_safe_alloc:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_ptr\_1d()}}}}}
&
Allocate a pointer to a 1\sphinxhyphen{}d array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_2d_2arg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_ptr\_2d\_2arg()}}}}}
&
Allocate a pointer to a 2\sphinxhyphen{}d array based on its dimension sizes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_3d_3arg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_ptr\_3d\_3arg()}}}}}
&
Allocate a pointer to a 3\sphinxhyphen{}d array based on its dimension sizes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_ptr\_2d()}}}}}
&
Allocate a pointer to a 2\sphinxhyphen{}d array based on its index starting and ending values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_ptr\_3d()}}}}}
&
Allocate a pointer to a 3\sphinxhyphen{}d array based on its index starting and ending values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_3d_6arg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_ptr\_3d\_6arg()}}}}}
&
Allocate a pointer to a 3\sphinxhyphen{}d array based on its index starting and ending values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_allocatable_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_allocatable\_2d()}}}}}
&
Allocate a 2\sphinxhyphen{}d allocatable array based on its index starting and ending values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_allocatable_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_allocatable\_3d()}}}}}
&
Allocate a 3\sphinxhyphen{}d allocatable array based on its index starting and ending values and k\sphinxhyphen{}index size.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_allocatable_3d_6arg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{safe\_alloc\_allocatable\_3d\_6arg()}}}}}
&
Allocate a 3\sphinxhyphen{}d allocatable array based on its 6 index starting and ending values.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_safe_alloc:detailed-description}}\label{\detokenize{api/generated/modules/mom_safe_alloc:detamom-safe-alloc}}
Convenience functions for safely allocating memory without accidentally reallocating pointer and causing memory leaks.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_safe_alloc:function-subroutine-documentation}}\index{safe\_alloc\_ptr\_1d() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_ptr\_1d()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_ptr\_1d}}}{\emph{ptr}, \emph{i1}, \emph{i2}}{}
Allocate a pointer to a 1\sphinxhyphen{}d array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: A pointer to allocate

\item {} 
\sphinxstylestrong{i1} :: {[}in{]} The size of the array, or its starting index if i2 is present

\item {} 
\sphinxstylestrong{i2} :: {[}in{]} The ending index of the array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_ptr\_2d\_2arg() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_ptr\_2d\_2arg()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_2d_2arg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_ptr\_2d\_2arg}}}{\emph{ptr}, \emph{ni}, \emph{nj}}{}
Allocate a pointer to a 2\sphinxhyphen{}d array based on its dimension sizes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: A pointer to allocate

\item {} 
\sphinxstylestrong{ni} :: {[}in{]} The size of the 1st dimension of the array

\item {} 
\sphinxstylestrong{nj} :: {[}in{]} The size of the 2nd dimension of the array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_ptr\_3d\_3arg() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_ptr\_3d\_3arg()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_3d_3arg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_ptr\_3d\_3arg}}}{\emph{ptr}, \emph{ni}, \emph{nj}, \emph{nk}}{}
Allocate a pointer to a 3\sphinxhyphen{}d array based on its dimension sizes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: A pointer to allocate

\item {} 
\sphinxstylestrong{ni} :: {[}in{]} The size of the 1st dimension of the array

\item {} 
\sphinxstylestrong{nj} :: {[}in{]} The size of the 2nd dimension of the array

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} The size of the 3rd dimension of the array

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_ptr\_2d() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_ptr\_2d()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_ptr\_2d}}}{\emph{ptr}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}}{}
Allocate a pointer to a 2\sphinxhyphen{}d array based on its index starting and ending values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: A pointer to allocate

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end index to allocate for the 2nd dimension

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_ptr\_3d() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_ptr\_3d()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_ptr\_3d}}}{\emph{ptr}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{nk}}{}
Allocate a pointer to a 3\sphinxhyphen{}d array based on its index starting and ending values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: A pointer to allocate

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} The size to allocate for the 3rd dimension

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_ptr\_3d\_6arg() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_ptr\_3d\_6arg()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_ptr_3d_6arg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_ptr\_3d\_6arg}}}{\emph{ptr}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{ks}, \emph{ke}}{}
Allocate a pointer to a 3\sphinxhyphen{}d array based on its index starting and ending values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: A pointer to allocate

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{ks} :: {[}in{]} The start index to allocate for the 3rd dimension

\item {} 
\sphinxstylestrong{ke} :: {[}in{]} The end index to allocate for the 3rd dimension

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_allocatable\_2d() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_allocatable\_2d()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_allocatable_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_allocatable\_2d}}}{\emph{ptr}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}}{}
Allocate a 2\sphinxhyphen{}d allocatable array based on its index starting and ending values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: An allocatable array to allocate

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end index to allocate for the 2nd dimension

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_allocatable\_3d() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_allocatable\_3d()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_allocatable_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_allocatable\_3d}}}{\emph{ptr}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{nk}}{}
Allocate a 3\sphinxhyphen{}d allocatable array based on its index starting and ending values and k\sphinxhyphen{}index size.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: An allocatable array to allocate

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{nk} :: {[}in{]} The size to allocate for the 3rd dimension

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{safe\_alloc\_allocatable\_3d\_6arg() (fortran subroutine in module mom\_safe\_alloc)@\spxentry{safe\_alloc\_allocatable\_3d\_6arg()}\spxextra{fortran subroutine in module mom\_safe\_alloc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_safe_alloc:f/mom_safe_alloc/safe_alloc_allocatable_3d_6arg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_safe\_alloc/}}\sphinxbfcode{\sphinxupquote{safe\_alloc\_allocatable\_3d\_6arg}}}{\emph{ptr}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{ks}, \emph{ke}}{}
Allocate a 3\sphinxhyphen{}d allocatable array based on its 6 index starting and ending values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ptr} :: An allocatable array to allocate

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The start index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The end index to allocate for the 1st dimension

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The start index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The end index to allocate for the 2nd dimension

\item {} 
\sphinxstylestrong{ks} :: {[}in{]} The start index to allocate for the 3rd dimension

\item {} 
\sphinxstylestrong{ke} :: {[}in{]} The end index to allocate for the 3rd dimension

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_set\_diffusivity module reference}
\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity}}\label{\detokenize{api/generated/modules/mom_set_diffusivity:mom-set-diffusivity-module-reference}}\label{\detokenize{api/generated/modules/mom_set_diffusivity::doc}}\index{mom\_set\_diffusivity (module)@\spxentry{mom\_set\_diffusivity}\spxextra{module}|spxpagem}
Calculate vertical diffusivity from all mixing processes.

{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:detamom-set-diffusivity}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_set_diffusivity:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/diffusivity_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diffusivity\_diags}}}}}
&
This structure has memory for used in calculating diagnostics of diffusivity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity\_cs}}}}}
&
This control structure contains parameters for MOM\_set\_diffusivity.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_set_diffusivity:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity()}}}}}
&
Sets the interior vertical diffusion of scalars due to the following processes:
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_tke_to_kd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_tke\_to\_kd()}}}}}
&
Convert turbulent kinetic energy to diffusivity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_n2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_n2()}}}}}
&
Calculate Brunt\sphinxhyphen{}Vaisala frequency, N\textasciicircum{}2.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/double_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{double\_diffusion()}}}}}
&
This subroutine sets the additional diffusivities of temperature and salinity due to double diffusion, using the same functional form as is used in MOM4.1, and taken from an NCAR technical note (REF?) that updates what was in Large et al.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_drag_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_drag\_diffusivity()}}}}}
&
This routine adds diffusion sustained by flow energy extracted by bottom drag.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_lotw_bbl_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_lotw\_bbl\_diffusivity()}}}}}
&
Calculates a BBL diffusivity use a Prandtl number 1 diffusivity with a law of the wall turbulent viscosity, up to a BBL height where the energy used for mixing has consumed the mechanical TKE input.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_mlrad_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_mlrad\_diffusivity()}}}}}
&
This routine adds effects of mixed layer radiation to the layer diffusivities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_bbl_tke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_bbl\_tke()}}}}}
&
This subroutine calculates several properties related to bottom boundary layer turbulence.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_density_ratios}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_density\_ratios()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity\_init()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity\_end()}}}}}
&
Clear pointers and dealocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_set_diffusivity:detailed-description}}\label{\detokenize{api/generated/modules/mom_set_diffusivity:detamom-set-diffusivity}}
Calculate vertical diffusivity from all mixing processes.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_set_diffusivity:type-documentation}}\index{diffusivity\_diags (fortran type in module mom\_set\_diffusivity)@\spxentry{diffusivity\_diags}\spxextra{fortran type in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/diffusivity_diags}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{diffusivity\_diags}}}
This structure has memory for used in calculating diagnostics of diffusivity.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2\_3d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: squared buoyancy frequency at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_user}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: user\sphinxhyphen{}added diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_bbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: BBL diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: layer integrated work by diapycnal mixing {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maxtke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: energy required to entrain to h\_max {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_bkgnd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Background diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_bkgnd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: Viscosity from ackground diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kt\_extra}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: double diffusion diffusivity for temp {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ks\_extra}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: double diffusion diffusivity for saln {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drho\_rat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: The density difference ratio used in double diffusion {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_to\_kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: conversion rate (\textasciitilde{}1.0 / (G\_Earth + dRho\_lay)) between TKE dissipated within a layer and Kd in that layer {[}Z2 T\sphinxhyphen{}1 / Z3 T\sphinxhyphen{}3 = T2 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_diffusivity\_cs (fortran type in module mom\_set\_diffusivity)@\spxentry{set\_diffusivity\_cs}\spxextra{fortran type in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{set\_diffusivity\_cs}}}
This control structure contains parameters for MOM\_set\_diffusivity.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_maxtke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_to\_kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_user}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_layer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_bbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kt\_extra}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ks\_extra}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_r\_rho}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_bkgnd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_bkgnd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, a refined bulk mixed layer is used with GVnk\_rho\_varies variable density mixed \& buffer layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fluxri\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The flux Richardson number where the stratification is large enough that N2 \textgreater{} omega2 {[}nondim{]}. The full expression for the Flux Richardson number is usually FLUX\_RI\_MAX*N2/(N2+OMEGA2). The default is 0.2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bottomdraglaw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the bottom stress is calculated with a drag law c\_drag*|u|*u.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_mixing\_as\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, take the maximum of the diffusivity from the BBL mixing and the other diffusivities. Otherwise, diffusivities from the BBL\_mixing is added.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_lotw\_bbl\_diffusivity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use simpler/less precise, BBL diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lotw\_bbl\_use\_omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use simpler/less precise, BBL diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_effic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: efficiency with which the energy extracted by bottom drag drives BBL diffusion {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdrag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: quadratic drag coefficient {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{imax\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: inverse of a maximum decay scale for bottom\sphinxhyphen{}drag driven turbulence {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The interior vertical viscosity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: interior diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: minimum diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: maximum increment for diapycnal diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. Set to a negative value to have no limit.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_add}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: uniform diffusivity added everywhere without filtering or scaling {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_smooth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Vertical diffusivity used to interpolate more sensible values of T \& S into thin layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure to regulate diagnostic output timing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{limit\_dissipation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If enabled, dissipation is limited to be larger than the following:

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dissip\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum dissipation {[}R Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dissip\_n0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient a in minimum dissipation = a+b*N {[}R Z2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dissip\_n1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient b in minimum dissipation = a+b*N {[}R Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dissip\_n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coefficient c in minimum dissipation = c*N2 {[}R Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J s m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dissip\_kd\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum Kd {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}, with dissipation Rho0*Kd\_min*N\textasciicircum{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Earth’s rotation frequency {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_radiation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: allow a fraction of TKE available from wind work to penetrate below mixed layer base with a vertical decay scale determined by the minimum of (1) The depth of the mixed layer, or (2) An Ekman length scale. Energy available to drive mixing below the mixed layer is given by E = ML\_RAD\_COEFF*MSTAR*USTAR**3. Optionally, if ML\_rad\_TKE\_decay is true, this is further reduced by a factor of exp(\sphinxhyphen{}h\_ML*Idecay\_len\_TkE), where Idecay\_len\_TKE is calculated the same way as in the mixed layer code. The diapycnal diffusivity is KD(k) = E/(N2(k)+OMEGA2), where N2 is the squared buoyancy frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]} and OMEGA2 is the rotation rate of the earth squared.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_rad\_kd\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum diapycnal diffusivity due to turbulence radiated from the base of the mixed layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_rad\_efold\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: non\sphinxhyphen{}dim coefficient to scale penetration depth

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_rad\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: coefficient, which scales MSTAR*USTAR\textasciicircum{}3 to obtain energy available for mixing below mixed layer base {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_rad\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true use code with a bug that reduces the energy available in the transition layer by a factor of the inverse of the energy deposition lenthscale (in m).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_rad\_tke\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply same exponential decay to ML\_rad as applied to the other surface sources of TKE in the mixed layer code.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum value of ustar to avoid numerical problems {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. If the value is small enough, this parameter should not affect the solution.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: ratio of natural Ekman depth to TKE decay scale {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mstar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: ratio of friction velocity cubed to TKE input to the mixed layer {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_use\_omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use absolute rotation rate instead of the vertical component of rotation when setting the decay scale for mixed layer turbulence.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_omega\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: When setting the decay scale for turbulence, use this fraction of the absolute rotation rate blended with the local value of f, as f\textasciicircum{}2 \textasciitilde{}= (1\sphinxhyphen{}of)*f\textasciicircum{}2 + of*4*omega\textasciicircum{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{user\_change\_diff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, call user\sphinxhyphen{}defined code to change diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usekappashear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the kappa\_shear module to find the shear\sphinxhyphen{}driven diapycnal diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vertex\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do the calculations of the shear\sphinxhyphen{}driven mixing at the cell vertices (i.e., the vorticity points).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_cvmix\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use one of the CVMix modules to find shear\sphinxhyphen{}driven diapycnal diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{double\_diffusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, enable double\sphinxhyphen{}diffusive mixing using an old method.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_cvmix\_ddiff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, enable double\sphinxhyphen{}diffusive mixing via CVMix.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_tidal\_mixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, activate tidal mixing diffusivity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{simple\_tke\_to\_kd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses a simple estimate of Kd/TKE that does not rely on a layer\sphinxhyphen{}formulation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_rrho\_salt\_fingers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: max density ratio for salt fingering

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_salt\_diff\_salt\_fingers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: max salt diffusivity for salt fingers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_molecular}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: molecular visc for double diff convect {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The directory in which input files are found.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{user\_change\_diff\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(user\_change\_diff\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappashear\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(kappa\_shear\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cvmix\_shear\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cvmix\_shear\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cvmix\_ddiff\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cvmix\_ddiff\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bkgnd\_mixing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(bkgnd\_mixing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(int\_tide\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_mixing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tidal\_mixing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for a child module.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_set_diffusivity:function-subroutine-documentation}}\index{set\_diffusivity() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{set\_diffusivity()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{set\_diffusivity}}}{\emph{u}, \emph{v}, \emph{h}, \emph{u\_h}, \emph{v\_h}, \emph{tv}, \emph{fluxes}, \emph{optics}, \emph{visc}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Kd\_lay}, \emph{Kd\_int}}{}
Sets the interior vertical diffusion of scalars due to the following processes:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Shear\sphinxhyphen{}driven mixing: two options, Jackson et at. and KPP interior;

\item {} 
Background mixing via CVMix (Bryan\sphinxhyphen{}Lewis profile) or the scheme described by Harrison \& Hallberg, JPO 2008;

\item {} 
Double\sphinxhyphen{}diffusion, old method and new method via CVMix;

\item {} 
Tidal mixing: many options available, see \sphinxcode{\sphinxupquote{MOM\_tidal\_mixing.F90}} ; In addition, this subroutine has the option to set the interior vertical viscosity associated with processes 1,2 and 4 listed above, which is stored in viscKv\_slow. Vertical viscosity due to shear\sphinxhyphen{}driven mixing is passed via viscKv\_shear

\end{enumerate}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{u\_h} :: {[}in{]} Zonal velocity interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v\_h} :: {[}in{]} Meridional velocity interpolated to h points {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Structure with pointers to thermodynamic fields. Out is for tvTempxPmE.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of thermodynamic surface fluxes

\item {} 
\sphinxstylestrong{optics} :: A structure describing the optical properties of the ocean.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} Structure containing vertical viscosities, bottom boundary layer properies, and related fields.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: Module control structure.

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}out{]} Diapycnal diffusivity of each layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}out{]} Diapycnal diffusivity at each interface {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_drag_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_drag\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_lotw_bbl_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_lotw\_bbl\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_mlrad_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_mlrad\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/calc_kappa_shear_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::calc\_kappa\_shear\_vertex}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/compute_ddiff_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff::compute\_ddiff\_coeffs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/double_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{double\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_n2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_n2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_tke_to_kd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_tke\_to\_kd}}}}} {\hyperref[\detokenize{api/generated/modules/mom_full_convection:f/mom_full_convection/full_convection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_full\_convection::full\_convection}}}}} \sphinxcode{\sphinxupquote{id\_clock\_cvmix\_ddiff}} \sphinxcode{\sphinxupquote{id\_clock\_kappashear}} {\hyperref[\detokenize{api/generated/modules/mom_isopycnal_slopes:f/mom_isopycnal_slopes/vert_fill_ts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_isopycnal\_slopes::vert\_fill\_ts}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_tke\_to\_kd() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{find\_tke\_to\_kd()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_tke_to_kd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{find\_tke\_to\_kd}}}{\emph{h}, \emph{tv}, \emph{dRho\_int}, \emph{N2\_lay}, \emph{j}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{TKE\_to\_Kd}, \emph{maxTKE}, \emph{kb}}{}
Convert turbulent kinetic energy to diffusivity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{drho\_int} :: {[}in{]} Change in locally referenced potential density across each interface {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{n2\_lay} :: {[}in{]} The squared buoyancy frequency of the layers {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index of row to work on

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: Diffusivity control structure

\item {} 
\sphinxstylestrong{tke\_to\_kd} :: {[}out{]} The conversion rate between the TKE dissipated within a layer and the diapycnal diffusivity witin that layer, usually (\textasciitilde{}Rho\_0 / (G\_Earth * dRho\_lay)) {[}Z2 T\sphinxhyphen{}1 / Z3 T\sphinxhyphen{}3 = T2 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{maxtke} :: {[}out{]} The energy required to for a layer to entrain to its maximum realizable thickness {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{kb} :: {[}out{]} Index of lightest layer denser than the buffer layer, or \sphinxhyphen{}1 without a bulk mixed layer.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_density_ratios}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_density\_ratios}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_n2() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{find\_n2()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_n2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{find\_n2}}}{\emph{h}, \emph{tv}, \emph{T\_f}, \emph{S\_f}, \emph{fluxes}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{dRho\_int}, \emph{N2\_lay}, \emph{N2\_int}, \emph{N2\_bot}}{}
Calculate Brunt\sphinxhyphen{}Vaisala frequency, N\textasciicircum{}2.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{t\_f} :: {[}in{]} layer temperature with the values in massless layers

\item {} 
\sphinxstylestrong{s\_f} :: {[}in{]} Layer salinities with values in massless

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of thermodynamic surface fluxes

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index of row to work on

\item {} 
\sphinxstylestrong{cs} :: Diffusivity control structure

\item {} 
\sphinxstylestrong{drho\_int} :: {[}out{]} Change in locally referenced potential density

\item {} 
\sphinxstylestrong{n2\_int} :: {[}out{]} The squared buoyancy frequency at the interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{n2\_lay} :: {[}out{]} The squared buoyancy frequency of the layers {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{n2\_bot} :: {[}out{]} The near\sphinxhyphen{}bottom squared buoyancy frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{double\_diffusion() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{double\_diffusion()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/double_diffusion}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{double\_diffusion}}}{\emph{tv}, \emph{h}, \emph{T\_f}, \emph{S\_f}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Kd\_T\_dd}, \emph{Kd\_S\_dd}}{}
This subroutine sets the additional diffusivities of temperature and salinity due to double diffusion, using the same functional form as is used in MOM4.1, and taken from an NCAR technical note (REF?) that updates what was in Large et al. (1994). All the coefficients here should probably be made run\sphinxhyphen{}time variables rather than hard\sphinxhyphen{}coded constants.

\begin{sphinxadmonition}{note}{Todo}

Find reference for NCAR tech note above.
\end{sphinxadmonition}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields; absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{t\_f} :: {[}in{]} layer temperatures with the values in massless layers

\item {} 
\sphinxstylestrong{s\_f} :: {[}in{]} Layer salinities with values in massless

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Meridional index upon which to work.

\item {} 
\sphinxstylestrong{cs} :: Module control structure.

\item {} 
\sphinxstylestrong{kd\_t\_dd} :: {[}out{]} Interface double diffusion diapycnal

\item {} 
\sphinxstylestrong{kd\_s\_dd} :: {[}out{]} Interface double diffusion diapycnal

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_drag\_diffusivity() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{add\_drag\_diffusivity()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_drag_diffusivity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{add\_drag\_diffusivity}}}{\emph{h}, \emph{u}, \emph{v}, \emph{tv}, \emph{fluxes}, \emph{visc}, \emph{j}, \emph{TKE\_to\_Kd}, \emph{maxTKE}, \emph{kb}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Kd\_lay}, \emph{Kd\_int}, \emph{Kd\_BBL}}{}
This routine adds diffusion sustained by flow energy extracted by bottom drag.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of thermodynamic surface fluxes

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Structure containing vertical viscosities, bottom boundary layer properies, and related fields

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index of row to work on

\item {} 
\sphinxstylestrong{tke\_to\_kd} :: {[}in{]} The conversion rate between the TKE TKE dissipated within a layer and the diapycnal diffusivity witin that layer, usually (\textasciitilde{}Rho\_0 / (G\_Earth * dRho\_lay)) {[}Z2 T\sphinxhyphen{}1 / Z3 T\sphinxhyphen{}3 = T2 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{maxtke} :: {[}in{]} The energy required to for a layer to entrain to its maximum\sphinxhyphen{}realizable thickness {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{kb} :: {[}in{]} Index of lightest layer denser than the buffer layer, or \sphinxhyphen{}1 without a bulk mixed layer

\item {} 
\sphinxstylestrong{cs} :: Diffusivity control structure

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} The diapycnal diffusivity in layers, {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} The diapycnal diffusivity at interfaces,

\item {} 
\sphinxstylestrong{kd\_bbl} :: Interface BBL diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_lotw\_bbl\_diffusivity() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{add\_lotw\_bbl\_diffusivity()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_lotw_bbl_diffusivity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{add\_lotw\_bbl\_diffusivity}}}{\emph{h}, \emph{u}, \emph{v}, \emph{tv}, \emph{fluxes}, \emph{visc}, \emph{j}, \emph{N2\_int}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Kd\_BBL}, \emph{Kd\_lay}, \emph{Kd\_int}}{}
Calculates a BBL diffusivity use a Prandtl number 1 diffusivity with a law of the wall turbulent viscosity, up to a BBL height where the energy used for mixing has consumed the mechanical TKE input.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} u component of flow {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} v component of flow {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} Surface fluxes structure

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Structure containing vertical viscosities, bottom boundary layer properies, and related fields.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index of row to work on

\item {} 
\sphinxstylestrong{n2\_int} :: {[}in{]} Square of Brunt\sphinxhyphen{}Vaisala at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: Diffusivity control structure

\item {} 
\sphinxstylestrong{kd\_bbl} :: Interface BBL diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} Layer net diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} Interface net diffusivity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_mlrad\_diffusivity() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{add\_mlrad\_diffusivity()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/add_mlrad_diffusivity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{add\_mlrad\_diffusivity}}}{\emph{h}, \emph{fluxes}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{TKE\_to\_Kd}, \emph{Kd\_lay}, \emph{Kd\_int}}{}
This routine adds effects of mixed layer radiation to the layer diffusivities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} Surface fluxes structure

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{cs} :: Diffusivity control structure

\item {} 
\sphinxstylestrong{tke\_to\_kd} :: {[}in{]} The conversion rate between the TKE TKE dissipated within a layer and the diapycnal diffusivity witin that layer, usually (\textasciitilde{}Rho\_0 / (G\_Earth * dRho\_lay)) {[}Z2 T\sphinxhyphen{}1 / Z3 T\sphinxhyphen{}3 = T2 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} The diapycnal diffusivity in layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} The diapycnal diffusivity at interfaces

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_diffusivity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_bbl\_tke() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{set\_bbl\_tke()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_bbl_tke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{set\_bbl\_tke}}}{\emph{u}, \emph{v}, \emph{h}, \emph{fluxes}, \emph{visc}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{OBC}}{}
This subroutine calculates several properties related to bottom boundary layer turbulence.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure of thermodynamic surface fluxes

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Structure containing vertical viscosities, bottom boundary layer properies, and related fields.

\item {} 
\sphinxstylestrong{cs} :: Diffusivity control structure

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_e}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_density\_ratios() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{set\_density\_ratios()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_density_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{set\_density\_ratios}}}{\emph{h}, \emph{tv}, \emph{kb}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{j}, \emph{ds\_dsp1}, \emph{rho\_0}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Structure containing pointers to any available thermodynamic fields; absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{kb} :: {[}in{]} Index of lightest layer denser than the buffer layer, or \sphinxhyphen{}1 without a bulk mixed layer.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Control structure returned by previous call to diabatic\_entrain\_init.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Meridional index upon which to work.

\item {} 
\sphinxstylestrong{ds\_dsp1} :: {[}out{]} Coordinate variable (sigma\sphinxhyphen{}2) difference across an interface divided by the difference across the interface below it {[}nondim{]}

\item {} 
\sphinxstylestrong{rho\_0} :: {[}in{]} Layer potential densities relative to

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/find_tke_to_kd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_tke\_to\_kd}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_diffusivity\_init() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{set\_diffusivity\_init()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{set\_diffusivity\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{int\_tide\_CSp}, \emph{halo\_TS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: pointer set to point to the module control structure.

\item {} 
\sphinxstylestrong{int\_tide\_csp} :: A pointer to the internal tides control structure

\item {} 
\sphinxstylestrong{halo\_ts} :: {[}out{]} The halo size of tracer points that must be valid for the calculations in set\_diffusivity.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_cvmix\_ddiff}} \sphinxcode{\sphinxupquote{id\_clock\_kappashear}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_at_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_at\_vertex}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::tidal\_mixing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_diffusivity\_end() (fortran subroutine in module mom\_set\_diffusivity)@\spxentry{set\_diffusivity\_end()}\spxextra{fortran subroutine in module mom\_set\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_diffusivity/}}\sphinxbfcode{\sphinxupquote{set\_diffusivity\_end}}}{\emph{CS}}{}
Clear pointers and dealocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for this module

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_bkgnd_mixing:f/mom_bkgnd_mixing/bkgnd_mixing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_bkgnd\_mixing::bkgnd\_mixing\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_shear::cvmix\_shear\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::tidal\_mixing\_end}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity::user\_change\_diff\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_set\_visc module reference}
\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc}}\label{\detokenize{api/generated/modules/mom_set_visc:mom-set-visc-module-reference}}\label{\detokenize{api/generated/modules/mom_set_visc::doc}}\index{mom\_set\_visc (module)@\spxentry{mom\_set\_visc}\spxextra{module}|spxpagem}
Calculates various values related to the bottom boundary layer, such as the viscosity and thickness of the BBL (set\_viscous\_BBL).

{\hyperref[\detokenize{api/generated/modules/mom_set_visc:detamom-set-visc}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_set_visc:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_visc\_cs}}}}}
&
Control structure for MOM\_set\_visc.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_set_visc:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_bbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_viscous\_bbl()}}}}}
&
Calculates the thickness of the bottom boundary layer and the viscosity within that layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_v_at_u}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_v\_at\_u()}}}}}
&
This subroutine finds a thickness\sphinxhyphen{}weighted value of v at the u\sphinxhyphen{}points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_u_at_v}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_u\_at\_v()}}}}}
&
This subroutine finds a thickness\sphinxhyphen{}weighted value of u at the v\sphinxhyphen{}points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_viscous\_ml()}}}}}
&
Calculates the thickness of the surface boundary layer for applying an elevated viscosity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_register_restarts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_visc\_register\_restarts()}}}}}
&
Register any fields associated with the vertvisc\_type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_visc\_init()}}}}}
&
Initializes the MOM\_set\_visc control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_visc\_end()}}}}}
&
This subroutine dellocates any memory in the set\_visc control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_set_visc:detailed-description}}\label{\detokenize{api/generated/modules/mom_set_visc:detamom-set-visc}}
This would also be the module in which other viscous quantities that are flow\sphinxhyphen{}independent might be set. This information is transmitted to other modules via a vertvisc type structure.

The same code is used for the two velocity components, by indirectly referencing the velocities and defining a handful of direction\sphinxhyphen{}specific defined variables.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_set_visc:type-documentation}}\index{set\_visc\_cs (fortran type in module mom\_set\_visc)@\spxentry{set\_visc\_cs}\spxextra{fortran type in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_visc\_cs}}}
Control structure for MOM\_set\_visc.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bbl\_thick\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_bbl\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bbl\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bbl\_thick\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_bbl\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_bbl\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ray\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ray\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nkml\_visc\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nkml\_visc\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hbbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The static bottom boundary layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. Runtime parameter

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdrag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The quadratic drag coefficient. Runtime parameter

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_smag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Laplacian Smagorinsky coefficient for calculating the drag in channels.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{drag\_bg\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An assumed unresolved background velocity for calculating the bottom drag {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. Runtime parameter

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_thick\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum bottom boundary layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. This might be Kv / (cdrag * drag\_bg\_vel) to give Kv as the minimum near\sphinxhyphen{}bottom viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{htbl\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A nominal thickness of the surface boundary layer for use in calculating the near\sphinxhyphen{}surface velocity {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{htbl\_shelf\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum surface boundary layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_bbl\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum viscosity in the bottom boundary layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_tbl\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum viscosity in the top boundary layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bottomdraglaw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: 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

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_use\_eos}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the equation of state in determining the properties of the bottom boundary layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{linear\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the drag law is cdrag*

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{channel\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the drag is exerted directly on each layer according to what fraction of the bottom they overlie.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{correct\_bbl\_bounds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the correct bounds on the BBL thickness and viscosity so that the bottom layer feels the intended drag.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rino\_mix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use Richardson number dependent mixing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dynamic\_viscous\_ml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a bulk Richardson number criterion to determine the mixed layer thickness for viscosity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulk\_ri\_ml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The bulk mixed layer used to determine the thickness of the viscous mixed layer. Nondim.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Earth’s rotation rate {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum value of ustar to avoid numerical problems {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. If the value is small enough, this should not affect the solution.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_decay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ratio of the natural Ekman depth to the TKE decay scale, nondimensional.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega\_frac}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: When setting the decay scale for turbulence, use this fraction of the absolute rotation rate blended with the local value of f, as sqrt((1\sphinxhyphen{}of)*f\textasciicircum{}2 + of*4*omega\textasciicircum{}2).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_use\_tidal\_bg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a tidal background amplitude for the bottom velocity when computing the bottom stress.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The directory for input files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_obc\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Open boundaries control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tideamp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: RMS tidal amplitude at h points {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: BBL mean U current {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: BBL mean V current {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_set_visc:function-subroutine-documentation}}\index{set\_viscous\_bbl() (fortran subroutine in module mom\_set\_visc)@\spxentry{set\_viscous\_bbl()}\spxextra{fortran subroutine in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_bbl}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_viscous\_bbl}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{visc}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{symmetrize}}{}
Calculates the thickness of the bottom boundary layer and the viscosity within that layer.

A drag law is used, either linearized about an assumed bottom velocity or using the actual near\sphinxhyphen{}bottom velocities combined with an assumed unresolved velocity. The bottom boundary layer thickness is limited by a combination of stratification and rotation, as in the paper of Killworth and Edwards, JPO 1999. It is not necessary to calculate the thickness and viscosity every time step; instead previous values may be used.

\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:namespacemom-set-visc-1set-viscous-bbl}}
Unexpected section title.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{Viscous} \PYG{n}{Bottom} \PYG{n}{Boundary} \PYG{n}{Layer}
\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{==}\PYG{o}{=}
\end{sphinxVerbatim}


If \sphinxcode{\sphinxupquote{set\_visc\_cs.bottomdraglaw}} is True then a bottom boundary layer viscosity and thickness are calculated so that the bottom stress is
is True then a bottom boundary layer viscosity and thickness are calculated so that the bottom stress is
\begin{equation*}
\begin{split}\mathbf{\tau}_b = C_d | U_{bbl} | \mathbf{u}_{bbl}\end{split}
\end{equation*}
If \sphinxcode{\sphinxupquote{set\_visc\_cs.bottomdraglaw}} is True then the term is True then the term \(|U_{bbl}|\) is set equal to the value in \sphinxcode{\sphinxupquote{set\_visc\_cs.drag\_bg\_vel}} so that so that \(C_d |U_{bbl}|\) becomes a Rayleigh bottom drag. Otherwise \(|U_{bbl}|\) is found by averaging the flow over the bottom \sphinxcode{\sphinxupquote{set\_visc\_cs.hbbl}} of the model, adding the amplitude of tides of the model, adding the amplitude of tides \sphinxcode{\sphinxupquote{set\_visc\_cs.tideamp}} and a constant and a constant \sphinxcode{\sphinxupquote{set\_visc\_cs.drag\_bg\_vel}}. For these calculations the vertical grid at the velocity component locations is found by . For these calculations the vertical grid at the velocity component locations is found by
\begin{equation*}
\begin{split}\begin{array}{ll} \frac{2 h^- h^+}{h^- + h^+} & u \left( h^+ - h^-\right) >= 0 \\ \frac{1}{2} \left( h^- + h^+ \right) & u \left( h^+ - h^-\right) < 0 \end{array}\end{split}
\end{equation*}
which biases towards the thin cell if the thin cell is upwind. Biasing the grid toward thin upwind cells helps increase the effect of viscosity and inhibits flow out of these thin cells.

After diagnosing
\(|U_{bbl}|\) over a fixed depth an active viscous boundary layer thickness is found using the ideas of Killworth and Edwards, 1999 (hereafter KW99). KW99 solve the equation
\begin{equation*}
\begin{split}\left( \frac{h_{bbl}}{h_f} \right)^2 + \frac{h_{bbl}}{h_N} = 1\end{split}
\end{equation*}
for the boundary layer depth \(h_{bbl}\) . Here
\begin{equation*}
\begin{split}h_f = \frac{C_n u_*}{f}\end{split}
\end{equation*}
is the rotation controlled boundary layer depth in the absence of stratification. \(u_*\) is the surface friction speed given by
\begin{equation*}
\begin{split}u_*^2 = C_d |U_{bbl}|^2\end{split}
\end{equation*}
and is a function of near bottom model flow.
\begin{equation*}
\begin{split}h_N = \frac{C_i u_*}{N} = \frac{ (C_i u_* )^2 }{g^\prime}\end{split}
\end{equation*}
is the stratification controlled boundary layer depth. The non\sphinxhyphen{}dimensional parameters \(C_n=0.5\) and \(C_i=20\) are suggested by Zilitinkevich and Mironov, 1996.

If a Richardson number dependent mixing scheme is being used, as indicated by \sphinxcode{\sphinxupquote{set\_visc\_cs.rino\_mix}}, then the boundary layer thickness is bounded to be no larger than a half of
, then the boundary layer thickness is bounded to be no larger than a half of \sphinxcode{\sphinxupquote{set\_visc\_cs.hbbl}} ..

\begin{sphinxadmonition}{note}{Todo}

Channel drag needs to be explained
\end{sphinxadmonition}

A BBL viscosity is calculated so that the no\sphinxhyphen{}slip boundary condition in the vertical viscosity solver implies the stress
\(\mathbf{\tau}_b\) .

\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:namespacemom-set-visc-1set-viscous-bbl-ref}}
Unexpected section title.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{References}
\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}
\end{sphinxVerbatim}

\begin{itemize}
\item {} 
Killworth, P. D., and N. R. Edwards, 1999: A Turbulent Bottom Boundary Layer Code for Use in Numerical Ocean Models. J. Phys. Oceanogr., 29, 1221\sphinxhyphen{}1238, {\color{red}\bfseries{}\textasciigrave{}doi:10.1175/1520\sphinxhyphen{}0485(1999)029\textless{}1221:ATBBLC\textgreater{}2.0.CO;2 \textless{}https://doi.org/10.1175/1520\sphinxhyphen{}0485(1999)029\textless{}1221:ATBBLC\textgreater{}2.0.CO;2\textgreater{}\textasciigrave{}\_}

\item {} 
Zilitinkevich, S., Mironov, D.V., 1996: A multi\sphinxhyphen{}limit formulation for the equilibrium depth of a stably stratified boundary layer. Boundary\sphinxhyphen{}Layer Meteorology 81, 325\sphinxhyphen{}351. \sphinxhref{https://doi.org/10.1007/BF02430334}{doi:10.1007/BF02430334}

\end{itemize}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs..

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities and related fields.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to set\_visc\_init.

\item {} 
\sphinxstylestrong{symmetrize} :: {[}in{]} If present and true, do extra calculations of those values in visc that would be calculated with symmetric memory.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_u_at_v}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_u\_at\_v}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_v_at_u}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_v\_at\_u}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_v\_at\_u() (fortran function in module mom\_set\_visc)@\spxentry{set\_v\_at\_u()}\spxextra{fortran function in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_v_at_u}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_v\_at\_u}}}{\emph{v}, \emph{h}, \emph{G}, \emph{i}, \emph{j}, \emph{k}, \emph{mask2dCv}, \emph{OBC}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine finds a thickness\sphinxhyphen{}weighted value of v at the u\sphinxhyphen{}points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index of the u\sphinxhyphen{}location to work on.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index of the u\sphinxhyphen{}location to work on.

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The k\sphinxhyphen{}index of the u\sphinxhyphen{}location to work on.

\item {} 
\sphinxstylestrong{mask2dcv} :: {[}in{]} A multiplicative mask of the v\sphinxhyphen{}points

\item {} 
\sphinxstylestrong{obc} :: A pointer to an open boundary condition structure

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The return value of v at u points points in the same units as u, i.e. {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or other units.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_bbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_viscous\_bbl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_viscous\_ml}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_u\_at\_v() (fortran function in module mom\_set\_visc)@\spxentry{set\_u\_at\_v()}\spxextra{fortran function in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_u_at_v}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_u\_at\_v}}}{\emph{u}, \emph{h}, \emph{G}, \emph{i}, \emph{j}, \emph{k}, \emph{mask2dCu}, \emph{OBC}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine finds a thickness\sphinxhyphen{}weighted value of u at the v\sphinxhyphen{}points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or other units.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{i} :: {[}in{]} The i\sphinxhyphen{}index of the u\sphinxhyphen{}location to work on.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index of the u\sphinxhyphen{}location to work on.

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The k\sphinxhyphen{}index of the u\sphinxhyphen{}location to work on.

\item {} 
\sphinxstylestrong{mask2dcu} :: {[}in{]} A multiplicative mask of the u\sphinxhyphen{}points

\item {} 
\sphinxstylestrong{obc} :: A pointer to an open boundary condition structure

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The return value of u at v points in the same units as u, i.e. {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} or other units.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_bbl}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_viscous\_bbl}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_viscous\_ml}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_viscous\_ml() (fortran subroutine in module mom\_set\_visc)@\spxentry{set\_viscous\_ml()}\spxextra{fortran subroutine in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_viscous_ml}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_viscous\_ml}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{forces}, \emph{visc}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{symmetrize}}{}
Calculates the thickness of the surface boundary layer for applying an elevated viscosity.

A bulk Richardson criterion or the thickness of the topmost NKML layers (with a bulk mixed layer) are currently used. The thicknesses are given in terms of fractional layers, so that this thickness will move as the thickness of the topmost layers change.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities and related fields.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to set\_visc\_init.

\item {} 
\sphinxstylestrong{symmetrize} :: {[}in{]} If present and true, do extra calculations of those values in visc that would be calculated with symmetric memory.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_u_at_v}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_u\_at\_v}}}}} {\hyperref[\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_v_at_u}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_v\_at\_u}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_visc\_register\_restarts() (fortran subroutine in module mom\_set\_visc)@\spxentry{set\_visc\_register\_restarts()}\spxextra{fortran subroutine in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_register_restarts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_visc\_register\_restarts}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{visc}, \emph{restart\_CS}}{}
Register any fields associated with the vertvisc\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities and related fields. Allocated here.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_conv:f/mom_cvmix_conv/cvmix_conv_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_conv::cvmix\_conv\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_shear:f/mom_cvmix_shear/cvmix_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_shear::cvmix\_shear\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_at_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_at\_vertex}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_is\_used}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_visc\_init() (fortran subroutine in module mom\_set\_visc)@\spxentry{set\_visc\_init()}\spxextra{fortran subroutine in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_visc\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{visc}, \emph{CS}, \emph{restart\_CS}, \emph{OBC}}{}
Initializes the MOM\_set\_visc control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities and related fields. Allocated here.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\item {} 
\sphinxstylestrong{obc} :: A pointer to an open boundary condition structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_cvmix_ddiff:f/mom_cvmix_ddiff/cvmix_ddiff_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_ddiff::cvmix\_ddiff\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_at_vertex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_at\_vertex}}}}} {\hyperref[\detokenize{api/generated/modules/mom_kappa_shear:f/mom_kappa_shear/kappa_shear_is_used}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_kappa\_shear::kappa\_shear\_is\_used}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/register_restart_field_as_obsolete}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::register\_restart\_field\_as\_obsolete}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_visc\_end() (fortran subroutine in module mom\_set\_visc)@\spxentry{set\_visc\_end()}\spxextra{fortran subroutine in module mom\_set\_visc}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_set_visc:f/mom_set_visc/set_visc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_set\_visc/}}\sphinxbfcode{\sphinxupquote{set\_visc\_end}}}{\emph{visc}, \emph{CS}}{}
This subroutine dellocates any memory in the set\_visc control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} A structure containing vertical viscosities and related fields. Elements are deallocated here.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to set\_visc\_init.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_shared\_initialization module reference}
\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization}}\label{\detokenize{api/generated/modules/mom_shared_initialization:mom-shared-initialization-module-reference}}\label{\detokenize{api/generated/modules/mom_shared_initialization::doc}}\index{mom\_shared\_initialization (module)@\spxentry{mom\_shared\_initialization}\spxextra{module}|spxpagem}
Code that initializes fixed aspects of the model grid, such as horizontal grid metrics, topography and Coriolis, and can be shared between components.

{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:detamom-shared-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_shared_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_shared_init_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_init\_init()}}}}}
&
MOM\_shared\_init\_init just writes the code version.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_initialize_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_rotation()}}}}}
&
MOM\_initialize\_rotation makes the appropriate call to set up the Coriolis parameter.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_calculate_grad_coriolis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_calculate\_grad\_coriolis()}}}}}
&
Calculates the components of grad f (Coriolis parameter)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/diagnosemaximumdepth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{diagnosemaximumdepth()}}}}}
&
Return the global maximum ocean bottom depth in the same units as the input depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_topography\_from\_file()}}}}}
&
Read gridded depths from file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/apply_topography_edits_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_topography\_edits\_from\_file()}}}}}
&
Applies a list of topography overrides read from a netcdf file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_named}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_topography\_named()}}}}}
&
initialize the bathymetry based on one of several named idealized configurations
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/limit_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{limit\_topography()}}}}}
&
limit\_topography ensures that min\_depth \textless{} D(x,y) \textless{} max\_depth
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_planetary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_rotation\_planetary()}}}}}
&
This subroutine sets up the Coriolis parameter for a sphere.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_beta_plane}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_rotation\_beta\_plane()}}}}}
&
This subroutine sets up the Coriolis parameter for a beta\sphinxhyphen{}plane or f\sphinxhyphen{}plane.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_grid_rotation_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_grid\_rotation\_angle()}}}}}
&
initialize\_grid\_rotation\_angle initializes the arrays with the sine and cosine of the angle between logical north on the grid and true north.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/modulo_around_point}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{modulo\_around\_point()}}}}}
&
Return the modulo value of x in an interval {[}xc\sphinxhyphen{}(Lx/2) xc+(Lx/2){]} If Lx\textless{}=0, then it returns x without applying modulo arithmetic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_named}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reset\_face\_lengths\_named()}}}}}
&
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths based on a named set of sizes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reset\_face\_lengths\_file()}}}}}
&
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a arrays read from a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reset\_face\_lengths\_list()}}}}}
&
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a list read from a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/read_face_length_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_face\_length\_list()}}}}}
&
This subroutine reads and counts the non\sphinxhyphen{}blank lines in the face length list file, after removing comments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_velocity_depth_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_velocity\_depth\_max()}}}}}
&
Set the bathymetry at velocity points to be the maximum of the depths at the neighoring tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_velocity_depth_min}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_velocity\_depth\_min()}}}}}
&
Set the bathymetry at velocity points to be the minimum of the depths at the neighoring tracer points.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/compute_global_grid_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{compute\_global\_grid\_integrals()}}}}}
&
Pre\sphinxhyphen{}compute global integrals of grid quantities (like masked ocean area) for later use in reporting diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/write_ocean_geometry_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_ocean\_geometry\_file()}}}}}
&
Write out a file describing the topography, Coriolis parameter, grid locations and various other fixed fields from the grid.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_shared_initialization:detailed-description}}\label{\detokenize{api/generated/modules/mom_shared_initialization:detamom-shared-initialization}}
Code that initializes fixed aspects of the model grid, such as horizontal grid metrics, topography and Coriolis, and can be shared between components.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_shared_initialization:function-subroutine-documentation}}\index{mom\_shared\_init\_init() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{mom\_shared\_init\_init()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_shared_init_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_shared\_init\_init}}}{\emph{PF}}{}
MOM\_shared\_init\_init just writes the code version.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_initialize\_rotation() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{mom\_initialize\_rotation()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_initialize_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_initialize\_rotation}}}{\emph{f}, \emph{G}, \emph{PF}, \emph{US}}{}
MOM\_initialize\_rotation makes the appropriate call to set up the Coriolis parameter.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{f} :: {[}out{]} The Coriolis parameter {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_beta_plane}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_rotation\_beta\_plane}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_planetary}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_rotation\_planetary}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_calculate\_grad\_coriolis() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{mom\_calculate\_grad\_coriolis()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_calculate_grad_coriolis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_calculate\_grad\_coriolis}}}{\emph{dF\_dx}, \emph{dF\_dy}, \emph{G}, \emph{US}}{}
Calculates the components of grad f (Coriolis parameter)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{df\_dx} :: {[}out{]} x\sphinxhyphen{}component of grad f {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{df\_dy} :: {[}out{]} y\sphinxhyphen{}component of grad f {[}T\sphinxhyphen{}1 L\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{diagnosemaximumdepth() (fortran function in module mom\_shared\_initialization)@\spxentry{diagnosemaximumdepth()}\spxextra{fortran function in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/diagnosemaximumdepth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{diagnosemaximumdepth}}}{\emph{D}, \emph{G}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the global maximum ocean bottom depth in the same units as the input depth.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}in{]} Ocean bottom depth in m or Z

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The global maximum ocean bottom depth in m or Z

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_topography\_from\_file() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{initialize\_topography\_from\_file()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_topography\_from\_file}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{US}}{}
Read gridded depths from file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/apply_topography_edits_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_topography\_edits\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_topography\_edits\_from\_file() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{apply\_topography\_edits\_from\_file()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/apply_topography_edits_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{apply\_topography\_edits\_from\_file}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{US}}{}
Applies a list of topography overrides read from a netcdf file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}inout{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_topography\_from\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_topography\_named() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{initialize\_topography\_named()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_topography_named}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_topography\_named}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{topog\_config}, \emph{max\_depth}, \emph{US}}{}
initialize the bathymetry based on one of several named idealized configurations
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{topog\_config} :: {[}in{]} The name of an idealized topographic configuration

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum depth of model in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{limit\_topography() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{limit\_topography()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/limit_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{limit\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
limit\_topography ensures that min\_depth \textless{} D(x,y) \textless{} max\_depth
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}inout{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum depth of model in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_rotation\_planetary() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{set\_rotation\_planetary()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_planetary}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_rotation\_planetary}}}{\emph{f}, \emph{G}, \emph{param\_file}, \emph{US}}{}
This subroutine sets up the Coriolis parameter for a sphere.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{f} :: {[}out{]} Coriolis parameter (vertical component) {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_initialize_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_rotation}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_rotation\_beta\_plane() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{set\_rotation\_beta\_plane()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_rotation_beta_plane}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_rotation\_beta\_plane}}}{\emph{f}, \emph{G}, \emph{param\_file}, \emph{US}}{}
This subroutine sets up the Coriolis parameter for a beta\sphinxhyphen{}plane or f\sphinxhyphen{}plane.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{f} :: {[}out{]} Coriolis parameter (vertical component) {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/mom_initialize_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_rotation}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_grid\_rotation\_angle() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{initialize\_grid\_rotation\_angle()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_grid_rotation_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_grid\_rotation\_angle}}}{\emph{G}, \emph{PF}}{}
initialize\_grid\_rotation\_angle initializes the arrays with the sine and cosine of the angle between logical north on the grid and true north.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/modulo_around_point}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{modulo\_around\_point}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{modulo\_around\_point() (fortran function in module mom\_shared\_initialization)@\spxentry{modulo\_around\_point()}\spxextra{fortran function in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/modulo_around_point}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{modulo\_around\_point}}}{\emph{x}, \emph{xc}, \emph{Lx}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the modulo value of x in an interval {[}xc\sphinxhyphen{}(Lx/2) xc+(Lx/2){]} If Lx\textless{}=0, then it returns x without applying modulo arithmetic.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} Value to which to apply modulo arithmetic

\item {} 
\sphinxstylestrong{xc} :: {[}in{]} Center of modulo range

\item {} 
\sphinxstylestrong{lx} :: {[}in{]} Modulo range width

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: x shifted by an integer multiple of Lx to be close to xc.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/initialize_grid_rotation_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_grid\_rotation\_angle}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reset\_face\_lengths\_named() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{reset\_face\_lengths\_named()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_named}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{reset\_face\_lengths\_named}}}{\emph{G}, \emph{param\_file}, \emph{name}, \emph{US}}{}
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths based on a named set of sizes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name for the set of face lengths. Only “global\_1deg” is currently implemented.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{reset\_face\_lengths\_file() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{reset\_face\_lengths\_file()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{reset\_face\_lengths\_file}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a arrays read from a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{reset\_face\_lengths\_list() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{reset\_face\_lengths\_list()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{reset\_face\_lengths\_list}}}{\emph{G}, \emph{param\_file}, \emph{US}}{}
This subroutine sets the open face lengths at selected points to restrict passages to their observed widths from a list read from a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/read_face_length_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_face\_length\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_face\_length\_list() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{read\_face\_length\_list()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/read_face_length_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{read\_face\_length\_list}}}{\emph{iounit}, \emph{filename}, \emph{num\_lines}, \emph{lines}}{}
This subroutine reads and counts the non\sphinxhyphen{}blank lines in the face length list file, after removing comments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iounit} :: {[}in{]} An open I/O unit number for the file

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the face\sphinxhyphen{}length file to read

\item {} 
\sphinxstylestrong{num\_lines} :: {[}out{]} The number of non\sphinxhyphen{}blank lines in the file

\item {} 
\sphinxstylestrong{lines} :: The non\sphinxhyphen{}blank lines, after removing comments

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reset\_face\_lengths\_list}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_velocity\_depth\_max() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{set\_velocity\_depth\_max()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_velocity_depth_max}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_velocity\_depth\_max}}}{\emph{G}}{}
Set the bathymetry at velocity points to be the maximum of the depths at the neighoring tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_velocity\_depth\_min() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{set\_velocity\_depth\_min()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/set_velocity_depth_min}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_velocity\_depth\_min}}}{\emph{G}}{}
Set the bathymetry at velocity points to be the minimum of the depths at the neighoring tracer points.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\end{description}\end{quote}

\end{fulllineitems}

\index{compute\_global\_grid\_integrals() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{compute\_global\_grid\_integrals()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/compute_global_grid_integrals}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{compute\_global\_grid\_integrals}}}{\emph{G}, \emph{US}}{}
Pre\sphinxhyphen{}compute global integrals of grid quantities (like masked ocean area) for later use in reporting diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_ocean\_geometry\_file() (fortran subroutine in module mom\_shared\_initialization)@\spxentry{write\_ocean\_geometry\_file()}\spxextra{fortran subroutine in module mom\_shared\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/write_ocean_geometry_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_shared\_initialization/}}\sphinxbfcode{\sphinxupquote{write\_ocean\_geometry\_file}}}{\emph{G}, \emph{param\_file}, \emph{directory}, \emph{geom\_file}, \emph{US}}{}
Write out a file describing the topography, Coriolis parameter, grid locations and various other fixed fields from the grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The dynamic horizontal grid

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory into which to place the geometry file.

\item {} 
\sphinxstylestrong{geom\_file} :: {[}in{]} If present, the name of the geometry file (otherwise the file is “ocean\_geometry”)

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_fixed}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_spatial\_means module reference}
\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means}}\label{\detokenize{api/generated/modules/mom_spatial_means:mom-spatial-means-module-reference}}\label{\detokenize{api/generated/modules/mom_spatial_means::doc}}\index{mom\_spatial\_means (module)@\spxentry{mom\_spatial\_means}\spxextra{module}|spxpagem}
Functions and routines to take area, volume, mass\sphinxhyphen{}weighted, layerwise, zonal or meridional means.

{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:detamom-spatial-means}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_spatial_means:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_area\_mean()}}}}}
&
Return the global area mean of a variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_integral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_area\_integral()}}}}}
&
Return the global area integral of a variable, by default using the masked area from the grid, but an alternate could be used instead.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_layer_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_layer\_mean()}}}}}
&
Return the layerwise global thickness\sphinxhyphen{}weighted mean of a variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_volume_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_volume\_mean()}}}}}
&
Find the global thickness\sphinxhyphen{}weighted mean of a variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_mass_integral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_mass\_integral()}}}}}
&
Find the global mass\sphinxhyphen{}weighted integral of a variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_i_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_i\_mean()}}}}}
&
Determine the global mean of a field along rows of constant i, returning it in a 1\sphinxhyphen{}d array using the local indexing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_j_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{global\_j\_mean()}}}}}
&
Determine the global mean of a field along rows of constant j, returning it in a 1\sphinxhyphen{}d array using the local indexing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/adjust_area_mean_to_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjust\_area\_mean\_to\_zero()}}}}}
&
Adjust 2d array such that area mean is zero without moving the zero contour.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_spatial_means:detailed-description}}\label{\detokenize{api/generated/modules/mom_spatial_means:detamom-spatial-means}}
Functions and routines to take area, volume, mass\sphinxhyphen{}weighted, layerwise, zonal or meridional means.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_spatial_means:function-subroutine-documentation}}\index{global\_area\_mean() (fortran function in module mom\_spatial\_means)@\spxentry{global\_area\_mean()}\spxextra{fortran function in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_mean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_area\_mean}}}{\emph{var}, \emph{G}, \emph{scale}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the global area mean of a variable. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The variable to average

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the variable

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::forcing\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_surface\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/sum_en}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::sum\_en}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{global\_area\_integral() (fortran function in module mom\_spatial\_means)@\spxentry{global\_area\_integral()}\spxextra{fortran function in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_area_integral}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_area\_integral}}}{\emph{var}, \emph{G}, \emph{scale}, \emph{area}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the global area integral of a variable, by default using the masked area from the grid, but an alternate could be used instead. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The variable to integrate

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the variable

\item {} 
\sphinxstylestrong{area} :: {[}in{]} The alternate area to use, including any required masking {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The returned area integral, usually in the units of var times {[}m2{]}.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::forcing\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_surface_thermo_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::post\_surface\_thermo\_diags}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{global\_layer\_mean() (fortran function in module mom\_spatial\_means)@\spxentry{global\_layer\_mean()}\spxextra{fortran function in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_layer_mean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_layer\_mean}}}{\emph{var}, \emph{h}, \emph{G}, \emph{GV}, \emph{scale}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Return the layerwise global thickness\sphinxhyphen{}weighted mean of a variable. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The variable to average

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the variable

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{global\_volume\_mean() (fortran function in module mom\_spatial\_means)@\spxentry{global\_volume\_mean()}\spxextra{fortran function in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_volume_mean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_volume\_mean}}}{\emph{var}, \emph{h}, \emph{G}, \emph{GV}, \emph{scale}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Find the global thickness\sphinxhyphen{}weighted mean of a variable. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The variable being averaged

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the variable

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The thickness\sphinxhyphen{}weighted average of var

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_diagnostic\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{global\_mass\_integral() (fortran function in module mom\_spatial\_means)@\spxentry{global\_mass\_integral()}\spxextra{fortran function in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_mass_integral}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_mass\_integral}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{var}, \emph{on\_PE\_only}, \emph{scale}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Find the global mass\sphinxhyphen{}weighted integral of a variable. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{var} :: {[}in{]} The variable being integrated

\item {} 
\sphinxstylestrong{on\_pe\_only} :: {[}in{]} If present and true, the sum is only done on the local PE, and it is \sphinxstyleemphasis{not} order invariant.

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the variable

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The mass\sphinxhyphen{}weighted integral of var (or 1) in kg times the units of var

\end{description}\end{quote}

\end{fulllineitems}

\index{global\_i\_mean() (fortran subroutine in module mom\_spatial\_means)@\spxentry{global\_i\_mean()}\spxextra{fortran subroutine in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_i_mean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_i\_mean}}}{\emph{array}, \emph{i\_mean}, \emph{G}, \emph{mask}, \emph{scale}, \emph{tmp\_scale}}{}
Determine the global mean of a field along rows of constant i, returning it in a 1\sphinxhyphen{}d array using the local indexing. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}in{]} The variable being averaged

\item {} 
\sphinxstylestrong{i\_mean} :: {[}out{]} Global mean of array along its i\sphinxhyphen{}axis

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} An array used for weighting the i\sphinxhyphen{}mean

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the output variable

\item {} 
\sphinxstylestrong{tmp\_scale} :: {[}in{]} A rescaling factor for the internal calculations that is removed from the output

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/query_efp_overflow_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::query\_efp\_overflow\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reset_efp_overflow_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reset\_efp\_overflow\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/apply_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::apply\_sponge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{global\_j\_mean() (fortran subroutine in module mom\_spatial\_means)@\spxentry{global\_j\_mean()}\spxextra{fortran subroutine in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_j_mean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{global\_j\_mean}}}{\emph{array}, \emph{j\_mean}, \emph{G}, \emph{mask}, \emph{scale}, \emph{tmp\_scale}}{}
Determine the global mean of a field along rows of constant j, returning it in a 1\sphinxhyphen{}d array using the local indexing. This uses reproducing sums.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}in{]} The variable being averaged

\item {} 
\sphinxstylestrong{j\_mean} :: {[}out{]} Global mean of array along its j\sphinxhyphen{}axis

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} An array used for weighting the j\sphinxhyphen{}mean

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A rescaling factor for the output variable

\item {} 
\sphinxstylestrong{tmp\_scale} :: {[}in{]} A rescaling factor for the internal calculations that is removed from the output

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/query_efp_overflow_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::query\_efp\_overflow\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coms:f/mom_coms/reset_efp_overflow_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coms::reset\_efp\_overflow\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjust\_area\_mean\_to\_zero() (fortran subroutine in module mom\_spatial\_means)@\spxentry{adjust\_area\_mean\_to\_zero()}\spxextra{fortran subroutine in module mom\_spatial\_means}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/adjust_area_mean_to_zero}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_spatial\_means/}}\sphinxbfcode{\sphinxupquote{adjust\_area\_mean\_to\_zero}}}{\emph{array}, \emph{G}, \emph{scaling}, \emph{unit\_scale}}{}
Adjust 2d array such that area mean is zero without moving the zero contour.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{array} :: {[}inout{]} 2D array to be adjusted

\item {} 
\sphinxstylestrong{scaling} :: {[}out{]} The scaling factor used

\item {} 
\sphinxstylestrong{unit\_scale} :: {[}in{]} A rescaling factor for the variable

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::convert\_iob\_to\_fluxes}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_sponge module reference}
\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge}}\label{\detokenize{api/generated/modules/mom_sponge:mom-sponge-module-reference}}\label{\detokenize{api/generated/modules/mom_sponge::doc}}\index{mom\_sponge (module)@\spxentry{mom\_sponge}\spxextra{module}|spxpagem}
Implements sponge regions in isopycnal mode.

{\hyperref[\detokenize{api/generated/modules/mom_sponge:detamom-sponge}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_sponge:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/p2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p2d}}}}}
&
A structure for creating arrays of pointers to 2D arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/p3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3d}}}}}
&
A structure for creating arrays of pointers to 3D arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/sponge_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sponge\_cs}}}}}
&
This control structure holds memory and parameters for the MOM\_sponge module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_sponge:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_sponge()}}}}}
&
This subroutine determines the number of points which are within sponges in this computational domain.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/init_sponge_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{init\_sponge\_diags()}}}}}
&
This subroutine sets up diagnostics for the sponges.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_sponge\_field()}}}}}
&
This subroutine stores the reference profile for the variable whose address is given by f\_ptr.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_ml_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_up\_sponge\_ml\_density()}}}}}
&
This subroutine stores the reference value for mixed layer density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/apply_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_sponge()}}}}}
&
This subroutine applies damping to the layers thicknesses, mixed layer buoyancy, and a variety of tracers for every column where there is damping.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/sponge_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sponge\_end()}}}}}
&
This call deallocates any memory in the sponge control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_sponge:detailed-description}}\label{\detokenize{api/generated/modules/mom_sponge:detamom-sponge}}
By Robert Hallberg, March 1999\sphinxhyphen{}June 2000.

This program contains the subroutines that implement sponge regions, in which the stratification and water mass properties are damped toward some profiles. There are three externally callable subroutines in this file.

initialize\_sponge determines the mapping from the model variables into the arrays of damped columns. This remapping is done for efficiency and to conserve memory. Only columns which have positive inverse damping times and which are deeper than a supplied depth are placed in sponges. The inverse damping time is also stored in this subroutine, and memory is allocated for all of the reference profiles which will subsequently be provided through calls to set\_up\_sponge\_field. The first two arguments are a two\sphinxhyphen{}dimensional array containing the damping rates, and the interface heights to damp towards.

set\_up\_sponge\_field is called to provide a reference profile and the location of the field that will be damped back toward that reference profile. A third argument, the number of layers in the field is also provided, but this should always be nz.

Apply\_sponge damps all of the fields that have been registered with set\_up\_sponge\_field toward their reference profiles. The four arguments are the thickness to be damped, the amount of time over which the damping occurs, and arrays to which the movement of fluid into a layer from above and below will be added. The effect on momentum of the sponge may be accounted for later using the movement of water recorded in these later arrays.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_sponge:type-documentation}}\index{p2d (fortran type in module mom\_sponge)@\spxentry{p2d}\spxextra{fortran type in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/p2d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{p2d}}}
A structure for creating arrays of pointers to 2D arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a 2D array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p3d (fortran type in module mom\_sponge)@\spxentry{p3d}\spxextra{fortran type in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/p3d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{p3d}}}
A structure for creating arrays of pointers to 3D arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a 3D array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{sponge\_cs (fortran type in module mom\_sponge)@\spxentry{sponge\_cs}\spxextra{fortran type in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/sponge_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{sponge\_cs}}}
This control structure holds memory and parameters for the MOM\_sponge module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bulkmixedlayer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, a refined bulk mixed layer is used with nkml sublayers and nkbl buffer layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The total number of layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting i\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending i\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting j\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending j\sphinxhyphen{}index of the computational domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting i\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ied}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending i\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jsd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The starting j\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The ending j\sphinxhyphen{}index of the data domain at h.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_col}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of sponge points within the computational domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fldno}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of fields which have already been registered by calls to set\_up\_sponge\_field.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the i\sphinxhyphen{}indicies of each of the columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{col\_j}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Array of the j\sphinxhyphen{}indicies of each of the columns being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iresttime\_col}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The inverse restoring time of each column {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rcv\_ml\_ref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The value toward which the mixed layer coordinate\sphinxhyphen{}density is being damped {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_eta}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The value toward which the interface heights are being damped {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p3d )(50)}\sphinxstyleemphasis{{]}} :: Pointers to the fields that are being damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )(50)}\sphinxstyleemphasis{{]}} :: The values to which the fields are damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_i\_mean\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply sponges to the i\sphinxhyphen{}mean fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{iresttime\_im}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The inverse restoring time of each row for i\sphinxhyphen{}mean sponges {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rcv\_ml\_ref\_im}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mixed layer coordinate\sphinxhyphen{}density is being damped {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_eta\_im}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The value toward which the i\sphinxhyphen{}mean interface heights are being damped {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ref\_val\_im}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( p2d )(50)}\sphinxstyleemphasis{{]}} :: The values toward which the i\sphinxhyphen{}means of fields are damped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_w\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A diagnostic ID.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_sponge:function-subroutine-documentation}}\index{initialize\_sponge() (fortran subroutine in module mom\_sponge)@\spxentry{initialize\_sponge()}\spxextra{fortran subroutine in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{initialize\_sponge}}}{\emph{Iresttime}, \emph{int\_height}, \emph{G}, \emph{param\_file}, \emph{CS}, \emph{GV}, \emph{Iresttime\_i\_mean}, \emph{int\_height\_i\_mean}}{}
This subroutine determines the number of points which are within sponges in this computational domain. Only points that have positive values of Iresttime and which mask2dT indicates are ocean points are included in the sponges. It also stores the target interface heights.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{iresttime} :: {[}in{]} The inverse of the restoring time {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{int\_height} :: {[}in{]} The interface heights to damp back toward {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{iresttime\_i\_mean} :: {[}in{]} The inverse of the restoring time for

\item {} 
\sphinxstylestrong{int\_height\_i\_mean} :: {[}in{]} The interface heights toward which to

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_initialize_sponges_southonly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_initialization::bfb\_initialize\_sponges\_southonly}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_sponges_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::initialize\_sponges\_file}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialization::phillips\_initialize\_sponges}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{init\_sponge\_diags() (fortran subroutine in module mom\_sponge)@\spxentry{init\_sponge\_diags()}\spxextra{fortran subroutine in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/init_sponge_diags}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{init\_sponge\_diags}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{diag}, \emph{CS}}{}
This subroutine sets up diagnostics for the sponges. It is separate from initialize\_sponge because it requires fields that are not readily available where initialize\_sponge is called.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set by a previous call to initialize\_sponge.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_sponge\_field() (fortran subroutine in module mom\_sponge)@\spxentry{set\_up\_sponge\_field()}\spxextra{fortran subroutine in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{set\_up\_sponge\_field}}}{\emph{sp\_val}, \emph{f\_ptr}, \emph{G}, \emph{nlay}, \emph{CS}, \emph{sp\_val\_i\_mean}}{}
This subroutine stores the reference profile for the variable whose address is given by f\_ptr. nlay is the number of layers in this variable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{sp\_val} :: {[}in{]} The reference profiles of the quantity being registered.

\item {} 
\sphinxstylestrong{f\_ptr} :: {[}in{]} a pointer to the field which will be damped

\item {} 
\sphinxstylestrong{nlay} :: {[}in{]} the number of layers in this quantity

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set by a previous call to initialize\_sponge.

\item {} 
\sphinxstylestrong{sp\_val\_i\_mean} :: {[}in{]} The i\sphinxhyphen{}mean reference value for

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/initialize_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::initialize\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/initialize_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::initialize\_rgc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_initialize_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_initialize\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_up\_sponge\_ml\_density() (fortran subroutine in module mom\_sponge)@\spxentry{set\_up\_sponge\_ml\_density()}\spxextra{fortran subroutine in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_ml_density}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{set\_up\_sponge\_ml\_density}}}{\emph{sp\_val}, \emph{G}, \emph{CS}, \emph{sp\_val\_i\_mean}}{}
This subroutine stores the reference value for mixed layer density. It is handled differently from other values because it is only used in determining which layers can be inflated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{sp\_val} :: {[}in{]} The reference values of the mixed layer density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set by a previous call to initialize\_sponge.

\item {} 
\sphinxstylestrong{sp\_val\_i\_mean} :: {[}in{]} the reference values of the zonal mean mixed

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization/rgc_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_initialization::rgc\_initialize\_sponges}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_sponge() (fortran subroutine in module mom\_sponge)@\spxentry{apply\_sponge()}\spxextra{fortran subroutine in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/apply_sponge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{apply\_sponge}}}{\emph{h}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{ea}, \emph{eb}, \emph{CS}, \emph{Rcv\_ml}}{}
This subroutine applies damping to the layers thicknesses, mixed layer buoyancy, and a variety of tracers for every column where there is damping.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}inout{]} An array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}inout{]} An array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set by a previous call to initialize\_sponge.

\item {} 
\sphinxstylestrong{rcv\_ml} :: {[}inout{]} The coordinate density of the mixed layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/global_i_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::global\_i\_mean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sponge\_end() (fortran subroutine in module mom\_sponge)@\spxentry{sponge\_end()}\spxextra{fortran subroutine in module mom\_sponge}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/sponge_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sponge/}}\sphinxbfcode{\sphinxupquote{sponge\_end}}}{\emph{CS}}{}
This call deallocates any memory in the sponge control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer to the control structure for this module that is set by a previous call to initialize\_sponge.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_state\_initialization module reference}
\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization}}\label{\detokenize{api/generated/modules/mom_state_initialization:mom-state-initialization-module-reference}}\label{\detokenize{api/generated/modules/mom_state_initialization::doc}}\index{mom\_state\_initialization (module)@\spxentry{mom\_state\_initialization}\spxextra{module}|spxpagem}
Initialization functions for state variables, u, v, h, T and S.

{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:detamom-state-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_state_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state()}}}}}
&
Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_from\_file()}}}}}
&
Reads the layer thicknesses or interface heights from a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/adjustetatofitbathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustetatofitbathymetry()}}}}}
&
Adjust interface heights to fit the bathymetry and diagnose layer thickness.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_uniform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_uniform()}}}}}
&
Initializes thickness to be uniform.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_list()}}}}}
&
Initialize thickness from a 1D list.
\\
\hline
\sphinxcode{\sphinxupquote{initialize\_thickness\_search()}}
&
Search density space for location of layers (not implemented!)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/convert_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_thickness()}}}}}
&
Converts thickness from geometric to pressure units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/depress_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depress\_surface()}}}}}
&
Depress the sea\sphinxhyphen{}surface based on an initial condition file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/trim_for_ice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trim\_for\_ice()}}}}}
&
Adjust the layer thicknesses by cutting away the top of each model column at the depth where the hydrostatic pressure matches an imposed surface pressure read from file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/cut_off_column_top}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cut\_off\_column\_top()}}}}}
&
Adjust the layer thicknesses by removing the top of the water column above the depth where the hydrostatic pressure matches p\_surf.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_from\_file()}}}}}
&
Initialize horizontal velocity components from file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_zero()}}}}}
&
Initialize horizontal velocity components to zero.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_uniform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_uniform()}}}}}
&
Sets the initial velocity components to uniform.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_circular}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_circular()}}}}}
&
Sets the initial velocity components to be circular with no flow at edges of domain and center.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_from\_file()}}}}}
&
Initializes temperature and salinity from file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_from\_profile()}}}}}
&
Initializes temperature and salinity from a 1D profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_fit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_fit()}}}}}
&
Initializes temperature and salinity by fitting to density.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_linear()}}}}}
&
Initializes T and S with linear profiles according to reference surface layer salinity and temperature and a specified range.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_sponges_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_sponges\_file()}}}}}
&
This subroutine sets the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/set_velocity_depth_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_velocity\_depth\_max()}}}}}
&
This subroutine sets the 4 bottom depths at velocity points to be the maximum of the adjacent depths.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/compute_global_grid_integrals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{compute\_global\_grid\_integrals()}}}}}
&
Subroutine to pre\sphinxhyphen{}compute global integrals of grid quantities for later use in reporting diagnostics.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/set_velocity_depth_min}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_velocity\_depth\_min()}}}}}
&
This subroutine sets the 4 bottom depths at velocity points to be the minimum of the adjacent depths.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_temp\_salt\_initialize\_from\_z()}}}}}
&
This subroutine determines the isopycnal or other coordinate interfaces and layer potential temperatures and salinities directly from a z\sphinxhyphen{}space file on a latitude\sphinxhyphen{}longitude grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/find_interfaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_interfaces()}}}}}
&
Find interface positions corresponding to interpolated depths in a density profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_state_init_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_init\_tests()}}}}}
&
Run simple unit tests.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_state_initialization:detailed-description}}\label{\detokenize{api/generated/modules/mom_state_initialization:detamom-state-initialization}}
Initialization functions for state variables, u, v, h, T and S.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_state_initialization:function-subroutine-documentation}}\index{mom\_initialize\_state() (fortran subroutine in module mom\_state\_initialization)@\spxentry{mom\_initialize\_state()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_initialize\_state}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{PF}, \emph{dirs}, \emph{restart\_CS}, \emph{ALE\_CSp}, \emph{tracer\_Reg}, \emph{sponge\_CSp}, \emph{ALE\_sponge\_CSp}, \emph{OBC}, \emph{Time\_in}}{}
Initialize temporally evolving fields, either as initial conditions or by reading them from a restart (or saves) file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}out{]} The zonal velocity that is being

\item {} 
\sphinxstylestrong{v} :: {[}out{]} The meridional velocity that is being

\item {} 
\sphinxstylestrong{h} :: {[}out{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{time} :: {[}inout{]} Time at the start of the run segment.

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} A structure containing several relevant directory paths.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\item {} 
\sphinxstylestrong{ale\_csp} :: The ALE control structure for remapping

\item {} 
\sphinxstylestrong{tracer\_reg} :: A pointer to the tracer registry

\item {} 
\sphinxstylestrong{sponge\_csp} :: The layerwise sponge control structure.

\item {} 
\sphinxstylestrong{ale\_sponge\_csp} :: The ALE sponge control structure.

\item {} 
\sphinxstylestrong{obc} :: The open boundary condition control structure.

\item {} 
\sphinxstylestrong{time\_in} :: {[}in{]} Time at the start of the run segment. Time\_in overrides any value set for Time.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/adjustment_initialization:f/adjustment_initialization/adjustment_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustment\_initialization::adjustment\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/baroclinic_zone_initialization:f/baroclinic_zone_initialization/baroclinic_zone_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{baroclinic\_zone\_initialization::baroclinic\_zone\_init\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/benchmark_initialization:f/benchmark_initialization/benchmark_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{benchmark\_initialization::benchmark\_init\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/bfb_initialization:f/bfb_initialization/bfb_initialize_sponges_southonly}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_initialization::bfb\_initialize\_sponges\_southonly}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/circle_obcs_initialization:f/circle_obcs_initialization/circle_obcs_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circle\_obcs\_initialization::circle\_obcs\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/convert_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/dense_water_initialization:f/dense_water_initialization/dense_water_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dense\_water\_initialization::dense\_water\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/depress_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depress\_surface}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/determine_is_new_run}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::determine\_is\_new\_run}}}}} {\hyperref[\detokenize{api/generated/modules/dome2d_initialization:f/dome2d_initialization/dome2d_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome2d\_initialization::dome2d\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dumbbell_initialization:f/dumbbell_initialization/dumbbell_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_initialization::dumbbell\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_channel_initialization:f/dyed_channel_initialization/dyed_channel_set_obc_tracer_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_channel\_initialization::dyed\_channel\_set\_obc\_tracer\_data}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obcs_initialization:f/dyed_obcs_initialization/dyed_obcs_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obcs\_initialization::dyed\_obcs\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/external_gwave_initialization:f/external_gwave_initialization/external_gwave_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{external\_gwave\_initialization::external\_gwave\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_sponges_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_sponges\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_fit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_fit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_from\_profile}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_temp\_salt\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_list}}}}} \sphinxcode{\sphinxupquote{initialize\_thickness\_search}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_uniform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_uniform}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_circular}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_circular}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_uniform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_uniform}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_velocity\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_initialization:f/isomip_initialization/isomip_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_initialization::isomip\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/lock_exchange_initialization:f/lock_exchange_initialization/lock_exchange_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lock\_exchange\_initialization::lock\_exchange\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_temp\_salt\_initialize\_from\_z}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialization::neverworld\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialization::phillips\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization/rgc_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_initialization::rgc\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization::rossby\_front\_initialize\_velocity}}}}} {\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_ts_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests::scm\_cvmix\_tests\_ts\_init}}}}} {\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialization::seamount\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sloshing\_initialization::sloshing\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization/soliton_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{soliton\_initialization::soliton\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/supercritical_initialization:f/supercritical_initialization/supercritical_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{supercritical\_initialization::supercritical\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/trim_for_ice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trim\_for\_ice}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/update_obc_segment_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::update\_obc\_segment\_data}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialization::user\_initialize\_sponges}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_thickness\_from\_file() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_thickness\_from\_file()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_thickness\_from\_file}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{file\_has\_thickness}, \emph{just\_read\_params}}{}
Reads the layer thicknesses or interface heights from a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{file\_has\_thickness} :: {[}in{]} If true, this file contains layer thicknesses; otherwise it contains interface heights.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/adjustetatofitbathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustetatofitbathymetry}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{adjustetatofitbathymetry() (fortran subroutine in module mom\_state\_initialization)@\spxentry{adjustetatofitbathymetry()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/adjustetatofitbathymetry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{adjustetatofitbathymetry}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{eta}, \emph{h}}{}
Adjust interface heights to fit the bathymetry and diagnose layer thickness.

If the bottom most interface is below the topography then the bottom\sphinxhyphen{}most layers are contracted to GVAngstrom\_m. If the bottom most interface is above the topography then the entire column is dilated (expanded) to fill the void.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{eta} :: {[}inout{]} Interface heights {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_thickness\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_temp\_salt\_initialize\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_thickness\_uniform() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_thickness\_uniform()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_uniform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_thickness\_uniform}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes thickness to be uniform.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_thickness\_list() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_thickness\_list()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_thickness\_list}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialize thickness from a 1D list.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_thickness\_searchNone() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_thickness\_searchNone()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_thickness_searchNone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_thickness\_searchNone}}}{}{}
Search density space for location of layers (not implemented!)
\begin{quote}\begin{description}
\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convert\_thickness() (fortran subroutine in module mom\_state\_initialization)@\spxentry{convert\_thickness()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/convert_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{convert\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{tv}}{}
Converts thickness from geometric to pressure units.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Input geometric layer thicknesses being converted

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{depress\_surface() (fortran subroutine in module mom\_state\_initialization)@\spxentry{depress\_surface()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/depress_surface}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{depress\_surface}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{tv}, \emph{just\_read\_params}}{}
Depress the sea\sphinxhyphen{}surface based on an initial condition file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{trim\_for\_ice() (fortran subroutine in module mom\_state\_initialization)@\spxentry{trim\_for\_ice()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/trim_for_ice}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{trim\_for\_ice}}}{\emph{PF}, \emph{G}, \emph{GV}, \emph{US}, \emph{ALE\_CSp}, \emph{tv}, \emph{h}, \emph{just\_read\_params}}{}
Adjust the layer thicknesses by cutting away the top of each model column at the depth where the hydrostatic pressure matches an imposed surface pressure read from file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{pf} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ale\_csp} :: ALE control structure

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/cut_off_column_top}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cut\_off\_column\_top}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_plm\_edge\_values}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cut\_off\_column\_top() (fortran subroutine in module mom\_state\_initialization)@\spxentry{cut\_off\_column\_top()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/cut_off_column_top}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{cut\_off\_column\_top}}}{\emph{nk}, \emph{tv}, \emph{GV}, \emph{US}, \emph{G\_earth}, \emph{depth}, \emph{min\_thickness}, \emph{T}, \emph{T\_t}, \emph{T\_b}, \emph{S}, \emph{S\_t}, \emph{S\_b}, \emph{p\_surf}, \emph{h}, \emph{remap\_CS}, \emph{z\_tol}, \emph{remap\_answers\_2018}}{}
Adjust the layer thicknesses by removing the top of the water column above the depth where the hydrostatic pressure matches p\_surf.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{g\_earth} :: {[}in{]} Gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} Depth of ocean column {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{min\_thickness} :: {[}in{]} Smallest thickness allowed {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{t} :: {[}inout{]} Layer mean temperature {[}degC{]}

\item {} 
\sphinxstylestrong{t\_t} :: {[}in{]} Temperature at top of layer {[}degC{]}

\item {} 
\sphinxstylestrong{t\_b} :: {[}in{]} Temperature at bottom of layer {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}inout{]} Layer mean salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_t} :: {[}in{]} Salinity at top of layer {[}ppt{]}

\item {} 
\sphinxstylestrong{s\_b} :: {[}in{]} Salinity at bottom of layer {[}ppt{]}

\item {} 
\sphinxstylestrong{p\_surf} :: {[}in{]} Imposed pressure on ocean at surface {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{remap\_cs} :: Remapping structure for remapping T and S, if associated

\item {} 
\sphinxstylestrong{z\_tol} :: {[}in{]} The tolerance with which to find the depth matching the specified pressure {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{remap\_answers\_2018} :: {[}in{]} If true, use the order of arithmetic and expressions that recover the answers for remapping from the end of 2018. Otherwise, use more robust forms of the same expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/find_depth_of_pressure_in_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::find\_depth\_of\_pressure\_in\_cell}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_state_init_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_init\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/trim_for_ice}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trim\_for\_ice}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_velocity\_from\_file() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_velocity\_from\_file()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_velocity\_from\_file}}}{\emph{u}, \emph{v}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialize horizontal velocity components from file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} The zonal velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} The meridional velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for modelparameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_velocity\_zero() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_velocity\_zero()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_zero}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_velocity\_zero}}}{\emph{u}, \emph{v}, \emph{G}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialize horizontal velocity components to zero.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} The zonal velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} The meridional velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for modelparameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_velocity\_uniform() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_velocity\_uniform()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_uniform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_velocity\_uniform}}}{\emph{u}, \emph{v}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Sets the initial velocity components to uniform.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} The zonal velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} The meridional velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for modelparameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_velocity\_circular() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_velocity\_circular()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_velocity_circular}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_velocity\_circular}}}{\emph{u}, \emph{v}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Sets the initial velocity components to be circular with no flow at edges of domain and center.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} The zonal velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} The meridional velocity that is being initialized {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{my\_psi}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_temp\_salt\_from\_file() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_temp\_salt\_from\_file()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_temp\_salt\_from\_file}}}{\emph{T}, \emph{S}, \emph{G}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes temperature and salinity from file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} The potential temperature that is being initialized {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} The salinity that is being initialized {[}ppt{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_temp\_salt\_from\_profile() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_temp\_salt\_from\_profile()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_from_profile}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_temp\_salt\_from\_profile}}}{\emph{T}, \emph{S}, \emph{G}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes temperature and salinity from a 1D profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} The potential temperature that is being initialized {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} The salinity that is being initialized {[}ppt{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_temp\_salt\_fit() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_temp\_salt\_fit()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_fit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_temp\_salt\_fit}}}{\emph{T}, \emph{S}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_Ref}, \emph{just\_read\_params}}{}
Initializes temperature and salinity by fitting to density.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} The potential temperature that is being initialized {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}out{]} The salinity that is being initialized {[}ppt{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_temp\_salt\_linear() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_temp\_salt\_linear()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_temp_salt_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_temp\_salt\_linear}}}{\emph{T}, \emph{S}, \emph{G}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes T and S with linear profiles according to reference surface layer salinity and temperature and a specified range.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} The potential temperature that is being initialized {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} The salinity that is being initialized {[}ppt{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_sponges\_file() (fortran subroutine in module mom\_state\_initialization)@\spxentry{initialize\_sponges\_file()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/initialize_sponges_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{initialize\_sponges\_file}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{use\_temperature}, \emph{tv}, \emph{param\_file}, \emph{Layer\_CSp}, \emph{ALE\_CSp}, \emph{Time}}{}
This subroutine sets the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge. The interface height is always subject to damping, and must always be the first registered field.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{use\_temperature} :: {[}in{]} If true, T \& S are state variables.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{layer\_csp} :: A pointer that is set to point to the control structure for this module (in layered mode).

\item {} 
\sphinxstylestrong{ale\_csp} :: A pointer that is set to point to the control structure for this module (in ALE mode).

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Time at the start of the run segment. Time\_in overrides any value set for Time.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_velocity\_depth\_max() (fortran subroutine in module mom\_state\_initialization)@\spxentry{set\_velocity\_depth\_max()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/set_velocity_depth_max}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_velocity\_depth\_max}}}{\emph{G}}{}
This subroutine sets the 4 bottom depths at velocity points to be the maximum of the adjacent depths.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\end{description}\end{quote}

\end{fulllineitems}

\index{compute\_global\_grid\_integrals() (fortran subroutine in module mom\_state\_initialization)@\spxentry{compute\_global\_grid\_integrals()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/compute_global_grid_integrals}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{compute\_global\_grid\_integrals}}}{\emph{G}, \emph{US}}{}
Subroutine to pre\sphinxhyphen{}compute global integrals of grid quantities for later use in reporting diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_velocity\_depth\_min() (fortran subroutine in module mom\_state\_initialization)@\spxentry{set\_velocity\_depth\_min()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/set_velocity_depth_min}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{set\_velocity\_depth\_min}}}{\emph{G}}{}
This subroutine sets the 4 bottom depths at velocity points to be the minimum of the adjacent depths.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_temp\_salt\_initialize\_from\_z() (fortran subroutine in module mom\_state\_initialization)@\spxentry{mom\_temp\_salt\_initialize\_from\_z()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_temp\_salt\_initialize\_from\_z}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{PF}, \emph{just\_read\_params}}{}
This subroutine determines the isopycnal or other coordinate interfaces and layer potential temperatures and salinities directly from a z\sphinxhyphen{}space file on a latitude\sphinxhyphen{}longitude grid.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h} :: {[}out{]} Layer thicknesses being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}inout{]} A structure pointing to various thermodynamic variables including temperature and salinity

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/adjustetatofitbathymetry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustetatofitbathymetry}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/convert_temp_salt_for_teos10}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::convert\_temp\_salt\_for\_teos10}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/determine_temperature}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::determine\_temperature}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/find_interfaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_interfaces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/regridding_main}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::regridding\_main}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::tracer\_z\_init\_array}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_interfaces() (fortran subroutine in module mom\_state\_initialization)@\spxentry{find\_interfaces()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/find_interfaces}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{find\_interfaces}}}{\emph{rho}, \emph{zin}, \emph{nk\_data}, \emph{Rb}, \emph{depth}, \emph{zi}, \emph{G}, \emph{US}, \emph{nlevs}, \emph{nkml}, \emph{hml}, \emph{eps\_z}, \emph{eps\_rho}}{}
Find interface positions corresponding to interpolated depths in a density profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{nk\_data} :: {[}in{]} The number of levels in the input data

\item {} 
\sphinxstylestrong{rho} :: {[}in{]} Potential density in z\sphinxhyphen{}space {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{zin} :: {[}in{]} Input data levels {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{rb} :: {[}in{]} target interface densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{depth} :: {[}in{]} ocean depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{zi} :: {[}out{]} The returned interface heights {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{nlevs} :: {[}in{]} number of valid points in each column

\item {} 
\sphinxstylestrong{nkml} :: {[}in{]} number of mixed layer pieces to distribute over a depth of hml.

\item {} 
\sphinxstylestrong{hml} :: {[}in{]} mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{eps\_z} :: {[}in{]} A negligibly small layer thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{eps\_rho} :: {[}in{]} A negligibly small density difference {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_temp\_salt\_initialize\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_state\_init\_tests() (fortran subroutine in module mom\_state\_initialization)@\spxentry{mom\_state\_init\_tests()}\spxextra{fortran subroutine in module mom\_state\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_state_init_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_state\_initialization/}}\sphinxbfcode{\sphinxupquote{mom\_state\_init\_tests}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}}{}
Run simple unit tests.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/cut_off_column_top}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cut\_off\_column\_top}}}}} {\hyperref[\detokenize{api/generated/modules/mom_density_integrals:f/mom_density_integrals/find_depth_of_pressure_in_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_density\_integrals::find\_depth\_of\_pressure\_in\_cell}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_string\_functions module reference}
\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions}}\label{\detokenize{api/generated/modules/mom_string_functions:mom-string-functions-module-reference}}\label{\detokenize{api/generated/modules/mom_string_functions::doc}}\index{mom\_string\_functions (module)@\spxentry{mom\_string\_functions}\spxextra{module}|spxpagem}
Handy functions for manipulating strings.

{\hyperref[\detokenize{api/generated/modules/mom_string_functions:detamom-string-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_string_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lowercase()}}}}}
&
Return a string in which all uppercase letters have been replaced by their lowercase counterparts.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uppercase()}}}}}
&
Return a string in which all uppercase letters have been replaced by their lowercase counterparts.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_int()}}}}}
&
Returns a character string of a left\sphinxhyphen{}formatted integer e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_ints()}}}}}
&
Returns a character string of a comma\sphinxhyphen{}separated, compact formatted, integers e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_real()}}}}}
&
Returns a left\sphinxhyphen{}justified string with a real formatted like ‘(G)’.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_reals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_reals()}}}}}
&
Returns a character string of a comma\sphinxhyphen{}separated, compact formatted, reals e.g.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/isformattedfloatequalto}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isformattedfloatequalto()}}}}}
&
Returns True if the string can be read/parsed to give the exact value of “val”.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extractword}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractword()}}}}}
&
Returns the string corresponding to the nth word in the argument or “” if the string is not long enough.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_word()}}}}}
&
Returns the string corresponding to the nth word in the argument or “” if the string is not long enough.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_integer()}}}}}
&
Returns the integer corresponding to the nth word in the argument.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_real()}}}}}
&
Returns the real corresponding to the nth word in the argument.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/remove_spaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_spaces()}}}}}
&
Returns string with all spaces removed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests()}}}}}
&
Returns true if a unit test of string\_functions fails.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{localtests()}}}}}
&
True if str1 does not match str2.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtesti}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{localtesti()}}}}}
&
True if i1 is not equal to i2.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtestr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{localtestr()}}}}}
&
True if r1 is not equal to r2.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/slasher}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{slasher()}}}}}
&
Returns a directory name that is terminated with a “/” or “./” if the argument is an empty string.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_string_functions:detailed-description}}\label{\detokenize{api/generated/modules/mom_string_functions:detamom-string-functions}}
By Alistair Adcroft and Robert Hallberg, last updated Sept. 2013.

The functions here perform a set of useful manipulations of character strings. Although they are a part of MOM6, the do not require any other MOM software to be useful.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_string_functions:function-subroutine-documentation}}\index{lowercase() (fortran function in module mom\_string\_functions)@\spxentry{lowercase()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{lowercase}}}{\emph{input\_string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(input\_string))}\sphinxstyleemphasis{{]}}}
Return a string in which all uppercase letters have been replaced by their lowercase counterparts.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{input\_string} :: {[}in{]} The string to modify

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The modified output string

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/basin_builder:f/basin_builder/basin_builder_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{basin\_builder::basin\_builder\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/cmor_long_std}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::cmor\_long\_std}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_configure_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_configure\_axes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/num_timelevels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::num\_timelevels}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::tidal\_mixing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_name_lookup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::tracer\_name\_lookup}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{uppercase() (fortran function in module mom\_string\_functions)@\spxentry{uppercase()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{uppercase}}}{\emph{input\_string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(input\_string))}\sphinxstyleemphasis{{]}}}
Return a string in which all uppercase letters have been replaced by their lowercase counterparts.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{input\_string} :: {[}in{]} The string to modify

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The modified output string

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_continuity:f/mom_continuity/continuity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_continuity::continuity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_consts::coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/mom_coriolisadv:f/mom_coriolisadv/coriolisadv_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coriolisadv::coriolisadv\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/energetic_pbl_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::energetic\_pbl\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_init}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolation_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::interpolation\_scheme}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_opacity:f/mom_opacity/opacity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_opacity::opacity\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/read_face_length_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::read\_face\_length\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::read\_tidal\_energy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_shared_initialization:f/mom_shared_initialization/reset_face_lengths_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_shared\_initialization::reset\_face\_lengths\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/setreconstructiontype}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::setreconstructiontype}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tidal\_mixing::tidal\_mixing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::wind\_forcing\_from\_file}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{left\_int() (fortran function in module mom\_string\_functions)@\spxentry{left\_int()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{left\_int}}}{\emph{i}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=19)}\sphinxstyleemphasis{{]}}}
Returns a character string of a left\sphinxhyphen{}formatted integer e.g. “123       ” (assumes 19 digit maximum)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{i} :: {[}in{]} The integer to convert to a string

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The output string

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_reals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_reals}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{left\_ints() (fortran function in module mom\_string\_functions)@\spxentry{left\_ints()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_ints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{left\_ints}}}{\emph{i}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=1320)}\sphinxstyleemphasis{{]}}}
Returns a character string of a comma\sphinxhyphen{}separated, compact formatted, integers e.g. “1, 2, 3, 4”.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{i} :: {[}in{]} The array of integers to convert to a string

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The output string

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_int}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{left\_real() (fortran function in module mom\_string\_functions)@\spxentry{left\_real()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{left\_real}}}{\emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=32)}\sphinxstyleemphasis{{]}}}
Returns a left\sphinxhyphen{}justified string with a real formatted like ‘(G)’.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{val} :: {[}in{]} The real variable to convert to a string

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The output string

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/isformattedfloatequalto}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isformattedfloatequalto}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_reals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_reals}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{left\_reals() (fortran function in module mom\_string\_functions)@\spxentry{left\_reals()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_reals}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{left\_reals}}}{\emph{r}, \emph{sep}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=1320)}\sphinxstyleemphasis{{]}}}
Returns a character string of a comma\sphinxhyphen{}separated, compact formatted, reals e.g. “1., 2., 5*3., 5.E2”.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{r} :: {[}in{]} The array of real variables to convert to a string

\item {} 
\sphinxstylestrong{sep} :: {[}in{]} The separator between successive values, by default it is ‘, ‘.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The output string

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_real}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/log_param_real_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::log\_param\_real\_array}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{isformattedfloatequalto() (fortran function in module mom\_string\_functions)@\spxentry{isformattedfloatequalto()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/isformattedfloatequalto}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{isformattedfloatequalto}}}{\emph{str}, \emph{val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns True if the string can be read/parsed to give the exact value of “val”.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{str} :: {[}in{]} The string to parse

\item {} 
\sphinxstylestrong{val} :: {[}in{]} The real value to compare with

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_real}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extractword() (fortran function in module mom\_string\_functions)@\spxentry{extractword()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extractword}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{extractword}}}{\emph{string}, \emph{n}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=120)}\sphinxstyleemphasis{{]}}}
Returns the string corresponding to the nth word in the argument or “” if the string is not long enough. Both spaces and commas are interpreted as separators.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} The string to scan

\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of word to extract

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_word}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initialize\_regridding}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_word() (fortran function in module mom\_string\_functions)@\spxentry{extract\_word()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{extract\_word}}}{\emph{string}, \emph{separators}, \emph{n}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=120)}\sphinxstyleemphasis{{]}}}
Returns the string corresponding to the nth word in the argument or “” if the string is not long enough. Words are delineated by the mandatory separators argument.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} String to scan

\item {} 
\sphinxstylestrong{separators} :: {[}in{]} Characters to use for delineation

\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of word to extract

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_integer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extractword}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractword}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_data_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::parse\_segment\_data\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_manifest_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::parse\_segment\_manifest\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_param_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::parse\_segment\_param\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/parse_segment_str}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::parse\_segment\_str}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_integer() (fortran function in module mom\_string\_functions)@\spxentry{extract\_integer()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_integer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{extract\_integer}}}{\emph{string}, \emph{separators}, \emph{n}, \emph{missing\_value}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Returns the integer corresponding to the nth word in the argument.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} String to scan

\item {} 
\sphinxstylestrong{separators} :: {[}in{]} Characters to use for delineation

\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of word to extract

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} Value to assign if word is missing

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_word}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initialize\_regridding}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_real() (fortran function in module mom\_string\_functions)@\spxentry{extract\_real()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_real}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{extract\_real}}}{\emph{string}, \emph{separators}, \emph{n}, \emph{missing\_value}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the real corresponding to the nth word in the argument.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{string} :: {[}in{]} String to scan

\item {} 
\sphinxstylestrong{separators} :: {[}in{]} Characters to use for delineation

\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of word to extract

\item {} 
\sphinxstylestrong{missing\_value} :: {[}in{]} Value to assign if word is missing

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_word}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/initialize_regridding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::initialize\_regridding}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{remove\_spaces() (fortran function in module mom\_string\_functions)@\spxentry{remove\_spaces()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/remove_spaces}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{remove\_spaces}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=120)}\sphinxstyleemphasis{{]}}}
Returns string with all spaces removed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} String to scan

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/open_boundary_config}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::open\_boundary\_config}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{string\_functions\_unit\_tests() (fortran function in module mom\_string\_functions)@\spxentry{string\_functions\_unit\_tests()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{string\_functions\_unit\_tests}}}{\emph{verbose}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if a unit test of string\_functions fails.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_integer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_integer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extract_word}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_word}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/extractword}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extractword}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_int}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_ints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_ints}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_real}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_real}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/left_reals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{left\_reals}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtesti}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{localtesti}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtestr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{localtestr}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{localtests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/remove_spaces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_spaces}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_unit\_tests::unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{localtests() (fortran function in module mom\_string\_functions)@\spxentry{localtests()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{localtests}}}{\emph{verbose}, \emph{str1}, \emph{str2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
True if str1 does not match str2. False otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{str1} :: {[}in{]} String

\item {} 
\sphinxstylestrong{str2} :: {[}in{]} String

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{localtesti() (fortran function in module mom\_string\_functions)@\spxentry{localtesti()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtesti}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{localtesti}}}{\emph{verbose}, \emph{i1}, \emph{i2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
True if i1 is not equal to i2. False otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{i1} :: {[}in{]} Integer

\item {} 
\sphinxstylestrong{i2} :: {[}in{]} Integer

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{localtestr() (fortran function in module mom\_string\_functions)@\spxentry{localtestr()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/localtestr}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{localtestr}}}{\emph{verbose}, \emph{r1}, \emph{r2}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
True if r1 is not equal to r2. False otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} If true, write results to stdout

\item {} 
\sphinxstylestrong{r1} :: {[}in{]} Float

\item {} 
\sphinxstylestrong{r2} :: {[}in{]} Float

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{slasher() (fortran function in module mom\_string\_functions)@\spxentry{slasher()}\spxextra{fortran function in module mom\_string\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/slasher}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_string\_functions/}}\sphinxbfcode{\sphinxupquote{slasher}}}{\emph{dir}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=len(dir)+2)}\sphinxstyleemphasis{{]}}}
Returns a directory name that is terminated with a “/” or “./” if the argument is an empty string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{dir} :: {[}in{]} A directory to be terminated with a “/” or changed to “./” if it is blank.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/mom_domains_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::mom\_domains\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_sum\_output module reference}
\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output}}\label{\detokenize{api/generated/modules/mom_sum_output:mom-sum-output-module-reference}}\label{\detokenize{api/generated/modules/mom_sum_output::doc}}\index{mom\_sum\_output (module)@\spxentry{mom\_sum\_output}\spxextra{module}|spxpagem}
Reports integrated quantities for monitoring the model state.

{\hyperref[\detokenize{api/generated/modules/mom_sum_output:detamom-sum-output}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_sum_output:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depth\_list}}}}}
&
A list of depths and corresponding globally integrated ocean area at each depth and the ocean volume below each depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/sum_output_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sum\_output\_cs}}}}}
&
The control structure for the MOM\_sum\_output module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_sum_output:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/mom_sum_output_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output\_init()}}}}}
&
MOM\_sum\_output\_init initializes the parameters and settings for the MOM\_sum\_output module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/mom_sum_output_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output\_end()}}}}}
&
MOM\_sum\_output\_end deallocates memory used by the MOM\_sum\_output module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_energy()}}}}}
&
This subroutine calculates and writes the total model energy, the energy and mass of each layer, and other globally integrated physical quantities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/accumulate_net_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{accumulate\_net\_input()}}}}}
&
This subroutine accumates the net input of volume, salt and heat, through the ocean surface for use in diagnosing conservation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depth\_list\_setup()}}}}}
&
This subroutine sets up an ordered list of depths, along with the cross sectional areas at each depth and the volume of fluid deeper than each depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/create_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_depth\_list()}}}}}
&
create\_depth\_list makes an ordered list of depths, along with the cross sectional areas at each depth and the volume of fluid deeper than each depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_depth\_list()}}}}}
&
This subroutine writes out the depth list to the specified file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_depth\_list()}}}}}
&
This subroutine reads in the depth list to the specified file and allocates and sets up CSDL and CSlist\_size .
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/get_depth_list_checksums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_depth\_list\_checksums()}}}}}
&
Return the checksums required to verify DEPTH\_LIST\_FILE contents.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_sum_output:detailed-description}}\label{\detokenize{api/generated/modules/mom_sum_output:detamom-sum-output}}
By Robert Hallberg, April 1994 \sphinxhyphen{} June 2002.

This file contains the subroutine (write\_energy) that writes horizontally integrated quantities, such as energies and layer volumes, and other summary information to an output file. Some of these quantities (APE or resting interface height) are defined relative to the global histogram of topography. The subroutine that compiles that histogram (depth\_list\_setup) is also included in this file.

In addition, if the number of velocity truncations since the previous call to write\_energy exceeds maxtrunc or the total energy exceeds a very large threshold, a fatal termination is triggered.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_sum_output:type-documentation}}\index{depth\_list (fortran type in module mom\_sum\_output)@\spxentry{depth\_list}\spxextra{fortran type in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{depth\_list}}}
A list of depths and corresponding globally integrated ocean area at each depth and the ocean volume below each depth.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: A depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The cross\sphinxhyphen{}sectional area of the ocean at that depth {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vol\_below}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: The ocean volume below that depth {[}Z m2 \textasciitilde{}\textgreater{} m3{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{sum\_output\_cs (fortran type in module mom\_sum\_output)@\spxentry{sum\_output\_cs}\spxextra{fortran type in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/sum_output_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{sum\_output\_cs}}}
The control structure for the MOM\_sum\_output module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( depth\_list )(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The sorted depth list.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{list\_size}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: length of sorting vector \textless{}= niglobal*njglobal

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: This saves the entry in DL with a volume just less than the volume of fluid below the interface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{do\_ape\_calc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate the available potential energy of the interfaces. Disabling this reduces the memory footprint of high\sphinxhyphen{}PE\sphinxhyphen{}count models dramatically.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_depth\_list}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Read the depth list from a file if it exists and write it if it doesn’t.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth\_list\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The name of the depth list file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{d\_list\_min\_inc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum increment {[}Z \textasciitilde{}\textgreater{} m{]}, between the depths of the entries in the depth\sphinxhyphen{}list file, 0 by default.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{require\_depth\_list\_chksum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Require matching checksums in Depth\_list.nc when reading the file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{update\_depth\_list\_chksum}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Automatically update the Depth\_list.nc file if the checksums are missing or do not match current values.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temperature and salinity are state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fresh\_water\_in\_efp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}} :: The total mass of fresh water added by surface fluxes on this PE since the last time that write\_energy was called {[}kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{net\_salt\_in\_efp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}} :: The total salt added by surface fluxes on this PE since the last time that write\_energy was called {[}ppt kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{net\_heat\_in\_efp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}} :: The total heat added by surface fluxes on this PE since the last time that write\_energy was called {[}J{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{heat\_prev\_efp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}} :: The total amount of heat in the ocean the last time that write\_energy was called {[}J{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_prev\_efp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}} :: The total amount of salt in the ocean the last time that write\_energy was called {[}ppt kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mass\_prev\_efp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(efp\_type)}\sphinxstyleemphasis{{]}} :: The total ocean mass the last time that write\_energy was called {[}kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_in\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The baroclinic dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energysavedays}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The interval between writing the energies and other integral quantities of the run.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energysavedays\_geometric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The starting interval for computing a geometric progression of time deltas between calls to write\_energy. This interval will increase by a factor of 2. after each call to write\_energy.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energysave\_geometric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Logical to control whether calls to write\_energy should follow a geometric progression.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{write\_energy\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The next time to write to the energy file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{geometric\_end\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: Time at which to stop the geometric progression of calls to write\_energy and revert to the standard energysavedays interval.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{timeunit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The length of the units for the time axis {[}s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{date\_stamped\_output}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use dates (not times) in messages to stdout.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{start\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The start time of the simulation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntrunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The number of times the velocity has been truncated since the last call to write\_energy.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_energy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum permitted energy per unit mass. If there is more energy than this, the model should stop {[}m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maxtrunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of truncations per energy save interval at which the run is stopped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{write\_stocks}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write the integrated tracer amounts to stdout when the energy files are written.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{previous\_calls}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of times write\_energy has been called.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prev\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The value of n from the last call.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fileenergy\_nc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: NetCDF id of the energy file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fileenergy\_ascii}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number of the ascii version of the energy file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fields}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(fieldtype)( num\_fields +max\_fields\_)}\sphinxstyleemphasis{{]}} :: fieldtype variables for the output fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{energyfile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The name of the energy file with path.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_sum_output:function-subroutine-documentation}}\index{mom\_sum\_output\_init() (fortran subroutine in module mom\_sum\_output)@\spxentry{mom\_sum\_output\_init()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/mom_sum_output_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{mom\_sum\_output\_init}}}{\emph{G}, \emph{US}, \emph{param\_file}, \emph{directory}, \emph{ntrnc}, \emph{Input\_start\_time}, \emph{CS}}{}
MOM\_sum\_output\_init initializes the parameters and settings for the MOM\_sum\_output module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory where the energy file goes.

\item {} 
\sphinxstylestrong{ntrnc} :: {[}inout{]} The integer that stores the number of times the velocity has been truncated since the last call to write\_energy.

\item {} 
\sphinxstylestrong{input\_start\_time} :: {[}in{]} The start time of the simulation.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depth\_list\_setup}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_sum\_output\_end() (fortran subroutine in module mom\_sum\_output)@\spxentry{mom\_sum\_output\_end()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/mom_sum_output_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{mom\_sum\_output\_end}}}{\emph{CS}}{}
MOM\_sum\_output\_end deallocates memory used by the MOM\_sum\_output module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to MOM\_sum\_output\_init.

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_energy() (fortran subroutine in module mom\_sum\_output)@\spxentry{write\_energy()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_energy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{write\_energy}}}{\emph{u}, \emph{v}, \emph{h}, \emph{tv}, \emph{day}, \emph{n}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{tracer\_CSp}, \emph{OBC}, \emph{dt\_forcing}}{}
This subroutine calculates and writes the total model energy, the energy and mass of each layer, and other globally integrated physical quantities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{v} :: {[}in{]} The meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{n} :: {[}in{]} The time step number of the current execution.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to MOM\_sum\_output\_init.

\item {} 
\sphinxstylestrong{tracer\_csp} :: tracer control structure.

\item {} 
\sphinxstylestrong{obc} :: Open boundaries control structure.

\item {} 
\sphinxstylestrong{dt\_forcing} :: {[}in{]} The forcing time step

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_e}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_w}}

\end{description}\end{quote}

\end{fulllineitems}

\index{accumulate\_net\_input() (fortran subroutine in module mom\_sum\_output)@\spxentry{accumulate\_net\_input()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/accumulate_net_input}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{accumulate\_net\_input}}}{\emph{fluxes}, \emph{sfc\_state}, \emph{tv}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine accumates the net input of volume, salt and heat, through the ocean surface for use in diagnosing conservation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to any possible forcing fields. Unused fields are unallocated.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which to average {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to MOM\_sum\_output\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{depth\_list\_setup() (fortran subroutine in module mom\_sum\_output)@\spxentry{depth\_list\_setup()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{depth\_list\_setup}}}{\emph{G}, \emph{US}, \emph{CS}}{}
This subroutine sets up an ordered list of depths, along with the cross sectional areas at each depth and the volume of fluid deeper than each depth. This might be read from a previously created file or it might be created anew. (For now only new creation occurs.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to MOM\_sum\_output\_init.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/create_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_depth\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_depth\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_depth\_list}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/mom_sum_output_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{create\_depth\_list() (fortran subroutine in module mom\_sum\_output)@\spxentry{create\_depth\_list()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/create_depth_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{create\_depth\_list}}}{\emph{G}, \emph{CS}}{}
create\_depth\_list makes an ordered list of depths, along with the cross sectional areas at each depth and the volume of fluid deeper than each depth.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up in MOM\_sum\_output\_init, in which the ordered depth list is stored.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depth\_list\_setup}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_depth\_list}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_depth\_list() (fortran subroutine in module mom\_sum\_output)@\spxentry{write\_depth\_list()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{write\_depth\_list}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{filename}, \emph{list\_size}}{}
This subroutine writes out the depth list to the specified file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to MOM\_sum\_output\_init.

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The path to the depth list file to write.

\item {} 
\sphinxstylestrong{list\_size} :: {[}in{]} The size of the depth list.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{area\_chksum\_attr}} \sphinxcode{\sphinxupquote{depth\_chksum\_attr}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/get_depth_list_checksums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_depth\_list\_checksums}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depth\_list\_setup}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_depth\_list}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_depth\_list() (fortran subroutine in module mom\_sum\_output)@\spxentry{read\_depth\_list()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{read\_depth\_list}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{filename}}{}
This subroutine reads in the depth list to the specified file and allocates and sets up CSDL and CSlist\_size .
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to MOM\_sum\_output\_init.

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The path to the depth list file to read.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{area\_chksum\_attr}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/create_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{create\_depth\_list}}}}} \sphinxcode{\sphinxupquote{depth\_chksum\_attr}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/get_depth_list_checksums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_depth\_list\_checksums}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_depth\_list}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/depth_list_setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{depth\_list\_setup}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_depth\_list\_checksums() (fortran subroutine in module mom\_sum\_output)@\spxentry{get\_depth\_list\_checksums()}\spxextra{fortran subroutine in module mom\_sum\_output}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/get_depth_list_checksums}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_sum\_output/}}\sphinxbfcode{\sphinxupquote{get\_depth\_list\_checksums}}}{\emph{G}, \emph{depth\_chksum}, \emph{area\_chksum}}{}
Return the checksums required to verify DEPTH\_LIST\_FILE contents.

This function computes checksums for the bathymetry (GbathyT) and masked area (mask2dT * areaT) fields of the model grid G, which are used to compute the depth list. A difference in checksum indicates that a different method was used to compute the grid data, and that any results using the depth list, such as APE, will not be reproducible.

Checksums are saved as hexadecimal strings, in order to avoid potential datatype issues with netCDF attributes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{depth\_chksum} :: {[}out{]} Depth checksum hexstring

\item {} 
\sphinxstylestrong{area\_chksum} :: {[}out{]} Area checksum hexstring

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/read_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_depth\_list}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_depth_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_depth\_list}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_surface\_forcing module reference}
\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing}}\label{\detokenize{api/generated/modules/mom_surface_forcing:mom-surface-forcing-module-reference}}\label{\detokenize{api/generated/modules/mom_surface_forcing::doc}}\index{mom\_surface\_forcing (module)@\spxentry{mom\_surface\_forcing}\spxextra{module}|spxpagem}
Functions that calculate the surface wind stresses and fluxes of buoyancy or temperature/salinity andfresh water, in ocean\sphinxhyphen{}only (solo) mode.

{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:detamom-surface-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_surface_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_forcing\_cs}}}}}
&
Structure containing pointers to the forcing fields that may be used to drive MOM.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_surface_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing()}}}}}
&
Calls subroutines in this file to get surface forcing fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_const()}}}}}
&
Sets the surface wind stresses to constant values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_2gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_2gyre()}}}}}
&
Sets the surface wind stresses to set up two idealized gyres.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_1gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_1gyre()}}}}}
&
Sets the surface wind stresses to set up a single idealized gyre.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_gyres}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_gyres()}}}}}
&
Sets the surface wind stresses to set up idealized gyres.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/neverworld_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_wind\_forcing()}}}}}
&
Sets the surface wind stresses, forcestaux and forcestauy for the Neverworld forcing configuration.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve\_wind\_forcing()}}}}}
&
Sets the zonal wind stresses to a piecewise series of s\sphinxhyphen{}curves.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve()}}}}}
&
Returns the value of a cosine\sphinxhyphen{}bell function evaluated at x/L.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_from\_file()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_by\_data\_override()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_from\_files()}}}}}
&
Specifies zero surface bouyancy fluxes from input files.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_from\_data\_override()}}}}}
&
Specifies zero surface bouyancy fluxes from data over\sphinxhyphen{}ride.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_zero()}}}}}
&
This subroutine specifies zero surface bouyancy fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_const()}}}}}
&
Sets up spatially and temporally constant surface heat fluxes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_linear()}}}}}
&
Sets surface fluxes of heat and salinity by restoring to temperature and salinity profiles that vary linearly with latitude.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/forcing_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_save\_restart()}}}}}
&
Save a restart file for the forcing fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_forcing\_init()}}}}}
&
Initialize the surface forcing module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_forcing\_end()}}}}}
&
Deallocate memory associated with the surface forcing module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_surface_forcing:detailed-description}}\label{\detokenize{api/generated/modules/mom_surface_forcing:detamom-surface-forcing}}
These functions are called every time step, even if the wind stresses or buoyancy fluxes are constant in time \sphinxhyphen{} in that case these routines return quickly without doing anything. In addition, any I/O of forcing fields is controlled by surface\_forcing\_init, located in this file.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_surface_forcing:type-documentation}}\index{surface\_forcing\_cs (fortran type in module mom\_surface\_forcing)@\spxentry{surface\_forcing\_cs}\spxextra{fortran type in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{surface\_forcing\_cs}}}
Structure containing pointers to the forcing fields that may be used to drive MOM. All fluxes are positive into the ocean.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{urf\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(user\_revise\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{user\_forcing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(user\_surface\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bfb\_forcing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(bfb\_surface\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dumbbell\_forcing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(dumbbell\_surface\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meso\_forcing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(meso\_surface\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{idealized\_hurricane\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(idealized\_hurricane\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{scm\_cvmix\_tests\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(scm\_cvmix\_tests\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structures for named forcing packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, temp \& salinity used as state variables

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restorebuoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, use restoring surface buoyancy forcing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adiabatic}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, no diapycnal mass fluxes or surface buoyancy forcing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{variable\_winds}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, wind stresses vary with time

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{variable\_buoyforce}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, buoyancy forcing varies with time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{south\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: southern latitude of the domain

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{len\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: domain length in latitude

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Boussinesq reference density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: piston velocity for surface restoring {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: piston velocity for surface temperature restoring {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: piston velocity for surface salinity restoring {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_heat\_fusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: latent heat of fusion times {[}Q \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_heat\_vapor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: latent heat of vaporization {[}Q \textasciitilde{}\textgreater{} J kg\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tau\_x0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Constant zonal wind stress used in the WIND\_CONFIG=”const” forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tau\_y0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Constant meridional wind stress used in the WIND\_CONFIG=”const” forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: constant unresolved background gustiness for ustar {[}R L Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_gust\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: if true, use 2\sphinxhyphen{}dimensional gustiness supplied from a file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: spatially varying unresolved background gustiness {[}R L Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} Pa{]} gust is used when read\_gust\_2d is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_restore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: temperature to damp (restore) the SST to {[}degC{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_restore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: salinity to damp (restore) the SSS {[}ppt{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dens\_restore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: density to damp (restore) surface density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{buoy\_last\_lev\_read}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read from buoyancy input files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gyres\_taux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant wind stress {[}Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gyres\_taux\_sin\_amp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amplitude of cosine wind stress gyres {[}Pa{]}, if WIND\_CONFIG==’gyres’.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gyres\_taux\_cos\_amp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The amplitude of cosine wind stress gyres {[}Pa{]}, if WIND\_CONFIG==’gyres’.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gyres\_taux\_n\_pis}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The number of sine lobes in the basin if if WIND\_CONFIG==’gyres’.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use a form of the gyre wind stresses that are rotationally invariant and more likely to be the same between compilers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fix\_ustar\_gustless\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true correct a bug in the time\sphinxhyphen{}averaging of the gustless wind friction velocity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{scurves\_ydata}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(20)}\sphinxstyleemphasis{{]}} :: Latitudes of scurve nodes {[}degreesN{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{scurves\_taux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(20)}\sphinxstyleemphasis{{]}} :: Zonal wind stress values at scurve nodes {[}Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_north}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: target temperatures at north used in buoyancy\_forcing\_linear

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_south}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: target temperatures at south used in buoyancy\_forcing\_linear

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_north}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: target salinity at north used in buoyancy\_forcing\_linear

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_south}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: target salinity at south used in buoyancy\_forcing\_linear

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{first\_call\_set\_forcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True until after the first call to set\_forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{archaic\_omip\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true use the variable names and data fields from a very old version of the OMIP forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dataoverrideisinitialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, data override has been initialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: value by which wind\sphinxhyphen{}stresses are scaled, ND.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{constantheatforcing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: value used for sensible heat flux when buoy\_config=”const” {[}Q R Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_stagger}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=8)}\sphinxstyleemphasis{{]}} :: A character indicating how the wind stress components are staggered in WIND\_FILE. Valid values are A or C for now.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_flow\_control\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the structure that is used to orchestrate the calling of tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure used to regulate timing of diagnostic output

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: directory where NetCDF input files are.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_config}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: indicator for wind forcing type (2gyre, USER, FILE..)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: if wind\_config is “file”, file to use

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{buoy\_config}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: indicator for buoyancy forcing type

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{longwave\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the longwave heat flux is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{shortwave\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the shortwave heat flux is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evaporation\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the evaporation is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sensibleheat\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the sensible heat flux is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latentheat\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the latent heat flux is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rain\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the rainfall is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{snow\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the snowfall is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{runoff\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the runoff is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{longwaveup\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the upward longwave heat flux is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{shortwaveup\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which the upward shorwave heat flux is read.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sstrestore\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which to read the sea surface temperature to restore toward.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salinityrestore\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file from which to read the sea surface salinity to restore toward.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stress\_x\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: X\sphinxhyphen{}windstress variable name in the input file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stress\_y\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: Y\sphinxhyphen{}windstress variable name in the input file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: ustar variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lw\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: lonngwave heat flux variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: shortwave heat flux variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: latent heat flux variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sens\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: sensible heat flux variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evap\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: evaporation variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rain\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: rainfall variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{snow\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: snowfall variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lrunoff\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: liquid runoff variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frunoff\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: frozen runoff variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sst\_restore\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: target sea surface temeperature variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sss\_restore\_var}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=80)}\sphinxstyleemphasis{{]}} :: target sea surface salinity variable name in the input file

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of wind stress.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of shortwave heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lw\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of longwave heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of latent heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sens\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of sensible heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evap\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of evaporation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{precip\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of precipitation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{runoff\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of runoff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sst\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of target SST.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sss\_nlev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of time levels in the file of target SSS.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of wind stress.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of shortwave heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lw\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of longwave heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of latent heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sens\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of sensible heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{evap\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of evaporation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{precip\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of precipitation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{runoff\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of runoff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sst\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of target SST.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sss\_last\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The last time level read of target SSS.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{handles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(forcing\_diags)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: A structure with diagnostics handles.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_surface_forcing:function-subroutine-documentation}}\index{set\_forcing() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{set\_forcing()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{set\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{fluxes}, \emph{day\_start}, \emph{day\_interval}, \emph{G}, \emph{US}, \emph{CS}}{}
Calls subroutines in this file to get surface forcing fields.

It also allocates and initializes the fields in the forcing and mech\_forcing types the first time it is called.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day\_start} :: {[}in{]} The start time of the fluxes

\item {} 
\sphinxstylestrong{day\_interval} :: {[}in{]} Length of time over which these fluxes applied

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_const}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_from\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_from\_files}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_linear}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{buoyancy\_forcing\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/dumbbell_surface_forcing:f/dumbbell_surface_forcing/dumbbell_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dumbbell\_surface\_forcing::dumbbell\_buoyancy\_forcing}}}}} \sphinxcode{\sphinxupquote{id\_clock\_forcing}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/neverworld_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_wind\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve\_wind\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_1gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_1gyre}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_2gyre}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_2gyre}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_by\_data\_override}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_const}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_const}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_from_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_from\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_gyres}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wind\_forcing\_gyres}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wind\_forcing\_const() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{wind\_forcing\_const()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_const}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{wind\_forcing\_const}}}{\emph{sfc\_state}, \emph{forces}, \emph{tau\_x0}, \emph{tau\_y0}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets the surface wind stresses to constant values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{tau\_x0} :: {[}in{]} The zonal wind stress {[}Pa{]}

\item {} 
\sphinxstylestrong{tau\_y0} :: {[}in{]} The meridional wind stress {[}Pa{]}

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wind\_forcing\_2gyre() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{wind\_forcing\_2gyre()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_2gyre}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{wind\_forcing\_2gyre}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets the surface wind stresses to set up two idealized gyres.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wind\_forcing\_1gyre() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{wind\_forcing\_1gyre()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_1gyre}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{wind\_forcing\_1gyre}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets the surface wind stresses to set up a single idealized gyre.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wind\_forcing\_gyres() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{wind\_forcing\_gyres()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_gyres}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{wind\_forcing\_gyres}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets the surface wind stresses to set up idealized gyres.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neverworld\_wind\_forcing() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{neverworld\_wind\_forcing()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/neverworld_wind_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{neverworld\_wind\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets the surface wind stresses, forcestaux and forcestauy for the Neverworld forcing configuration.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time used for determining the fluxes.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scurve\_wind\_forcing() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{scurve\_wind\_forcing()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve_wind_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{scurve\_wind\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets the zonal wind stresses to a piecewise series of s\sphinxhyphen{}curves.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time used for determining the fluxes.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scurve() (fortran function in module mom\_surface\_forcing)@\spxentry{scurve()}\spxextra{fortran function in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{scurve}}}{\emph{x}, \emph{L}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the value of a cosine\sphinxhyphen{}bell function evaluated at x/L.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional position

\item {} 
\sphinxstylestrong{l} :: {[}in{]} non\sphinxhyphen{}dimensional width

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/scurve_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve\_wind\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wind\_forcing\_from\_file() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{wind\_forcing\_from\_file()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_from_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{wind\_forcing\_from\_file}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wind\_forcing\_by\_data\_override() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{wind\_forcing\_by\_data\_override()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/wind_forcing_by_data_override}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{wind\_forcing\_by\_data\_override}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{buoyancy\_forcing\_from\_files() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{buoyancy\_forcing\_from\_files()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_files}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{buoyancy\_forcing\_from\_files}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
Specifies zero surface bouyancy fluxes from input files.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{buoyancy\_forcing\_from\_data\_override() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{buoyancy\_forcing\_from\_data\_override()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_from_data_override}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{buoyancy\_forcing\_from\_data\_override}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
Specifies zero surface bouyancy fluxes from data over\sphinxhyphen{}ride.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{buoyancy\_forcing\_zero() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{buoyancy\_forcing\_zero()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_zero}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{buoyancy\_forcing\_zero}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{CS}}{}
This subroutine specifies zero surface bouyancy fluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{buoyancy\_forcing\_const() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{buoyancy\_forcing\_const()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_const}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{buoyancy\_forcing\_const}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets up spatially and temporally constant surface heat fluxes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{buoyancy\_forcing\_linear() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{buoyancy\_forcing\_linear()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/buoyancy_forcing_linear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{buoyancy\_forcing\_linear}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
Sets surface fluxes of heat and salinity by restoring to temperature and salinity profiles that vary linearly with latitude.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_forcing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{forcing\_save\_restart() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{forcing\_save\_restart()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/forcing_save_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{forcing\_save\_restart}}}{\emph{CS}, \emph{G}, \emph{Time}, \emph{directory}, \emph{time\_stamped}, \emph{filename\_suffix}}{}
Save a restart file for the forcing fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time at this call; needed for mpp\_write calls

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} directory into which to write these restart files

\item {} 
\sphinxstylestrong{time\_stamped} :: {[}in{]} If true, the restart file names include a unique time stamp; the default is false.

\item {} 
\sphinxstylestrong{filename\_suffix} :: {[}in{]} optional suffix (e.g., a time\sphinxhyphen{}stamp) to append to the restart fname

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::save\_restart}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_forcing\_init() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{surface\_forcing\_init()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{tracer\_flow\_CSp}}{}
Initialize the surface forcing module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} structure used to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\item {} 
\sphinxstylestrong{tracer\_flow\_csp} :: Forcing for tracers?

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/bfb_surface_forcing:f/bfb_surface_forcing/bfb_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bfb\_surface\_forcing::bfb\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}} \sphinxcode{\sphinxupquote{id\_clock\_forcing}} {\hyperref[\detokenize{api/generated/modules/meso_surface_forcing:f/meso_surface_forcing/meso_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{meso\_surface\_forcing::meso\_surface\_forcing\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/num_timelevels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::num\_timelevels}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restart\_init\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing::user\_surface\_forcing\_init}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_forcing\_end() (fortran subroutine in module mom\_surface\_forcing)@\spxentry{surface\_forcing\_end()}\spxextra{fortran subroutine in module mom\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{surface\_forcing\_end}}}{\emph{CS}, \emph{fluxes}}{}
Deallocate memory associated with the surface forcing module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: pointer to control struct returned by a previous surface\_forcing\_init call

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_surface\_forcing\_gfdl module reference}
\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl}}\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:mom-surface-forcing-gfdl-module-reference}}\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl::doc}}\index{mom\_surface\_forcing\_gfdl (module)@\spxentry{mom\_surface\_forcing\_gfdl}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:detamom-surface-forcing-gfdl}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/ice_ocean_boundary_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_ocean\_boundary\_type}}}}}
&
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/ice_ocean_boundary_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_ocean\_boundary\_type()}}}}} is a structure corresponding to forcing, but with the elements, units, and conventions that exactly conform to the use for MOM6\sphinxhyphen{}based coupled models.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/surface_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_forcing\_cs}}}}}
&
surface\_forcing\_CS is a structure containing pointers to the forcing fields which may be used to drive MOM. All fluxes are positive downward.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_fluxes()}}}}}
&
This subroutine translates the Ice\_ocean\_boundary\_type into a MOM thermodynamic forcing type, including changes of units, sign conventions, and putting the fields into arrays with MOM\sphinxhyphen{}standard halos.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_forces()}}}}}
&
This subroutine translates the Ice\_ocean\_boundary\_type into a MOM mechanical forcing type, including changes of units, sign conventions, and putting the fields into arrays with MOM\sphinxhyphen{}standard halos.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/extract_iob_stresses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_iob\_stresses()}}}}}
&
This subroutine extracts the wind stresses and related fields like ustar from an Ice\_ocean\_boundary\_type into optional argument arrays, including changes of units, sign conventions, and putting the fields into arrays with MOM\sphinxhyphen{}standard sized halos.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_flux_adjustments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_flux\_adjustments()}}}}}
&
Adds thermodynamic flux adjustments obtained via data\_override Component name is ‘OCN’ Available adjustments are:
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_force_adjustments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_force\_adjustments()}}}}}
&
Adds mechanical forcing adjustments obtained via data\_override Component name is ‘OCN’ Available adjustments are:
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/forcing_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forcing\_save\_restart()}}}}}
&
Save any restart files associated with the surface forcing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_forcing\_init()}}}}}
&
Initialize the surface forcing, including setting parameters and allocating permanent memory.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/surface_forcing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_forcing\_end()}}}}}
&
Clean up and deallocate any memory associated with this module and its children.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/ice_ocn_bnd_type_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_ocn\_bnd\_type\_chksum()}}}}}
&
Write out a set of messages with checksums of the fields in an ice\_ocen\_boundary type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/check_mask_val_consistency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_mask\_val\_consistency()}}}}}
&
Check the values passed by IOB over land are zero.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:detailed-description}}\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:detamom-surface-forcing-gfdl}}
\textless{}undocumented\textgreater{}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:type-documentation}}\index{ice\_ocean\_boundary\_type (fortran type in module mom\_surface\_forcing\_gfdl)@\spxentry{ice\_ocean\_boundary\_type}\spxextra{fortran type in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/ice_ocean_boundary_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{ice\_ocean\_boundary\_type}}}
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/ice_ocean_boundary_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ice\_ocean\_boundary\_type()}}}}} is a structure corresponding to forcing, but with the elements, units, and conventions that exactly conform to the use for MOM6\sphinxhyphen{}based coupled models.
is a structure corresponding to forcing, but with the elements, units, and conventions that exactly conform to the use for MOM6\sphinxhyphen{}based coupled models.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}direction wind stress {[}Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}direction wind stress {[}Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: sensible heat flux {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{q\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: specific humidity flux {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: salt flux {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lw\_flux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: long wave radiation {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_flux\_vis\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: direct visible sw radiation {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_flux\_vis\_dif}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diffuse visible sw radiation {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_flux\_nir\_dir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: direct Near InfraRed sw radiation {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sw\_flux\_nir\_dif}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diffuse Near InfraRed sw radiation {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass flux of liquid precip {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fprec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass flux of frozen precip {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{runoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass flux of liquid runoff {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calving}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass flux of frozen runoff {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stress\_mag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The time\sphinxhyphen{}mean magnitude of the stress on the ocean {[}Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: frictional velocity beneath icebergs {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: fractional area covered by icebergs {[}m2 m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mass\_berg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass of icebergs per unit ocean area {[}kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{runoff\_hflx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content of liquid runoff {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{calving\_hflx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: heat content of frozen runoff {[}W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: pressure of overlying ice and atmosphere on ocean surface {[}Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mass of ice per unit ocean area {[}kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ice\_rigidity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: rigidity of the sea ice, sea\sphinxhyphen{}ice and ice\sphinxhyphen{}shelves, expressed as a coefficient for divergence damping, as determined outside of the ocean model {[}m3 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{xtype}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The type of the exchange \sphinxhyphen{} REGRID, REDIST or DIRECT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fluxes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coupler\_2d\_bc\_type)}\sphinxstyleemphasis{{]}} :: A structure that may contain an array of named fields used for passive tracer fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_stagger}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A flag indicating the spatial discretization of wind stresses. This flag may be set by the flux\sphinxhyphen{}exchange code, based on what the sea\sphinxhyphen{}ice model is providing. Otherwise, the value from the surface\_forcing\_CS is used.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_forcing\_cs (fortran type in module mom\_surface\_forcing\_gfdl)@\spxentry{surface\_forcing\_cs}\spxextra{fortran type in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/surface_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{surface\_forcing\_cs}}}
surface\_forcing\_CS is a structure containing pointers to the forcing fields which may be used to drive MOM. All fluxes are positive downward.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_stagger}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: AGRID, BGRID\_NE, or CGRID\_NE (integer values from MOM\_domains) to indicate the staggering of the winds that are being provided in calls to update\_ocean\_model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temp and saln used as state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wind\_stress\_multiplier}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A multiplier applied to incoming wind stress {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Boussinesq reference density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Total ocean surface area {[}m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_heat\_fusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Latent heat of fusion {[}J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{latent\_heat\_vapor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Latent heat of vaporization {[}J kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum surface pressure that can be exerted by the atmosphere and floating sea\sphinxhyphen{}ice {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. This is needed because the FMS coupling structure does not limit the water that can be frozen out of the ocean and the ice\sphinxhyphen{}ocean heat fluxes are treated explicitly.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_limited\_p\_ssh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, return the sea surface height with the correction for the atmospheric (and sea\sphinxhyphen{}ice) pressure limited by max\_p\_surf instead of the full atmospheric pressure. The default is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{approx\_net\_mass\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the net mass sources from the ice\sphinxhyphen{}ocean boundary type without any further adjustments to drive the ocean dynamics. The actual net mass source may differ due to corrections.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Constant unresolved background gustiness for ustar {[}R L Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_gust\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use a 2\sphinxhyphen{}dimensional gustiness supplied from an input file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Turbulent kinetic energy introduced to the bottom boundary layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A spatially varying unresolved background gustiness that.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Tidal contribution to the bottom friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cd\_tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Drag coefficient that applies to the tides (nondimensional)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{utide}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Constant tidal velocity to use if read\_tideamp is false {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{read\_tideamp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, spatially varying tidal amplitude read from a file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rigid\_sea\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sea\sphinxhyphen{}ice exerts a rigidity that acts to damp surface deflections (especially surface gravity waves). The default is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_sea\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Viscosity in sea\sphinxhyphen{}ice that resists sheared vertical motions {[}L4 Z\sphinxhyphen{}2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{density\_sea\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Typical density of sea\sphinxhyphen{}ice {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}. The value is only used to convert the ice pressure into appropriate units for use with Kv\_sea\_ice.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rigid\_sea\_ice\_mass}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A mass per unit area of sea\sphinxhyphen{}ice beyond which sea\sphinxhyphen{}ice viscosity becomes effective {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}, typically of order 1000 kg m\sphinxhyphen{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{allow\_flux\_adjustments}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use data\_override to obtain flux adjustments.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restore\_salt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the coupled MOM driver adds a term to restore surface salinity to a specified value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restore\_temp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the coupled MOM driver adds a term to restore sea surface temperature to a specified value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Piston velocity for surface restoring {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_restore\_as\_sflux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, SSS restore as salt flux instead of water flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adjust\_net\_srestore\_to\_zero}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Adjust srestore to zero (for both salt\_flux or vprec)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adjust\_net\_srestore\_by\_scaling}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Adjust srestore w/o moving zero contour.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adjust\_net\_fresh\_water\_to\_zero}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Adjust net surface fresh\sphinxhyphen{}water (with restoring) to zero.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_net\_fw\_adjustment\_sign\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Use the wrong sign when adjusting net FW.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{adjust\_net\_fresh\_water\_by\_scaling}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Adjust net surface fresh\sphinxhyphen{}water w/o moving zero contour.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_srestore\_under\_ice}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use an ice mask defined by frazil criteria for salinity restoring.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ice\_salt\_concentration}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Salt concentration for sea ice {[}kg/kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_srestore\_marginal\_seas}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, then mask SSS restoring in marginal seas.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_delta\_srestore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum delta salinity used for restoring.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_delta\_trestore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum delta sst used for restoring.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{basin\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Mask for surface salinity restoring by basin.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use a simpler expression to calculate gustiness.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fix\_ustar\_gustless\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true correct a bug in the time\sphinxhyphen{}averaging of the gustless wind friction velocity.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{check\_no\_land\_fluxes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Return warning if IOB flux over land is non\sphinxhyphen{}zero.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Structure to regulate diagnostic output timing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Directory where NetCDF input files are.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_restore\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Filename for salt restoring data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_restore\_var\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=30)}\sphinxstyleemphasis{{]}} :: Name of surface salinity in salt\_restore\_file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_srestore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply a 2\sphinxhyphen{}dimensional mask to the surface salinity restoring fluxes. The masking file should be in inputdir/salt\_restore\_mask.nc and the field should be named ‘mask’.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{srestore\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: mask for SSS restoring

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{temp\_restore\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: Filename for sst restoring data.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{temp\_restore\_var\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=30)}\sphinxstyleemphasis{{]}} :: Name of surface temperature in temp\_restore\_file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_trestore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply a 2\sphinxhyphen{}dimensional mask to the surface temperature restoring fluxes. The masking file should be in inputdir/temp\_restore\_mask.nc and the field should be named ‘mask’.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{trestore\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Mask for SST restoring.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_srestore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An id number for time\_interp\_external.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_trestore}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An id number for time\_interp\_external.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{handles}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(forcing\_diags)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Diagnostics handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{urf\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(user\_revise\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A control structure for user forcing revisions.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:function-subroutine-documentation}}\index{convert\_iob\_to\_fluxes() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{convert\_iob\_to\_fluxes()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_fluxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{convert\_iob\_to\_fluxes}}}{\emph{IOB}, \emph{fluxes}, \emph{index\_bounds}, \emph{Time}, \emph{valid\_time}, \emph{G}, \emph{US}, \emph{CS}, \emph{sfc\_state}}{}
This subroutine translates the Ice\_ocean\_boundary\_type into a MOM thermodynamic forcing type, including changes of units, sign conventions, and putting the fields into arrays with MOM\sphinxhyphen{}standard halos.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iob} :: {[}in{]} An ice\sphinxhyphen{}ocean boundary type with fluxes to drive

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to all possible mass, heat or salt flux forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{index\_bounds} :: {[}in{]} The i\sphinxhyphen{} and j\sphinxhyphen{} size of the arrays in IOB.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The time of the fluxes, used for interpolating the salinity to the right time, when it is being restored.

\item {} 
\sphinxstylestrong{valid\_time} :: {[}in{]} The amount of time over which these fluxes should be applied {[}s{]}.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} A structure containing fields that describe the surface state of the ocean.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_spatial_means:f/mom_spatial_means/adjust_area_mean_to_zero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_spatial\_means::adjust\_area\_mean\_to\_zero}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_flux_adjustments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_flux\_adjustments}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/check_mask_val_consistency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_mask\_val\_consistency}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/extract_iob_stresses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_iob\_stresses}}}}} \sphinxcode{\sphinxupquote{id\_clock\_forcing}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convert\_iob\_to\_forces() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{convert\_iob\_to\_forces()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_forces}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{convert\_iob\_to\_forces}}}{\emph{IOB}, \emph{forces}, \emph{index\_bounds}, \emph{Time}, \emph{G}, \emph{US}, \emph{CS}, \emph{dt\_forcing}, \emph{reset\_avg}}{}
This subroutine translates the Ice\_ocean\_boundary\_type into a MOM mechanical forcing type, including changes of units, sign conventions, and putting the fields into arrays with MOM\sphinxhyphen{}standard halos.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iob} :: {[}in{]} An ice\sphinxhyphen{}ocean boundary type with fluxes to drive

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{index\_bounds} :: {[}in{]} The i\sphinxhyphen{} and j\sphinxhyphen{} size of the arrays in IOB.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The time of the fluxes, used for interpolating the salinity to the right time, when it is being restored.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init.

\item {} 
\sphinxstylestrong{dt\_forcing} :: {[}in{]} A time interval over which to apply the current value of ustar as a weighted running average {[}s{]}, or if 0 do not average ustar. Missing is equivalent to 0.

\item {} 
\sphinxstylestrong{reset\_avg} :: {[}in{]} If true, reset the time average.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_force_adjustments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_force\_adjustments}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/extract_iob_stresses}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{extract\_iob\_stresses}}}}} \sphinxcode{\sphinxupquote{id\_clock\_forcing}}

\end{description}\end{quote}

\end{fulllineitems}

\index{extract\_iob\_stresses() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{extract\_iob\_stresses()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/extract_iob_stresses}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{extract\_iob\_stresses}}}{\emph{IOB}, \emph{index\_bounds}, \emph{Time}, \emph{G}, \emph{US}, \emph{CS}, \emph{taux}, \emph{tauy}, \emph{ustar}, \emph{gustless\_ustar}, \emph{tau\_halo}}{}
This subroutine extracts the wind stresses and related fields like ustar from an Ice\_ocean\_boundary\_type into optional argument arrays, including changes of units, sign conventions, and putting the fields into arrays with MOM\sphinxhyphen{}standard sized halos.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{iob} :: {[}in{]} An ice\sphinxhyphen{}ocean boundary type with fluxes to drive

\item {} 
\sphinxstylestrong{index\_bounds} :: {[}in{]} The i\sphinxhyphen{} and j\sphinxhyphen{} size of the arrays in IOB.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The time of the fluxes, used for interpolating the salinity to the right time, when it is being restored.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init.

\item {} 
\sphinxstylestrong{taux} :: {[}inout{]} The zonal wind stresses on a C\sphinxhyphen{}grid {[}R Z L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{tauy} :: {[}inout{]} The meridional wind stresses on a C\sphinxhyphen{}grid {[}R Z L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{ustar} :: {[}inout{]} The surface friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{gustless\_ustar} :: {[}out{]} The surface friction velocity without

\item {} 
\sphinxstylestrong{tau\_halo} :: {[}in{]} The halo size of wind stresses to set, 0 by default.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_fluxes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_forces}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_flux\_adjustments() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{apply\_flux\_adjustments()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_flux_adjustments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{apply\_flux\_adjustments}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{Time}, \emph{fluxes}}{}
Adds thermodynamic flux adjustments obtained via data\_override Component name is ‘OCN’ Available adjustments are:
\begin{itemize}
\item {} 
hflx\_adj (Heat flux into the ocean {[}W m\sphinxhyphen{}2{]})

\item {} 
sflx\_adj (Salt flux into the ocean {[}kg salt m\sphinxhyphen{}2 s\sphinxhyphen{}1{]})

\item {} 
prcme\_adj (Fresh water flux into the ocean {[}kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]})

\end{itemize}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Surface forcing control structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time structure

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Surface fluxes structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_fluxes}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{apply\_force\_adjustments() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{apply\_force\_adjustments()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/apply_force_adjustments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{apply\_force\_adjustments}}}{\emph{G}, \emph{US}, \emph{CS}, \emph{Time}, \emph{forces}}{}
Adds mechanical forcing adjustments obtained via data\_override Component name is ‘OCN’ Available adjustments are:
\begin{itemize}
\item {} 
taux\_adj (Zonal wind stress delta, positive to the east {[}Pa{]})

\item {} 
tauy\_adj (Meridional wind stress delta, positive to the north {[}Pa{]})

\end{itemize}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Surface forcing control structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time structure

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_forces}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{forcing\_save\_restart() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{forcing\_save\_restart()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/forcing_save_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{forcing\_save\_restart}}}{\emph{CS}, \emph{G}, \emph{Time}, \emph{directory}, \emph{time\_stamped}, \emph{filename\_suffix}}{}
Save any restart files associated with the surface forcing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory into which to write the restart files

\item {} 
\sphinxstylestrong{time\_stamped} :: {[}in{]} If true, the restart file names include a unique time stamp. The default is false.

\item {} 
\sphinxstylestrong{filename\_suffix} :: {[}in{]} An optional suffix (e.g., a time\sphinxhyphen{} stamp) to append to the restart file names.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::save\_restart}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_forcing\_init() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{surface\_forcing\_init()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}, \emph{wind\_stagger}}{}
Initialize the surface forcing, including setting parameters and allocating permanent memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{wind\_stagger} :: {[}in{]} If present, the staggering of the winds that are being provided in calls to update\_ocean\_model

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}} \sphinxcode{\sphinxupquote{id\_clock\_forcing}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restart_init_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restart\_init\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/restore_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::restore\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_forcing\_end() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{surface\_forcing\_end()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/surface_forcing_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{surface\_forcing\_end}}}{\emph{CS}, \emph{fluxes}}{}
Clean up and deallocate any memory associated with this module and its children.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init, it will be deallocated here.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to all possible mass, heat or salt flux forcing fields. If present, it will be deallocated here.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ice\_ocn\_bnd\_type\_chksum() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{ice\_ocn\_bnd\_type\_chksum()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/ice_ocn_bnd_type_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{ice\_ocn\_bnd\_type\_chksum}}}{\emph{id}, \emph{timestep}, \emph{iobt}}{}
Write out a set of messages with checksums of the fields in an ice\_ocen\_boundary type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id} :: {[}in{]} An identifying string for this call

\item {} 
\sphinxstylestrong{timestep} :: {[}in{]} The number of elapsed timesteps

\item {} 
\sphinxstylestrong{iobt} :: {[}in{]} An ice\sphinxhyphen{}ocean boundary type with fluxes to drive the

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_mask\_val\_consistency() (fortran subroutine in module mom\_surface\_forcing\_gfdl)@\spxentry{check\_mask\_val\_consistency()}\spxextra{fortran subroutine in module mom\_surface\_forcing\_gfdl}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/check_mask_val_consistency}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl/}}\sphinxbfcode{\sphinxupquote{check\_mask\_val\_consistency}}}{\emph{val}, \emph{mask}, \emph{i}, \emph{j}, \emph{varname}, \emph{G}}{}
Check the values passed by IOB over land are zero.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{val} :: {[}in{]} value of flux/variable passed by IOB

\item {} 
\sphinxstylestrong{mask} :: {[}in{]} value of ocean mask

\item {} 
\sphinxstylestrong{i} :: {[}in{]} model grid cell indices

\item {} 
\sphinxstylestrong{j} :: {[}in{]} model grid cell indices

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} variable name

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing_gfdl:f/mom_surface_forcing_gfdl/convert_iob_to_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_iob\_to\_fluxes}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tfreeze module reference}
\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze}}\label{\detokenize{api/generated/modules/mom_tfreeze:mom-tfreeze-module-reference}}\label{\detokenize{api/generated/modules/mom_tfreeze::doc}}\index{mom\_tfreeze (module)@\spxentry{mom\_tfreeze}\spxextra{module}|spxpagem}
Freezing point expressions.

{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:detamom-tfreeze}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tfreeze:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_linear_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_linear\_scalar()}}}}}
&
This subroutine computes the freezing point potential temperature {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using a simple linear expression, with coefficients passed in as arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_linear_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_linear\_array()}}}}}
&
This subroutine computes an array of freezing point potential temperatures {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using a simple linear expression, with coefficients passed in as arguments.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_millero_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_millero\_scalar()}}}}}
&
This subroutine computes the freezing point potential temperature {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e\sphinxhyphen{}8 to 7.75e\sphinxhyphen{}8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_millero_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_millero\_array()}}}}}
&
This subroutine computes the freezing point potential temperature {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e\sphinxhyphen{}8 to 7.75e\sphinxhyphen{}8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_teos10_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_teos10\_scalar()}}}}}
&
This subroutine computes the freezing point conservative temperature {[}degC{]} from absolute salinity {[}g/kg{]}, and pressure {[}Pa{]} using the TEOS10 package.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_teos10_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_teos10\_array()}}}}}
&
This subroutine computes the freezing point conservative temperature {[}degC{]} from absolute salinity {[}g/kg{]}, and pressure {[}Pa{]} using the TEOS10 package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tfreeze:detailed-description}}\label{\detokenize{api/generated/modules/mom_tfreeze:detamom-tfreeze}}
Freezing point expressions.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tfreeze:function-subroutine-documentation}}\index{calculate\_tfreeze\_linear\_scalar() (fortran subroutine in module mom\_tfreeze)@\spxentry{calculate\_tfreeze\_linear\_scalar()}\spxextra{fortran subroutine in module mom\_tfreeze}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_linear_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tfreeze/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_linear\_scalar}}}{\emph{S}, \emph{pres}, \emph{T\_Fr}, \emph{TFr\_S0\_P0}, \emph{dTFr\_dS}, \emph{dTFr\_dp}}{}
This subroutine computes the freezing point potential temperature {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using a simple linear expression, with coefficients passed in as arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{pres} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{tfr\_s0\_p0} :: {[}in{]} The freezing point at S=0, p=0 {[}degC{]}.

\item {} 
\sphinxstylestrong{dtfr\_ds} :: {[}in{]} The derivative of freezing point with salinity, {[}degC ppt\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dtfr\_dp} :: {[}in{]} The derivative of freezing point with pressure, {[}degC Pa\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_linear\_array() (fortran subroutine in module mom\_tfreeze)@\spxentry{calculate\_tfreeze\_linear\_array()}\spxextra{fortran subroutine in module mom\_tfreeze}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_linear_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tfreeze/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_linear\_array}}}{\emph{S}, \emph{pres}, \emph{T\_Fr}, \emph{start}, \emph{npts}, \emph{TFr\_S0\_P0}, \emph{dTFr\_dS}, \emph{dTFr\_dp}}{}
This subroutine computes an array of freezing point potential temperatures {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using a simple linear expression, with coefficients passed in as arguments.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{pres} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\item {} 
\sphinxstylestrong{tfr\_s0\_p0} :: {[}in{]} The freezing point at S=0, p=0, {[}degC{]}.

\item {} 
\sphinxstylestrong{dtfr\_ds} :: {[}in{]} The derivative of freezing point with salinity, {[}degC PSU\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{dtfr\_dp} :: {[}in{]} The derivative of freezing point with pressure, {[}degC Pa\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_millero\_scalar() (fortran subroutine in module mom\_tfreeze)@\spxentry{calculate\_tfreeze\_millero\_scalar()}\spxextra{fortran subroutine in module mom\_tfreeze}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_millero_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tfreeze/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_millero\_scalar}}}{\emph{S}, \emph{pres}, \emph{T\_Fr}}{}
This subroutine computes the freezing point potential temperature {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e\sphinxhyphen{}8 to 7.75e\sphinxhyphen{}8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity in PSU.

\item {} 
\sphinxstylestrong{pres} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point potential temperature {[}degC{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_millero\_array() (fortran subroutine in module mom\_tfreeze)@\spxentry{calculate\_tfreeze\_millero\_array()}\spxextra{fortran subroutine in module mom\_tfreeze}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_millero_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tfreeze/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_millero\_array}}}{\emph{S}, \emph{pres}, \emph{T\_Fr}, \emph{start}, \emph{npts}}{}
This subroutine computes the freezing point potential temperature {[}degC{]} from salinity {[}ppt{]}, and pressure {[}Pa{]} using the expression from Millero (1978) (and in appendix A of Gill 1982), but with the of the pressure dependence changed from 7.53e\sphinxhyphen{}8 to 7.75e\sphinxhyphen{}8 to make this an expression for potential temperature (not in situ temperature), using a value that is correct at the freezing point at 35 PSU and 5e6 Pa (500 dbar).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} Salinity {[}PSU{]}.

\item {} 
\sphinxstylestrong{pres} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} The starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} The number of values to calculate.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_teos10\_scalar() (fortran subroutine in module mom\_tfreeze)@\spxentry{calculate\_tfreeze\_teos10\_scalar()}\spxextra{fortran subroutine in module mom\_tfreeze}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_teos10_scalar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tfreeze/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_teos10\_scalar}}}{\emph{S}, \emph{pres}, \emph{T\_Fr}}{}
This subroutine computes the freezing point conservative temperature {[}degC{]} from absolute salinity {[}g/kg{]}, and pressure {[}Pa{]} using the TEOS10 package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} Absolute salinity {[}g/kg{]}.

\item {} 
\sphinxstylestrong{pres} :: {[}in{]} Pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point conservative temperature {[}degC{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_teos10_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_teos10\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tfreeze\_teos10\_array() (fortran subroutine in module mom\_tfreeze)@\spxentry{calculate\_tfreeze\_teos10\_array()}\spxextra{fortran subroutine in module mom\_tfreeze}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_teos10_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tfreeze/}}\sphinxbfcode{\sphinxupquote{calculate\_tfreeze\_teos10\_array}}}{\emph{S}, \emph{pres}, \emph{T\_Fr}, \emph{start}, \emph{npts}}{}
This subroutine computes the freezing point conservative temperature {[}degC{]} from absolute salinity {[}g/kg{]}, and pressure {[}Pa{]} using the TEOS10 package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{s} :: {[}in{]} absolute salinity {[}g/kg{]}.

\item {} 
\sphinxstylestrong{pres} :: {[}in{]} pressure {[}Pa{]}.

\item {} 
\sphinxstylestrong{t\_fr} :: {[}out{]} Freezing point conservative temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{start} :: {[}in{]} the starting point in the arrays.

\item {} 
\sphinxstylestrong{npts} :: {[}in{]} the number of values to calculate.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tfreeze:f/mom_tfreeze/calculate_tfreeze_teos10_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tfreeze\_teos10\_scalar}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_thickness\_diffuse module reference}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse}}\label{\detokenize{api/generated/modules/mom_thickness_diffuse:mom-thickness-diffuse-module-reference}}\label{\detokenize{api/generated/modules/mom_thickness_diffuse::doc}}\index{mom\_thickness\_diffuse (module)@\spxentry{mom\_thickness\_diffuse}\spxextra{module}|spxpagem}
Thickness diffusion (or Gent McWilliams)

{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:detamom-thickness-diffuse}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_cs}}}}}
&
Control structure for thickness diffusion.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse()}}}}}
&
Calculates thickness diffusion coefficients and applies thickness diffusion to layer thicknesses, h.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_full}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_full()}}}}}
&
Calculates parameterized layer transports for use in the continuity equation.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/streamfn_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamfn\_solver()}}}}}
&
Tridiagonal solver for streamfunction at interfaces.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/add_detangling_kh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_detangling\_kh()}}}}}
&
Modifies thickness diffusivities to untangle layer structures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_init()}}}}}
&
Initialize the thickness diffusion module/structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_get_kh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_get\_kh()}}}}}
&
Copies ubtav and vbtav from private type into arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_end()}}}}}
&
Deallocate the thickness diffusion control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:detailed-description}}\label{\detokenize{api/generated/modules/mom_thickness_diffuse:detamom-thickness-diffuse}}

\paragraph{Thickness diffusion (aka Gent\sphinxhyphen{}McWilliams)}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:thickness-diffusion-aka-gent-mcwilliams}}\label{\detokenize{api/generated/modules/mom_thickness_diffuse:namespacemom-thickness-diffuse-1section-gm}}
Thickness diffusion is implemented via along\sphinxhyphen{}layer mass fluxes
\begin{equation*}
\begin{split}h^\dagger \leftarrow h^n - \Delta t \nabla \cdot ( \vec{uh}^* )\end{split}
\end{equation*}
where the mass fluxes are cast as the difference in vector streamfunction
\begin{equation*}
\begin{split}\vec{uh}^* = \delta_k \vec{\psi} .\end{split}
\end{equation*}
The GM implementation of thickness diffusion made the streamfunction proportional to the potential density slope
\begin{equation*}
\begin{split}\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}\end{split}
\end{equation*}
but for robustness the scheme is implemented as
\begin{equation*}
\begin{split}\vec{\psi} = \kappa_h \frac{M^2}{\sqrt{N^4 + M^4}}\end{split}
\end{equation*}
since the quantity \(\frac{M^2}{\sqrt{N^2 + M^2}}\) is bounded between \$\sphinxhyphen{}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:
\begin{equation*}
\begin{split}\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}}\end{split}
\end{equation*}
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\sphinxhyphen{}speed or the equivalent barotropic mode wave\sphinxhyphen{}speed. \(N_*^2 = \max(N^2,0)\) is a non\sphinxhyphen{}negative form of the square of the Brunt\sphinxhyphen{}Vaisala frequency. The parameter \(\gamma_F\) is used to reduce the vertical smoothing length scale.
\begin{equation*}
\begin{split}\kappa_h = \left( \kappa_o + \alpha_{s} L_{s}^2 < S N > + \alpha_{M} \kappa_{M} \right) r(\Delta x,L_d)\end{split}
\end{equation*}
where \(S\) is the isoneutral slope magnitude, \(N\) is the square root of Brunt\sphinxhyphen{}Vaisala frequency, \(\kappa_{M}\) is the diffusivity calculated by the MEKE parameterization ({\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke()}}}}} module) and module) and \(r(\Delta x,L_d)\) is a function of the local resolution (ratio of grid\sphinxhyphen{}spacing, \(\Delta x\) , to deformation radius, \(L_d\) ). The length \(L_s\) is provided by the {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs()}}}}} module (enabled with module (enabled with \sphinxcode{\sphinxupquote{USE\_VARIABLE\_MIXING=True}} and the term \(<SN>\) is the vertical average slope times the Brunt\sphinxhyphen{}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).
\begin{equation*}
\begin{split}\kappa_h \leftarrow \min{\left( \kappa_{max}, \kappa_{cfl}, \max{\left( \kappa_{min}, \kappa_h \right)} \right)} f(c_g,z)\end{split}
\end{equation*}
where
\(f(c_g,z)\) is a vertical structure function. \(f(c_g,z)\) is calculated in module {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs()}}}}}. If . If \sphinxcode{\sphinxupquote{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 \sphinxcode{\sphinxupquote{vert\_fill\_ts()}}:
:

\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*}


\subparagraph{Module mom\_thickness\_diffuse parameters}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:module-mom-thickness-diffuse-parameters}}\label{\detokenize{api/generated/modules/mom_thickness_diffuse:namespacemom-thickness-diffuse-1section-khth-module-parameters}}

\begin{savenotes}\sphinxattablestart
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily 
Symbol
&\sphinxstyletheadfamily 
Module parameter
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{THICKNESSDIFFUSE}}
\\
\hline
\(\kappa_o\)
&
\sphinxcode{\sphinxupquote{KHTH}}
\\
\hline
\(\alpha_{s}\)
&
\sphinxcode{\sphinxupquote{KHTH\_SLOPE\_CFF}}
\\
\hline
\(\kappa_{min}\)
&
\sphinxcode{\sphinxupquote{KHTH\_MIN}}
\\
\hline
\(\kappa_{max}\)
&
\sphinxcode{\sphinxupquote{KHTH\_MAX}}
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{KHTH\_MAX\_CFL}}
\\
\hline
\(\kappa_{smth}\)
&
\sphinxcode{\sphinxupquote{KD\_SMOOTH}}
\\
\hline
\(\alpha_{M}\)
&
\sphinxcode{\sphinxupquote{MEKE\_KHTH\_FAC}}
(from {\hyperref[\detokenize{api/generated/modules/mom_meke:f/mom_meke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_meke()}}}}} module) module)
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{KHTH\_USE\_EBT\_STRUCT}}
(from {\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs()}}}}} module) module)
\\
\hline\begin{itemize}
\item {} 
\end{itemize}
&
\sphinxcode{\sphinxupquote{KHTH\_USE\_FGNV\_STREAMFUNCTION}}
\\
\hline
\(\gamma_F\)
&
\sphinxcode{\sphinxupquote{FGNV\_FILTER\_SCALE}}
\\
\hline
\(c_{min}\)
&
\sphinxcode{\sphinxupquote{FGNV\_C\_MIN}}
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}


\subparagraph{References}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:references}}\label{\detokenize{api/generated/modules/mom_thickness_diffuse:namespacemom-thickness-diffuse-1section-khth-module-reference}}
Ferrari, R., S.M. Griffies, A.J.G. Nurser and G.K. Vallis, 2010: A boundary\sphinxhyphen{}value problem for the parameterized mesoscale eddy transport. Ocean Modelling, 32, 143\sphinxhyphen{}156.
\sphinxurl{http://doi.org/10.1016/j.ocemod.2010.01.004}

Viscbeck, M., J.C. Marshall, H. Jones, 1996: Dynamics of isolated convective regions in the ocean. J. Phys. Oceangr., 26, 1721\sphinxhyphen{}1734.
\sphinxurl{http://dx.doi.org/10.1175/1520-0485(1996)026\%3C1721:DOICRI\%3E2.0.CO;2}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:type-documentation}}\index{thickness\_diffuse\_cs (fortran type in module mom\_thickness\_diffuse)@\spxentry{thickness\_diffuse\_cs}\spxextra{fortran type in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_cs}}}
Control structure for thickness diffusion.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_uhgm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vhgm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_gmwork}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_u1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_v1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kh\_t1}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_slope\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_slope\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sfn\_unlim\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sfn\_unlim\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sfn\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_sfn\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifier.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Background interface depth diffusivity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khth\_slope\_cff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Slope dependence coefficient of Khth {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_khth\_cfl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum value of the diffusive CFL for thickness diffusion.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khth\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum value of Khth {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khth\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum value of Khth {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}, or 0 for no max.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slope\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Slopes steeper than slope\_max are limited in some way {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_smooth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Vertical diffusivity used to interpolate more sensible values of T \& S into thin layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, interfaces heights are diffused.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_fgnv\_streamfn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the streamfunction formulation of Ferrari et al., 2010, which effectively emphasizes graver vertical modes by smoothing in the vertical.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fgnv\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A coefficient scaling the vertical smoothing term in the Ferrari et al., 2010, streamfunction formulation {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fgnv\_c\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A minimum wave speed used in the Ferrari et al., 2010, streamfunction formulation {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2\_floor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A floor for Brunt\sphinxhyphen{}Vasaila frequency in the Ferrari et al., 2010, streamfunction formulation {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{detangle\_interfaces}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, add 3\sphinxhyphen{}d structured interface height diffusivities to horizontally smooth jagged layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{detangle\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If detangle\_interfaces is true, this is the timescale over which maximally jagged grid\sphinxhyphen{}scale thickness variations are suppressed {[}T \textasciitilde{}\textgreater{} s{]}. This must be longer than DT, or 0 (the default) to use DT.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of layers within mixed layer

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: write verbose checksums for debugging purposes

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_gme\_thickness\_diffuse}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, passes GM coefficients to MOM\_hor\_visc for use with GME closure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_geometric}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the GM coefficient formulation from the GEOMETRIC framework (Marshall et al., 2012)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_geometric\_alpha}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The nondimensional coefficient governing the efficiency of the GEOMETRIC thickness difussion {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_geometric\_epsilon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum Eady growth rate for the GEOMETRIC thickness diffusivity {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{meke\_geom\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use expressions in the MEKE\_GEOMETRIC calculation that recover the answers from the original implementation. Otherwise, use expressions that satisfy rotational symmetry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_kh\_in\_meke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, uses the thickness diffusivity calculated here to diffuse MEKE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gm\_src\_alt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the GM energy conversion form S\textasciicircum{}2*N\textasciicircum{}2*kappa rather than the streamfunction for the GM source term.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_gm\_work\_bug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the incorrect sign for the top\sphinxhyphen{}level work tendency on the top layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stanley\_det\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The coefficient correlating SGS temperature variance with the mean temperature gradient in the deterministic part of the Stanley parameterization. Negative values disable the scheme.” {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure used to regulate timing of diagnostics

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gmwork}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Work by thickness diffusivity {[}R Z L2 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diagslopex}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Diagnostic: zonal neutral slope {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diagslopey}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Diagnostic: zonal neutral slope {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh\_u\_gme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: interface height diffusivities in u\sphinxhyphen{}columns {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kh\_v\_gme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: interface height diffusivities in v\sphinxhyphen{}columns {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_thickness_diffuse:function-subroutine-documentation}}\index{thickness\_diffuse() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{thickness\_diffuse()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse}}}{\emph{h}, \emph{uhtr}, \emph{vhtr}, \emph{tv}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{MEKE}, \emph{VarMix}, \emph{CDp}, \emph{CS}}{}
Calculates thickness diffusion coefficients and applies thickness diffusion to layer thicknesses, h. Diffusivities are limited to ensure stability. Also returns along\sphinxhyphen{}layer mass fluxes used in the continuity equation.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uhtr} :: {[}inout{]} Accumulated zonal mass flux {[}L2 H \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}inout{]} Accumulated meridional mass flux {[}L2 H \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{meke} :: MEKE control structure

\item {} 
\sphinxstylestrong{varmix} :: Variable mixing coefficients

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} Diagnostics for the continuity equation

\item {} 
\sphinxstylestrong{cs} :: Control structure for thickness diffusion

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/add_detangling_kh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_detangling\_kh}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_update_remap_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_update\_remap\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_full}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_full}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{thickness\_diffuse\_full() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{thickness\_diffuse\_full()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_full}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_full}}}{\emph{h}, \emph{e}, \emph{Kh\_u}, \emph{Kh\_v}, \emph{tv}, \emph{uhD}, \emph{vhD}, \emph{cg1}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{MEKE}, \emph{CS}, \emph{int\_slope\_u}, \emph{int\_slope\_v}, \emph{slope\_x}, \emph{slope\_y}}{}
Calculates parameterized layer transports for use in the continuity equation. Fluxes are limited to give positive definite thicknesses. Called by \sphinxcode{\sphinxupquote{thickness\_diffuse()}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Interface positions {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{kh\_u} :: {[}in{]} Thickness diffusivity on interfaces at u points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kh\_v} :: {[}in{]} Thickness diffusivity on interfaces at v points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{uhd} :: {[}out{]} Zonal mass fluxes {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{vhd} :: {[}out{]} Meridional mass fluxes {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{cg1} :: Wave speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{meke} :: MEKE control structure

\item {} 
\sphinxstylestrong{cs} :: Control structure for thickness diffusion

\item {} 
\sphinxstylestrong{int\_slope\_u} :: {[}in{]} Ratio that determine how much of the isopycnal slopes are taken directly from the interface slopes without consideration of density gradients {[}nondim{]}.

\item {} 
\sphinxstylestrong{int\_slope\_v} :: {[}in{]} Ratio that determine how much of the isopycnal slopes are taken directly from the interface slopes without consideration of density gradients {[}nondim{]}.

\item {} 
\sphinxstylestrong{slope\_x} :: {[}in{]} Isopycnal slope at u\sphinxhyphen{}points

\item {} 
\sphinxstylestrong{slope\_y} :: {[}in{]} Isopycnal slope at v\sphinxhyphen{}points

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/streamfn_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamfn\_solver}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{streamfn\_solver() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{streamfn\_solver()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/streamfn_solver}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{streamfn\_solver}}}{\emph{nk}, \emph{c2\_h}, \emph{hN2}, \emph{sfn}}{}
Tridiagonal solver for streamfunction at interfaces.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{nk} :: {[}in{]} Number of layers

\item {} 
\sphinxstylestrong{c2\_h} :: {[}in{]} Wave speed squared over thickness in layers {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{hn2} :: {[}in{]} Thickness times N2 at interfaces {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{sfn} :: {[}inout{]} Streamfunction {[}Z L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1{]} or arbitrary units On entry, equals diffusivity times slope. On exit, equals the streamfunction.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_full}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse\_full}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_detangling\_kh() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{add\_detangling\_kh()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/add_detangling_kh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{add\_detangling\_kh}}}{\emph{h}, \emph{e}, \emph{Kh\_u}, \emph{Kh\_v}, \emph{KH\_u\_CFL}, \emph{KH\_v\_CFL}, \emph{tv}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{int\_slope\_u}, \emph{int\_slope\_v}}{}
Modifies thickness diffusivities to untangle layer structures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{e} :: {[}in{]} Interface positions {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{kh\_u} :: {[}inout{]} Thickness diffusivity on interfaces at u points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kh\_v} :: {[}inout{]} Thickness diffusivity on interfaces at v points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kh\_u\_cfl} :: {[}in{]} Maximum stable thickness diffusivity at u points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kh\_v\_cfl} :: {[}in{]} Maximum stable thickness diffusivity at v points {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamics structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: Control structure for thickness diffusion

\item {} 
\sphinxstylestrong{int\_slope\_u} :: {[}inout{]} Ratio that determine how much of the isopycnal slopes are taken directly from the interface slopes without consideration of density gradients.

\item {} 
\sphinxstylestrong{int\_slope\_v} :: {[}inout{]} Ratio that determine how much of the isopycnal slopes are taken directly from the interface slopes without consideration of density gradients.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thickness\_diffuse}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{thickness\_diffuse\_init() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{thickness\_diffuse\_init()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CDp}, \emph{CS}}{}
Initialize the thickness diffusion module/structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handles

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} Continuity equation diagnostics

\item {} 
\sphinxstylestrong{cs} :: Control structure for thickness diffusion

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{thickness\_diffuse\_get\_kh() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{thickness\_diffuse\_get\_kh()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_get_kh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_get\_kh}}}{\emph{CS}, \emph{KH\_u\_GME}, \emph{KH\_v\_GME}, \emph{G}}{}
Copies ubtav and vbtav from private type into arrays.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for this module

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{kh\_u\_gme} :: {[}inout{]} interface height diffusivities at u\sphinxhyphen{}faces {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{kh\_v\_gme} :: {[}inout{]} interface height diffusivities at v\sphinxhyphen{}faces {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{thickness\_diffuse\_end() (fortran subroutine in module mom\_thickness\_diffuse)@\spxentry{thickness\_diffuse\_end()}\spxextra{fortran subroutine in module mom\_thickness\_diffuse}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_thickness_diffuse:f/mom_thickness_diffuse/thickness_diffuse_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_thickness\_diffuse/}}\sphinxbfcode{\sphinxupquote{thickness\_diffuse\_end}}}{\emph{CS}}{}
Deallocate the thickness diffusion control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure for thickness diffusion

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tidal\_forcing module reference}
\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing}}\label{\detokenize{api/generated/modules/mom_tidal_forcing:mom-tidal-forcing-module-reference}}\label{\detokenize{api/generated/modules/mom_tidal_forcing::doc}}\index{mom\_tidal\_forcing (module)@\spxentry{mom\_tidal\_forcing}\spxextra{module}|spxpagem}
Tidal contributions to geopotential.

{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:detamom-tidal-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_tidal_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/astro_longitudes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{astro\_longitudes}}}}}
&
Simple type to store astronomical longitudes used to calculate tidal phases.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_cs}}}}}
&
The control structure for the MOM\_tidal\_forcing module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tidal_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/astro_longitudes_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{astro\_longitudes\_init()}}}}}
&
Finds astronomical longitudes s, h, p, and N, the mean longitude of the moon, sun, lunar perigee, and ascending node, respectively, at the specified reference time time\_ref.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/eq_phase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eq\_phase()}}}}}
&
Calculates the equilibrium phase argument for the given tidal constituent constit and the astronomical longitudes and the reference time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_frequency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_frequency()}}}}}
&
Looks up angular frequencies for the main tidal constituents.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/nodal_fu}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{nodal\_fu()}}}}}
&
Find amplitude (f) and phase (u) modulation of tidal constituents by the 18.6 year nodal cycle.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_init()}}}}}
&
This subroutine allocates space for the static variables used by this module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/find_in_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_in\_files()}}}}}
&
This subroutine finds a named variable in a list of files and reads its values into a domain\sphinxhyphen{}decomposed 2\sphinxhyphen{}d array.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_sensitivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_sensitivity()}}}}}
&
This subroutine calculates returns the partial derivative of the local geopotential height with the input sea surface height due to self\sphinxhyphen{}attraction and loading.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/calc_tidal_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calc\_tidal\_forcing()}}}}}
&
This subroutine calculates the geopotential anomalies that drive the tides, including self\sphinxhyphen{}attraction and loading.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_end()}}}}}
&
This subroutine deallocates memory associated with the tidal forcing module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tidal_forcing:detailed-description}}\label{\detokenize{api/generated/modules/mom_tidal_forcing:detamom-tidal-forcing}}
Tidal contributions to geopotential.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_tidal_forcing:type-documentation}}\index{astro\_longitudes (fortran type in module mom\_tidal\_forcing)@\spxentry{astro\_longitudes}\spxextra{fortran type in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/astro_longitudes}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{astro\_longitudes}}}
Simple type to store astronomical longitudes used to calculate tidal phases.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mean longitude of moon {[}rad{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mean longitude of sun {[}rad{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Mean longitude of lunar perigee {[}rad{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Longitude of ascending node {[}rad{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_forcing\_cs (fortran type in module mom\_tidal\_forcing)@\spxentry{tidal\_forcing\_cs}\spxextra{fortran type in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{tidal\_forcing\_cs}}}
The control structure for the MOM\_tidal\_forcing module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sal\_scalar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the scalar approximation when calculating self\sphinxhyphen{}attraction and loading.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_sal\_from\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, Read the tidal self\sphinxhyphen{}attraction and loading from input files, specified by TIDAL\_INPUT\_FILE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_prev\_tides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the SAL from the previous iteration of the tides to facilitate convergence.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_eq\_phase}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, tidal forcing is phase\sphinxhyphen{}shifted to match equilibrium tide. Set to false if providing tidal phases that have already been shifted by the astronomical/equilibrium argument.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sal\_scalar}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The constant of proportionality between sea surface height (really it should be bottom pressure) anomalies and bottom geopotential anomalies.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of tidal constituents in use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{freq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( max\_constituents )}\sphinxstyleemphasis{{]}} :: The frequency of a tidal constituent {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{phase0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( max\_constituents )}\sphinxstyleemphasis{{]}} :: The phase of a tidal constituent at time 0, in radians.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{amp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( max\_constituents )}\sphinxstyleemphasis{{]}} :: The amplitude of a tidal constituent at time 0 {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{love\_no}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( max\_constituents )}\sphinxstyleemphasis{{]}} :: The Love number of a tidal constituent at time 0 {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{struct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( max\_constituents )}\sphinxstyleemphasis{{]}} :: An encoded spatial structure for each constituent.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{const\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=16)( max\_constituents )}\sphinxstyleemphasis{{]}} :: The name of each constituent.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_ref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: Reference time (t = 0) used to calculate tidal forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_longitudes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( astro\_longitudes )}\sphinxstyleemphasis{{]}} :: Astronomical longitudes used to calculate tidal phases at t = 0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sin\_struct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The sine and cosine based structures that can.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cos\_struct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: be associated with the astronomical forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cosphasesal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The cosine and sine of the phase of the.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sinphasesal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: self\sphinxhyphen{}attraction and loading amphidromes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ampsal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The amplitude of the SAL {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cosphase\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The cosine and sine of the phase of the.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sinphase\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: amphidromes in the previous tidal solutions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{amp\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The amplitude of the previous tidal solution {[}m{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tidal_forcing:function-subroutine-documentation}}\index{astro\_longitudes\_init() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{astro\_longitudes\_init()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/astro_longitudes_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{astro\_longitudes\_init}}}{\emph{time\_ref}, \emph{longitudes}}{}
Finds astronomical longitudes s, h, p, and N, the mean longitude of the moon, sun, lunar perigee, and ascending node, respectively, at the specified reference time time\_ref. These formulas were obtained from Kowalik and Luick, “Modern Theory and Practice of Tide Analysis and Tidal Power”, 2019 (their Equation I.71), which are based on Schureman, 1958. For simplicity, the time associated with time\_ref should be at midnight. These formulas also only make sense if the calendar is gregorian.
\begin{quote}\begin{description}
\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::initialize\_obc\_tides}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{eq\_phase() (fortran function in module mom\_tidal\_forcing)@\spxentry{eq\_phase()}\spxextra{fortran function in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/eq_phase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{eq\_phase}}}{\emph{constit}, \emph{longitudes}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Calculates the equilibrium phase argument for the given tidal constituent constit and the astronomical longitudes and the reference time. These formulas follow Table I.4 of Kowalik and Luick, “Modern Theory and Practice of Tide Analysis and Tidal Power”, 2019.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::initialize\_obc\_tides}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_frequency() (fortran function in module mom\_tidal\_forcing)@\spxentry{tidal\_frequency()}\spxextra{fortran function in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_frequency}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{tidal\_frequency}}}{\emph{constit}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Looks up angular frequencies for the main tidal constituents. Values used here are from previous versions of MOM.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::initialize\_obc\_tides}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{nodal\_fu() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{nodal\_fu()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/nodal_fu}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{nodal\_fu}}}{\emph{constit}, \emph{N}, \emph{fn}, \emph{un}}{}
Find amplitude (f) and phase (u) modulation of tidal constituents by the 18.6 year nodal cycle. Values here follow Table I.6 in Kowalik and Luick, “Modern Theory and Practice of Tide Analysis and Tidal Power”, 2019.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/initialize_obc_tides}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::initialize\_obc\_tides}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_forcing\_init() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{tidal\_forcing\_init()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{tidal\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{CS}}{}
This subroutine allocates space for the static variables used by this module. The metrics may be effectively 0, 1, or 2\sphinxhyphen{}D arrays, while fields like the background viscosities are 2\sphinxhyphen{}D arrays. ALLOC is a macro defined in \sphinxcode{\sphinxupquote{MOM\_memory.h}}
for allocate or nothing with static memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/astro_longitudes_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{astro\_longitudes\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cpu_clock:f/mom_cpu_clock/cpu_clock_id}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cpu\_clock::cpu\_clock\_id}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/eq_phase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eq\_phase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/find_in_files}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_in\_files}}}}} \sphinxcode{\sphinxupquote{id\_clock\_tides}} \sphinxcode{\sphinxupquote{max\_constituents}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_frequency}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_frequency}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_in\_files() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{find\_in\_files()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/find_in_files}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{find\_in\_files}}}{\emph{filenames}, \emph{varname}, \emph{array}, \emph{G}}{}
This subroutine finds a named variable in a list of files and reads its values into a domain\sphinxhyphen{}decomposed 2\sphinxhyphen{}d array.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filenames} :: {[}in{]} The names of the files to search for the named variable

\item {} 
\sphinxstylestrong{varname} :: {[}in{]} The name of the variable to read

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{array} :: {[}out{]} The array to fill with the data

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_forcing\_sensitivity() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{tidal\_forcing\_sensitivity()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_sensitivity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{tidal\_forcing\_sensitivity}}}{\emph{G}, \emph{CS}, \emph{deta\_tidal\_deta}}{}
This subroutine calculates returns the partial derivative of the local geopotential height with the input sea surface height due to self\sphinxhyphen{}attraction and loading.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to tidal\_forcing\_init.

\item {} 
\sphinxstylestrong{deta\_tidal\_deta} :: {[}out{]} The partial derivative of eta\_tidal with the local value of eta {[}nondim{]}.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/set_dtbt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::set\_dtbt}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calc\_tidal\_forcing() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{calc\_tidal\_forcing()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/calc_tidal_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{calc\_tidal\_forcing}}}{\emph{Time}, \emph{eta}, \emph{eta\_tidal}, \emph{G}, \emph{CS}, \emph{deta\_tidal\_deta}, \emph{m\_to\_Z}}{}
This subroutine calculates the geopotential anomalies that drive the tides, including self\sphinxhyphen{}attraction and loading. Optionally, it also returns the partial derivative of the local geopotential height with the input sea surface height. For now, eta and eta\_tidal are both geopotential heights in depth units, but probably the input for eta should really be replaced with the column mass anomalies.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The time for the caluculation.

\item {} 
\sphinxstylestrong{eta} :: {[}in{]} The sea surface height anomaly from a time\sphinxhyphen{}mean geoid {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{eta\_tidal} :: {[}out{]} The tidal forcing geopotential height anomalies {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to tidal\_forcing\_init.

\item {} 
\sphinxstylestrong{deta\_tidal\_deta} :: {[}out{]} The partial derivative of eta\_tidal with the local value of eta {[}nondim{]}.

\item {} 
\sphinxstylestrong{m\_to\_z} :: {[}in{]} A scaling factor from m to the units of eta.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_tides}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_fv:f/mom_pressureforce_fv/pressureforce_fv_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_fv::pressureforce\_fv\_nonbouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_bouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_bouss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_pressureforce_mont:f/mom_pressureforce_mont/pressureforce_mont_nonbouss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_pressureforce\_mont::pressureforce\_mont\_nonbouss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_forcing\_end() (fortran subroutine in module mom\_tidal\_forcing)@\spxentry{tidal\_forcing\_end()}\spxextra{fortran subroutine in module mom\_tidal\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_forcing:f/mom_tidal_forcing/tidal_forcing_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_forcing/}}\sphinxbfcode{\sphinxupquote{tidal\_forcing\_end}}}{\emph{CS}}{}
This subroutine deallocates memory associated with the tidal forcing module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to tidal\_forcing\_init; it is deallocated here.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tidal\_mixing module reference}
\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing}}\label{\detokenize{api/generated/modules/mom_tidal_mixing:mom-tidal-mixing-module-reference}}\label{\detokenize{api/generated/modules/mom_tidal_mixing::doc}}\index{mom\_tidal\_mixing (module)@\spxentry{mom\_tidal\_mixing}\spxextra{module}|spxpagem}
Interface to vertical tidal mixing schemes including CVMix tidal mixing.

{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:detamom-tidal-mixing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_tidal_mixing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_mixing\_cs}}}}}
&
Control structure with parameters for the tidal mixing module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_mixing\_diags}}}}}
&
Containers for tidal mixing diagnostics.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tidal_mixing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_mixing\_init()}}}}}
&
Initializes internal tidal dissipation scheme for diapycnal mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_tidal_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tidal\_mixing()}}}}}
&
Depending on whether or not CVMix is active, calls the associated subroutine to compute internal tidal dissipation and to add the effect of internal\sphinxhyphen{}tide\sphinxhyphen{}driven mixing to the layer or interface diffusivities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_cvmix_tidal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_cvmix\_tidal()}}}}}
&
Calls the CVMix routines to compute tidal dissipation and to add the effect of internal\sphinxhyphen{}tide\sphinxhyphen{}driven mixing to the interface diffusivities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/add_int_tide_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_int\_tide\_diffusivity()}}}}}
&
This subroutine adds the effect of internal\sphinxhyphen{}tide\sphinxhyphen{}driven mixing to the layer diffusivities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/setup_tidal_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup\_tidal\_diagnostics()}}}}}
&
Sets up diagnostics arrays for tidal mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/post_tidal_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_tidal\_diagnostics()}}}}}
&
This subroutine offers up diagnostics of the tidal mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_h_amp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_mixing\_h\_amp()}}}}}
&
This subroutine returns a zonal slice of the topographic roughness amplitudes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_tidal\_energy()}}}}}
&
This subroutine read tidal energy inputs from a file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_constituents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_tidal\_constituents()}}}}}
&
This subroutine reads tidal input energy from a file by constituent.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_mixing\_end()}}}}}
&
Clear pointers and deallocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tidal_mixing:detailed-description}}\label{\detokenize{api/generated/modules/mom_tidal_mixing:detamom-tidal-mixing}}
Interface to vertical tidal mixing schemes including CVMix tidal mixing.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_tidal_mixing:type-documentation}}\index{tidal\_mixing\_cs (fortran type in module mom\_tidal\_mixing)@\spxentry{tidal\_mixing\_cs}\spxextra{fortran type in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{tidal\_mixing\_cs}}}
Control structure with parameters for the tidal mixing module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tke\_leewave}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_niku}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_lowmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_itidal\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_niku\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kd\_lowmode\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_nb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_meanz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_fl\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_fl\_lowmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_polzin\_decay\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_polzin\_decay\_scale\_scaled}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_n2\_int}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_simmons\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_schmittner\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tidal\_qe\_md}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_vert\_dep}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do more extensive debugging checks. This is hard\sphinxhyphen{}coded.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_dissipation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Internal tide conversion (from barotropic) with the schemes of St Laurent et al (2002) \& Simmons et al (2004)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_profile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A coded integer indicating the vertical profile for dissipation of the internal waves. Schemes that are currently encoded are St Laurent et al (2002) and Polzin (2009).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lee\_wave\_dissipation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Enable lee\sphinxhyphen{}wave driven mixing, following Nikurashin (2010), with a vertical energy deposition profile specified by Lee\_wave\_profile to be St Laurent et al (2002) or Simmons et al (2004) scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lee\_wave\_profile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A coded integer indicating the vertical profile for dissipation of the lee waves. Schemes that are currently encoded are St Laurent et al (2002) and Polzin (2009).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_decay\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: decay scale for internal wave TKE {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mu\_itides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: efficiency for conversion of dissipation to potential energy {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gamma\_itides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: fraction of local dissipation {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gamma\_lee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: fraction of local dissipation for lee waves (Nikurashin’s energy input) {[}nondim{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{decay\_scale\_factor\_lee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Scaling factor for the decay scale of lee wave energy dissipation {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_zbot\_itides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: minimum depth for internal tide conversion {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lowmode\_itidal\_dissipation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, consider mixing due to breaking low modes that have been remotely generated using an internal tidal dissipation scheme to specify the vertical profile of the energy input to drive diapycnal mixing, along the lines of St. Laurent et al. (2002) and Simmons et al. (2004).

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nu\_polzin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The non\sphinxhyphen{}dimensional constant used in Polzin form of the vertical scale of decay of tidal dissipation {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nbotref\_polzin}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Reference value for the buoyancy frequency at the ocean bottom used in Polzin formulation of the vertical scale of decay of tidal dissipation {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{polzin\_decay\_scale\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Scaling factor for the decay length scale of the tidal dissipation profile in Polzin {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{polzin\_decay\_scale\_max\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The decay length scale of tidal dissipation profile in Polzin formulation should not exceed Polzin\_decay\_scale\_max\_factor * depth of the ocean {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{polzin\_min\_decay\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: minimum decay scale of the tidal dissipation profile in Polzin formulation {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itide\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: maximum internal tide conversion {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]} available to mix above the BBL

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{utide}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: constant tidal amplitude {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]} if READ\_TIDEAMP is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_itides}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: topographic wavenumber and non\sphinxhyphen{}dimensional scaling {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kappa\_h2\_factor}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: factor for the product of wavenumber * rms sgs height

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inputdir}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The directory in which to find input files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_cvmix\_tidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: true if CVMix is to be used for determining diffusivity due to tidal mixing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_thickness}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum thickness allowed {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cvmix\_tidal\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: 1 for Simmons, 2 for Schmittner

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cvmix\_tidal\_params}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cvmix\_tidal\_params\_type)}\sphinxstyleemphasis{{]}} :: A CVMix\sphinxhyphen{}specific type with parameters for tidal mixing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cvmix\_glb\_params}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(cvmix\_global\_params\_type)}\sphinxstyleemphasis{{]}} :: CVMix\sphinxhyphen{}specific for Prandtl number only.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_max\_coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: CVMix\sphinxhyphen{}specific maximum allowable tidal diffusivity. {[}m\textasciicircum{}2/s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_diss\_lim\_tc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: CVMix\sphinxhyphen{}specific dissipation limit depth for tidal\sphinxhyphen{}energy\sphinxhyphen{}constituent data {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: The control structure for remapping.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. If false, use more robust forms of the same remapping expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_niku}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Lee wave driven Turbulent Kinetic Energy input {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The internal Turbulent Kinetic Energy input divided by the bottom stratfication {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The near bottom buoyancy frequency {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A mask of where internal tide energy is input.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Squared bottom depth variance {[}Z2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tideamp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: RMS tidal amplitude {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_src}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: tidal constituent input layer thickness {[}m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_qe\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Tidal energy input times the local dissipation fraction, q*E(x,y), with the CVMix implementation of Jayne et al tidal mixing {[}W m\sphinxhyphen{}2{]}. TODO: make this E(x,y) only.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_qe\_3d\_in}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: q*E(x,y,z) with the Schmittner parameterization {[}W m\sphinxhyphen{}3?{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use updated and more robust forms of the same expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: structure to regulate diagnostic output timing

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( tidal\_mixing\_diags )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a structure of diagnostic arrays.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_mixing\_diags (fortran type in module mom\_tidal\_mixing)@\spxentry{tidal\_mixing\_diags}\spxextra{fortran type in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_diags}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{tidal\_mixing\_diags}}}
Containers for tidal mixing diagnostics.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: internal tide diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fl\_itidal}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: vertical flux of tidal turbulent dissipation {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_niku}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: lee\sphinxhyphen{}wave diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_niku\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer integrated work by lee\sphinxhyphen{}wave driven mixing {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_itidal\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer integrated work by int tide driven mixing {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_lowmode\_work}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer integrated work by low mode driven mixing {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2\_int}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Bouyancy frequency squared at interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vert\_dep\_3d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The 3\sphinxhyphen{}d mixing energy deposition {[}W m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{schmittner\_coeff\_3d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The coefficient in the Schmittner et al mixing scheme, in UNITS?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tidal\_qe\_md}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Input tidal energy dissipated locally, interpolated to model vertical coordinate {[}W m\sphinxhyphen{}3?{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_lowmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: internal tide diffusivity at interfaces due to propagating low modes {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fl\_lowmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: vertical flux of tidal turbulent dissipation due to propagating low modes {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_itidal\_used}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: internal tide TKE input at ocean bottom {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: bottom squared buoyancy frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2\_meanz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: vertically averaged buoyancy frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{polzin\_decay\_scale\_scaled}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: vertical scale of decay for tidal dissipation {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{polzin\_decay\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: vertical decay scale for tidal diss with Polzin {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{simmons\_coeff\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Simmons et al mixing coefficient.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tidal_mixing:function-subroutine-documentation}}\index{tidal\_mixing\_init() (fortran function in module mom\_tidal\_mixing)@\spxentry{tidal\_mixing\_init()}\spxextra{fortran function in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{tidal\_mixing\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Initializes internal tidal dissipation scheme for diapycnal mixing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Run\sphinxhyphen{}time parameter file handle

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostics control structure.

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{polzin\_09}} \sphinxcode{\sphinxupquote{polzin\_profile\_string}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_tidal\_energy}}}}} \sphinxcode{\sphinxupquote{schmittner}} \sphinxcode{\sphinxupquote{schmittner\_scheme\_string}} \sphinxcode{\sphinxupquote{simmons}} \sphinxcode{\sphinxupquote{simmons\_scheme\_string}} \sphinxcode{\sphinxupquote{stlaurent\_02}} \sphinxcode{\sphinxupquote{stlaurent\_profile\_string}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_tidal\_mixing() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{calculate\_tidal\_mixing()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_tidal_mixing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{calculate\_tidal\_mixing}}}{\emph{h}, \emph{N2\_bot}, \emph{j}, \emph{TKE\_to\_Kd}, \emph{max\_TKE}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{N2\_lay}, \emph{N2\_int}, \emph{Kd\_lay}, \emph{Kd\_int}, \emph{Kd\_max}, \emph{Kv}}{}
Depending on whether or not CVMix is active, calls the associated subroutine to compute internal tidal dissipation and to add the effect of internal\sphinxhyphen{}tide\sphinxhyphen{}driven mixing to the layer or interface diffusivities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{n2\_bot} :: {[}in{]} The near\sphinxhyphen{}bottom squared buoyancy frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{n2\_lay} :: {[}in{]} The squared buoyancy frequency of the layers {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{n2\_int} :: {[}in{]} The squared buoyancy frequency at the interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{tke\_to\_kd} :: {[}in{]} The conversion rate between the TKE dissipated within a layer and the diapycnal diffusivity within that layer, usually (\textasciitilde{}Rho\_0 / (G\_Earth * dRho\_lay)) {[}Z2 T\sphinxhyphen{}1 / Z3 T\sphinxhyphen{}3 = T2 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{max\_tke} :: {[}in{]} The energy required to for a layer to entrain to its maximum realizable thickness {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} The diapycnal diffusivity in layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} The diapycnal diffusivity at interfaces,

\item {} 
\sphinxstylestrong{kd\_max} :: {[}in{]} The maximum increment for diapycnal diffusivity due to TKE\sphinxhyphen{}based processes, {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. Set this to a negative value to have no limit.

\item {} 
\sphinxstylestrong{kv} :: The “slow” vertical viscosity at each interface (not layer!) {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/add_int_tide_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_int\_tide\_diffusivity}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_cvmix_tidal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_cvmix\_tidal}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{calculate\_cvmix\_tidal() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{calculate\_cvmix\_tidal()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_cvmix_tidal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{calculate\_cvmix\_tidal}}}{\emph{h}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{N2\_int}, \emph{Kd\_lay}, \emph{Kd\_int}, \emph{Kv}}{}
Calls the CVMix routines to compute tidal dissipation and to add the effect of internal\sphinxhyphen{}tide\sphinxhyphen{}driven mixing to the interface diffusivities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{n2\_int} :: {[}in{]} The squared buoyancy frequency at the interfaces {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} The diapycnal diffusivity in the layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} The diapycnal diffusivity at interfaces {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kv} :: The “slow” vertical viscosity at each interface (not layer!) {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}} \sphinxcode{\sphinxupquote{schmittner}} \sphinxcode{\sphinxupquote{simmons}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_tidal_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tidal\_mixing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{add\_int\_tide\_diffusivity() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{add\_int\_tide\_diffusivity()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/add_int_tide_diffusivity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{add\_int\_tide\_diffusivity}}}{\emph{h}, \emph{N2\_bot}, \emph{j}, \emph{TKE\_to\_Kd}, \emph{max\_TKE}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{N2\_lay}, \emph{Kd\_lay}, \emph{Kd\_int}, \emph{Kd\_max}}{}
This subroutine adds the effect of internal\sphinxhyphen{}tide\sphinxhyphen{}driven mixing to the layer diffusivities. The mechanisms considered are (1) local dissipation of internal waves generated by the barotropic flow (“itidal”), (2) local dissipation of internal waves generated by the propagating low modes (rays) of the internal tide (“lowmode”), and (3) local dissipation of internal lee waves. Will eventually need to add diffusivity due to other wave\sphinxhyphen{}breaking processes (e.g. Bottom friction, Froude\sphinxhyphen{}number\sphinxhyphen{}depending breaking, PSI, etc.).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{n2\_bot} :: {[}in{]} The near\sphinxhyphen{}bottom squared buoyancy frequency frequency {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{n2\_lay} :: {[}in{]} The squared buoyancy frequency of the layers {[}T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{j} :: {[}in{]} The j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{tke\_to\_kd} :: {[}in{]} The conversion rate between the TKE dissipated within a layer and the diapycnal diffusivity within that layer, usually (\textasciitilde{}Rho\_0 / (G\_Earth * dRho\_lay)) {[}Z2 T\sphinxhyphen{}1 / Z3 T\sphinxhyphen{}3 = T2 Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{max\_tke} :: {[}in{]} The energy required to for a layer to entrain to its maximum realizable thickness {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} The diapycnal diffusivity in layers {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} The diapycnal diffusivity at interfaces

\item {} 
\sphinxstylestrong{kd\_max} :: {[}in{]} The maximum increment for diapycnal diffusivity due to TKE\sphinxhyphen{}based processes {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}. Set this to a negative value to have no limit.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{polzin\_09}} \sphinxcode{\sphinxupquote{stlaurent\_02}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/calculate_tidal_mixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{calculate\_tidal\_mixing}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setup\_tidal\_diagnostics() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{setup\_tidal\_diagnostics()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/setup_tidal_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{setup\_tidal\_diagnostics}}}{\emph{G}, \emph{CS}}{}
Sets up diagnostics arrays for tidal mixing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{schmittner}} \sphinxcode{\sphinxupquote{simmons}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_tidal\_diagnostics() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{post\_tidal\_diagnostics()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/post_tidal_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{post\_tidal\_diagnostics}}}{\emph{G}, \emph{GV}, \emph{h}, \emph{CS}}{}
This subroutine offers up diagnostics of the tidal mixing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_mixing\_h\_amp() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{tidal\_mixing\_h\_amp()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_h_amp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{tidal\_mixing\_h\_amp}}}{\emph{h\_amp}, \emph{G}, \emph{j}, \emph{CS}}{}
This subroutine returns a zonal slice of the topographic roughness amplitudes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h\_amp} :: {[}out{]} The topographic roughness amplitude {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index of the row to work on

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_tidal\_energy() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{read\_tidal\_energy()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_energy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{read\_tidal\_energy}}}{\emph{G}, \emph{US}, \emph{tidal\_energy\_type}, \emph{tidal\_energy\_file}, \emph{CS}}{}
This subroutine read tidal energy inputs from a file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tidal\_energy\_type} :: {[}in{]} The type of tidal energy inputs to read

\item {} 
\sphinxstylestrong{tidal\_energy\_file} :: {[}in{]} The file from which to read tidalinputs

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_constituents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_tidal\_constituents}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_mixing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_tidal\_constituents() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{read\_tidal\_constituents()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_constituents}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{read\_tidal\_constituents}}}{\emph{G}, \emph{US}, \emph{tidal\_energy\_file}, \emph{CS}}{}
This subroutine reads tidal input energy from a file by constituent.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tidal\_energy\_file} :: {[}in{]} The file from which to read tidal energy inputs

\item {} 
\sphinxstylestrong{cs} :: The control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::initialize\_remapping}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/read_tidal_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_tidal\_energy}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_mixing\_end() (fortran subroutine in module mom\_tidal\_mixing)@\spxentry{tidal\_mixing\_end()}\spxextra{fortran subroutine in module mom\_tidal\_mixing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tidal_mixing:f/mom_tidal_mixing/tidal_mixing_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tidal\_mixing/}}\sphinxbfcode{\sphinxupquote{tidal\_mixing\_end}}}{\emph{CS}}{}
Clear pointers and deallocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: This module’s control structure, which will be deallocated in this routine.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_time\_manager module reference}
\label{\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager}}\label{\detokenize{api/generated/modules/mom_time_manager:mom-time-manager-module-reference}}\label{\detokenize{api/generated/modules/mom_time_manager::doc}}\index{mom\_time\_manager (module)@\spxentry{mom\_time\_manager}\spxextra{module}|spxpagem}
Wraps the FMS time manager functions.

{\hyperref[\detokenize{api/generated/modules/mom_time_manager:detamom-time-manager}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_time_manager:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{real\_to\_time()}}}}}
&
This is an alternate implementation of the FMS function real\_to\_time\_type that is accurate over a larger range of input values.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_time_manager:detailed-description}}\label{\detokenize{api/generated/modules/mom_time_manager:detamom-time-manager}}
Wraps the FMS time manager functions.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_time_manager:function-subroutine-documentation}}\index{real\_to\_time() (fortran function in module mom\_time\_manager)@\spxentry{real\_to\_time()}\spxextra{fortran function in module mom\_time\_manager}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_time\_manager/}}\sphinxbfcode{\sphinxupquote{real\_to\_time}}}{\emph{x}, \emph{err\_msg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}}}
This is an alternate implementation of the FMS function real\_to\_time\_type that is accurate over a larger range of input values. With 32 bit signed integers, this version should work over the entire valid range (2\textasciicircum{}31 days or \textasciitilde{}5.8835 million years) of time\_types, whereas the standard version in the FMS time\_manager stops working for conversions of times greater than 2\textasciicircum{}31 seconds, or \textasciitilde{}68.1 years.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The output time as a time\_type

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} The input time in real seconds.

\item {} 
\sphinxstylestrong{err\_msg} :: {[}out{]} An optional returned error message.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_controlled_forcing:f/mom_controlled_forcing/apply_ctrl_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_controlled\_forcing::apply\_ctrl\_forcing}}}}} {\hyperref[\detokenize{api/generated/modules/mom_barotropic:f/mom_barotropic/btstep}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_barotropic::btstep}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic}}}}} \sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_transport_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_transport\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/read_param_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::read\_param\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tracer\_advect module reference}
\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect}}\label{\detokenize{api/generated/modules/mom_tracer_advect:mom-tracer-advect-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_advect::doc}}\index{mom\_tracer\_advect (module)@\spxentry{mom\_tracer\_advect}\spxextra{module}|spxpagem}
This module contains the subroutines that advect tracers along coordinate surfaces.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:detamom-tracer-advect}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_tracer_advect:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/tracer_advect_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_advect\_cs}}}}}
&
Control structure for this module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_advect:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_tracer()}}}}}
&
This routine time steps the tracer concentration using a monotonic, conservative, weakly diffusive scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_x()}}}}}
&
This subroutine does 1\sphinxhyphen{}d flux\sphinxhyphen{}form advection in the zonal direction using a monotonic piecewise linear scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_y()}}}}}
&
This subroutine does 1\sphinxhyphen{}d flux\sphinxhyphen{}form advection using a monotonic piecewise linear scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/tracer_advect_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_advect\_init()}}}}}
&
Initialize lateral tracer advection module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/tracer_advect_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_advect\_end()}}}}}
&
Close the tracer advection module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_advect:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_advect:detamom-tracer-advect}}
This program contains the subroutines that advect tracers horizontally (i.e. along layers).


\paragraph{section\_mom\_advect\_intro}
\label{\detokenize{api/generated/modules/mom_tracer_advect:section-mom-advect-intro}}\label{\detokenize{api/generated/modules/mom_tracer_advect:namespacemom-tracer-advect-1section-mom-advect-intro}}\begin{itemize}
\item {} 
advect\_tracer advects tracer concentrations using a combination of the modified flux advection scheme from Easter (Mon. Wea. Rev., 1993) with tracer distributions given by the monotonic modified van Leer scheme proposed by Lin et al. (Mon. Wea. Rev., 1994). This scheme conserves the total amount of tracer while avoiding spurious maxima and minima of the tracer concentration. If a higher order accuracy scheme is needed, suggest monotonic piecewise parabolic method, as described in Carpenter et al. (MWR, 1990).

\item {} 
advect\_tracer has 4 arguments, described below. This subroutine determines the volume of a layer in a grid cell at the previous instance when the tracer concentration was changed, so it is essential that the volume fluxes should be correct. It is also important that the tracer advection occurs before each calculation of the diabatic forcing.

\end{itemize}


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_advect:type-documentation}}\index{tracer\_advect\_cs (fortran type in module mom\_tracer\_advect)@\spxentry{tracer\_advect\_cs}\spxextra{fortran type in module mom\_tracer\_advect}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/tracer_advect_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_advect/}}\sphinxbfcode{\sphinxupquote{tracer\_advect\_cs}}}
Control structure for this module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The baroclinic dynamics time step {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{useppm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use PPM instead of PLM.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usehuynh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the Huynh scheme for PPM interface values.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_uhr\_vhr\_t\_hprev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: A structred used for group passes.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_advect:function-subroutine-documentation}}\index{advect\_tracer() (fortran subroutine in module mom\_tracer\_advect)@\spxentry{advect\_tracer()}\spxextra{fortran subroutine in module mom\_tracer\_advect}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_advect/}}\sphinxbfcode{\sphinxupquote{advect\_tracer}}}{\emph{h\_end}, \emph{uhtr}, \emph{vhtr}, \emph{OBC}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Reg}, \emph{h\_prev\_opt}, \emph{max\_iter\_in}, \emph{x\_first\_in}, \emph{uhr\_out}, \emph{vhr\_out}, \emph{h\_out}}{}
This routine time steps the tracer concentration using a monotonic, conservative, weakly diffusive scheme.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h\_end} :: {[}in{]} layer thickness after advection {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{uhtr} :: {[}in{]} accumulated volume/mass flux through zonal face {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhtr} :: {[}in{]} accumulated volume/mass flux through merid face {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{obc} :: specifies whether, where, and what OBCs are used

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: control structure for module

\item {} 
\sphinxstylestrong{reg} :: pointer to tracer registry

\item {} 
\sphinxstylestrong{h\_prev\_opt} :: {[}in{]} layer thickness before advection {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{max\_iter\_in} :: {[}in{]} The maximum number of iterations

\item {} 
\sphinxstylestrong{x\_first\_in} :: {[}in{]} If present, indicate whether to update first in the x\sphinxhyphen{} or y\sphinxhyphen{}direction.

\item {} 
\sphinxstylestrong{uhr\_out} :: {[}out{]} accumulated volume/mass flux through zonal face

\item {} 
\sphinxstylestrong{vhr\_out} :: {[}out{]} accumulated volume/mass flux through merid face

\item {} 
\sphinxstylestrong{h\_out} :: {[}out{]} layer thickness before advection {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_x}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_y}}}}} {\hyperref[\detokenize{api/generated/modules/mom_domains:f/mom_domains/do_group_pass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_domains::do\_group\_pass}}}}} \sphinxcode{\sphinxupquote{id\_clock\_advect}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_sync}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_advection\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_advection\_layer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_redistribute\_residual}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{advect\_x() (fortran subroutine in module mom\_tracer\_advect)@\spxentry{advect\_x()}\spxextra{fortran subroutine in module mom\_tracer\_advect}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_advect/}}\sphinxbfcode{\sphinxupquote{advect\_x}}}{\emph{Tr}, \emph{hprev}, \emph{uhr}, \emph{uh\_neglect}, \emph{OBC}, \emph{domore\_u}, \emph{ntr}, \emph{Idt}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{k}, \emph{G}, \emph{GV}, \emph{US}, \emph{usePPM}, \emph{useHuynh}}{}
This subroutine does 1\sphinxhyphen{}d flux\sphinxhyphen{}form advection in the zonal direction using a monotonic piecewise linear scheme.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{tr} :: {[}inout{]} The array of registered tracers to work on

\item {} 
\sphinxstylestrong{hprev} :: {[}inout{]} cell volume at the end of previous tracer change {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{uhr} :: {[}inout{]} accumulated volume/mass flux through the zonal face {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{uh\_neglect} :: {[}in{]} A tiny zonal mass flux that can be neglected {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{obc} :: specifies whether, where, and what OBCs are used

\item {} 
\sphinxstylestrong{domore\_u} :: {[}inout{]} If true, there is more advection to be done in this u\sphinxhyphen{}row

\item {} 
\sphinxstylestrong{idt} :: {[}in{]} The inverse of dt {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ntr} :: {[}in{]} The number of tracers

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting tracer i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending tracer i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting tracer j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending tracer j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The k\sphinxhyphen{}level to work on

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{useppm} :: {[}in{]} If true, use PPM instead of PLM

\item {} 
\sphinxstylestrong{usehuynh} :: {[}in{]} If true, use the Huynh scheme for PPM interface values

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{advect\_y() (fortran subroutine in module mom\_tracer\_advect)@\spxentry{advect\_y()}\spxextra{fortran subroutine in module mom\_tracer\_advect}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_advect/}}\sphinxbfcode{\sphinxupquote{advect\_y}}}{\emph{Tr}, \emph{hprev}, \emph{vhr}, \emph{vh\_neglect}, \emph{OBC}, \emph{domore\_v}, \emph{ntr}, \emph{Idt}, \emph{is}, \emph{ie}, \emph{js}, \emph{je}, \emph{k}, \emph{G}, \emph{GV}, \emph{US}, \emph{usePPM}, \emph{useHuynh}}{}
This subroutine does 1\sphinxhyphen{}d flux\sphinxhyphen{}form advection using a monotonic piecewise linear scheme.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{tr} :: {[}inout{]} The array of registered tracers to work on

\item {} 
\sphinxstylestrong{hprev} :: {[}inout{]} cell volume at the end of previous tracer change {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vhr} :: {[}inout{]} accumulated volume/mass flux through the meridional face {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{vh\_neglect} :: {[}inout{]} A tiny meridional mass flux that can be neglected {[}H L2 \textasciitilde{}\textgreater{} m3 or kg{]}

\item {} 
\sphinxstylestrong{obc} :: specifies whether, where, and what OBCs are used

\item {} 
\sphinxstylestrong{domore\_v} :: {[}inout{]} If true, there is more advection to be done in this v\sphinxhyphen{}row

\item {} 
\sphinxstylestrong{idt} :: {[}in{]} The inverse of dt {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ntr} :: {[}in{]} The number of tracers

\item {} 
\sphinxstylestrong{is} :: {[}in{]} The starting tracer i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{ie} :: {[}in{]} The ending tracer i\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{js} :: {[}in{]} The starting tracer j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{je} :: {[}in{]} The ending tracer j\sphinxhyphen{}index to work on

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The k\sphinxhyphen{}level to work on

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{useppm} :: {[}in{]} If true, use PPM instead of PLM

\item {} 
\sphinxstylestrong{usehuynh} :: {[}in{]} If true, use the Huynh scheme for PPM interface values

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/advect_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advect\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_advect\_init() (fortran subroutine in module mom\_tracer\_advect)@\spxentry{tracer\_advect\_init()}\spxextra{fortran subroutine in module mom\_tracer\_advect}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/tracer_advect_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_advect/}}\sphinxbfcode{\sphinxupquote{tracer\_advect\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Initialize lateral tracer advection module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} open file to parse for model parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{cs} :: module control structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_advect}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_sync}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_advect\_end() (fortran subroutine in module mom\_tracer\_advect)@\spxentry{tracer\_advect\_end()}\spxextra{fortran subroutine in module mom\_tracer\_advect}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_advect:f/mom_tracer_advect/tracer_advect_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_advect/}}\sphinxbfcode{\sphinxupquote{tracer\_advect\_end}}}{\emph{CS}}{}
Close the tracer advection module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tracer\_diabatic module reference}
\label{\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic}}\label{\detokenize{api/generated/modules/mom_tracer_diabatic:mom-tracer-diabatic-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_diabatic::doc}}\index{mom\_tracer\_diabatic (module)@\spxentry{mom\_tracer\_diabatic}\spxextra{module}|spxpagem}
This module contains routines that implement physical fluxes of tracers (e.g. due to surface fluxes or mixing). These are intended to be called from call\_tracer\_column\_fns in the {\hyperref[\detokenize{api/generated/modules/MOM_tracer_flow_control:f/MOM_tracer_flow_control}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_tracer\_flow\_control()}}}}} module.
module.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:detamom-tracer-diabatic}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_diabatic:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_vertdiff()}}}}}
&
This subroutine solves a tridiagonal equation for the final tracer concentrations after the dual\sphinxhyphen{}entrainments, and possibly sinking or surface and bottom sources, are applied.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{applytracerboundaryfluxesinout()}}}}}
&
This routine is modeled after applyBoundaryFluxesInOut in \sphinxcode{\sphinxupquote{MOM\_diabatic\_aux.F90}} NOTE: Please note that in this routine sfc\_flux gets set to zero to ensure that the surface flux of the tracer does not get applied again during a subsequent call to tracer\_vertdif.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_diabatic:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_diabatic:detamom-tracer-diabatic}}
This module contains routines that implement physical fluxes of tracers (e.g. due to surface fluxes or mixing). These are intended to be called from call\_tracer\_column\_fns in the {\hyperref[\detokenize{api/generated/modules/MOM_tracer_flow_control:f/MOM_tracer_flow_control}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOM\_tracer\_flow\_control()}}}}} module.
module.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_diabatic:function-subroutine-documentation}}\index{tracer\_vertdiff() (fortran subroutine in module mom\_tracer\_diabatic)@\spxentry{tracer\_vertdiff()}\spxextra{fortran subroutine in module mom\_tracer\_diabatic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic/}}\sphinxbfcode{\sphinxupquote{tracer\_vertdiff}}}{\emph{h\_old}, \emph{ea}, \emph{eb}, \emph{dt}, \emph{tr}, \emph{G}, \emph{GV}, \emph{sfc\_flux}, \emph{btm\_flux}, \emph{btm\_reservoir}, \emph{sink\_rate}, \emph{convert\_flux\_in}}{}
This subroutine solves a tridiagonal equation for the final tracer concentrations after the dual\sphinxhyphen{}entrainments, and possibly sinking or surface and bottom sources, are applied. The sinking is implemented with an fully implicit upwind advection scheme. Alternate time units can be used for the timestep, surface and bottom fluxes and sink\_rate provided they are all consistent.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} amount of fluid entrained from the layer above {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} amount of fluid entrained from the layer below {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tr} :: {[}inout{]} tracer concentration in concentration units {[}CU{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{sfc\_flux} :: {[}in{]} surface flux of the tracer in units of {[}CU kg m\sphinxhyphen{}2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CU kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]} or {[}CU H \textasciitilde{}\textgreater{} CU m or CU kg m\sphinxhyphen{}2{]} if convert\_flux\_in is .false.

\item {} 
\sphinxstylestrong{btm\_flux} :: {[}in{]} The (negative upward) bottom flux of the tracer in {[}CU kg m\sphinxhyphen{}2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CU kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]} or {[}CU H \textasciitilde{}\textgreater{} CU m or CU kg m\sphinxhyphen{}2{]} if

\item {} 
\sphinxstylestrong{btm\_reservoir} :: {[}inout{]} amount of tracer in a bottom reservoir {[}CU kg m\sphinxhyphen{}2{]}; formerly {[}CU m{]}

\item {} 
\sphinxstylestrong{sink\_rate} :: {[}in{]} rate at which the tracer sinks {[}m T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{convert\_flux\_in} :: {[}in{]} True if the specified sfc\_flux needs to be integrated in time

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::advection\_test\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::boundary\_impulse\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::dome\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::dye\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::dyed\_obc\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::ideal\_age\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::isomip\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::ocmip2\_cfc\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::oil\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::pseudo\_salt\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::rgc\_tracer\_column\_physics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{applytracerboundaryfluxesinout() (fortran subroutine in module mom\_tracer\_diabatic)@\spxentry{applytracerboundaryfluxesinout()}\spxextra{fortran subroutine in module mom\_tracer\_diabatic}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic/}}\sphinxbfcode{\sphinxupquote{applytracerboundaryfluxesinout}}}{\emph{G}, \emph{GV}, \emph{Tr}, \emph{dt}, \emph{fluxes}, \emph{h}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}, \emph{in\_flux\_optional}, \emph{out\_flux\_optional}, \emph{update\_h\_opt}}{}
This routine is modeled after applyBoundaryFluxesInOut in \sphinxcode{\sphinxupquote{MOM\_diabatic\_aux.F90}}
NOTE: Please note that in this routine sfc\_flux gets set to zero to ensure that the surface flux of the tracer does not get applied again during a subsequent call to tracer\_vertdif.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{tr} :: {[}inout{]} Tracer concentration on T\sphinxhyphen{}cell

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time\sphinxhyphen{}step over which forcing is applied {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} Surface fluxes container

\item {} 
\sphinxstylestrong{h} :: {[}inout{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{in\_flux\_optional} :: {[}in{]} The total time\sphinxhyphen{}integrated amount of tracer that enters with freshwater

\item {} 
\sphinxstylestrong{out\_flux\_optional} :: {[}in{]} The total time\sphinxhyphen{}integrated amount of tracer that leaves with freshwater

\item {} 
\sphinxstylestrong{update\_h\_opt} :: {[}in{]} Optional flag to determine whether h should be updated

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::advection\_test\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/boundary_impulse_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::boundary\_impulse\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/dome_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::dome\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::dye\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/dyed_obc_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::dyed\_obc\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::ideal\_age\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/isomip_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::isomip\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::ocmip2\_cfc\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_into_ocean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_fw\_fluxes\_into\_ocean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_out_ocean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_fw\_fluxes\_out\_ocean}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::oil\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::pseudo\_salt\_tracer\_column\_physics}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::rgc\_tracer\_column\_physics}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{MOM\_tracer\_flow\_control module reference}
\label{\detokenize{api/generated/modules/MOM_tracer_flow_control:f/MOM_tracer_flow_control}}\label{\detokenize{api/generated/modules/MOM_tracer_flow_control:mom-tracer-flow-control-module-reference}}\label{\detokenize{api/generated/modules/MOM_tracer_flow_control::doc}}\index{MOM\_tracer\_flow\_control (module)@\spxentry{MOM\_tracer\_flow\_control}\spxextra{module}|spxpagem}
By Will Cooke, April 2003 Edited by Elizabeth Yankovsky, May 2019.

{\hyperref[\detokenize{api/generated/modules/MOM_tracer_flow_control:detamom-tracer-flow-control}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/MOM_tracer_flow_control:detailed-description}}\label{\detokenize{api/generated/modules/MOM_tracer_flow_control:detamom-tracer-flow-control}}
This module contains two subroutines into which calls to other tracer initialization (call\_tracer\_init\_fns) and column physics routines (call\_tracer\_column\_fns) can be inserted.


\subsection{mom\_tracer\_flow\_control module reference}
\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control}}\label{\detokenize{api/generated/modules/mom_tracer_flow_control:mom-tracer-flow-control-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_flow_control::doc}}\index{mom\_tracer\_flow\_control (module)@\spxentry{mom\_tracer\_flow\_control}\spxextra{module}|spxpagem}
Orchestrates the registration and calling of tracer packages.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:detamom-tracer-flow-control}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_tracer_flow_control:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_flow\_control\_cs}}}}}
&
The control structure for orchestrating the calling of tracer packages.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_flow_control:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_flux\_init()}}}}}
&
This subroutine carries out a series of calls to initialize the air\sphinxhyphen{}sea tracer fluxes, but it does not record the generated indicies, and it may be called \sphinxstyleemphasis{before} the ocean model has been initialized and may be called on non\sphinxhyphen{}ocean PEs.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_register}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_register()}}}}}
&
This subroutine determines which tracer packages are to be used and does the calls to register their tracers to be advected, diffused, and read from restarts.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_flow\_control\_init()}}}}}
&
This subroutine calls all registered tracer initialization subroutines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/get_chl_from_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_chl\_from\_model()}}}}}
&
This subroutine extracts the chlorophyll concentrations from the model state, if possible.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_set_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_set\_forcing()}}}}}
&
This subroutine calls the individual tracer modules’ subroutines to specify or read quantities related to their surface forcing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_column\_fns()}}}}}
&
This subroutine calls all registered tracer column physics subroutines.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_stocks()}}}}}
&
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/store_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{store\_stocks()}}}}}
&
This routine stores the stocks and does error handling for call\_tracer\_stocks.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_surface\_state()}}}}}
&
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_flow\_control\_end()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_flow_control:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_flow_control:detamom-tracer-flow-control}}
Orchestrates the registration and calling of tracer packages.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_flow_control:type-documentation}}\index{tracer\_flow\_control\_cs (fortran type in module mom\_tracer\_flow\_control)@\spxentry{tracer\_flow\_control\_cs}\spxextra{fortran type in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_control\_cs}}}
The control structure for orchestrating the calling of tracer packages.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{user\_tracer\_example\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(user\_tracer\_example\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dome\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(dome\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{isomip\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(isomip\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rgc\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(rgc\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ideal\_age\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ideal\_age\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(dye\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(oil\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{advection\_test\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(advection\_test\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocmip2\_cfc\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocmip2\_cfc\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mom\_generic\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_generic\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pseudo\_salt\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{boundary\_impulse\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(boundary\_impulse\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dyed\_obc\_tracer\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(dyed\_obc\_tracer\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointers to the control strucures for the tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_user\_tracer\_example}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the USER\_tracer\_example package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_dome\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the DOME\_tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_isomip\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the ISOMPE\_tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_rgc\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the RGC\_tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ideal\_age}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the ideal age tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_regional\_dyes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the regional dyes tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_oil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the oil tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_advection\_test\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ocmip2\_cfc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the OCMIP2\_CFC tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_mom\_generic\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the MOM\_generic\_tracer packages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_pseudo\_salt\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the psuedo\_salt tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_boundary\_impulse\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the boundary impulse tracer package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_dyed\_obc\_tracer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the dyed OBC tracer package.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_flow_control:function-subroutine-documentation}}\index{call\_tracer\_flux\_init() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{call\_tracer\_flux\_init()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_flux_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{call\_tracer\_flux\_init}}}{\emph{verbosity}}{}
This subroutine carries out a series of calls to initialize the air\sphinxhyphen{}sea tracer fluxes, but it does not record the generated indicies, and it may be called
\sphinxstyleemphasis{before}
the ocean model has been initialized and may be called on non\sphinxhyphen{}ocean PEs. It is not necessary to call this routine for ocean\sphinxhyphen{}only runs, because the same calls are made again inside of the routines called by call\_tracer\_register.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbosity} :: {[}in{]} A 0\sphinxhyphen{}9 integer indicating a level of verbosity.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/close_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::close\_param\_file}}}}} {\hyperref[\detokenize{api/generated/modules/mom_get_input:f/mom_get_input/get_mom_input}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_get\_input::get\_mom\_input}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_flux\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{call\_tracer\_register() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{call\_tracer\_register()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_register}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{call\_tracer\_register}}}{\emph{HI}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{}
This subroutine determines which tracer packages are to be used and does the calls to register their tracers to be advected, diffused, and read from restarts.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_flow\_control\_init() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{tracer\_flow\_control\_init()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_control\_init}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{param\_file}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}, \emph{ALE\_sponge\_CSp}, \emph{tv}}{}
This subroutine calls all registered tracer initialization subroutines.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} 1 if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\item {} 
\sphinxstylestrong{sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated.

\item {} 
\sphinxstylestrong{ale\_sponge\_csp} :: A pointer to the control structure for the ALE sponges, if they are in use. Otherwise this may be unassociated.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_chl\_from\_model() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{get\_chl\_from\_model()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/get_chl_from_model}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{get\_chl\_from\_model}}}{\emph{Chl\_array}, \emph{G}, \emph{CS}}{}
This subroutine extracts the chlorophyll concentrations from the model state, if possible.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{chl\_array} :: {[}out{]} The array in which to store the model’s

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_aux:f/mom_diabatic_aux/set_pen_shortwave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_aux::set\_pen\_shortwave}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{call\_tracer\_set\_forcing() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{call\_tracer\_set\_forcing()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_set_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{call\_tracer\_set\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day\_start}, \emph{day\_interval}, \emph{G}, \emph{CS}}{}
This subroutine calls the individual tracer modules’ subroutines to specify or read quantities related to their surface forcing.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{day\_start} :: {[}in{]} Start time of the fluxes.

\item {} 
\sphinxstylestrong{day\_interval} :: {[}in{]} Length of time over which these fluxes will be applied.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{call\_tracer\_column\_fns() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{call\_tracer\_column\_fns()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_column_fns}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{call\_tracer\_column\_fns}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{Hml}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{optics}, \emph{CS}, \emph{debug}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine calls all registered tracer column physics subroutines.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained from the layer above during this call will be added {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained from the layer below during this call will be added {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{hml} :: {[}in{]} Mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{optics} :: The structure containing optical properties.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true calculate checksums

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/adiabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::adiabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_layer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_advection\_layer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_diabatic\_ale}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{call\_tracer\_stocks() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{call\_tracer\_stocks()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{call\_tracer\_stocks}}}{\emph{h}, \emph{stock\_values}, \emph{G}, \emph{GV}, \emph{CS}, \emph{stock\_names}, \emph{stock\_units}, \emph{num\_stocks}, \emph{stock\_index}, \emph{got\_min\_max}, \emph{global\_min}, \emph{global\_max}, \emph{xgmin}, \emph{ygmin}, \emph{zgmin}, \emph{xgmax}, \emph{ygmax}, \emph{zgmax}}{}
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler. These routines are optional.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stock\_values} :: {[}out{]} The integrated amounts of a tracer on the current PE, usually in kg x concentration {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\item {} 
\sphinxstylestrong{stock\_names} :: {[}out{]} Diagnostic names to use for each stock.

\item {} 
\sphinxstylestrong{stock\_units} :: {[}out{]} Units to use in the metadata for each stock.

\item {} 
\sphinxstylestrong{num\_stocks} :: {[}out{]} The number of tracer stocks being returned.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} The integer stock index from stocks\_constants\_mod of the stock to be returned. If this is present and greater than 0, only a single stock can be returned.

\item {} 
\sphinxstylestrong{got\_min\_max} :: {[}inout{]} Indicates whether the global min and

\item {} 
\sphinxstylestrong{global\_min} :: {[}out{]} The global minimum of each tracer

\item {} 
\sphinxstylestrong{global\_max} :: {[}out{]} The global maximum of each tracer

\item {} 
\sphinxstylestrong{xgmin} :: {[}out{]} The x\sphinxhyphen{}position of the global minimum

\item {} 
\sphinxstylestrong{ygmin} :: {[}out{]} The y\sphinxhyphen{}position of the global minimum

\item {} 
\sphinxstylestrong{zgmin} :: {[}out{]} The z\sphinxhyphen{}position of the global minimum

\item {} 
\sphinxstylestrong{xgmax} :: {[}out{]} The x\sphinxhyphen{}position of the global maximum

\item {} 
\sphinxstylestrong{ygmax} :: {[}out{]} The y\sphinxhyphen{}position of the global maximum

\item {} 
\sphinxstylestrong{zgmax} :: {[}out{]} The z\sphinxhyphen{}position of the global maximum

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/advection_test_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::advection\_test\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::dye\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/ideal_age_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::ideal\_age\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_min_max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_min\_max}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/ocmip2_cfc_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::ocmip2\_cfc\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::oil\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::pseudo\_salt\_stock}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/store_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{store\_stocks}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sum_output:f/mom_sum_output/write_energy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sum\_output::write\_energy}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{store\_stocks() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{store\_stocks()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/store_stocks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{store\_stocks}}}{\emph{pkg\_name}, \emph{ns}, \emph{names}, \emph{units}, \emph{values}, \emph{index}, \emph{stock\_values}, \emph{set\_pkg\_name}, \emph{max\_ns}, \emph{ns\_tot}, \emph{stock\_names}, \emph{stock\_units}}{}
This routine stores the stocks and does error handling for call\_tracer\_stocks.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{pkg\_name} :: {[}in{]} The tracer package name

\item {} 
\sphinxstylestrong{ns} :: {[}in{]} The number of stocks associated with this tracer package

\item {} 
\sphinxstylestrong{names} :: {[}in{]} Diagnostic names to use for each stock.

\item {} 
\sphinxstylestrong{units} :: {[}in{]} Units to use in the metadata for each stock.

\item {} 
\sphinxstylestrong{values} :: {[}in{]} The values of the tracer stocks

\item {} 
\sphinxstylestrong{index} :: {[}in{]} The integer stock index from stocks\_constants\_mod of the stock to be returned. If this is present and greater than 0, only a single stock can be returned.

\item {} 
\sphinxstylestrong{stock\_values} :: {[}inout{]} The master list of stock values

\item {} 
\sphinxstylestrong{set\_pkg\_name} :: {[}inout{]} The name of the last tracer package whose stocks were stored for a specific index. This is used to trigger an error if there are redundant stocks.

\item {} 
\sphinxstylestrong{max\_ns} :: {[}in{]} The maximum size of the master stock list

\item {} 
\sphinxstylestrong{ns\_tot} :: {[}inout{]} The total number of stocks in the master list

\item {} 
\sphinxstylestrong{stock\_names} :: {[}inout{]} Diagnostic names to use for each stock in the master list

\item {} 
\sphinxstylestrong{stock\_units} :: {[}inout{]} Units to use in the metadata for each stock in the master list

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{call\_tracer\_surface\_state() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{call\_tracer\_surface\_state()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{call\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine calls all registered tracer packages to enable them to add to the surface state returned to the coupler. These routines are optional.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_flow\_control\_end() (fortran subroutine in module mom\_tracer\_flow\_control)@\spxentry{tracer\_flow\_control\_end()}\spxextra{fortran subroutine in module mom\_tracer\_flow\_control}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/tracer_flow_control_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control/}}\sphinxbfcode{\sphinxupquote{tracer\_flow\_control\_end}}}{\emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to call\_tracer\_register.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tracer\_hor\_diff module reference}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff}}\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:mom-tracer-hor-diff-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_hor_diff::doc}}\index{mom\_tracer\_hor\_diff (module)@\spxentry{mom\_tracer\_hor\_diff}\spxextra{module}|spxpagem}
Main routine for lateral (along surface or neutral) diffusion of tracers.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:detamom-tracer-hor-diff}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/p2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p2d}}}}}
&
A type that can be used to create arrays of pointers to 2D arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/p2di}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p2di}}}}}
&
A type that can be used to create arrays of pointers to 2D integer arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_hor\_diff\_cs}}}}}
&
The control structure for along\sphinxhyphen{}layer and epineutral tracer diffusion.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_hordiff()}}}}}
&
Compute along\sphinxhyphen{}coordinate diffusion of all tracers using the diffusivity in CSKhTr, or using space\sphinxhyphen{}dependent diffusivity.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_epipycnal_ml_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_epipycnal\_ml\_diff()}}}}}
&
This subroutine does epipycnal diffusion of all tracers between the mixed and buffer layers and the interior, using the diffusivity in CSKhTr.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_hor\_diff\_init()}}}}}
&
Initialize lateral tracer diffusion module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_hor\_diff\_end()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:detamom-tracer-hor-diff}}

\paragraph{Introduction to the module}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:introduction-to-the-module}}\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:namespacemom-tracer-hor-diff-1section-intro}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{This} \PYG{n}{module} \PYG{n}{contains} \PYG{n}{subroutines} \PYG{n}{that} \PYG{n}{handle} \PYG{n}{horizontal}
\end{sphinxVerbatim}

diffusion (i.e., isoneutral or along layer) of tracers.

Each of the tracers are subject to Fickian along\sphinxhyphen{}coordinate diffusion if Khtr is defined and positive. The tracer diffusion can use a suitable number of iterations to guarantee stability with an arbitrarily large time step.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:type-documentation}}\index{p2d (fortran type in module mom\_tracer\_hor\_diff)@\spxentry{p2d}\spxextra{fortran type in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/p2d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{p2d}}}
A type that can be used to create arrays of pointers to 2D arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a 2D array of reals.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p2di (fortran type in module mom\_tracer\_hor\_diff)@\spxentry{p2di}\spxextra{fortran type in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/p2di}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{p2di}}}
A type that can be used to create arrays of pointers to 2D integer arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, private}\sphinxstyleemphasis{{]}} :: A pointer to a 2D array of integers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_hor\_diff\_cs (fortran type in module mom\_tracer\_hor\_diff)@\spxentry{tracer\_hor\_diff\_cs}\spxextra{fortran type in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{tracer\_hor\_diff\_cs}}}
The control structure for along\sphinxhyphen{}layer and epineutral tracer diffusion.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khtr\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khtr\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khtr\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_cfl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khdt\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_khdt\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The along\sphinxhyphen{}isopycnal tracer diffusivity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr\_slope\_cff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The non\sphinxhyphen{}dimensional coefficient in KhTr formula {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Minimum along\sphinxhyphen{}isopycnal tracer diffusivity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr\_max}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum along\sphinxhyphen{}isopycnal tracer diffusivity {[}L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr\_passivity\_coeff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Passivity coefficient that scales Rd/dx (default = 0) where passivity is the ratio between along\sphinxhyphen{}isopycnal tracer mixing and thickness mixing {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{khtr\_passivity\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Passivity minimum (default = 1/2) {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ml\_khtr\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: With Diffuse\_ML\_interior, the ratio of the truly horizontal diffusivity in the mixed layer to the epipycnal diffusivity {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_diff\_cfl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: If positive, locally limit the along\sphinxhyphen{}isopycnal tracer diffusivity to keep the diffusive CFL locally at or below this value {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diffuse\_ml\_interior}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, diffuse along isopycnals between the mixed layer and the interior.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{check\_diffusive\_cfl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, automatically iterate the diffusion to ensure that the diffusive equivalent of the CFL limit is not violated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_neutral\_diffusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the neutral\_diffusion module from within tracer\_hor\_diff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_lateral\_boundary\_diffusion}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the lateral\_boundary\_diffusion module from within tracer\_hor\_diff.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{recalc\_neutral\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, recalculate the neutral surfaces if CFL has been exceeded.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{neutral\_diffusion\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(neutral\_diffusion\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for neutral diffusion.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lateral\_boundary\_diffusion\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(lateral\_boundary\_diffusion\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Control structure for lateral boundary mixing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{show\_call\_tree}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Display the call tree while running. Set by VERBOSITY level.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{first\_call}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: This is true until after the first call.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: For group halo pass, used in both tracer\_hordiff and tracer\_epipycnal\_ML\_diff.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:function-subroutine-documentation}}\index{tracer\_hordiff() (fortran subroutine in module mom\_tracer\_hor\_diff)@\spxentry{tracer\_hordiff()}\spxextra{fortran subroutine in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{tracer\_hordiff}}}{\emph{h}, \emph{dt}, \emph{MEKE}, \emph{VarMix}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Reg}, \emph{tv}, \emph{do\_online\_flag}, \emph{read\_khdt\_x}, \emph{read\_khdt\_y}}{}
Compute along\sphinxhyphen{}coordinate diffusion of all tracers using the diffusivity in CSKhTr, or using space\sphinxhyphen{}dependent diffusivity. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{meke} :: MEKE type

\item {} 
\sphinxstylestrong{varmix} :: Variable mixing type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: module control structure

\item {} 
\sphinxstylestrong{reg} :: registered tracers

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, including potential temp and salinity or mixed layer density. Absent fields have NULL ptrs, and these may (probably will) point to some of the same arrays as Tr does. tv is required for epipycnal mixing between mixed layer and the interior.

\item {} 
\sphinxstylestrong{do\_online\_flag} :: {[}in{]} If present and true, do online tracer transport with stored velocities.

\item {} 
\sphinxstylestrong{read\_khdt\_x} :: {[}in{]} If present, these are the zonal

\item {} 
\sphinxstylestrong{read\_khdt\_y} :: {[}in{]} If present, these are the meridional

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_waypoint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_waypoint}}}}} \sphinxcode{\sphinxupquote{id\_clock\_diffuse}} \sphinxcode{\sphinxupquote{id\_clock\_epimix}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_sync}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/lateral_boundary_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::lateral\_boundary\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::mom\_tracer\_chksum}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_calc\_coeffs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_epipycnal_ml_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_epipycnal\_ml\_diff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_epipycnal\_ml\_diff() (fortran subroutine in module mom\_tracer\_hor\_diff)@\spxentry{tracer\_epipycnal\_ml\_diff()}\spxextra{fortran subroutine in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_epipycnal_ml_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{tracer\_epipycnal\_ml\_diff}}}{\emph{h}, \emph{dt}, \emph{Tr}, \emph{ntr}, \emph{khdt\_epi\_x}, \emph{khdt\_epi\_y}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{tv}, \emph{num\_itts}}{}
This subroutine does epipycnal diffusion of all tracers between the mixed and buffer layers and the interior, using the diffusivity in CSKhTr. Multiple iterations are used (if necessary) so that there is no limit on the acceptable time increment.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} time step {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{tr} :: {[}inout{]} tracer array

\item {} 
\sphinxstylestrong{ntr} :: {[}in{]} number of tracers

\item {} 
\sphinxstylestrong{khdt\_epi\_x} :: {[}in{]} Zonal epipycnal diffusivity times a time step and the ratio of the open face width over the distance between adjacent tracer points {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{khdt\_epi\_y} :: {[}in{]} Meridional epipycnal diffusivity times a time step and the ratio of the open face width over the distance between adjacent tracer points {[}L2 \textasciitilde{}\textgreater{} m2{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} module control structure

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} thermodynamic structure

\item {} 
\sphinxstylestrong{num\_itts} :: {[}in{]} number of iterations (usually=1)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} \sphinxcode{\sphinxupquote{id\_clock\_pass}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_hordiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_hor\_diff\_init() (fortran subroutine in module mom\_tracer\_hor\_diff)@\spxentry{tracer\_hor\_diff\_init()}\spxextra{fortran subroutine in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{tracer\_hor\_diff\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{EOS}, \emph{diabatic\_CSp}, \emph{CS}}{}
Initialize lateral tracer diffusion module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} diagnostic control

\item {} 
\sphinxstylestrong{eos} :: {[}in{]} Equation of state CS

\item {} 
\sphinxstylestrong{diabatic\_csp} :: {[}in{]} Equation of state CS

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file

\item {} 
\sphinxstylestrong{cs} :: horz diffusion control structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{id\_clock\_diffuse}} \sphinxcode{\sphinxupquote{id\_clock\_epimix}} \sphinxcode{\sphinxupquote{id\_clock\_pass}} \sphinxcode{\sphinxupquote{id\_clock\_sync}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/register_diag_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::register\_diag\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_hor\_diff\_end() (fortran subroutine in module mom\_tracer\_hor\_diff)@\spxentry{tracer\_hor\_diff\_end()}\spxextra{fortran subroutine in module mom\_tracer\_hor\_diff}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hor_diff_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff/}}\sphinxbfcode{\sphinxupquote{tracer\_hor\_diff\_end}}}{\emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: module control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tracer\_initialization\_from\_z module reference}
\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z}}\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:mom-tracer-initialization-from-z-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z::doc}}\index{mom\_tracer\_initialization\_from\_z (module)@\spxentry{mom\_tracer\_initialization\_from\_z}\spxextra{module}|spxpagem}
Initializes hydrography from z\sphinxhyphen{}coordinate climatology files.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:detamom-tracer-initialization-from-z}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_initialize\_tracer\_from\_z()}}}}}
&
Initializes a tracer from a z\sphinxhyphen{}space data file.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:detamom-tracer-initialization-from-z}}
Initializes hydrography from z\sphinxhyphen{}coordinate climatology files.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:function-subroutine-documentation}}\index{mom\_initialize\_tracer\_from\_z() (fortran subroutine in module mom\_tracer\_initialization\_from\_z)@\spxentry{mom\_initialize\_tracer\_from\_z()}\spxextra{fortran subroutine in module mom\_tracer\_initialization\_from\_z}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_initialization_from_z:f/mom_tracer_initialization_from_z/mom_initialize_tracer_from_z}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_initialization\_from\_z/}}\sphinxbfcode{\sphinxupquote{mom\_initialize\_tracer\_from\_z}}}{\emph{h}, \emph{tr}, \emph{G}, \emph{GV}, \emph{US}, \emph{PF}, \emph{src\_file}, \emph{src\_var\_nam}, \emph{src\_var\_unit\_conversion}, \emph{src\_var\_record}, \emph{homogenize}, \emph{useALEremapping}, \emph{remappingScheme}, \emph{src\_var\_gridspec}}{}
Initializes a tracer from a z\sphinxhyphen{}space data file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tr} :: Pointer to array to be initialized

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} parameter file

\item {} 
\sphinxstylestrong{src\_file} :: {[}in{]} source filename

\item {} 
\sphinxstylestrong{src\_var\_nam} :: {[}in{]} variable name in file

\item {} 
\sphinxstylestrong{src\_var\_unit\_conversion} :: {[}in{]} optional multiplicative unit conversion

\item {} 
\sphinxstylestrong{src\_var\_record} :: {[}in{]} record to read for multiple time\sphinxhyphen{}level files

\item {} 
\sphinxstylestrong{homogenize} :: {[}in{]} optionally homogenize to mean value

\item {} 
\sphinxstylestrong{usealeremapping} :: {[}in{]} to remap or not (optional)

\item {} 
\sphinxstylestrong{remappingscheme} :: {[}in{]} remapping scheme to use.

\item {} 
\sphinxstylestrong{src\_var\_gridspec} :: {[}in{]} Source variable name in a gridspec file. This is not implemented yet.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_remap_scalar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_remap\_scalar}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_horizontal_regridding:f/mom_horizontal_regridding/mystats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_horizontal\_regridding::mystats}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::initialize\_mom\_generic\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tracer\_registry module reference}
\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry}}\label{\detokenize{api/generated/modules/mom_tracer_registry:mom-tracer-registry-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_registry::doc}}\index{mom\_tracer\_registry (module)@\spxentry{mom\_tracer\_registry}\spxextra{module}|spxpagem}
This module contains the {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_registry\_type()}}}}} and the subroutines that handle registration of tracers and related subroutines. The primary subroutine, register\_tracer, is called to indicate the tracers advected and diffused.
and the subroutines that handle registration of tracers and related subroutines. The primary subroutine, register\_tracer, is called to indicate the tracers advected and diffused.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:detamom-tracer-registry}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_tracer_registry:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_registry\_type}}}}}
&
Type to carry basic tracer information.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_type}}}}}
&
The tracer type.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_registry:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_tracer()}}}}}
&
This subroutine registers a tracer to be advected and laterally diffused.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/lock_tracer_registry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lock\_tracer\_registry()}}}}}
&
This subroutine locks the tracer registry to prevent the addition of more tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_tracer\_diagnostics()}}}}}
&
register\_tracer\_diagnostics does a set of register\_diag\_field calls for any previously registered in a tracer registry with a value of registry\_diags set to .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/preale_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{preale\_tracer\_diagnostics()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/postale_tracer_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{postale\_tracer\_diagnostics()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_diagnostics_at_sync}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_tracer\_diagnostics\_at\_sync()}}}}}
&
Post tracer diganostics when that should only be posted when MOM’s state is self\sphinxhyphen{}consistent (also referred to as ‘synchronized’)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{post\_tracer\_transport\_diagnostics()}}}}}
&
Post the advective and diffusive tendencies.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_chksum()}}}}}
&
This subroutine writes out chksums for tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_chkinv()}}}}}
&
Calculates and prints the global inventory of all tracers in the registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_name_lookup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_name\_lookup()}}}}}
&
Find a tracer in the tracer registry by name.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_registry\_init()}}}}}
&
Initialize the tracer registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_registry\_end()}}}}}
&
This routine closes the tracer registry module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_registry:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_registry:detamom-tracer-registry}}
This module contains the {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_registry\_type()}}}}} and the subroutines that handle registration of tracers and related subroutines. The primary subroutine, register\_tracer, is called to indicate the tracers advected and diffused.
and the subroutines that handle registration of tracers and related subroutines. The primary subroutine, register\_tracer, is called to indicate the tracers advected and diffused.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_registry:type-documentation}}\index{tracer\_registry\_type (fortran type in module mom\_tracer\_registry)@\spxentry{tracer\_registry\_type}\spxextra{fortran type in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{tracer\_registry\_type}}}
Type to carry basic tracer information.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of registered tracers

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( tracer\_type )(50)}\sphinxstyleemphasis{{]}} :: array of registered tracers

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{locked}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: New tracers may be registered if locked=.false. When locked=.true., no more tracers can be registered, at which point common diagnostics can be set up for the registered tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_type (fortran type in module mom\_tracer\_registry)@\spxentry{tracer\_type}\spxextra{fortran type in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{tracer\_type}}}
The tracer type.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tr\_post\_horzn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_adx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ady}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbd\_bulk\_dfx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbd\_bulk\_dfy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbd\_dfx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbd\_dfy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbd\_dfx\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbd\_dfy\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_adx\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_ady\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfx\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfy\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_adv\_xy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_adv\_xy\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfxy\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfxy\_cont\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dfxy\_conc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbdxy\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbdxy\_cont\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_lbdxy\_conc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_remap\_conc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_remap\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_remap\_cont\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_trxh\_tendency}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_trxh\_tendency\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tr\_vardec}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic IDs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: tracer concentration array {[}conc{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ad\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for x\sphinxhyphen{}advective tracer flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ad\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for y\sphinxhyphen{}advective tracer flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ad2d\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic vertical sum x\sphinxhyphen{}advective tracer flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ad2d\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic vertical sum y\sphinxhyphen{}advective tracer flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{df\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for x\sphinxhyphen{}diffusive tracer flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{df\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for y\sphinxhyphen{}diffusive tracer flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lbd\_dfx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for x\sphinxhyphen{}diffusive tracer flux {[}conc H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lbd\_dfy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for y\sphinxhyphen{}diffusive tracer flux {[}conc H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lbd\_dfx\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for x\sphinxhyphen{}diffusive tracer flux {[}conc H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lbd\_dfy\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for y\sphinxhyphen{}diffusive tracer flux {[}conc H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lbd\_bulk\_df\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for x\sphinxhyphen{}diffusive tracer flux {[}conc H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lbd\_bulk\_df\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic array for y\sphinxhyphen{}diffusive tracer flux {[}conc H m2 s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{df2d\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic vertical sum x\sphinxhyphen{}diffusive flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{df2d\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: diagnostic vertical sum y\sphinxhyphen{}diffusive flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m3 s\sphinxhyphen{}1 or conc kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{advection\_xy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: convergence of lateral advective tracer fluxes {[}conc H T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} conc m s\sphinxhyphen{}1 or conc kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: tracer concentration array at a previous timestep used for diagnostics {[}conc{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{trxh\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer integrated tracer concentration array at a previous timestep used for diagnostics

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{{]}} :: tracer name used for diagnostics and error messages

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: Physical dimensions of the tracer concentration.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{longname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: Long name of the variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{registry\_diags}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the registry to set up the diagnostics associated with this tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: CMOR name of this tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: CMOR physical dimensions of the tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_longname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=240)}\sphinxstyleemphasis{{]}} :: CMOR long name of the tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_nameroot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{{]}} :: Short tracer name snippet used construct the names of flux diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_longname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=64)}\sphinxstyleemphasis{{]}} :: A word or phrase used construct the long names of flux diagnostics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling factor used to convert the fluxes of this tracer to its desired units.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=48)}\sphinxstyleemphasis{{]}} :: The units for fluxes of this variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{conv\_units}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=48)}\sphinxstyleemphasis{{]}} :: The units for the flux convergence of this tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{conv\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A scaling factor used to convert the flux convergence of this tracer to its desired units.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cmor\_tendprefix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=48)}\sphinxstyleemphasis{{]}} :: The CMOR variable prefix for tendencies of this tracer, required because CMOR does not follow any discernable pattern for these names.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr\_squared}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The tracer registry index for the square of this tracer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, this tracer should be vertically remapped.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_form}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer indicating which template is to be used to label diagnostics.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_registry:function-subroutine-documentation}}\index{register\_tracer() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{register\_tracer()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{register\_tracer}}}{\emph{tr\_ptr}, \emph{Reg}, \emph{param\_file}, \emph{HI}, \emph{GV}, \emph{name}, \emph{longname}, \emph{units}, \emph{cmor\_name}, \emph{cmor\_units}, \emph{cmor\_longname}, \emph{tr\_desc}, \emph{OBC\_inflow}, \emph{OBC\_in\_u}, \emph{OBC\_in\_v}, \emph{ad\_x}, \emph{ad\_y}, \emph{df\_x}, \emph{df\_y}, \emph{ad\_2d\_x}, \emph{ad\_2d\_y}, \emph{df\_2d\_x}, \emph{df\_2d\_y}, \emph{advection\_xy}, \emph{registry\_diags}, \emph{flux\_nameroot}, \emph{flux\_longname}, \emph{flux\_units}, \emph{flux\_scale}, \emph{convergence\_units}, \emph{convergence\_scale}, \emph{cmor\_tendprefix}, \emph{diag\_form}, \emph{restart\_CS}, \emph{mandatory}}{}
This subroutine registers a tracer to be advected and laterally diffused.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} horizontal index type

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item {} 
\sphinxstylestrong{tr\_ptr} :: target or pointer to the tracer array

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} file to parse for model parameter values

\item {} 
\sphinxstylestrong{name} :: {[}in{]} Short tracer name

\item {} 
\sphinxstylestrong{longname} :: {[}in{]} The long tracer name

\item {} 
\sphinxstylestrong{units} :: {[}in{]} The units of this tracer

\item {} 
\sphinxstylestrong{cmor\_name} :: {[}in{]} CMOR name

\item {} 
\sphinxstylestrong{cmor\_units} :: {[}in{]} CMOR physical dimensions of variable

\item {} 
\sphinxstylestrong{cmor\_longname} :: {[}in{]} CMOR long name

\item {} 
\sphinxstylestrong{tr\_desc} :: {[}in{]} A structure with metadata about the tracer

\item {} 
\sphinxstylestrong{obc\_inflow} :: {[}in{]} the tracer for all inflows via OBC for which OBC\_in\_u or OBC\_in\_v are not specified (units of tracer CONC)

\item {} 
\sphinxstylestrong{obc\_in\_u} :: tracer at inflows through u\sphinxhyphen{}faces of tracer cells (units of tracer CONC)

\item {} 
\sphinxstylestrong{obc\_in\_v} :: tracer at inflows through v\sphinxhyphen{}faces of tracer cells (units of tracer CONC)

\item {} 
\sphinxstylestrong{ad\_x} :: diagnostic x\sphinxhyphen{}advective flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ad\_y} :: diagnostic y\sphinxhyphen{}advective flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{df\_x} :: diagnostic x\sphinxhyphen{}diffusive flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{df\_y} :: diagnostic y\sphinxhyphen{}diffusive flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ad\_2d\_x} :: vert sum of diagnostic x\sphinxhyphen{}advect flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ad\_2d\_y} :: vert sum of diagnostic y\sphinxhyphen{}advect flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{df\_2d\_x} :: vert sum of diagnostic x\sphinxhyphen{}diffuse flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{df\_2d\_y} :: vert sum of diagnostic y\sphinxhyphen{}diffuse flux {[}conc H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} CONC m3 s\sphinxhyphen{}1 or CONC kg s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{advection\_xy} :: convergence of lateral advective tracer fluxes

\item {} 
\sphinxstylestrong{registry\_diags} :: {[}in{]} If present and true, use the registry for the diagnostics of this tracer.

\item {} 
\sphinxstylestrong{flux\_nameroot} :: {[}in{]} Short tracer name snippet used construct the names of flux diagnostics.

\item {} 
\sphinxstylestrong{flux\_longname} :: {[}in{]} A word or phrase used construct the long names of flux diagnostics.

\item {} 
\sphinxstylestrong{flux\_units} :: {[}in{]} The units for the fluxes of this tracer.

\item {} 
\sphinxstylestrong{flux\_scale} :: {[}in{]} A scaling factor used to convert the fluxes of this tracer to its desired units.

\item {} 
\sphinxstylestrong{convergence\_units} :: {[}in{]} The units for the flux convergence of this tracer.

\item {} 
\sphinxstylestrong{convergence\_scale} :: {[}in{]} A scaling factor used to convert the flux convergence of this tracer to its desired units.

\item {} 
\sphinxstylestrong{cmor\_tendprefix} :: {[}in{]} The CMOR name for the layer\sphinxhyphen{}integrated tendencies of this tracer.

\item {} 
\sphinxstylestrong{diag\_form} :: {[}in{]} An integer (1 or 2, 1 by default) indicating the character string template to use in labeling diagnostics

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure this tracer will be registered for restarts if this argument is present

\item {} 
\sphinxstylestrong{mandatory} :: {[}in{]} If true, this tracer must be read from a restart file.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_registry\_init}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/advection_test_tracer:f/advection_test_tracer/register_advection_test_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{advection\_test\_tracer::register\_advection\_test\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/boundary_impulse_tracer:f/boundary_impulse_tracer/register_boundary_impulse_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boundary\_impulse\_tracer::register\_boundary\_impulse\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dome_tracer:f/dome_tracer/register_dome_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_tracer::register\_dome\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes::register\_dye\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/dyed_obc_tracer:f/dyed_obc_tracer/register_dyed_obc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dyed\_obc\_tracer::register\_dyed\_obc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/register_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::register\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/isomip_tracer:f/isomip_tracer/register_isomip_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isomip\_tracer::register\_isomip\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/register_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::register\_mom\_generic\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/register_ocmip2_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::register\_ocmip2\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::register\_oil\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/register_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer::register\_pseudo\_salt\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/register_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer::register\_rgc\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_register_tracer_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example::user\_register\_tracer\_example}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{lock\_tracer\_registry() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{lock\_tracer\_registry()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/lock_tracer_registry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{lock\_tracer\_registry}}}{\emph{Reg}}{}
This subroutine locks the tracer registry to prevent the addition of more tracers. After locked=.true., can then register common diagnostics.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{register\_tracer\_diagnostics() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{register\_tracer\_diagnostics()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{register\_tracer\_diagnostics}}}{\emph{Reg}, \emph{h}, \emph{Time}, \emph{diag}, \emph{G}, \emph{GV}, \emph{US}, \emph{use\_ALE}}{}
register\_tracer\_diagnostics does a set of register\_diag\_field calls for any previously registered in a tracer registry with a value of registry\_diags set to .true.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses

\item {} 
\sphinxstylestrong{time} :: {[}in{]} current model time

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} structure to regulate diagnostic output

\item {} 
\sphinxstylestrong{use\_ale} :: {[}in{]} If true active diagnostics that only apply to ALE configurations

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/cmor_long_std}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::cmor\_long\_std}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{preale\_tracer\_diagnostics() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{preale\_tracer\_diagnostics()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/preale_tracer_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{preale\_tracer\_diagnostics}}}{\emph{Reg}, \emph{G}, \emph{GV}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{postale\_tracer\_diagnostics() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{postale\_tracer\_diagnostics()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/postale_tracer_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{postale\_tracer\_diagnostics}}}{\emph{Reg}, \emph{G}, \emph{GV}, \emph{diag}, \emph{dt}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} ocean vertical grid structure

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} regulates diagnostic output

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} total time interval for these diagnostics {[}T \textasciitilde{}\textgreater{} s{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_tracer\_diagnostics\_at\_sync() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{post\_tracer\_diagnostics\_at\_sync()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_diagnostics_at_sync}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{post\_tracer\_diagnostics\_at\_sync}}}{\emph{Reg}, \emph{h}, \emph{diag\_prev}, \emph{diag}, \emph{G}, \emph{GV}, \emph{dt}}{}
Post tracer diganostics when that should only be posted when MOM’s state is self\sphinxhyphen{}consistent (also referred to as ‘synchronized’)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses

\item {} 
\sphinxstylestrong{diag\_prev} :: {[}in{]} Contains diagnostic grids from previous timestep

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} structure to regulate diagnostic output

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} total time step for tracer updates {[}T \textasciitilde{}\textgreater{} s{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_copy_storage_to_diag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_copy\_storage\_to\_diag}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_restore_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_restore\_grids}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_save_grids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_save\_grids}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{post\_tracer\_transport\_diagnostics() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{post\_tracer\_transport\_diagnostics()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/post_tracer_transport_diagnostics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{post\_tracer\_transport\_diagnostics}}}{\emph{G}, \emph{GV}, \emph{Reg}, \emph{h\_diag}, \emph{diag}}{}
Post the advective and diffusive tendencies.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{reg} :: pointer to the tracer registry

\item {} 
\sphinxstylestrong{h\_diag} :: {[}in{]} Layer thicknesses on which to post fields

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} structure to regulate diagnostic output

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/post_transport_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::post\_transport\_diagnostics}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_tracer\_chksum() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{mom\_tracer\_chksum()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{mom\_tracer\_chksum}}}{\emph{mesg}, \emph{Tr}, \emph{ntr}, \emph{G}}{}
This subroutine writes out chksums for tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} message that appears on the chksum lines

\item {} 
\sphinxstylestrong{tr} :: {[}in{]} array of all of registered tracers

\item {} 
\sphinxstylestrong{ntr} :: {[}in{]} number of registered tracers

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_redistribute\_residual}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_hor_diff:f/mom_tracer_hor_diff/tracer_hordiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_hor\_diff::tracer\_hordiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_tracer\_chkinv() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{mom\_tracer\_chkinv()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/mom_tracer_chkinv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{mom\_tracer\_chkinv}}}{\emph{mesg}, \emph{G}, \emph{h}, \emph{Tr}, \emph{ntr}}{}
Calculates and prints the global inventory of all tracers in the registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} message that appears on the chksum lines

\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{tr} :: {[}in{]} array of all of registered tracers

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses

\item {} 
\sphinxstylestrong{ntr} :: {[}in{]} number of registered tracers

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_offline_inputs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_offline\_inputs}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_advection_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_advection\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_into_ocean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_fw\_fluxes\_into\_ocean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_fw_fluxes_out_ocean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_fw\_fluxes\_out\_ocean}}}}} {\hyperref[\detokenize{api/generated/modules/mom_offline_main:f/mom_offline_main/offline_redistribute_residual}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_offline\_main::offline\_redistribute\_residual}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_name\_lookup() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{tracer\_name\_lookup()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_name_lookup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{tracer\_name\_lookup}}}{\emph{Reg}, \emph{tr\_ptr}, \emph{name}}{}
Find a tracer in the tracer registry by name.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{reg} :: pointer to tracer registry

\item {} 
\sphinxstylestrong{tr\_ptr} :: target or pointer to the tracer array

\item {} 
\sphinxstylestrong{name} :: {[}in{]} tracer name

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/lowercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::lowercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/dome_initialization:f/dome_initialization/dome_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dome\_initialization::dome\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_open_boundary:f/mom_open_boundary/register_temp_salt_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_open\_boundary::register\_temp\_salt\_segments}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_registry\_init() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{tracer\_registry\_init()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{tracer\_registry\_init}}}{\emph{param\_file}, \emph{Reg}}{}
Initialize the tracer registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} open file to parse for model parameters

\item {} 
\sphinxstylestrong{reg} :: pointer to tracer registry

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_registry\_end() (fortran subroutine in module mom\_tracer\_registry)@\spxentry{tracer\_registry\_end()}\spxextra{fortran subroutine in module mom\_tracer\_registry}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/tracer_registry_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_registry/}}\sphinxbfcode{\sphinxupquote{tracer\_registry\_end}}}{\emph{Reg}}{}
This routine closes the tracer registry module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{reg} :: The tracer registry that will be deallocated

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_tracer\_z\_init module reference}
\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init}}\label{\detokenize{api/generated/modules/mom_tracer_z_init:mom-tracer-z-init-module-reference}}\label{\detokenize{api/generated/modules/mom_tracer_z_init::doc}}\index{mom\_tracer\_z\_init (module)@\spxentry{mom\_tracer\_z\_init}\spxextra{module}|spxpagem}
Used to initialize tracers from a depth\sphinxhyphen{} (or z*\sphinxhyphen{}) space file.

{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:detamom-tracer-z-init}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_tracer_z_init:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init()}}}}}
&
This function initializes a tracer by reading a Z\sphinxhyphen{}space file, returning .true.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init\_array()}}}}}
&
Layer model routine for remapping tracers from pseudo\sphinxhyphen{}z coordinates into layers defined by target interface positions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/read_z_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_z\_edges()}}}}}
&
This subroutine reads the vertical coordinate data for a field from a NetCDF file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_overlap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_overlap()}}}}}
&
Determines the layers bounded by interfaces e that overlap with the depth range between Z\_top and Z\_bot, and the fractional weights of each layer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_limited_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_limited\_slope()}}}}}
&
This subroutine determines a limited slope for val to be advected with a piecewise limited scheme.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/determine_temperature}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{determine\_temperature()}}}}}
&
This subroutine determines the potential temperature and salinity that is consistent with the target density using provided initial guess.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_tracer_z_init:detailed-description}}\label{\detokenize{api/generated/modules/mom_tracer_z_init:detamom-tracer-z-init}}
Used to initialize tracers from a depth\sphinxhyphen{} (or z*\sphinxhyphen{}) space file.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_tracer_z_init:function-subroutine-documentation}}\index{tracer\_z\_init() (fortran function in module mom\_tracer\_z\_init)@\spxentry{tracer\_z\_init()}\spxextra{fortran function in module mom\_tracer\_z\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init/}}\sphinxbfcode{\sphinxupquote{tracer\_z\_init}}}{\emph{tr}, \emph{h}, \emph{filename}, \emph{tr\_name}, \emph{G}, \emph{US}, \emph{missing\_val}, \emph{land\_val}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This function initializes a tracer by reading a Z\sphinxhyphen{}space file, returning .true. if this appears to have been successful, and false otherwise.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: A return code indicating if the initialization has been successful

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tr} :: {[}out{]} The tracer to initialize

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read from

\item {} 
\sphinxstylestrong{tr\_name} :: {[}in{]} The name of the tracer in the file

\item {} 
\sphinxstylestrong{missing\_val} :: {[}in{]} The missing value for the tracer

\item {} 
\sphinxstylestrong{land\_val} :: {[}in{]} A value to use to fill in land points

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_limited_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_limited\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_overlap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_overlap}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/read_z_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{read\_z\_edges}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ocmip2_cfc:f/mom_ocmip2_cfc/init_tracer_cfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ocmip2\_cfc::init\_tracer\_cfc}}}}} {\hyperref[\detokenize{api/generated/modules/ideal_age_example:f/ideal_age_example/initialize_ideal_age_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ideal\_age\_example::initialize\_ideal\_age\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/initialize_mom_generic_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::initialize\_mom\_generic\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/initialize_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer::initialize\_oil\_tracer}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_z\_init\_array() (fortran subroutine in module mom\_tracer\_z\_init)@\spxentry{tracer\_z\_init\_array()}\spxextra{fortran subroutine in module mom\_tracer\_z\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init/}}\sphinxbfcode{\sphinxupquote{tracer\_z\_init\_array}}}{\emph{tr\_in}, \emph{z\_edges}, \emph{nk\_data}, \emph{e}, \emph{land\_fill}, \emph{G}, \emph{nlay}, \emph{nlevs}, \emph{eps\_z}, \emph{tr}}{}
Layer model routine for remapping tracers from pseudo\sphinxhyphen{}z coordinates into layers defined by target interface positions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{nk\_data} :: {[}in{]} The number of levels in the input data

\item {} 
\sphinxstylestrong{tr\_in} :: {[}in{]} The z\sphinxhyphen{}space array of tracer concentrations that is read in.

\item {} 
\sphinxstylestrong{z\_edges} :: {[}in{]} The depths of the cell edges in the input z* data {[}Z \textasciitilde{}\textgreater{} m or m{]}

\item {} 
\sphinxstylestrong{nlay} :: {[}in{]} The number of vertical layers in the target grid

\item {} 
\sphinxstylestrong{e} :: {[}in{]} The depths of the target layer interfaces {[}Z \textasciitilde{}\textgreater{} m or m{]}

\item {} 
\sphinxstylestrong{land\_fill} :: {[}in{]} fill in data over land (1)

\item {} 
\sphinxstylestrong{nlevs} :: {[}in{]} The number of input levels with valid data

\item {} 
\sphinxstylestrong{eps\_z} :: {[}in{]} A negligibly thin layer thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{tr} :: {[}out{]} tracers in layer space

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_limited_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_limited\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_overlap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_overlap}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_temp\_salt\_initialize\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{read\_z\_edges() (fortran subroutine in module mom\_tracer\_z\_init)@\spxentry{read\_z\_edges()}\spxextra{fortran subroutine in module mom\_tracer\_z\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/read_z_edges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init/}}\sphinxbfcode{\sphinxupquote{read\_z\_edges}}}{\emph{filename}, \emph{tr\_name}, \emph{z\_edges}, \emph{nz\_out}, \emph{has\_edges}, \emph{use\_missing}, \emph{missing}, \emph{scale}}{}
This subroutine reads the vertical coordinate data for a field from a NetCDF file. It also might read the missing value attribute for that same field.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{filename} :: {[}in{]} The name of the file to read from.

\item {} 
\sphinxstylestrong{tr\_name} :: {[}in{]} The name of the tracer in the file.

\item {} 
\sphinxstylestrong{z\_edges} :: {[}out{]} The depths of the vertical edges of the tracer array

\item {} 
\sphinxstylestrong{nz\_out} :: {[}out{]} The number of vertical layers in the tracer array

\item {} 
\sphinxstylestrong{has\_edges} :: {[}out{]} If true the values in z\_edges are the edges of the tracer cells, otherwise they are the cell centers

\item {} 
\sphinxstylestrong{use\_missing} :: {[}inout{]} If false on input, see whether the tracer has a missing value, and if so return true

\item {} 
\sphinxstylestrong{missing} :: {[}inout{]} The missing value, if one has been found

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A scaling factor for z\_edges into new units.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_overlap() (fortran subroutine in module mom\_tracer\_z\_init)@\spxentry{find\_overlap()}\spxextra{fortran subroutine in module mom\_tracer\_z\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_overlap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init/}}\sphinxbfcode{\sphinxupquote{find\_overlap}}}{\emph{e}, \emph{Z\_top}, \emph{Z\_bot}, \emph{k\_max}, \emph{k\_start}, \emph{k\_top}, \emph{k\_bot}, \emph{wt}, \emph{z1}, \emph{z2}}{}
Determines the layers bounded by interfaces e that overlap with the depth range between Z\_top and Z\_bot, and the fractional weights of each layer. It also calculates the normalized relative depths of the range of each layer that overlaps that depth range.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{e} :: {[}in{]} Column interface heights, {[}Z \textasciitilde{}\textgreater{} m{]} or other units.

\item {} 
\sphinxstylestrong{z\_top} :: {[}in{]} Top of range being mapped to, in the units of e {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{z\_bot} :: {[}in{]} Bottom of range being mapped to, in the units of e {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{k\_max} :: {[}in{]} Number of valid layers.

\item {} 
\sphinxstylestrong{k\_start} :: {[}in{]} Layer at which to start searching.

\item {} 
\sphinxstylestrong{k\_top} :: {[}out{]} Indices of top layers that overlap with the depth range.

\item {} 
\sphinxstylestrong{k\_bot} :: {[}out{]} Indices of bottom layers that overlap with the depth range.

\item {} 
\sphinxstylestrong{wt} :: {[}out{]} Relative weights of each layer from k\_top to k\_bot {[}nondim{]}.

\item {} 
\sphinxstylestrong{z1} :: {[}out{]} Depth of the top limits of the part of a layer that contributes to a depth level, relative to the cell center and normalized by the cell thickness {[}nondim{]}. Note that \sphinxhyphen{}1/2 \textless{}= z1 \textless{} z2 \textless{}= 1/2.

\item {} 
\sphinxstylestrong{z2} :: {[}out{]} Depths of the bottom limit of the part of a layer that contributes to a depth level, relative to the cell center and normalized by the cell thickness {[}nondim{]}. Note that \sphinxhyphen{}1/2 \textless{}= z1 \textless{} z2 \textless{}= 1/2.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_limited\_slope() (fortran function in module mom\_tracer\_z\_init)@\spxentry{find\_limited\_slope()}\spxextra{fortran function in module mom\_tracer\_z\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/find_limited_slope}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init/}}\sphinxbfcode{\sphinxupquote{find\_limited\_slope}}}{\emph{val}, \emph{e}, \emph{k}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine determines a limited slope for val to be advected with a piecewise limited scheme.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{val} :: {[}in{]} An column the values that are being interpolated.

\item {} 
\sphinxstylestrong{e} :: {[}in{]} A column’s interface heights {[}Z \textasciitilde{}\textgreater{} m{]} or other units.

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The layer whose slope is being determined.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The normalized slope in the intracell distribution of val.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_z\_init\_array}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{determine\_temperature() (fortran subroutine in module mom\_tracer\_z\_init)@\spxentry{determine\_temperature()}\spxextra{fortran subroutine in module mom\_tracer\_z\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/determine_temperature}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init/}}\sphinxbfcode{\sphinxupquote{determine\_temperature}}}{\emph{temp}, \emph{salt}, \emph{R\_tgt}, \emph{p\_ref}, \emph{niter}, \emph{land\_fill}, \emph{h}, \emph{k\_start}, \emph{G}, \emph{US}, \emph{eos}, \emph{h\_massless}}{}
This subroutine determines the potential temperature and salinity that is consistent with the target density using provided initial guess.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{temp} :: {[}inout{]} potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{salt} :: {[}inout{]} salinity {[}PSU{]}

\item {} 
\sphinxstylestrong{r\_tgt} :: {[}in{]} desired potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxstylestrong{niter} :: {[}in{]} maximum number of iterations

\item {} 
\sphinxstylestrong{k\_start} :: {[}in{]} starting index (i.e. below the buffer layer)

\item {} 
\sphinxstylestrong{land\_fill} :: {[}in{]} land fill value

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness, used only to avoid working on

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{eos} :: seawater equation of state control structure

\item {} 
\sphinxstylestrong{h\_massless} :: {[}in{]} A threshold below which a layer is determined to be massless {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_temp_salt_initialize_from_z}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_temp\_salt\_initialize\_from\_z}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_transcribe\_grid module reference}
\label{\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid}}\label{\detokenize{api/generated/modules/mom_transcribe_grid:mom-transcribe-grid-module-reference}}\label{\detokenize{api/generated/modules/mom_transcribe_grid::doc}}\index{mom\_transcribe\_grid (module)@\spxentry{mom\_transcribe\_grid}\spxextra{module}|spxpagem}
Module with routines for copying information from a shared dynamic horizontal grid to an ocean\sphinxhyphen{}specific horizontal grid and the reverse.

{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:detamom-transcribe-grid}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_transcribe_grid:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_dyngrid_to_mom_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_dyngrid\_to\_mom\_grid()}}}}}
&
Copies information from a dynamic (shared) horizontal grid type into an ocean\_grid\_type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_mom_grid_to_dyngrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copy\_mom\_grid\_to\_dyngrid()}}}}}
&
Copies information from an ocean\_grid\_type into a dynamic (shared) horizontal grid type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/rotate_dyngrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_dyngrid()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_transcribe_grid:detailed-description}}\label{\detokenize{api/generated/modules/mom_transcribe_grid:detamom-transcribe-grid}}
Module with routines for copying information from a shared dynamic horizontal grid to an ocean\sphinxhyphen{}specific horizontal grid and the reverse.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_transcribe_grid:function-subroutine-documentation}}\index{copy\_dyngrid\_to\_mom\_grid() (fortran subroutine in module mom\_transcribe\_grid)@\spxentry{copy\_dyngrid\_to\_mom\_grid()}\spxextra{fortran subroutine in module mom\_transcribe\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_dyngrid_to_mom_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transcribe\_grid/}}\sphinxbfcode{\sphinxupquote{copy\_dyngrid\_to\_mom\_grid}}}{\emph{dG}, \emph{oG}, \emph{US}}{}
Copies information from a dynamic (shared) horizontal grid type into an ocean\_grid\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dg} :: {[}in{]} Common horizontal grid type

\item {} 
\sphinxstylestrong{og} :: {[}inout{]} Ocean grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_grid:f/mom_grid/set_derived_metrics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_grid::set\_derived\_metrics}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{copy\_mom\_grid\_to\_dyngrid() (fortran subroutine in module mom\_transcribe\_grid)@\spxentry{copy\_mom\_grid\_to\_dyngrid()}\spxextra{fortran subroutine in module mom\_transcribe\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/copy_mom_grid_to_dyngrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transcribe\_grid/}}\sphinxbfcode{\sphinxupquote{copy\_mom\_grid\_to\_dyngrid}}}{\emph{oG}, \emph{dG}, \emph{US}}{}
Copies information from an ocean\_grid\_type into a dynamic (shared) horizontal grid type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{og} :: {[}in{]} Ocean grid type

\item {} 
\sphinxstylestrong{dg} :: {[}inout{]} Common horizontal grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/set_derived_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::set\_derived\_dyn\_horgrid}}}}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_dyngrid() (fortran subroutine in module mom\_transcribe\_grid)@\spxentry{rotate\_dyngrid()}\spxextra{fortran subroutine in module mom\_transcribe\_grid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transcribe_grid:f/mom_transcribe_grid/rotate_dyngrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transcribe\_grid/}}\sphinxbfcode{\sphinxupquote{rotate\_dyngrid}}}{\emph{G\_in}, \emph{G}, \emph{US}, \emph{turns}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g\_in} :: {[}in{]} Common horizontal grid type

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Ocean grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dyn_horgrid:f/mom_dyn_horgrid/set_derived_dyn_horgrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dyn\_horgrid::set\_derived\_dyn\_horgrid}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_transform\_fms module reference}
\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms}}\label{\detokenize{api/generated/modules/mom_transform_fms:mom-transform-fms-module-reference}}\label{\detokenize{api/generated/modules/mom_transform_fms::doc}}\index{mom\_transform\_fms (module)@\spxentry{mom\_transform\_fms}\spxextra{module}|spxpagem}
Support functions and interfaces to permit transformed model domains to interact with FMS operations registered on the non\sphinxhyphen{}transformed domains.

{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:detamom-transform-fms}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_transform_fms:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_0d()}}}}}
&
Compute the FMS (mpp) checksum of a scalar.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_1d()}}}}}
&
Compute the FMS (mpp) checksum of a 1d field.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_2d()}}}}}
&
Compute the FMS (mpp) checksum of a rotated 2d field.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_3d()}}}}}
&
Compute the FMS (mpp) checksum of a rotated 3d field.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_4d()}}}}}
&
Compute the FMS (mpp) checksum of a rotated 4d field.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_write\_field\_real\_0d()}}}}}
&
Write the rotation of a 1d field to an FMS output file This function is provided to support the full FMS write\_field interface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_write\_field\_real\_1d()}}}}}
&
Write the rotation of a 1d field to an FMS output file This function is provided to support the full FMS write\_field interface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_write\_field\_real\_2d()}}}}}
&
Write the rotation of a 2d field to an FMS output file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_write\_field\_real\_3d()}}}}}
&
Write the rotation of a 3d field to an FMS output file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_4d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_write\_field\_real\_4d()}}}}}
&
Write the rotation of a 4d field to an FMS output file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_0d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_time\_interp\_external\_0d()}}}}}
&
Read a scalar field based on model time This function is provided to support the full FMS time\_interp\_external interface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_time\_interp\_external\_2d()}}}}}
&
Read a 2d field based on model time, and rotate to the model grid.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotated\_time\_interp\_external\_3d()}}}}}
&
Read a 3d field based on model time, and rotate to the model grid.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_transform_fms:detailed-description}}\label{\detokenize{api/generated/modules/mom_transform_fms:detamom-transform-fms}}
Support functions and interfaces to permit transformed model domains to interact with FMS operations registered on the non\sphinxhyphen{}transformed domains.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_transform_fms:function-subroutine-documentation}}\index{rotated\_mpp\_chksum\_real\_0d() (fortran function in module mom\_transform\_fms)@\spxentry{rotated\_mpp\_chksum\_real\_0d()}\spxextra{fortran function in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_0d}}}{\emph{field}, \emph{pelist}, \emph{mask\_val}, \emph{turns}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Compute the FMS (mpp) checksum of a scalar. This function is provided to support the full FMS mpp\_chksum interface.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotated\_mpp\_chksum\_real\_1d() (fortran function in module mom\_transform\_fms)@\spxentry{rotated\_mpp\_chksum\_real\_1d()}\spxextra{fortran function in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_1d}}}{\emph{field}, \emph{pelist}, \emph{mask\_val}, \emph{turns}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Compute the FMS (mpp) checksum of a 1d field. This function is provided to support the full FMS mpp\_chksum interface.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotated\_mpp\_chksum\_real\_2d() (fortran function in module mom\_transform\_fms)@\spxentry{rotated\_mpp\_chksum\_real\_2d()}\spxextra{fortran function in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_2d}}}{\emph{field}, \emph{pelist}, \emph{mask\_val}, \emph{turns}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Compute the FMS (mpp) checksum of a rotated 2d field.

\end{fulllineitems}

\index{rotated\_mpp\_chksum\_real\_3d() (fortran function in module mom\_transform\_fms)@\spxentry{rotated\_mpp\_chksum\_real\_3d()}\spxextra{fortran function in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_3d}}}{\emph{field}, \emph{pelist}, \emph{mask\_val}, \emph{turns}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Compute the FMS (mpp) checksum of a rotated 3d field.

\end{fulllineitems}

\index{rotated\_mpp\_chksum\_real\_4d() (fortran function in module mom\_transform\_fms)@\spxentry{rotated\_mpp\_chksum\_real\_4d()}\spxextra{fortran function in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_mpp_chksum_real_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_mpp\_chksum\_real\_4d}}}{\emph{field}, \emph{pelist}, \emph{mask\_val}, \emph{turns}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Compute the FMS (mpp) checksum of a rotated 4d field.

\end{fulllineitems}

\index{rotated\_write\_field\_real\_0d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_write\_field\_real\_0d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_write\_field\_real\_0d}}}{\emph{io\_unit}, \emph{field\_md}, \emph{field}, \emph{tstamp}, \emph{turns}}{}
Write the rotation of a 1d field to an FMS output file This function is provided to support the full FMS write\_field interface.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotated\_write\_field\_real\_1d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_write\_field\_real\_1d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_1d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_write\_field\_real\_1d}}}{\emph{io\_unit}, \emph{field\_md}, \emph{field}, \emph{tstamp}, \emph{turns}}{}
Write the rotation of a 1d field to an FMS output file This function is provided to support the full FMS write\_field interface.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotated\_write\_field\_real\_2d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_write\_field\_real\_2d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_write\_field\_real\_2d}}}{\emph{io\_unit}, \emph{field\_md}, \emph{domain}, \emph{field}, \emph{tstamp}, \emph{tile\_count}, \emph{default\_data}, \emph{turns}}{}
Write the rotation of a 2d field to an FMS output file.

\end{fulllineitems}

\index{rotated\_write\_field\_real\_3d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_write\_field\_real\_3d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_write\_field\_real\_3d}}}{\emph{io\_unit}, \emph{field\_md}, \emph{domain}, \emph{field}, \emph{tstamp}, \emph{tile\_count}, \emph{default\_data}, \emph{turns}}{}
Write the rotation of a 3d field to an FMS output file.

\end{fulllineitems}

\index{rotated\_write\_field\_real\_4d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_write\_field\_real\_4d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_write_field_real_4d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_write\_field\_real\_4d}}}{\emph{io\_unit}, \emph{field\_md}, \emph{domain}, \emph{field}, \emph{tstamp}, \emph{tile\_count}, \emph{default\_data}, \emph{turns}}{}
Write the rotation of a 4d field to an FMS output file.

\end{fulllineitems}

\index{rotated\_time\_interp\_external\_0d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_time\_interp\_external\_0d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_0d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_time\_interp\_external\_0d}}}{\emph{fms\_id}, \emph{time}, \emph{data\_in}, \emph{verbose}, \emph{turns}}{}
Read a scalar field based on model time This function is provided to support the full FMS time\_interp\_external interface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{fms\_id} :: {[}in{]} FMS field ID

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\item {} 
\sphinxstylestrong{data\_in} :: {[}inout{]} field to write data

\item {} 
\sphinxstylestrong{verbose} :: {[}in{]} Verbose output

\item {} 
\sphinxstylestrong{turns} :: {[}in{]} Number of quarter turns

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotated\_time\_interp\_external\_2d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_time\_interp\_external\_2d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_2d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_time\_interp\_external\_2d}}}{\emph{fms\_id}, \emph{time}, \emph{data\_in}, \emph{interp}, \emph{verbose}, \emph{horz\_interp}, \emph{mask\_out}, \emph{is\_in}, \emph{ie\_in}, \emph{js\_in}, \emph{je\_in}, \emph{window\_id}, \emph{turns}}{}
Read a 2d field based on model time, and rotate to the model grid.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rotated\_time\_interp\_external\_3d() (fortran subroutine in module mom\_transform\_fms)@\spxentry{rotated\_time\_interp\_external\_3d()}\spxextra{fortran subroutine in module mom\_transform\_fms}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_transform_fms:f/mom_transform_fms/rotated_time_interp_external_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_transform\_fms/}}\sphinxbfcode{\sphinxupquote{rotated\_time\_interp\_external\_3d}}}{\emph{fms\_id}, \emph{time}, \emph{data\_in}, \emph{interp}, \emph{verbose}, \emph{horz\_interp}, \emph{mask\_out}, \emph{is\_in}, \emph{ie\_in}, \emph{js\_in}, \emph{je\_in}, \emph{window\_id}, \emph{turns}}{}
Read a 3d field based on model time, and rotate to the model grid.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_unit\_scaling module reference}
\label{\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling}}\label{\detokenize{api/generated/modules/mom_unit_scaling:mom-unit-scaling-module-reference}}\label{\detokenize{api/generated/modules/mom_unit_scaling::doc}}\index{mom\_unit\_scaling (module)@\spxentry{mom\_unit\_scaling}\spxextra{module}|spxpagem}
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.

{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:detamom-unit-scaling}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_unit_scaling:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scale_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{unit\_scale\_type}}}}}
&
Describes various unit conversion factors.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_unit_scaling:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{unit\_scaling\_init()}}}}}
&
Allocates and initializes the ocean model unit scaling type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/fix_restart_unit_scaling}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fix\_restart\_unit\_scaling()}}}}}
&
Set the unit scaling factors for output to restart files to the unit scaling factors for this run.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{unit\_scaling\_end()}}}}}
&
Deallocates a unit scaling structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_unit_scaling:detailed-description}}\label{\detokenize{api/generated/modules/mom_unit_scaling:detamom-unit-scaling}}
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_unit_scaling:type-documentation}}\index{unit\_scale\_type (fortran type in module mom\_unit\_scaling)@\spxentry{unit\_scale\_type}\spxextra{fortran type in module mom\_unit\_scaling}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scale_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_unit\_scaling/}}\sphinxbfcode{\sphinxupquote{unit\_scale\_type}}}
Describes various unit conversion factors.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates distances in meters to the units of depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_to\_m}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates distances in the units of depth to meters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_l}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates lengths in meters to the units of horizontal lengths.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l\_to\_m}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates lengths in the units of horizontal lengths to meters.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_to\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates time intervals in seconds to the units of time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_to\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates the units of time to seconds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{r\_to\_kg\_m3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates the units of density to kilograms per meter cubed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kg\_m3\_to\_r}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates kilograms per meter cubed to the units of density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{q\_to\_j\_kg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates the units of enthalpy to Joules per kilogram.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{j\_kg\_to\_q}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates Joules per kilogram to the units of enthalpy.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_to\_l}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert vertical distances to lateral lengths.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l\_to\_z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert lateral lengths to vertical distances.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l\_t\_to\_m\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert lateral velocities from L T\sphinxhyphen{}1 to m s\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_s\_to\_l\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert lateral velocities from m s\sphinxhyphen{}1 to L T\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{l\_t2\_to\_m\_s2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert lateral accelerations from L T\sphinxhyphen{}2 to m s\sphinxhyphen{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z2\_t\_to\_m2\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert vertical diffusivities from Z2 T\sphinxhyphen{}1 to m2 s\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m2\_s\_to\_z2\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert vertical diffusivities from m2 s\sphinxhyphen{}1 to Z2 T\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{w\_m2\_to\_qrz\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert heat fluxes from W m\sphinxhyphen{}2 to Q R Z T\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{qrz\_t\_to\_w\_m2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert heat fluxes from Q R Z T\sphinxhyphen{}1 to W m\sphinxhyphen{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rz\_to\_kg\_m2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert mass loads from R Z to kg m\sphinxhyphen{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kg\_m2s\_to\_rz\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert mass fluxes from kg m\sphinxhyphen{}2 s\sphinxhyphen{}1 to R Z T\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rz\_t\_to\_kg\_m2s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert mass fluxes from R Z T\sphinxhyphen{}1 to kg m\sphinxhyphen{}2 s\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rz3\_t3\_to\_w\_m2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert turbulent kinetic energy fluxes from R Z3 T\sphinxhyphen{}3 to W m\sphinxhyphen{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{w\_m2\_to\_rz3\_t3}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert turbulent kinetic energy fluxes from W m\sphinxhyphen{}2 to R Z3 T\sphinxhyphen{}3.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rl2\_t2\_to\_pa}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Convert pressures from R L2 T\sphinxhyphen{}2 to Pa.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_z\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A copy of the m\_to\_Z that is used in restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_l\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A copy of the m\_to\_L that is used in restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_to\_t\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A copy of the s\_to\_T that is used in restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kg\_m3\_to\_r\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A copy of the kg\_m3\_to\_R that is used in restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{j\_kg\_to\_q\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A copy of the J\_kg\_to\_Q that is used in restart files.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_unit_scaling:function-subroutine-documentation}}\index{unit\_scaling\_init() (fortran subroutine in module mom\_unit\_scaling)@\spxentry{unit\_scaling\_init()}\spxextra{fortran subroutine in module mom\_unit\_scaling}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_unit\_scaling/}}\sphinxbfcode{\sphinxupquote{unit\_scaling\_init}}}{\emph{param\_file}, \emph{US}}{}
Allocates and initializes the ocean model unit scaling type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle/type

\item {} 
\sphinxstylestrong{us} :: A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fix\_restart\_unit\_scaling() (fortran subroutine in module mom\_unit\_scaling)@\spxentry{fix\_restart\_unit\_scaling()}\spxextra{fortran subroutine in module mom\_unit\_scaling}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/fix_restart_unit_scaling}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_unit\_scaling/}}\sphinxbfcode{\sphinxupquote{fix\_restart\_unit\_scaling}}}{\emph{US}}{}
Set the unit scaling factors for output to restart files to the unit scaling factors for this run.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{us} :: {[}inout{]} A dimensional unit scaling type

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/initialize_ice_shelf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::initialize\_ice\_shelf}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{unit\_scaling\_end() (fortran subroutine in module mom\_unit\_scaling)@\spxentry{unit\_scaling\_end()}\spxextra{fortran subroutine in module mom\_unit\_scaling}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_unit_scaling:f/mom_unit_scaling/unit_scaling_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_unit\_scaling/}}\sphinxbfcode{\sphinxupquote{unit\_scaling\_end}}}{\emph{US}}{}
Deallocates a unit scaling structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{us} :: A dimensional unit scaling type

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_unit\_tests module reference}
\label{\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests}}\label{\detokenize{api/generated/modules/mom_unit_tests:mom-unit-tests-module-reference}}\label{\detokenize{api/generated/modules/mom_unit_tests::doc}}\index{mom\_unit\_tests (module)@\spxentry{mom\_unit\_tests}\spxextra{module}|spxpagem}
Invokes unit tests in all modules that have them.

{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:detamom-unit-tests}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_unit_tests:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{unit\_tests()}}}}}
&
Calls unit tests for other modules.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_unit_tests:detailed-description}}\label{\detokenize{api/generated/modules/mom_unit_tests:detamom-unit-tests}}
Invokes unit tests in all modules that have them.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_unit_tests:function-subroutine-documentation}}\index{unit\_tests() (fortran subroutine in module mom\_unit\_tests)@\spxentry{unit\_tests()}\spxextra{fortran subroutine in module mom\_unit\_tests}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_unit_tests:f/mom_unit_tests/unit_tests}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_unit\_tests/}}\sphinxbfcode{\sphinxupquote{unit\_tests}}}{\emph{verbosity}}{}
Calls unit tests for other modules. Note that if a unit test returns true, a FATAL error is triggered.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{verbosity} :: {[}in{]} The verbosity level

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_vkernels:f/mom_diag_vkernels/diag_vkernels_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_vkernels::diag\_vkernels\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_lateral_boundary_diffusion:f/mom_lateral_boundary_diffusion/near_boundary_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_boundary\_diffusion::near\_boundary\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_random:f/mom_random/random_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_random::random\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/string_functions_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::string\_functions\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_variables module reference}
\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables}}\label{\detokenize{api/generated/modules/mom_variables:mom-variables-module-reference}}\label{\detokenize{api/generated/modules/mom_variables::doc}}\index{mom\_variables (module)@\spxentry{mom\_variables}\spxextra{module}|spxpagem}
Provides transparent structures with groups of MOM6 variables and supporting routines.

{\hyperref[\detokenize{api/generated/modules/mom_variables:detamom-variables}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_variables:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/accel_diag_ptrs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{accel\_diag\_ptrs}}}}}
&
Pointers to arrays with accelerations, which can later be used for derived diagnostics, like energy balances.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/bt_cont_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bt\_cont\_type}}}}}
&
Container for information about the summed layer transports and how they will vary as the barotropic velocity is changed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/cont_diag_ptrs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cont\_diag\_ptrs}}}}}
&
Pointers to arrays with transports, which can later be used for derived diagnostics, like energy balances.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/ocean_internal_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_internal\_state}}}}}
&
Pointers to all of the prognostic variables allocated in \sphinxcode{\sphinxupquote{MOM\_variables.F90}} and \sphinxcode{\sphinxupquote{MOM.F90}} .
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/p2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p2d}}}}}
&
A structure for creating arrays of pointers to 2D arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/p3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3d}}}}}
&
A structure for creating arrays of pointers to 3D arrays.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface}}}}}
&
Pointers to various fields which may be used describe the surface state of MOM, and which will be returned to a the calling program.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/thermo_var_ptrs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thermo\_var\_ptrs}}}}}
&
Pointers to an assortment of thermodynamic fields that may be available, including potential temperature, salinity, heat capacity, and the equation of state control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/vertvisc_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_type}}}}}
&
Vertical viscosities, drag coefficients, and related fields.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_variables:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/allocate_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_surface\_state()}}}}}
&
Allocates the fields for the surface (return) properties of the ocean model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/deallocate_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{deallocate\_surface\_state()}}}}}
&
Deallocates the elements of a surface state type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/rotate_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_surface\_state()}}}}}
&
Rotate the surface state fields from the input to the model indices.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/alloc_bt_cont_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alloc\_bt\_cont\_type()}}}}}
&
Allocates the arrays contained within a BT\_cont\_type and initializes them to 0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/dealloc_bt_cont_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dealloc\_bt\_cont\_type()}}}}}
&
Deallocates the arrays contained within a BT\_cont\_type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/mom_thermovar_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_thermovar\_chksum()}}}}}
&
Diagnostic checksums on various elements of a {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/thermo_var_ptrs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thermo\_var\_ptrs()}}}}} type for debugging.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_variables:detailed-description}}\label{\detokenize{api/generated/modules/mom_variables:detamom-variables}}
Provides transparent structures with groups of MOM6 variables and supporting routines.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_variables:type-documentation}}\index{accel\_diag\_ptrs (fortran type in module mom\_variables)@\spxentry{accel\_diag\_ptrs}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/accel_diag_ptrs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{accel\_diag\_ptrs}}}
Pointers to arrays with accelerations, which can later be used for derived diagnostics, like energy balances.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diffu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal acceleration due to along isopycnal viscosity {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diffv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional acceleration due to along isopycnal viscosity {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cau}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal Coriolis and momentum advection accelerations {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional Coriolis and momentum advection accelerations {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pfu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal acceleration due to pressure forces {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pfv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional acceleration due to pressure forces {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{du\_dt\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal acceleration due to vertical viscosity {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dv\_dt\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional acceleration due to vertical viscosity {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{du\_dt\_dia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal acceleration due to diapycnal mixing {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dv\_dt\_dia}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional acceleration due to diapycnal mixing {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{du\_other}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Zonal velocity changes due to any other processes that are not due to any explicit accelerations {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dv\_other}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Meridional velocity changes due to any other processes that are not due to any explicit accelerations {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gradkeu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: gradKEu = \sphinxhyphen{} d/dx(u2) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gradkev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: gradKEv = \sphinxhyphen{} d/dy(u2) {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rv\_x\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: rv\_x\_v = rv * v at u {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rv\_x\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: rv\_x\_u = rv * u at v {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_hfrac\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Fractional layer thickness at u points.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag\_hfrac\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Fractional layer thickness at v points.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{bt\_cont\_type (fortran type in module mom\_variables)@\spxentry{bt\_cont\_type}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/bt_cont_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{bt\_cont\_type}}}
Container for information about the summed layer transports and how they will vary as the barotropic velocity is changed.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from locations far to the east {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_e0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from nearby to the east {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_w0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from nearby to the west {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_u\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for zonal barotropic transport drawing from locations far to the west {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ubt\_ww}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: uBT\_WW is the barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, beyond which the marginal open face area is FA\_u\_WW. uBT\_WW must be non\sphinxhyphen{}negative.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ubt\_ee}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: uBT\_EE is a barotropic velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, beyond which the marginal open face area is FA\_u\_EE. uBT\_EE must be non\sphinxhyphen{}positive.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from locations far to the north {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_n0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from nearby to the north {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_s0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from nearby to the south {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fa\_v\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The effective open face area for meridional barotropic transport drawing from locations far to the south {[}H L \textasciitilde{}\textgreater{} m2 or kg m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vbt\_ss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: vBT\_SS is the barotropic velocity, {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, beyond which the marginal open face area is FA\_v\_SS. vBT\_SS must be non\sphinxhyphen{}negative.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vbt\_nn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: vBT\_NN is the barotropic velocity, {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}, beyond which the marginal open face area is FA\_v\_NN. vBT\_NN must be non\sphinxhyphen{}positive.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: An effective thickness at zonal faces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: An effective thickness at meridional faces {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_polarity\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for polarity group halo updates.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pass\_fa\_uv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(group\_pass\_type)}\sphinxstyleemphasis{{]}} :: Structure for face area group halo updates.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{cont\_diag\_ptrs (fortran type in module mom\_variables)@\spxentry{cont\_diag\_ptrs}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/cont_diag_ptrs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{cont\_diag\_ptrs}}}
Pointers to arrays with transports, which can later be used for derived diagnostics, like energy balances.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Resolved zonal layer thickness fluxes, {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Resolved meridional layer thickness fluxes, {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uhgm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Isopycnal height diffusion induced zonal volume fluxes {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vhgm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Isopycnal height diffusion induced meridional volume fluxes {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diapyc\_vel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The net diapycnal velocity {[}H s\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1 or kg m\sphinxhyphen{}2 s\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_internal\_state (fortran type in module mom\_variables)@\spxentry{ocean\_internal\_state}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/ocean_internal_state}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{ocean\_internal\_state}}}
Pointers to all of the prognostic variables allocated in \sphinxcode{\sphinxupquote{MOM\_variables.F90}}
and \sphinxcode{\sphinxupquote{MOM.F90}} .
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the temperature state variable {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the salinity state variable {[}ppt \textasciitilde{}\textgreater{} PSU or g/kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to zonal transports {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to meridional transports {[}H L2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}1 or kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cau}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the zonal Coriolis and Advective acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cav}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the meridional Coriolis and Advective acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pfu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the zonal Pressure force acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pfv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the meridional Pressure force acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diffu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the zonal acceleration due to lateral viscosity {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diffv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the meridional acceleration due to lateral viscosity {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pbce}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the baroclinic pressure force dependency on free surface movement.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_accel\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the zonal barotropic\sphinxhyphen{}solver acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_accel\_bt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to the meridional barotropic\sphinxhyphen{}solver acceleration {[}L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_av}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to zonal velocity averaged over the timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_av}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to meridional velocity averaged over the timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to zonal velocity at the end of the last timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Pointer to meridional velocity at the end of the last timestep {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p2d (fortran type in module mom\_variables)@\spxentry{p2d}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/p2d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{p2d}}}
A structure for creating arrays of pointers to 2D arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a 2D array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{p3d (fortran type in module mom\_variables)@\spxentry{p3d}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/p3d}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{p3d}}}
A structure for creating arrays of pointers to 3D arrays.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a 3D array.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface (fortran type in module mom\_variables)@\spxentry{surface}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/surface}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{surface}}}
Pointers to various fields which may be used describe the surface state of MOM, and which will be returned to a the calling program.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sst}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The sea surface temperature {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The sea surface salinity {[}ppt \textasciitilde{}\textgreater{} psu or gSalt/kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sfc\_density}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The mixed layer density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The mixed layer depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The mixed layer zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The mixed layer meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sea\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The sea level {[}Z \textasciitilde{}\textgreater{} m{]}. If a reduced surface gravity is.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frazil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The energy needed to heat the ocean column to the freezing point during.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{melt\_potential}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Instantaneous amount of heat that can be used to melt sea ice {[}Q R Z \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocean\_mass}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The total mass of the ocean {[}R Z \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocean\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The total heat content of the ocean in {[}degC R Z \textasciitilde{}\textgreater{} degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ocean\_salt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The total salt content of the ocean in {[}kgSalt kg\sphinxhyphen{}1 R Z \textasciitilde{}\textgreater{} kgSalt m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{taux\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The zonal stresses on the ocean under shelves {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tauy\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The meridional stresses on the ocean under shelves {[}R L Z T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tempxpme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The net inflow of water into the ocean times the temperature at which this.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_deficit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The salt needed to maintain the ocean column above a minimum.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{internal\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Any internal or geothermal heat sources that are applied to the ocean.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_is\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the temperature variable SST is actually the conservative temperature in {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_is\_abss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the salinity variable SSS is actually the absolute salinity in {[}g/kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_fields}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coupler\_2d\_bc\_type)}\sphinxstyleemphasis{{]}} :: A structure that may contain an array of named fields describing tracer\sphinxhyphen{}related quantities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{arrays\_allocated}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: A flag that indicates whether the surface type has had its memory allocated.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{thermo\_var\_ptrs (fortran type in module mom\_variables)@\spxentry{thermo\_var\_ptrs}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/thermo_var_ptrs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{thermo\_var\_ptrs}}}
Pointers to an assortment of thermodynamic fields that may be available, including potential temperature, salinity, heat capacity, and the equation of state control structure.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Potential temperature {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Salinity {[}PSU{]} or {[}gSalt/kg{]}, generically {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Ocean surface pressure used in equation of state calculations {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{eqn\_of\_state}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(eos\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Type that indicates the equation of state to use.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{p\_ref}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. This is the pressure used to calculate Rml from T and S when eqn\_of\_state is associated.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The heat capacity of seawater {[}Q degC\sphinxhyphen{}1 \textasciitilde{}\textgreater{} J degC\sphinxhyphen{}1 kg\sphinxhyphen{}1{]}. When conservative temperature is used, this is constant and exactly 3991.86795711963 J degC\sphinxhyphen{}1 kg\sphinxhyphen{}1.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_is\_cont}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the temperature variable tvT is actually the conservative temperature {[}degC{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_is\_abss}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the salinity variable tvS is actually the absolute salinity in units of {[}gSalt/kg{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_salinity}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum value of salinity when BOUND\_SALINITY=True {[}ppt{]}. The default is 0.01 for backward compatibility but should be 0.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frazil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The energy needed to heat the ocean column to the freezing point since calculate\_surface\_state was2 last called {[}Q Z R \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{salt\_deficit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The salt needed to maintain the ocean column at a minimum salinity of MIN\_SALINITY since the last time that calculate\_surface\_state was called, {[}ppt R Z \textasciitilde{}\textgreater{} gSalt m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tempxpme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The net inflow of water into the ocean times the temperature at which this inflow occurs since the last call to calculate\_surface\_state {[}degC R Z \textasciitilde{}\textgreater{} degC kg m\sphinxhyphen{}2{]}. This should be prescribed in the forcing fields, but as it often is not, this is a useful heat budget diagnostic.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{internal\_heat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Any internal or geothermal heat sources that have been applied to the ocean since the last call to calculate\_surface\_state {[}degC R Z \textasciitilde{}\textgreater{} degC kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: SGS variance of potential temperature {[}degC2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vars}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: SGS variance of salinity {[}ppt2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{covarts}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: SGS covariance of salinity and potential temperature {[}degC ppt{]}.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertvisc\_type (fortran type in module mom\_variables)@\spxentry{vertvisc\_type}\spxextra{fortran type in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/vertvisc_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{vertvisc\_type}}}
Vertical viscosities, drag coefficients, and related fields.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prandtl\_turb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The Prandtl number for the turbulent diffusion that is captured in Kd\_shear {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_thick\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The bottom boundary layer thickness at the u\sphinxhyphen{}points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bbl\_thick\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The bottom boundary layer thickness at the v\sphinxhyphen{}points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_bbl\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The bottom boundary layer viscosity at the u\sphinxhyphen{}points {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_bbl\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The bottom boundary layer viscosity at the v\sphinxhyphen{}points {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ustar\_bbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The turbulence velocity in the bottom boundary layer at h points {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_bbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A term related to the bottom boundary layer source of turbulent kinetic energy, currently in {[}Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} m3 s\sphinxhyphen{}3{]}, but may at some time be changed to {[}R Z3 T\sphinxhyphen{}3 \textasciitilde{}\textgreater{} W m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{taux\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The zonal stresses on the ocean under shelves {[}R Z L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tauy\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The meridional stresses on the ocean under shelves {[}R Z L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tbl\_thick\_shelf\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Thickness of the viscous top boundary layer under ice shelves at u\sphinxhyphen{}points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tbl\_thick\_shelf\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Thickness of the viscous top boundary layer under ice shelves at v\sphinxhyphen{}points {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_tbl\_shelf\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Viscosity in the viscous top boundary layer under ice shelves at u\sphinxhyphen{}points {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_tbl\_shelf\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Viscosity in the viscous top boundary layer under ice shelves at v\sphinxhyphen{}points {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml\_visc\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The number of layers in the viscous surface mixed layer at u\sphinxhyphen{}points {[}nondim{]}. This is not an integer because there may be fractional layers, and it is stored in terms of layers, not depth, to facilitate the movement of the viscous boundary layer with the flow.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml\_visc\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The number of layers in the viscous surface mixed layer at v\sphinxhyphen{}points {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mld}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Instantaneous active mixing layer depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ray\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Rayleigh drag velocity to be applied to each layer at u\sphinxhyphen{}points {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ray\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The Rayleigh drag velocity to be applied to each layer at v\sphinxhyphen{}points {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_extra\_t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The extra diffusivity of temperature due to double diffusion relative to the diffusivity of density {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_extra\_s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The extra diffusivity of salinity due to double diffusion relative to the diffusivity of density {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The shear\sphinxhyphen{}driven turbulent diapycnal diffusivity at the interfaces between layers in tracer columns {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_shear}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The shear\sphinxhyphen{}driven turbulent vertical viscosity at the interfaces between layers in tracer columns {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_shear\_bu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The shear\sphinxhyphen{}driven turbulent vertical viscosity at the interfaces between layers in corner columns {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv\_slow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The turbulent vertical viscosity component due to “slow” processes (e.g., tidal, background, convection etc) {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tke\_turb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The turbulent kinetic energy per unit mass at the interfaces {[}Z2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}. This may be at the tracer or corner points.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_variables:function-subroutine-documentation}}\index{allocate\_surface\_state() (fortran subroutine in module mom\_variables)@\spxentry{allocate\_surface\_state()}\spxextra{fortran subroutine in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/allocate_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{allocate\_surface\_state}}}{\emph{sfc\_state}, \emph{G}, \emph{use\_temperature}, \emph{do\_integrals}, \emph{gas\_fields\_ocn}, \emph{use\_meltpot}, \emph{use\_iceshelves}, \emph{omit\_frazil}}{}
Allocates the fields for the surface (return) properties of the ocean model. Unused fields are unallocated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} ocean grid structure

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} ocean surface state type to be allocated.

\item {} 
\sphinxstylestrong{use\_temperature} :: {[}in{]} If true, allocate the space for thermodynamic variables.

\item {} 
\sphinxstylestrong{do\_integrals} :: {[}in{]} If true, allocate the space for vertically integrated fields.

\item {} 
\sphinxstylestrong{gas\_fields\_ocn} :: {[}in{]} If present, this type describes the ocean

\item {} 
\sphinxstylestrong{use\_meltpot} :: {[}in{]} If true, allocate the space for melt potential

\item {} 
\sphinxstylestrong{use\_iceshelves} :: {[}in{]} If true, allocate the space for the stresses under ice shelves.

\item {} 
\sphinxstylestrong{omit\_frazil} :: {[}in{]} If present and false, do not allocate the space to pass frazil fluxes to the coupler

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/rotate_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_surface\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{deallocate\_surface\_state() (fortran subroutine in module mom\_variables)@\spxentry{deallocate\_surface\_state()}\spxextra{fortran subroutine in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/deallocate_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{deallocate\_surface\_state}}}{\emph{sfc\_state}}{}
Deallocates the elements of a surface state type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{sfc\_state} :: {[}inout{]} ocean surface state type to be deallocated here.

\end{description}\end{quote}

\end{fulllineitems}

\index{rotate\_surface\_state() (fortran subroutine in module mom\_variables)@\spxentry{rotate\_surface\_state()}\spxextra{fortran subroutine in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/rotate_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{rotate\_surface\_state}}}{\emph{sfc\_state\_in}, \emph{G\_in}, \emph{sfc\_state}, \emph{G}, \emph{turns}}{}
Rotate the surface state fields from the input to the model indices.
\begin{quote}\begin{description}
\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/allocate_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allocate\_surface\_state}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{alloc\_bt\_cont\_type() (fortran subroutine in module mom\_variables)@\spxentry{alloc\_bt\_cont\_type()}\spxextra{fortran subroutine in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/alloc_bt_cont_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{alloc\_bt\_cont\_type}}}{\emph{BT\_cont}, \emph{G}, \emph{alloc\_faces}}{}
Allocates the arrays contained within a BT\_cont\_type and initializes them to 0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{bt\_cont} :: The BT\_cont\_type whose elements will be allocated

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{alloc\_faces} :: {[}in{]} If present and true, allocate memory for effective face thicknesses.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dealloc\_bt\_cont\_type() (fortran subroutine in module mom\_variables)@\spxentry{dealloc\_bt\_cont\_type()}\spxextra{fortran subroutine in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/dealloc_bt_cont_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{dealloc\_bt\_cont\_type}}}{\emph{BT\_cont}}{}
Deallocates the arrays contained within a BT\_cont\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{bt\_cont} :: The BT\_cont\_type whose elements will be deallocated.

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_thermovar\_chksum() (fortran subroutine in module mom\_variables)@\spxentry{mom\_thermovar\_chksum()}\spxextra{fortran subroutine in module mom\_variables}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_variables:f/mom_variables/mom_thermovar_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_variables/}}\sphinxbfcode{\sphinxupquote{mom\_thermovar\_chksum}}}{\emph{mesg}, \emph{tv}, \emph{G}}{}
Diagnostic checksums on various elements of a {\hyperref[\detokenize{api/generated/modules/mom_variables:f/mom_variables/thermo_var_ptrs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thermo\_var\_ptrs()}}}}} type for debugging.
type for debugging.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mesg} :: {[}in{]} A message that appears in the checksum lines

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_ale_legacy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_ale\_legacy}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/layered_diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::layered\_diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_vert\_friction module reference}
\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction}}\label{\detokenize{api/generated/modules/mom_vert_friction:mom-vert-friction-module-reference}}\label{\detokenize{api/generated/modules/mom_vert_friction::doc}}\index{mom\_vert\_friction (module)@\spxentry{mom\_vert\_friction}\spxextra{module}|spxpagem}
Implements vertical viscosity (vertvisc)

{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:detamom-vert-friction}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_vert_friction:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_cs}}}}}
&
The control structure with parameters and memory for the MOM\_vert\_friction module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_vert_friction:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc()}}}}}
&
Perform a fully implicit vertical diffusion of momentum.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_remnant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_remnant()}}}}}
&
Calculate the fraction of momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of barotropic acceleration that a layer experiences after viscosity is applied.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_coef()}}}}}
&
Calculate the coupling coefficients (CSa\_u and CSa\_v) and effective layer thicknesses (CSh\_u and CSh\_v) for later use in the applying the implicit vertical viscosity via \sphinxcode{\sphinxupquote{vertvisc()}}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/find_coupling_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_coupling\_coef()}}}}}
&
Calculate the ‘coupling coefficient’ (a\_cpl) at the interfaces.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_limit_vel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_limit\_vel()}}}}}
&
Velocity components which exceed a threshold for physically reasonable values are truncated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_init()}}}}}
&
Initialize the vertical friction module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/updatecfltruncationvalue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{updatecfltruncationvalue()}}}}}
&
Update the CFL truncation value as a function of time.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_end()}}}}}
&
Clean up and deallocate the vertical friction module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_vert_friction:detailed-description}}\label{\detokenize{api/generated/modules/mom_vert_friction:detamom-vert-friction}}
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\sphinxhyphen{}) / (h+ + h\sphinxhyphen{}) ) is used if the velocity is from the thinner side and the arithmetic mean thickness (i.e. (h+ + h\sphinxhyphen{})/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 maxvel to truncvel. 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 CSMaxtrunc 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\sphinxhyphen{}specific defined variables.

Macros written all in capital letters are defined in \sphinxcode{\sphinxupquote{MOM\_memory.h}}
.

A small fragment of the grid is shown below:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}  \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x}   \PYG{n}{At} \PYG{n}{x}\PYG{p}{:}  \PYG{n}{q}
\PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}  \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}}   \PYG{n}{At} \PYG{o}{\PYGZca{}}\PYG{p}{:}  \PYG{n}{v}\PYG{p}{,} \PYG{n}{frhatv}\PYG{p}{,} \PYG{n}{tauy}
\PYG{n}{j}    \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x}   \PYG{n}{At} \PYG{o}{\PYGZgt{}}\PYG{p}{:}  \PYG{n}{u}\PYG{p}{,} \PYG{n}{frhatu}\PYG{p}{,} \PYG{n}{taux}
\PYG{n}{j}    \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}} \PYG{n}{o} \PYG{o}{\PYGZgt{}}   \PYG{n}{At} \PYG{n}{o}\PYG{p}{:}  \PYG{n}{h}
\PYG{n}{j}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}  \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x} \PYG{o}{\PYGZca{}} \PYG{n}{x}
    \PYG{n}{i}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}  \PYG{n}{i}  \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}  \PYG{n}{At} \PYG{n}{x} \PYG{o}{\PYGZam{}} \PYG{o}{\PYGZca{}}\PYG{p}{:}
       \PYG{n}{i}  \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}    \PYG{n}{At} \PYG{o}{\PYGZgt{}} \PYG{o}{\PYGZam{}} \PYG{n}{o}\PYG{p}{:}
\end{sphinxVerbatim}

The boundaries always run through q grid points (x).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_vert_friction:type-documentation}}\index{vertvisc\_cs (fortran type in module mom\_vert\_friction)@\spxentry{vertvisc\_cs}\spxextra{fortran type in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc\_cs}}}
The control structure with parameters and memory for the MOM\_vert\_friction module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_du\_dt\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_dv\_dt\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_au\_vv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_av\_vv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_h\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hml\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hml\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_taux\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_tauy\_bot}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_slow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_kv\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_du\_dt\_visc\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_hf\_dv\_dt\_visc\_2d}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Diagnostic identifiers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The mixed layer thickness in thickness units {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hmix\_stress}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The mixed layer thickness over which the wind stress is applied with direct\_stress {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kvml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The mixed layer vertical viscosity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The interior vertical viscosity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{hbbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The static bottom boundary layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kvbbl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The vertical viscosity in the bottom boundary layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maxvel}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Velocity components greater than maxvel are truncated {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{vel\_underflow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Velocity components smaller than vel\_underflow are set to 0 {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_based\_trunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, base truncations on CFL numbers, not absolute velocities.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_trunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Velocity components will be truncated when they are large enough that the corresponding CFL number exceeds this value, nondim.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_report}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The value of the CFL number that will cause the accelerations to be reported, nondim. CFL\_report will often equal CFL\_trunc.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{truncramptime}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The time\sphinxhyphen{}scale over which to ramp up the value of CFL\_trunc from CFL\_truncS to CFL\_truncE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_truncs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The start value of CFL\_trunc.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cfl\_trunce}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The end/target value of CFL\_trunc.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cflrampingisactivated}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if the ramping has been initialized.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rampstarttime}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The time at which the ramping of CFL\_trunc starts.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} (* h\_v {[}*, *) :: The u\sphinxhyphen{}drag coefficient across an interface {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The effective layer thickness at u\sphinxhyphen{}points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The v\sphinxhyphen{}drag coefficient across an interface {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{real}} :: The effective layer thickness at v\sphinxhyphen{}points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a1\_shelf\_u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The u\sphinxhyphen{}momentum coupling coefficient under ice shelves {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. Retained to determine stress under shelves.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{a1\_shelf\_v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The v\sphinxhyphen{}momentum coupling coefficient under ice shelves {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. Retained to determine stress under shelves.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{split}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the split time stepping scheme.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bottomdraglaw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: 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.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{channel\_drag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the drag is exerted directly on each layer according to what fraction of the bottom they overlie.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{harmonic\_visc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: 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.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{harm\_bl\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: 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.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{direct\_stress}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the wind stress is distributed over the topmost Hmix\_stress of fluid and KVML may be very small.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dynamic\_viscous\_ml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: 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.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the answers from the end of 2018. Otherwise, use expressions that do not use an arbitary and hard\sphinxhyphen{}coded maximum viscous coupling coefficient between layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{debug}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, write verbose checksums for debugging purposes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers in the mixed layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntrunc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The number of times the velocity has been truncated since the last call to write\_energy.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_trunc\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The complete path to a file in which a column of u\sphinxhyphen{}accelerations are written if velocity truncations occur.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_trunc\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The complete path to a file in which a column of v\sphinxhyphen{}accelerations are written if velocity truncations occur.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stokesmixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, do Stokes drift mixing via the Lagrangian current (Eulerian plus Stokes drift). False by default and set via STOKES\_MIXING\_COMBINED.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pointaccel\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(pointaccel\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the control structure for recording accelerations leading to velocity truncations.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_vert_friction:function-subroutine-documentation}}\index{vertvisc() (fortran subroutine in module mom\_vert\_friction)@\spxentry{vertvisc()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc}}}{\emph{u}, \emph{v}, \emph{h}, \emph{forces}, \emph{visc}, \emph{dt}, \emph{OBC}, \emph{ADp}, \emph{CDp}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{taux\_bot}, \emph{tauy\_bot}, \emph{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*}
\begin{split}\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{split}
\end{equation*}
where \(a_{k + 1/2} = \Delta t \nu_{k + 1/2} / h_{k + 1/2}\) is the \sphinxstyleemphasis{interfacial coupling thickness per time step} , encompassing background viscosity as well as contributions from enhanced mixed and bottom layer viscosities. \$r\_k\$ is a Rayleight drag term due to channel drag. There is an additional stress term on the right\sphinxhyphen{}hand side if DIRECT\_STRESS is true, applied to the surface layer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{visc} :: {[}inout{]} Viscosities and bottom drag

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{obc} :: Open boundary condition structure

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} Accelerations in the momentum equations for diagnostics

\item {} 
\sphinxstylestrong{cdp} :: {[}inout{]} Continuity equation terms

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\item {} 
\sphinxstylestrong{taux\_bot} :: {[}out{]} Zonal bottom stress from ocean to

\item {} 
\sphinxstylestrong{tauy\_bot} :: {[}out{]} Meridional bottom stress from ocean to

\item {} 
\sphinxstylestrong{waves} :: Container for wave/Stokes information

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_limit_vel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_limit\_vel}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertvisc\_remnant() (fortran subroutine in module mom\_vert\_friction)@\spxentry{vertvisc\_remnant()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_remnant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc\_remnant}}}{\emph{visc}, \emph{visc\_rem\_u}, \emph{visc\_rem\_v}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Calculate the fraction of momentum originally in a layer that remains after a time\sphinxhyphen{}step of viscosity, and the fraction of a time\sphinxhyphen{}step’s worth of barotropic acceleration that a layer experiences after viscosity is applied.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Viscosities and bottom drag

\item {} 
\sphinxstylestrong{visc\_rem\_u} :: {[}inout{]} Fraction of a time\sphinxhyphen{}step’s worth of a

\item {} 
\sphinxstylestrong{visc\_rem\_v} :: {[}inout{]} Fraction of a time\sphinxhyphen{}step’s worth of a

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertvisc\_coef() (fortran subroutine in module mom\_vert\_friction)@\spxentry{vertvisc\_coef()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_coef}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc\_coef}}}{\emph{u}, \emph{v}, \emph{h}, \emph{forces}, \emph{visc}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{OBC}}{}
Calculate the coupling coefficients (CSa\_u and CSa\_v) and effective layer thicknesses (CSh\_u and CSh\_v) for later use in the applying the implicit vertical viscosity via \sphinxcode{\sphinxupquote{vertvisc()}}.
.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Viscosities and bottom drag

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\item {} 
\sphinxstylestrong{obc} :: Open boundary condition structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/find_coupling_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{find\_coupling\_coef}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_w}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit:f/mom_dynamics_unsplit/step_mom_dyn_unsplit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit::step\_mom\_dyn\_unsplit}}}}} {\hyperref[\detokenize{api/generated/modules/mom_dynamics_unsplit_rk2:f/mom_dynamics_unsplit_rk2/step_mom_dyn_unsplit_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_unsplit\_rk2::step\_mom\_dyn\_unsplit\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{find\_coupling\_coef() (fortran subroutine in module mom\_vert\_friction)@\spxentry{find\_coupling\_coef()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/find_coupling_coef}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{find\_coupling\_coef}}}{\emph{a\_cpl}, \emph{hvel}, \emph{do\_i}, \emph{h\_harm}, \emph{bbl\_thick}, \emph{kv\_bbl}, \emph{z\_i}, \emph{h\_ml}, \emph{dt}, \emph{j}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{visc}, \emph{forces}, \emph{work\_on\_u}, \emph{OBC}, \emph{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.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{a\_cpl} :: {[}out{]} Coupling coefficient across interfaces {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hvel} :: {[}in{]} Thickness at velocity points {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{do\_i} :: {[}in{]} If true, determine coupling coefficient for a column

\item {} 
\sphinxstylestrong{h\_harm} :: {[}in{]} Harmonic mean of thicknesses around a velocity

\item {} 
\sphinxstylestrong{bbl\_thick} :: {[}in{]} Bottom boundary layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{kv\_bbl} :: {[}in{]} Bottom boundary layer viscosity {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{z\_i} :: {[}in{]} Estimate of interface heights above the bottom,

\item {} 
\sphinxstylestrong{h\_ml} :: {[}out{]} Mixed layer depth {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{j} :: {[}in{]} j\sphinxhyphen{}index to find coupling coefficient for

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Structure containing viscosities and bottom drag

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{work\_on\_u} :: {[}in{]} If true, u\sphinxhyphen{}points are being calculated, otherwise they are v\sphinxhyphen{}points

\item {} 
\sphinxstylestrong{obc} :: Open boundary condition structure

\item {} 
\sphinxstylestrong{shelf} :: {[}in{]} If present and true, use a surface boundary condition appropriate for an ice shelf.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_n}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_s}} \sphinxcode{\sphinxupquote{mom\_open\_boundary::obc\_direction\_w}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_coef}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc\_coef}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertvisc\_limit\_vel() (fortran subroutine in module mom\_vert\_friction)@\spxentry{vertvisc\_limit\_vel()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_limit_vel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc\_limit\_vel}}}{\emph{u}, \emph{v}, \emph{h}, \emph{ADp}, \emph{CDp}, \emph{forces}, \emph{visc}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
Velocity components which exceed a threshold for physically reasonable values are truncated. Optionally, any column with excessive velocities may be sent to a diagnostic reporting subroutine.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{adp} :: {[}in{]} Acceleration diagnostic pointers

\item {} 
\sphinxstylestrong{cdp} :: {[}in{]} Continuity diagnostic pointers

\item {} 
\sphinxstylestrong{forces} :: {[}in{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{visc} :: {[}in{]} Viscosities and bottom drag

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time increment {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vertvisc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertvisc\_init() (fortran subroutine in module mom\_vert\_friction)@\spxentry{vertvisc\_init()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc\_init}}}{\emph{MIS}, \emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{ADp}, \emph{dirs}, \emph{ntrunc}, \emph{CS}}{}
Initialize the vertical friction module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mis} :: {[}in{]} The “MOM Internal State”, a set of pointers

\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} File to parse for parameters

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostic control structure

\item {} 
\sphinxstylestrong{adp} :: {[}inout{]} Acceleration diagnostic pointers

\item {} 
\sphinxstylestrong{dirs} :: {[}in{]} Relevant directory paths

\item {} 
\sphinxstylestrong{ntrunc} :: {[}inout{]} Number of velocity truncations

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{updatecfltruncationvalue() (fortran subroutine in module mom\_vert\_friction)@\spxentry{updatecfltruncationvalue()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/updatecfltruncationvalue}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{updatecfltruncationvalue}}}{\emph{Time}, \emph{CS}, \emph{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.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{cs} :: Vertical viscosity control structure

\item {} 
\sphinxstylestrong{activate} :: {[}in{]} Specifiy whether to record the value of Time as the beginning of the ramp period

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_dynamics_split_rk2:f/mom_dynamics_split_rk2/step_mom_dyn_split_rk2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_dynamics\_split\_rk2::step\_mom\_dyn\_split\_rk2}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{vertvisc\_end() (fortran subroutine in module mom\_vert\_friction)@\spxentry{vertvisc\_end()}\spxextra{fortran subroutine in module mom\_vert\_friction}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_vert_friction:f/mom_vert_friction/vertvisc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_vert\_friction/}}\sphinxbfcode{\sphinxupquote{vertvisc\_end}}}{\emph{CS}}{}
Clean up and deallocate the vertical friction module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Vertical viscosity control structure that will be deallocated in this subroutine.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_verticalgrid module reference}
\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid}}\label{\detokenize{api/generated/modules/mom_verticalgrid:mom-verticalgrid-module-reference}}\label{\detokenize{api/generated/modules/mom_verticalgrid::doc}}\index{mom\_verticalgrid (module)@\spxentry{mom\_verticalgrid}\spxextra{module}|spxpagem}
Provides a transparent vertical ocean grid type and supporting routines.

{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:detamom-verticalgrid}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_verticalgrid:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgrid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalgrid\_type}}}}}
&
Describes the vertical ocean grid, including unit conversion factors.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_verticalgrid:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgridinit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalgridinit()}}}}}
&
Allocates and initializes the ocean model vertical grid structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/fix_restart_scaling}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fix\_restart\_scaling()}}}}}
&
Set the scaling factors for restart files to the scaling factors for this run.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_thickness_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_thickness\_units()}}}}}
&
Returns the model’s thickness units, usually m or kg/m\textasciicircum{}2.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_flux_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_flux\_units()}}}}}
&
Returns the model’s thickness flux units, usually m\textasciicircum{}3/s or kg/s.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_tr_flux_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_tr\_flux\_units()}}}}}
&
Returns the model’s tracer flux units.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/setverticalgridaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setverticalgridaxes()}}}}}
&
This sets the coordinate data for the “layer mode” of the isopycnal model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgridend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalgridend()}}}}}
&
Deallocates the model’s vertical grid structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_verticalgrid:detailed-description}}\label{\detokenize{api/generated/modules/mom_verticalgrid:detamom-verticalgrid}}
Provides a transparent vertical ocean grid type and supporting routines.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_verticalgrid:type-documentation}}\index{verticalgrid\_type (fortran type in module mom\_verticalgrid)@\spxentry{verticalgrid\_type}\spxextra{fortran type in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgrid_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{verticalgrid\_type}}}
Describes the vertical ocean grid, including unit conversion factors.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ke}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers/levels in the vertical.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum depth of the ocean {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mks\_g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration in unscaled MKS units {[}m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation or nominal density used to convert depths into mass units {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zaxisunits}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: The units that vertical coordinates are written in.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{zaxislongname}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=40)}\sphinxstyleemphasis{{]}} :: Coordinate name to appear in files, e.g. “Target Potential Density” or “Height”.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{slayer}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Coordinate values of layer centers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sinterface}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Coordinate values on interfaces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{direction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Direction defaults to 1, positive up.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{boussinesq}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, make the Boussinesq approximation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{angstrom\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A one\sphinxhyphen{}Angstrom thickness in the model thickness units {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{angstrom\_z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A one\sphinxhyphen{}Angstrom thickness in the model depth units {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{angstrom\_m}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A one\sphinxhyphen{}Angstrom thickness {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_subroundoff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A thickness that is so small that it can be added to a thickness of Angstrom or larger without changing it at the bit level {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. If Angstrom is 0 or exceedingly small, this is negligible compared to 1e\sphinxhyphen{}17 m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_prime}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rlay}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: The target coordinate value (potential density) in each layer {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nkml}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers at the top that should be treated as parts of a homogeneous region.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk\_rho\_varies}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of layers at the top where the density does not track any target density.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_kg\_m2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates thicknesses from the units of thickness to kg m\sphinxhyphen{}2.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kg\_m2\_to\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates thicknesses from kg m\sphinxhyphen{}2 to the units of thickness.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates distances in m to the units of thickness.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_m}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates distances in the units of thickness to m.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_pa}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates the units of thickness to pressure {[}Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates thickness units to the units of depth.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_to\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates depth units to thickness units.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_rz}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates thickness units to the units of mass per unit area.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rz\_to\_h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates mass per unit area units to thickness units.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h\_to\_mks}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant that translates thickness units to its MKS unit (m or kg m\sphinxhyphen{}2) based on GVBoussinesq.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{m\_to\_h\_restart}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A copy of the m\_to\_H that is used in restart files.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_verticalgrid:function-subroutine-documentation}}\index{verticalgridinit() (fortran subroutine in module mom\_verticalgrid)@\spxentry{verticalgridinit()}\spxextra{fortran subroutine in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgridinit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{verticalgridinit}}}{\emph{param\_file}, \emph{GV}, \emph{US}}{}
Allocates and initializes the ocean model vertical grid structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle/type

\item {} 
\sphinxstylestrong{gv} :: The container for vertical grid data

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{fix\_restart\_scaling() (fortran subroutine in module mom\_verticalgrid)@\spxentry{fix\_restart\_scaling()}\spxextra{fortran subroutine in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/fix_restart_scaling}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{fix\_restart\_scaling}}}{\emph{GV}}{}
Set the scaling factors for restart files to the scaling factors for this run.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{gv} :: {[}inout{]} The ocean’s vertical grid structure

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_thickness\_units() (fortran function in module mom\_verticalgrid)@\spxentry{get\_thickness\_units()}\spxextra{fortran function in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_thickness_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{get\_thickness\_units}}}{\emph{GV}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=48)}\sphinxstyleemphasis{{]}}}
Returns the model’s thickness units, usually m or kg/m\textasciicircum{}2.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The vertical thickness units

\item[{Parameters}] \leavevmode
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_register_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_register\_diags}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic_driver_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic\_driver\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/register_transport_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::register\_transport\_diags}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_flux\_units() (fortran function in module mom\_verticalgrid)@\spxentry{get\_flux\_units()}\spxextra{fortran function in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_flux_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{get\_flux\_units}}}{\emph{GV}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=48)}\sphinxstyleemphasis{{]}}}
Returns the model’s thickness flux units, usually m\textasciicircum{}3/s or kg/s.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The thickness flux units

\item[{Parameters}] \leavevmode
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_tr\_flux\_units() (fortran function in module mom\_verticalgrid)@\spxentry{get\_tr\_flux\_units()}\spxextra{fortran function in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/get_tr_flux_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{get\_tr\_flux\_units}}}{\emph{GV}, \emph{tr\_units}, \emph{tr\_vol\_conc\_units}, \emph{tr\_mass\_conc\_units}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=48)}\sphinxstyleemphasis{{]}}}
Returns the model’s tracer flux units.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The model’s flux units for a tracer.

\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{tr\_units} :: {[}in{]} Units for a tracer, for example Celsius or PSU.

\item {} 
\sphinxstylestrong{tr\_vol\_conc\_units} :: {[}in{]} The concentration units per unit volume, for example if the units are umol m\sphinxhyphen{}3, tr\_vol\_conc\_units would be umol.

\item {} 
\sphinxstylestrong{tr\_mass\_conc\_units} :: {[}in{]} The concentration units per unit mass of sea water, for example if the units are mol kg\sphinxhyphen{}1, tr\_vol\_conc\_units would be mol.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{setverticalgridaxes() (fortran subroutine in module mom\_verticalgrid)@\spxentry{setverticalgridaxes()}\spxextra{fortran subroutine in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/setverticalgridaxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{setverticalgridaxes}}}{\emph{Rlay}, \emph{GV}, \emph{scale}}{}
This sets the coordinate data for the “layer mode” of the isopycnal model.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}inout{]} The container for vertical grid data

\item {} 
\sphinxstylestrong{rlay} :: {[}in{]} The layer target density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{scale} :: {[}in{]} A unit scaling factor for Rlay

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{verticalgridend() (fortran subroutine in module mom\_verticalgrid)@\spxentry{verticalgridend()}\spxextra{fortran subroutine in module mom\_verticalgrid}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_verticalgrid:f/mom_verticalgrid/verticalgridend}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_verticalgrid/}}\sphinxbfcode{\sphinxupquote{verticalgridend}}}{\emph{GV}}{}
Deallocates the model’s vertical grid structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{gv} :: The ocean’s vertical grid structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_wave\_interface module reference}
\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface}}\label{\detokenize{api/generated/modules/mom_wave_interface:mom-wave-interface-module-reference}}\label{\detokenize{api/generated/modules/mom_wave_interface::doc}}\index{mom\_wave\_interface (module)@\spxentry{mom\_wave\_interface}\spxextra{module}|spxpagem}
Interface for surface waves.

{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:detamom-wave-interface}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_wave_interface:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/wave_parameters_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_parameters\_cs}}}}}
&
Container for all surface wave related parameters.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_wave_interface:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/mom_wave_interface_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface\_init()}}}}}
&
Initializes parameters related to MOM\_wave\_interface.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/mom_wave_interface_init_lite}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface\_init\_lite()}}}}}
&
A ‘lite’ init subroutine to initialize a few inputs needed if using wave information with the wind\sphinxhyphen{}speed dependent Stokes drift formulation of LF17.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_surface_waves}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_surface\_waves()}}}}}
&
Subroutine that handles updating of surface wave/Stokes drift related properties.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_stokes_drift}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_stokes\_drift()}}}}}
&
Constructs the Stokes Drift profile on the model grid based on desired coupling options.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/surface_bands_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_bands\_by\_data\_override()}}}}}
&
A subroutine to fill the Stokes drift from a NetCDF file using the data\_override procedures.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_langmuir\_number()}}}}}
&
Interface to get Langmuir number based on options stored in wave structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_stokessl_lifoxkemper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_stokessl\_lifoxkemper()}}}}}
&
Get SL averaged Stokes drift from Li/FK 17 method.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_sl_average_prof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_sl\_average\_prof()}}}}}
&
Get SL Averaged Stokes drift from a Stokes drift Profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_sl_average_band}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_sl\_average\_band()}}}}}
&
Get SL averaged Stokes drift from the banded Spectrum method.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/dhh85_mid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dhh85\_mid()}}}}}
&
Compute the Stokes drift at a given depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/stokesmixing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stokesmixing()}}}}}
&
Explicit solver for Stokes mixing.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/coriolisstokes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coriolisstokes()}}}}}
&
Solver to add Coriolis\sphinxhyphen{}Stokes to model Still in development and not meant for general use.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/ust_2_u10_coare3p5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ust\_2\_u10\_coare3p5()}}}}}
&
Computes wind speed from ustar\_air based on COARE 3.5 Cd relationship Probably doesn’t belong in this module, but it is used here to estimate wind speed for wind\sphinxhyphen{}wave relationships.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/waves_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{waves\_end()}}}}}
&
Clear pointers, deallocate memory.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_wave_interface:detailed-description}}\label{\detokenize{api/generated/modules/mom_wave_interface:detamom-wave-interface}}
This module should be moved as wave coupling progresses and likely will should mirror the iceberg or sea\sphinxhyphen{}ice model set\sphinxhyphen{}up.

This module is meant to contain the routines to read in and interpret surface wave data for MOM6. In its original form, the capabilities include setting the Stokes drift in the model (from a variety of sources including prescribed, empirical, and input files). In short order, the plan is to also ammend the subroutine to accept Stokes drift information from an external coupler. Eventually, it will be necessary to break this file apart so that general wave information may be stored in the control structure and the Stokes drift effect can be isolated from processes such as sea\sphinxhyphen{}state dependent momentum fluxes, gas fluxes, and other wave related air\sphinxhyphen{}sea interaction and boundary layer phenomenon.

The Stokes drift are stored on the C\sphinxhyphen{}grid with the conventional protocol to interpolate to the h\sphinxhyphen{}grid to compute Langmuir number, the primary quantity needed for Langmuir turbulence parameterizations in both the ePBL and KPP approach. This module also computes full 3d Stokes drift profiles, which will be useful if second\sphinxhyphen{}order type boundary layer parameterizations are implemented (perhaps via GOTM, work in progress).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_wave_interface:type-documentation}}\index{wave\_parameters\_cs (fortran type in module mom\_wave\_interface)@\spxentry{wave\_parameters\_cs}\spxextra{fortran type in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/wave_parameters_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{wave\_parameters\_cs}}}
Container for all surface wave related parameters.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_surfacestokes\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_surfacestokes\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_3dstokes\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_3dstokes\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_la\_turb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Diagnostic handles.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usewaves}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Flag to enable surface gravity wave feature.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lagrangianmixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: This feature is in development and not ready True if Stokes drift is present and mixing should be applied to Lagrangian current (mean current + Stokes drift). See Reichl et al., 2016 KPP\sphinxhyphen{}LT approach.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stokesmixing}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: This feature is in development and not ready. True if vertical mixing of momentum should be applied directly to Stokes current (with separate mixing parameter for Eulerian mixing contribution). See Harcourt 2013, 2015 Second\sphinxhyphen{}Moment approach.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coriolisstokes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: This feature is in development and not ready.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stklevelmode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{,}\sphinxstyleemphasis{public}\sphinxstyleemphasis{{]}} :: Sets if Stokes drift is defined at mid\sphinxhyphen{}points or layer averaged. Set to 0 if mid\sphinxhyphen{}point and set to 1 if average value of Stokes drift over level. If advecting with Stokes transport, 1 is the correct approach.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wavenum\_cen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Wavenumber bands for read/coupled {[}m\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{freq\_cen}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Frequency bands for read/coupled {[}s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prescribedsurfstkx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Surface Stokes drift if prescribed {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prescribedsurfstky}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Surface Stokes drift if prescribed {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: 3d zonal Stokes drift profile {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: 3d meridional Stokes drift profile {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la\_sl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: SL Langmuir number (directionality factored later)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la\_turb}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Aligned Turbulent Langmuir number.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us0\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Surface Stokes Drift (zonal, m/s)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us0\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Surface Stokes Drift (meridional, m/s)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stkx0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Stokes Drift spectrum (zonal, m/s)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stky0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Stokes Drift spectrum (meridional, m/s)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kvs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable, public}\sphinxstyleemphasis{{]}} :: Viscosity for Stokes Drift shear {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, public}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer, public}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{la\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: An arbitrary lower\sphinxhyphen{}bound on the Langmuir number. Run\sphinxhyphen{}time parameter. Langmuir number is sqrt(u\_star/u\_stokes). When both are small but u\_star is orders of magnitude smaller the Langmuir number could have unintended consequences. Since both are small it can be safely capped to avoid such consequences.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_wave_interface:function-subroutine-documentation}}\index{mom\_wave\_interface\_init() (fortran subroutine in module mom\_wave\_interface)@\spxentry{mom\_wave\_interface\_init()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/mom_wave_interface_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{mom\_wave\_interface\_init}}}{\emph{time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{CS}, \emph{diag}}{}
Initializes parameters related to MOM\_wave\_interface.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Input parameter structure

\item {} 
\sphinxstylestrong{cs} :: Wave parameter control structure

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} Diagnostic Pointer

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{coupler}} \sphinxcode{\sphinxupquote{dataoverrideisinitialized}} \sphinxcode{\sphinxupquote{dataovr}} \sphinxcode{\sphinxupquote{datasource}} \sphinxcode{\sphinxupquote{dhh85}} \sphinxcode{\sphinxupquote{input}} \sphinxcode{\sphinxupquote{la\_frachbl}} \sphinxcode{\sphinxupquote{la\_misalignment}} \sphinxcode{\sphinxupquote{lf17}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{numbands}} \sphinxcode{\sphinxupquote{partitionmode}} \sphinxcode{\sphinxupquote{pi}} \sphinxcode{\sphinxupquote{staticwaves}} \sphinxcode{\sphinxupquote{surfbandfilename}} \sphinxcode{\sphinxupquote{surfbands}} \sphinxcode{\sphinxupquote{testprof}} \sphinxcode{\sphinxupquote{tp\_stkx0}} \sphinxcode{\sphinxupquote{tp\_stky0}} \sphinxcode{\sphinxupquote{tp\_wvl}} \sphinxcode{\sphinxupquote{waveage}} \sphinxcode{\sphinxupquote{waveagepeakfreq}} \sphinxcode{\sphinxupquote{wavemethod}} \sphinxcode{\sphinxupquote{wavewind}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_wave\_interface\_init\_lite() (fortran subroutine in module mom\_wave\_interface)@\spxentry{mom\_wave\_interface\_init\_lite()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/mom_wave_interface_init_lite}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{mom\_wave\_interface\_init\_lite}}}{\emph{param\_file}}{}
A ‘lite’ init subroutine to initialize a few inputs needed if using wave information with the wind\sphinxhyphen{}speed dependent Stokes drift formulation of LF17.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} Input parameter structure

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{la\_frachbl}} \sphinxcode{\sphinxupquote{lf17}} \sphinxcode{\sphinxupquote{mdl}} \sphinxcode{\sphinxupquote{null\_wavemethod}} \sphinxcode{\sphinxupquote{pi}} \sphinxcode{\sphinxupquote{wavemethod}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::ocean\_model\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_surface\_waves() (fortran subroutine in module mom\_wave\_interface)@\spxentry{update\_surface\_waves()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_surface_waves}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{update\_surface\_waves}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{Day}, \emph{dt}, \emph{CS}}{}
Subroutine that handles updating of surface wave/Stokes drift related properties.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Wave parameter Control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Timestep as a time\sphinxhyphen{}type

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{coupler}} \sphinxcode{\sphinxupquote{dataovr}} \sphinxcode{\sphinxupquote{datasource}} \sphinxcode{\sphinxupquote{input}} \sphinxcode{\sphinxupquote{numbands}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/surface_bands_by_data_override}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{surface\_bands\_by\_data\_override}}}}} \sphinxcode{\sphinxupquote{surfbands}} \sphinxcode{\sphinxupquote{testprof}} \sphinxcode{\sphinxupquote{wavemethod}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod::update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_stokes\_drift() (fortran subroutine in module mom\_wave\_interface)@\spxentry{update\_stokes\_drift()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_stokes_drift}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{update\_stokes\_drift}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{h}, \emph{ustar}}{}
Constructs the Stokes Drift profile on the model grid based on desired coupling options.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Wave parameter Control structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} Wind friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{dhh85}} \sphinxcode{\sphinxupquote{dhh85\_is\_set}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/dhh85_mid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dhh85\_mid}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_langmuir\_number}}}}} \sphinxcode{\sphinxupquote{numbands}} \sphinxcode{\sphinxupquote{partitionmode}} \sphinxcode{\sphinxupquote{pi}} \sphinxcode{\sphinxupquote{staticwaves}} \sphinxcode{\sphinxupquote{surfbands}} \sphinxcode{\sphinxupquote{testprof}} \sphinxcode{\sphinxupquote{tp\_stkx0}} \sphinxcode{\sphinxupquote{tp\_stky0}} \sphinxcode{\sphinxupquote{tp\_wvl}} \sphinxcode{\sphinxupquote{wavemethod}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_mom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_mom}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{surface\_bands\_by\_data\_override() (fortran subroutine in module mom\_wave\_interface)@\spxentry{surface\_bands\_by\_data\_override()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/surface_bands_by_data_override}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{surface\_bands\_by\_data\_override}}}{\emph{day\_center}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
A subroutine to fill the Stokes drift from a NetCDF file using the data\_override procedures.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{day\_center} :: {[}in{]} Center of timestep

\item {} 
\sphinxstylestrong{cs} :: Wave structure

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{dataoverrideisinitialized}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{numbands}} \sphinxcode{\sphinxupquote{partitionmode}} \sphinxcode{\sphinxupquote{pi}} \sphinxcode{\sphinxupquote{surfbandfilename}} \sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_surface_waves}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_surface\_waves}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_langmuir\_number() (fortran subroutine in module mom\_wave\_interface)@\spxentry{get\_langmuir\_number()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{get\_langmuir\_number}}}{\emph{LA}, \emph{G}, \emph{GV}, \emph{US}, \emph{HBL}, \emph{ustar}, \emph{i}, \emph{j}, \emph{H}, \emph{U\_H}, \emph{V\_H}, \emph{Override\_MA}, \emph{Waves}}{}
Interface to get Langmuir number based on options stored in wave structure.

Note this can be called with an unallocated Waves pointer, which is okay if we want the wind\sphinxhyphen{}speed only dependent Langmuir number. Therefore, we need to be careful about what we try to access here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{i} :: {[}in{]} Meridional index of h\sphinxhyphen{}point

\item {} 
\sphinxstylestrong{j} :: {[}in{]} Zonal index of h\sphinxhyphen{}point

\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} Friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hbl} :: {[}in{]} (Positive) thickness of boundary layer {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{override\_ma} :: {[}in{]} Override to use misalignment in LA calculation. This can be used if diagnostic LA outputs are desired that are different than those used by the dynamical model.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Grid layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{u\_h} :: {[}in{]} Zonal velocity at H point {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v\_h} :: {[}in{]} Meridional velocity at H point {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{waves} :: Surface wave control structure.

\item {} 
\sphinxstylestrong{la} :: {[}out{]} Langmuir number

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{dhh85}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_sl_average_band}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_sl\_average\_band}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_sl_average_prof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_sl\_average\_prof}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_stokessl_lifoxkemper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_stokessl\_lifoxkemper}}}}} \sphinxcode{\sphinxupquote{la\_frachbl}} \sphinxcode{\sphinxupquote{la\_misalignment}} \sphinxcode{\sphinxupquote{lf17}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{null\_wavemethod}} \sphinxcode{\sphinxupquote{numbands}} \sphinxcode{\sphinxupquote{surfbands}} \sphinxcode{\sphinxupquote{testprof}} \sphinxcode{\sphinxupquote{wavemethod}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_energetic_pbl:f/mom_energetic_pbl/epbl_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_energetic\_pbl::epbl\_column}}}}} {\hyperref[\detokenize{api/generated/modules/mom_cvmix_kpp:f/mom_cvmix_kpp/kpp_compute_bld}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_cvmix\_kpp::kpp\_compute\_bld}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_stokes_drift}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_stokes\_drift}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_stokessl\_lifoxkemper() (fortran subroutine in module mom\_wave\_interface)@\spxentry{get\_stokessl\_lifoxkemper()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_stokessl_lifoxkemper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{get\_stokessl\_lifoxkemper}}}{\emph{ustar}, \emph{hbl}, \emph{GV}, \emph{US}, \emph{UStokes\_SL}, \emph{LA}}{}
Get SL averaged Stokes drift from Li/FK 17 method.

Original description:
\begin{itemize}
\item {} 
This function returns the enhancement factor, given the 10\sphinxhyphen{}meter wind {[}m s\sphinxhyphen{}1{]}, friction velocity {[}m s\sphinxhyphen{}1{]} and the boundary layer depth {[}m{]}.

\end{itemize}

Update (Jan/25):
\begin{itemize}
\item {} 
Converted from function to subroutine, now returns Langmuir number.

\item {} 
Computs 10m wind internally, so only ustar and hbl need passed to subroutine.

\end{itemize}

Qing Li, 160606
\begin{itemize}
\item {} 
BGR port from CVMix to MOM6 Jan/25/2017

\item {} 
BGR change output to LA from Efactor

\item {} 
BGR remove u10 input

\item {} 
BGR note: fixed parameter values should be changed to “get\_params”

\end{itemize}
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ustar} :: {[}in{]} water\sphinxhyphen{}side surface friction velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{hbl} :: {[}in{]} boundary layer depth {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{ustokes\_sl} :: {[}out{]} Surface layer averaged Stokes drift {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{la} :: {[}out{]} Langmuir number

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pi}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/ust_2_u10_coare3p5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ust\_2\_u10\_coare3p5}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_langmuir\_number}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_sl\_average\_prof() (fortran subroutine in module mom\_wave\_interface)@\spxentry{get\_sl\_average\_prof()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_sl_average_prof}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{get\_sl\_average\_prof}}}{\emph{GV}, \emph{AvgDepth}, \emph{H}, \emph{Profile}, \emph{Average}}{}
Get SL Averaged Stokes drift from a Stokes drift Profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid structure

\item {} 
\sphinxstylestrong{avgdepth} :: {[}in{]} Depth to average over (negative) {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Grid thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{profile} :: {[}in{]} Profile of quantity to be averaged {[}arbitrary{]}

\item {} 
\sphinxstylestrong{average} :: {[}out{]} Output quantity averaged over depth AvgDepth {[}arbitrary{]} (used here for Stokes drift)

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_langmuir\_number}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_sl\_average\_band() (fortran subroutine in module mom\_wave\_interface)@\spxentry{get\_sl\_average\_band()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_sl_average_band}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{get\_sl\_average\_band}}}{\emph{GV}, \emph{AvgDepth}, \emph{NB}, \emph{WaveNumbers}, \emph{SurfStokes}, \emph{Average}}{}
Get SL averaged Stokes drift from the banded Spectrum method.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{avgdepth} :: {[}in{]} Depth to average over {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{nb} :: {[}in{]} Number of bands used

\item {} 
\sphinxstylestrong{wavenumbers} :: {[}in{]} Wavenumber corresponding to each band {[}Z\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{surfstokes} :: {[}in{]} Surface Stokes drift for each band {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{average} :: {[}out{]} Output average Stokes drift over depth AvgDepth {[}m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_langmuir_number}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_langmuir\_number}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dhh85\_mid() (fortran subroutine in module mom\_wave\_interface)@\spxentry{dhh85\_mid()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/dhh85_mid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{dhh85\_mid}}}{\emph{GV}, \emph{US}, \emph{zpt}, \emph{UStokes}}{}
Compute the Stokes drift at a given depth.

Taken from Qing Li (Brown) use for comparing MOM6 simulation to his LES computed at z mid point (I think) and not depth averaged. Should be fine to integrate in frequency from 0.1 to sqrt(\sphinxhyphen{}0.2*grav*2pi/dz
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{zpt} :: {[}in{]} Depth to get Stokes drift {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{ustokes} :: {[}out{]} Stokes drift {[}m s\sphinxhyphen{}1{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{pi}} \sphinxcode{\sphinxupquote{waveage}} \sphinxcode{\sphinxupquote{waveagepeakfreq}} \sphinxcode{\sphinxupquote{wavewind}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_stokes_drift}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_stokes\_drift}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{stokesmixing() (fortran subroutine in module mom\_wave\_interface)@\spxentry{stokesmixing()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/stokesmixing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{stokesmixing}}}{\emph{G}, \emph{GV}, \emph{dt}, \emph{h}, \emph{u}, \emph{v}, \emph{Waves}}{}
Explicit solver for Stokes mixing. Still in development do not use.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step of MOM6 {[}T \textasciitilde{}\textgreater{} s{]} for explicit solver

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Velocity i\sphinxhyphen{}component {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Velocity j\sphinxhyphen{}component {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{waves} :: Surface wave related control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{coriolisstokes() (fortran subroutine in module mom\_wave\_interface)@\spxentry{coriolisstokes()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/coriolisstokes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{coriolisstokes}}}{\emph{G}, \emph{GV}, \emph{DT}, \emph{h}, \emph{u}, \emph{v}, \emph{WAVES}, \emph{US}}{}
Solver to add Coriolis\sphinxhyphen{}Stokes to model Still in development and not meant for general use. Can be activated (with code intervention) for LES comparison CHECK THAT RIGHT TIMESTEP IS PASSED IF YOU USE THIS**.

Not accessed in the standard code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Ocean vertical grid

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Time step of MOM6 {[}s{]} CHECK IF PASSING RIGHT TIMESTEP

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{u} :: {[}inout{]} Velocity i\sphinxhyphen{}component {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}inout{]} Velocity j\sphinxhyphen{}component {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{waves} :: Surface wave related control structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ust\_2\_u10\_coare3p5() (fortran subroutine in module mom\_wave\_interface)@\spxentry{ust\_2\_u10\_coare3p5()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/ust_2_u10_coare3p5}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{ust\_2\_u10\_coare3p5}}}{\emph{USTair}, \emph{U10}, \emph{GV}, \emph{US}}{}
Computes wind speed from ustar\_air based on COARE 3.5 Cd relationship Probably doesn’t belong in this module, but it is used here to estimate wind speed for wind\sphinxhyphen{}wave relationships. Should be a fine way to estimate the neutral wind\sphinxhyphen{}speed as written here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ustair} :: {[}in{]} Wind friction velocity {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{u10} :: {[}out{]} 10\sphinxhyphen{}m neutral wind speed {[}m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} vertical grid type

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/get_stokessl_lifoxkemper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_stokessl\_lifoxkemper}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{waves\_end() (fortran subroutine in module mom\_wave\_interface)@\spxentry{waves\_end()}\spxextra{fortran subroutine in module mom\_wave\_interface}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/waves_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_interface/}}\sphinxbfcode{\sphinxupquote{waves\_end}}}{\emph{CS}}{}
Clear pointers, deallocate memory.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: Control structure

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_wave\_speed module reference}
\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed}}\label{\detokenize{api/generated/modules/mom_wave_speed:mom-wave-speed-module-reference}}\label{\detokenize{api/generated/modules/mom_wave_speed::doc}}\index{mom\_wave\_speed (module)@\spxentry{mom\_wave\_speed}\spxextra{module}|spxpagem}
Routines for calculating baroclinic wave speeds.

{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:detamom-wave-speed}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_wave_speed:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed\_cs}}}}}
&
Control structure for MOM\_wave\_speed.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_wave_speed:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed()}}}}}
&
Calculates the wave speed of the first baroclinic mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tdma6}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tdma6()}}}}}
&
Solve a non\sphinxhyphen{}symmetric tridiagonal problem with the sum of the upper and lower diagnonals minus a scalar contribution as the leading diagonal.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speeds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speeds()}}}}}
&
Calculates the wave speeds for the first few barolinic modes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tridiag_det}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tridiag\_det()}}}}}
&
Calculate the determinant of a tridiagonal matrix with diagonals a,b\sphinxhyphen{}lam,c and its derivative with lam, where lam is constant across rows.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed\_init()}}}}}
&
Initialize control structure for MOM\_wave\_speed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_set_param}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed\_set\_param()}}}}}
&
Sets internal parameters for MOM\_wave\_speed.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_wave_speed:detailed-description}}\label{\detokenize{api/generated/modules/mom_wave_speed:detamom-wave-speed}}
Routines for calculating baroclinic wave speeds.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_wave_speed:type-documentation}}\index{wave\_speed\_cs (fortran type in module mom\_wave\_speed)@\spxentry{wave\_speed\_cs}\spxextra{fortran type in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{wave\_speed\_cs}}}
Control structure for MOM\_wave\_speed.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ebt\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, calculate the equivalent barotropic wave speed instead of the first baroclinic wave speed. This parameter controls the default behavior of

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{better\_cg1\_est}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use an improved estimate of the first mode internal wave speed.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mono\_n2\_column\_fraction}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The lower fraction of water column over which N2 is limited as monotonic for the purposes of calculating the equivalent barotropic wave speed. This parameter controls the default behavior of

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mono\_n2\_depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The depth below which N2 is limited as monotonic for the purposes of calculating the equivalent barotropic wave speed {[}Z \textasciitilde{}\textgreater{} m{]}. This parameter controls the default behavior of

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_speed2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum mode 1 internal wave speed squared {[}L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{wave\_speed\_tol}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The fractional tolerance with which to solve for the wave speeds {[}nondim{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remapping\_cs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(remapping\_cs)}\sphinxstyleemphasis{{]}} :: Used for vertical remapping when calculating equivalent barotropic mode structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{remap\_answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. If false, use more robust forms of the same remapping expressions.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Diagnostics control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_wave_speed:function-subroutine-documentation}}\index{wave\_speed() (fortran subroutine in module mom\_wave\_speed)@\spxentry{wave\_speed()}\spxextra{fortran subroutine in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{wave\_speed}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{cg1}, \emph{CS}, \emph{full\_halos}, \emph{use\_ebt\_mode}, \emph{mono\_N2\_column\_fraction}, \emph{mono\_N2\_depth}, \emph{modal\_structure}, \emph{better\_speed\_est}, \emph{min\_speed}, \emph{wave\_speed\_tol}}{}
Calculates the wave speed of the first baroclinic mode.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{cg1} :: {[}out{]} First mode internal wave speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{cs} :: Control structure for MOM\_wave\_speed

\item {} 
\sphinxstylestrong{full\_halos} :: {[}in{]} If true, do the calculation over the entire computational domain.

\item {} 
\sphinxstylestrong{use\_ebt\_mode} :: {[}in{]} If true, use the equivalent barotropic mode instead of the first baroclinic mode.

\item {} 
\sphinxstylestrong{mono\_n2\_column\_fraction} :: {[}in{]} The lower fraction of water column over which N2 is limited as monotonic for the purposes of calculating vertical modal structure.

\item {} 
\sphinxstylestrong{mono\_n2\_depth} :: {[}in{]} A depth below which N2 is limited as monotonic for the purposes of calculating vertical modal structure {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{modal\_structure} :: {[}out{]} Normalized model structure {[}nondim{]}

\item {} 
\sphinxstylestrong{better\_speed\_est} :: {[}in{]} If true, use a more robust estimate of the first mode speed as the starting point for iterations.

\item {} 
\sphinxstylestrong{min\_speed} :: {[}in{]} If present, set a floor in the first mode speed below which 0 is returned {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{wave\_speed\_tol} :: {[}in{]} The fractional tolerance for finding the wave speeds {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_core_h}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_core\_h}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tdma6}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tdma6}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tridiag_det}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tridiag\_det}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_lateral_mixing_coeffs:f/mom_lateral_mixing_coeffs/calc_resoln_function}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_lateral\_mixing\_coeffs::calc\_resoln\_function}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/calculate_diagnostic_fields}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::calculate\_diagnostic\_fields}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tdma6() (fortran subroutine in module mom\_wave\_speed)@\spxentry{tdma6()}\spxextra{fortran subroutine in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tdma6}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{tdma6}}}{\emph{n}, \emph{a}, \emph{c}, \emph{lam}, \emph{y}}{}
Solve a non\sphinxhyphen{}symmetric tridiagonal problem with the sum of the upper and lower diagnonals minus a scalar contribution as the leading diagonal. This uses the Thomas algorithm rather than the Hallberg algorithm since the matrix is not symmetric.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of rows of matrix

\item {} 
\sphinxstylestrong{a} :: {[}in{]} Lower diagonal {[}T2 L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{c} :: {[}in{]} Upper diagonal {[}T2 L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{lam} :: {[}in{]} Scalar subtracted from leading diagonal {[}T2 L\sphinxhyphen{}2 \textasciitilde{}\textgreater{} s2 m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{y} :: {[}inout{]} RHS on entry, result on exit

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wave\_speeds() (fortran subroutine in module mom\_wave\_speed)@\spxentry{wave\_speeds()}\spxextra{fortran subroutine in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speeds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{wave\_speeds}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{nmodes}, \emph{cn}, \emph{CS}, \emph{full\_halos}, \emph{better\_speed\_est}, \emph{min\_speed}, \emph{wave\_speed\_tol}}{}
Calculates the wave speeds for the first few barolinic modes.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} Thermodynamic variables

\item {} 
\sphinxstylestrong{nmodes} :: {[}in{]} Number of modes

\item {} 
\sphinxstylestrong{cn} :: {[}out{]} Waves speeds {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{cs} :: Control structure for MOM\_wave\_speed

\item {} 
\sphinxstylestrong{full\_halos} :: {[}in{]} If true, do the calculation over the entire computational domain.

\item {} 
\sphinxstylestrong{better\_speed\_est} :: {[}in{]} If true, use a more robust estimate of the first mode speed as the starting point for iterations.

\item {} 
\sphinxstylestrong{min\_speed} :: {[}in{]} If present, set a floor in the first mode speed below which 0 is returned {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{wave\_speed\_tol} :: {[}in{]} The fractional tolerance for finding the wave speeds {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tridiag_det}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tridiag\_det}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diabatic_driver:f/mom_diabatic_driver/diabatic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diabatic\_driver::diabatic}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tridiag\_det() (fortran subroutine in module mom\_wave\_speed)@\spxentry{tridiag\_det()}\spxextra{fortran subroutine in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/tridiag_det}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{tridiag\_det}}}{\emph{a}, \emph{c}, \emph{ks}, \emph{ke}, \emph{lam}, \emph{det}, \emph{ddet}, \emph{row\_scale}}{}
Calculate the determinant of a tridiagonal matrix with diagonals a,b\sphinxhyphen{}lam,c and its derivative with lam, where lam is constant across rows. Only the ratio of det to its derivative and their signs are typically used, so internal rescaling by consistent factors are used to avoid over\sphinxhyphen{} or underflow.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a} :: {[}in{]} Lower diagonal of matrix (first entry unused)

\item {} 
\sphinxstylestrong{c} :: {[}in{]} Upper diagonal of matrix (last entry unused)

\item {} 
\sphinxstylestrong{ks} :: {[}in{]} Starting index to use in determinant

\item {} 
\sphinxstylestrong{ke} :: {[}in{]} Ending index to use in determinant

\item {} 
\sphinxstylestrong{lam} :: {[}in{]} Value subtracted from b

\item {} 
\sphinxstylestrong{det} :: {[}out{]} Determinant

\item {} 
\sphinxstylestrong{ddet} :: {[}out{]} Derivative of determinant with lam

\item {} 
\sphinxstylestrong{row\_scale} :: {[}in{]} A scaling factor of the rows of the matrix to limit the growth of the determinant

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speeds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speeds}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wave\_speed\_init() (fortran subroutine in module mom\_wave\_speed)@\spxentry{wave\_speed\_init()}\spxextra{fortran subroutine in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{wave\_speed\_init}}}{\emph{CS}, \emph{use\_ebt\_mode}, \emph{mono\_N2\_column\_fraction}, \emph{mono\_N2\_depth}, \emph{remap\_answers\_2018}, \emph{better\_speed\_est}, \emph{min\_speed}, \emph{wave\_speed\_tol}}{}
Initialize control structure for MOM\_wave\_speed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for MOM\_wave\_speed

\item {} 
\sphinxstylestrong{use\_ebt\_mode} :: {[}in{]} If true, use the equivalent barotropic mode instead of the first baroclinic mode.

\item {} 
\sphinxstylestrong{mono\_n2\_column\_fraction} :: {[}in{]} The lower fraction of water column over which N2 is limited as monotonic for the purposes of calculating the vertical modal structure.

\item {} 
\sphinxstylestrong{mono\_n2\_depth} :: {[}in{]} The depth below which N2 is limited as monotonic for the purposes of calculating the vertical modal structure {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{remap\_answers\_2018} :: {[}in{]} If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. Otherwise use more robust but mathematically equivalent expressions.

\item {} 
\sphinxstylestrong{better\_speed\_est} :: {[}in{]} If true, use a more robust estimate of the first mode speed as the starting point for iterations.

\item {} 
\sphinxstylestrong{min\_speed} :: {[}in{]} If present, set a floor in the first mode speed below which 0 is returned {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{wave\_speed\_tol} :: {[}in{]} The fractional tolerance for finding the wave speeds {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/initialize_remapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::initialize\_remapping}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_set_param}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed\_set\_param}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diagnostics:f/mom_diagnostics/mom_diagnostics_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diagnostics::mom\_diagnostics\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wave\_speed\_set\_param() (fortran subroutine in module mom\_wave\_speed)@\spxentry{wave\_speed\_set\_param()}\spxextra{fortran subroutine in module mom\_wave\_speed}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_set_param}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_speed/}}\sphinxbfcode{\sphinxupquote{wave\_speed\_set\_param}}}{\emph{CS}, \emph{use\_ebt\_mode}, \emph{mono\_N2\_column\_fraction}, \emph{mono\_N2\_depth}, \emph{remap\_answers\_2018}, \emph{better\_speed\_est}, \emph{min\_speed}, \emph{wave\_speed\_tol}}{}
Sets internal parameters for MOM\_wave\_speed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: Control structure for MOM\_wave\_speed

\item {} 
\sphinxstylestrong{use\_ebt\_mode} :: {[}in{]} If true, use the equivalent barotropic mode instead of the first baroclinic mode.

\item {} 
\sphinxstylestrong{mono\_n2\_column\_fraction} :: {[}in{]} The lower fraction of water column over which N2 is limited as monotonic for the purposes of calculating the vertical modal structure.

\item {} 
\sphinxstylestrong{mono\_n2\_depth} :: {[}in{]} The depth below which N2 is limited as monotonic for the purposes of calculating the vertical modal structure {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{remap\_answers\_2018} :: {[}in{]} If true, use the order of arithmetic and expressions that recover the remapping answers from 2018. Otherwise use more robust but mathematically equivalent expressions.

\item {} 
\sphinxstylestrong{better\_speed\_est} :: {[}in{]} If true, use a more robust estimate of the first mode speed as the starting point for iterations.

\item {} 
\sphinxstylestrong{min\_speed} :: {[}in{]} If present, set a floor in the first mode speed below which 0 is returned {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{wave\_speed\_tol} :: {[}in{]} The fractional tolerance for finding the wave speeds {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_speed:f/mom_wave_speed/wave_speed_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_speed\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_wave\_structure module reference}
\label{\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure}}\label{\detokenize{api/generated/modules/mom_wave_structure:mom-wave-structure-module-reference}}\label{\detokenize{api/generated/modules/mom_wave_structure::doc}}\index{mom\_wave\_structure (module)@\spxentry{mom\_wave\_structure}\spxextra{module}|spxpagem}
Vertical structure functions for first baroclinic mode wave speed.

{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:detamom-wave-structure}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_wave_structure:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_structure\_cs}}}}}
&
The control structure for the MOM\_wave\_structure module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_wave_structure:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_structure()}}}}}
&
This subroutine determines the internal wave velocity structure for any mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/tridiag_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tridiag\_solver()}}}}}
&
Solves a tri\sphinxhyphen{}diagonal system Ax=y using either the standard Thomas algorithm (TDMA\_T) or its more stable variant that invokes the “Hallberg substitution” (TDMA\_H).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_structure\_init()}}}}}
&
Allocate memory associated with the wave structure module and read parameters.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_wave_structure:detailed-description}}\label{\detokenize{api/generated/modules/mom_wave_structure:detamom-wave-structure}}
Vertical structure functions for first baroclinic mode wave speed.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_wave_structure:type-documentation}}\index{wave\_structure\_cs (fortran type in module mom\_wave\_structure)@\spxentry{wave\_structure\_cs}\spxextra{fortran type in module mom\_wave\_structure}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_wave\_structure/}}\sphinxbfcode{\sphinxupquote{wave\_structure\_cs}}}
The control structure for the MOM\_wave\_structure module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{w\_strct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Vertical structure of vertical velocity (normalized) {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_strct}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Vertical structure of horizontal velocity (normalized) {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{w\_profile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Vertical profile of w\_hat(z), where w(x,y,z,t) = w\_hat(z)*exp(i(kx+ly\sphinxhyphen{}freq*t)) is the full time\sphinxhyphen{} varying vertical velocity with w\_hat(z) = W0*w\_strct(z) {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{uavg\_profile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Vertical profile of the magnitude of horizontal velocity, (u\textasciicircum{}2+v\textasciicircum{}2)\textasciicircum{}0.5, averaged over a period {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_depths}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Depths of layer interfaces {[}m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{n2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Squared buoyancy frequency at each interface {[}s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_intfaces}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Number of layer interfaces (including surface and bottom)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_source\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: X Location of generation site for internal tide for testing (BDM)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{int\_tide\_source\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Y Location of generation site for internal tide for testing (BDM)

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_wave_structure:function-subroutine-documentation}}\index{wave\_structure() (fortran subroutine in module mom\_wave\_structure)@\spxentry{wave\_structure()}\spxextra{fortran subroutine in module mom\_wave\_structure}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_structure/}}\sphinxbfcode{\sphinxupquote{wave\_structure}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{cn}, \emph{ModeNum}, \emph{freq}, \emph{CS}, \emph{En}, \emph{full\_halos}}{}
This subroutine determines the internal wave velocity structure for any mode.

This subroutine solves for the eigen vector {[}vertical structure, e(k){]} associated with the first baroclinic mode speed {[}i.e., smallest eigen value (lam = 1/c\textasciicircum{}2){]} of the system d2e/dz2 = \sphinxhyphen{}(N2/cn2)e, or (A\sphinxhyphen{}lam*I)e = 0, where A = \sphinxhyphen{}(1/N2)(d2/dz2), lam = 1/c\textasciicircum{}2, and I is the identity matrix. 2nd order discretization in the vertical lets this system be represented as

\sphinxhyphen{}Igu(k)*e(k\sphinxhyphen{}1) + (Igu(k)+Igl(k)\sphinxhyphen{}lam)*e(k) \sphinxhyphen{} Igl(k)*e(k+1) = 0.0

with rigid lid boundary conditions e(1) = e(nz+1) = 0.0 giving

(Igu(2)+Igl(2)\sphinxhyphen{}lam)*e(2) \sphinxhyphen{} Igl(2)*e(3) = 0.0 \sphinxhyphen{}Igu(nz)*e(nz\sphinxhyphen{}1) + (Igu(nz)+Igl(nz)\sphinxhyphen{}lam)*e(nz) = 0.0

where, upon noting N2 = reduced gravity/layer thickness, we get Igl(k) = 1.0/(gprime(k)*H(k)) ; Igu(k) = 1.0/(gprime(k)*H(k\sphinxhyphen{}1))

The eigen value for this system is approximated using “wave\_speed.” This subroutine uses these eigen values (mode speeds) to estimate the corresponding eigen vectors (velocity structure) using the “inverse iteration with shift” method. The algorithm is

Pick a starting vector reasonably close to mode structure and with unit magnitude, b\_guess For n=1,2,3,… Solve (A\sphinxhyphen{}lam*I)e = e\_guess for e Set e\_guess=e/{\color{red}\bfseries{}|e|} and repeat, with each iteration refining the estimate of e
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables.

\item {} 
\sphinxstylestrong{cn} :: {[}in{]} The (non\sphinxhyphen{}rotational) mode internal gravity wave speed {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{modenum} :: {[}in{]} Mode number

\item {} 
\sphinxstylestrong{freq} :: {[}in{]} Intrinsic wave frequency {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to wave\_structure\_init.

\item {} 
\sphinxstylestrong{en} :: {[}in{]} Internal wave energy density {[}R Z3 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} J m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{full\_halos} :: {[}in{]} If true, do the calculation over the entire computational domain.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/tridiag_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tridiag\_solver}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/propagate_int_tide}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::propagate\_int\_tide}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tridiag\_solver() (fortran subroutine in module mom\_wave\_structure)@\spxentry{tridiag\_solver()}\spxextra{fortran subroutine in module mom\_wave\_structure}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/tridiag_solver}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_structure/}}\sphinxbfcode{\sphinxupquote{tridiag\_solver}}}{\emph{a}, \emph{b}, \emph{c}, \emph{h}, \emph{y}, \emph{method}, \emph{x}}{}
Solves a tri\sphinxhyphen{}diagonal system Ax=y using either the standard Thomas algorithm (TDMA\_T) or its more stable variant that invokes the “Hallberg substitution” (TDMA\_H).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{a} :: {[}in{]} lower diagonal with first entry equal to zero.

\item {} 
\sphinxstylestrong{b} :: {[}in{]} middle diagonal.

\item {} 
\sphinxstylestrong{c} :: {[}in{]} upper diagonal with last entry equal to zero.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} vector of values that have already been added to b; used for systems of the form (e.g. average layer thickness in vertical diffusion case): {[} \sphinxhyphen{}alpha(k\sphinxhyphen{}1/2) {]} * e(k\sphinxhyphen{}1) + {[} alpha(k\sphinxhyphen{}1/2) + alpha(k+1/2) + h(k) {]} * e(k) + {[} \sphinxhyphen{}alpha(k+1/2) {]} * e(k+1) = y(k) where a(k)={[}\sphinxhyphen{}alpha(k\sphinxhyphen{}1/2){]}, b(k)={[}alpha(k\sphinxhyphen{}1/2)+alpha(k+1/2) + h(k){]}, and c(k)={[}\sphinxhyphen{}alpha(k+1/2){]}. Only used with TDMA\_H method.

\item {} 
\sphinxstylestrong{y} :: {[}in{]} vector of known values on right hand side.

\item {} 
\sphinxstylestrong{method} :: {[}in{]} A string describing the algorithm to use

\item {} 
\sphinxstylestrong{x} :: {[}out{]} vector of unknown values to solve for.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wave\_structure}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{wave\_structure\_init() (fortran subroutine in module mom\_wave\_structure)@\spxentry{wave\_structure\_init()}\spxextra{fortran subroutine in module mom\_wave\_structure}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_wave_structure:f/mom_wave_structure/wave_structure_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_wave\_structure/}}\sphinxbfcode{\sphinxupquote{wave\_structure\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Allocate memory associated with the wave structure module and read parameters.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_internal_tides:f/mom_internal_tides/internal_tides_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_internal\_tides::internal\_tides\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{mom\_write\_cputime module reference}
\label{\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime}}\label{\detokenize{api/generated/modules/mom_write_cputime:mom-write-cputime-module-reference}}\label{\detokenize{api/generated/modules/mom_write_cputime::doc}}\index{mom\_write\_cputime (module)@\spxentry{mom\_write\_cputime}\spxextra{module}|spxpagem}
A module to monitor the overall CPU time used by MOM6 and project when to stop the model.

{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:detamom-write-cputime}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/mom_write_cputime:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_cputime\_cs}}}}}
&
A control structure that regulates the writing of CPU time.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/mom_write_cputime:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime_start_clock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_cputime\_start\_clock()}}}}}
&
Evaluate the CPU time returned by SYSTEM\_CLOCK at the start of a run.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/mom_write_cputime_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime\_init()}}}}}
&
Initialize the MOM\_write\_cputime module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/mom_write_cputime_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime\_end()}}}}}
&
Close the MOM\_write\_cputime module.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_cputime()}}}}}
&
This subroutine assesses how much CPU time the model has taken and determines how long the model should be run before it saves a restart file and stops itself.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/mom_write_cputime:detailed-description}}\label{\detokenize{api/generated/modules/mom_write_cputime:detamom-write-cputime}}
By Robert Hallberg, May 2006.

This file contains the subroutine (write\_cputime) that writes the summed CPU time across all processors to an output file. In addition, write\_cputime estimates how many more time steps can be taken before 95\% of the available CPU time is used, so that the model can be checkpointed at that time.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/mom_write_cputime:type-documentation}}\index{write\_cputime\_cs (fortran type in module mom\_write\_cputime)@\spxentry{write\_cputime\_cs}\spxextra{fortran type in module mom\_write\_cputime}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{mom\_write\_cputime/}}\sphinxbfcode{\sphinxupquote{write\_cputime\_cs}}}
A control structure that regulates the writing of CPU time.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maxcpu}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum amount of cpu time per processor for which MOM should run before saving a restart file and quiting with a return value that indicates that further execution is required to complete the simulation, in wall\sphinxhyphen{}clock seconds.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{start\_time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The start time of the simulation. Start\_time is set in MOM\_initialization.F90.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{startup\_cputime}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The CPU time used in the startup phase of the model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prev\_cputime}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The last measured CPU time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dn\_dcpu\_min}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum derivative of timestep with CPU time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cputime2}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The accumulated cpu time.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{previous\_calls}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of times write\_CPUtime has been called.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prev\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The value of n from the last call.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{filecpu\_ascii}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The unit number of the CPU time file.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cpufile}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The name of the CPU time file.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/mom_write_cputime:function-subroutine-documentation}}\index{write\_cputime\_start\_clock() (fortran subroutine in module mom\_write\_cputime)@\spxentry{write\_cputime\_start\_clock()}\spxextra{fortran subroutine in module mom\_write\_cputime}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime_start_clock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_write\_cputime/}}\sphinxbfcode{\sphinxupquote{write\_cputime\_start\_clock}}}{\emph{CS}}{}
Evaluate the CPU time returned by SYSTEM\_CLOCK at the start of a run.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure set up by a previous call to MOM\_write\_cputime\_init.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{clocks\_per\_sec}} \sphinxcode{\sphinxupquote{max\_ticks}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_write\_cputime\_init() (fortran subroutine in module mom\_write\_cputime)@\spxentry{mom\_write\_cputime\_init()}\spxextra{fortran subroutine in module mom\_write\_cputime}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/mom_write_cputime_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_write\_cputime/}}\sphinxbfcode{\sphinxupquote{mom\_write\_cputime\_init}}}{\emph{param\_file}, \emph{directory}, \emph{Input\_start\_time}, \emph{CS}}{}
Initialize the MOM\_write\_cputime module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} The directory where the CPU time file goes.

\item {} 
\sphinxstylestrong{input\_start\_time} :: {[}in{]} The start model time of the simulation.

\item {} 
\sphinxstylestrong{cs} :: A pointer that may be set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{clocks\_per\_sec}} \sphinxcode{\sphinxupquote{max\_ticks}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}

\index{mom\_write\_cputime\_end() (fortran subroutine in module mom\_write\_cputime)@\spxentry{mom\_write\_cputime\_end()}\spxextra{fortran subroutine in module mom\_write\_cputime}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/mom_write_cputime_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_write\_cputime/}}\sphinxbfcode{\sphinxupquote{mom\_write\_cputime\_end}}}{\emph{CS}}{}
Close the MOM\_write\_cputime module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure set up by a previous call to MOM\_write\_cputime\_init.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_cputime}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_cputime() (fortran subroutine in module mom\_write\_cputime)@\spxentry{write\_cputime()}\spxextra{fortran subroutine in module mom\_write\_cputime}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/write_cputime}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{mom\_write\_cputime/}}\sphinxbfcode{\sphinxupquote{write\_cputime}}}{\emph{day}, \emph{n}, \emph{CS}, \emph{nmax}, \emph{call\_end}}{}
This subroutine assesses how much CPU time the model has taken and determines how long the model should be run before it saves a restart file and stops itself. Optionally this may also be used to trigger this module’s end routine.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{day} :: {[}inout{]} The current model time.

\item {} 
\sphinxstylestrong{n} :: {[}in{]} The time step number of the current execution.

\item {} 
\sphinxstylestrong{cs} :: The control structure set up by a previous call to MOM\_write\_cputime\_init.

\item {} 
\sphinxstylestrong{nmax} :: {[}inout{]} The number of iterations after which to stop so that the simulation will not run out of CPU time.

\item {} 
\sphinxstylestrong{call\_end} :: {[}in{]} If true, also call MOM\_write\_cputime\_end.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{clocks\_per\_sec}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/is_root_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::is\_root\_pe}}}}} \sphinxcode{\sphinxupquote{max\_ticks}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_write_cputime:f/mom_write_cputime/mom_write_cputime_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_write\_cputime\_end}}}}}

\item[{Called from}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_main}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{NETCDF module reference}
\label{\detokenize{api/generated/modules/NETCDF:f/NETCDF}}\label{\detokenize{api/generated/modules/NETCDF:netcdf-module-reference}}\label{\detokenize{api/generated/modules/NETCDF::doc}}\index{NETCDF (module)@\spxentry{NETCDF}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/NETCDF:detanetcdf}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/NETCDF:detailed-description}}\label{\detokenize{api/generated/modules/NETCDF:detanetcdf}}
\textless{}undocumented\textgreater{}


\subsection{netcdf module reference}
\label{\detokenize{api/generated/modules/netcdf:f/netcdf}}\label{\detokenize{api/generated/modules/netcdf:netcdf-module-reference}}\label{\detokenize{api/generated/modules/netcdf::doc}}\index{netcdf (module)@\spxentry{netcdf}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/netcdf:detanetcdf}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/netcdf:detailed-description}}\label{\detokenize{api/generated/modules/netcdf:detanetcdf}}
\textless{}undocumented\textgreater{}


\subsection{neverworld\_initialization module reference}
\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization}}\label{\detokenize{api/generated/modules/neverworld_initialization:neverworld-initialization-module-reference}}\label{\detokenize{api/generated/modules/neverworld_initialization::doc}}\index{neverworld\_initialization (module)@\spxentry{neverworld\_initialization}\spxextra{module}|spxpagem}
Initialization for the “Neverworld” configuration.

{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:detaneverworld-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/neverworld_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialize\_topography()}}}}}
&
This subroutine sets up the Neverworld test case topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cosbell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cosbell()}}}}}
&
Returns the value of a cosine\sphinxhyphen{}bell function evaluated at x/L.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/spike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spike()}}}}}
&
Returns the value of a sin\sphinxhyphen{}spike function evaluated at x/L.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cone()}}}}}
&
Returns the value of a triangular function centered at x=x0 with value 1 and linearly decreasing to 0 at x=x0+/\sphinxhyphen{}L, and 0 otherwise.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve()}}}}}
&
Returns an s\sphinxhyphen{}curve s(x) s.t.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof()}}}}}
&
Returns a “coastal” profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x()}}}}}
&
Distance between points x,y and a line segment (x0,y0) and (x0,y1).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_y()}}}}}
&
Distance between points x,y and a line segment (x0,y0) and (x1,y0).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast()}}}}}
&
A “coast profile” applied in an N\sphinxhyphen{}S line from lon0,lat0 to lon0,lat1.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast()}}}}}
&
A “coast profile” applied in an E\sphinxhyphen{}W line from lon0,lat0 to lon1,lat0.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_ridge()}}}}}
&
A NS ridge.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/circ_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_ridge()}}}}}
&
A circular ridge.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialize\_thickness()}}}}}
&
This subroutine initializes layer thicknesses for the Neverworld test case, by finding the depths of interfaces in a specified latitude\sphinxhyphen{}dependent temperature profile with an exponentially decaying thermocline on top of a linear stratification.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/neverworld_initialization:detailed-description}}\label{\detokenize{api/generated/modules/neverworld_initialization:detaneverworld-initialization}}
Initialization for the “Neverworld” configuration.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/neverworld_initialization:function-subroutine-documentation}}\index{neverworld\_initialize\_topography() (fortran subroutine in module neverworld\_initialization)@\spxentry{neverworld\_initialize\_topography()}\spxextra{fortran subroutine in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{neverworld\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
This subroutine sets up the Neverworld test case topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cosbell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cosbell}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/spike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spike}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cosbell() (fortran function in module neverworld\_initialization)@\spxentry{cosbell()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cosbell}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{cosbell}}}{\emph{x}, \emph{L}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the value of a cosine\sphinxhyphen{}bell function evaluated at x/L.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional position

\item {} 
\sphinxstylestrong{l} :: {[}in{]} non\sphinxhyphen{}dimensional width

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{spike() (fortran function in module neverworld\_initialization)@\spxentry{spike()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/spike}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{spike}}}{\emph{x}, \emph{L}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the value of a sin\sphinxhyphen{}spike function evaluated at x/L.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional position

\item {} 
\sphinxstylestrong{l} :: {[}in{]} non\sphinxhyphen{}dimensional width

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neverworld\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cone() (fortran function in module neverworld\_initialization)@\spxentry{cone()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cone}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{cone}}}{\emph{x}, \emph{x0}, \emph{L}, \emph{clip}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns the value of a triangular function centered at x=x0 with value 1 and linearly decreasing to 0 at x=x0+/\sphinxhyphen{}L, and 0 otherwise. If clip is present the top of the cone is cut off at “clip”, which effectively defaults to 1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} position of peak {[}nondim{]}

\item {} 
\sphinxstylestrong{l} :: {[}in{]} half\sphinxhyphen{}width of base of cone {[}nondim{]}

\item {} 
\sphinxstylestrong{clip} :: {[}in{]} clipping height of cone {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/circ_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circ\_ridge}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_ridge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scurve() (fortran function in module neverworld\_initialization)@\spxentry{scurve()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/scurve}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{scurve}}}{\emph{x}, \emph{x0}, \emph{L}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns an s\sphinxhyphen{}curve s(x) s.t. s(x0)\textless{}=0, s(x0+L)\textgreater{}=1 and cubic in between.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} position of peak {[}nondim{]}

\item {} 
\sphinxstylestrong{l} :: {[}in{]} half\sphinxhyphen{}width of base of cone {[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{cstprof() (fortran function in module neverworld\_initialization)@\spxentry{cstprof()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cstprof}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{cstprof}}}{\emph{x}, \emph{x0}, \emph{L}, \emph{lf}, \emph{bf}, \emph{sf}, \emph{sh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Returns a “coastal” profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} position of peak {[}nondim{]}

\item {} 
\sphinxstylestrong{l} :: {[}in{]} width of profile {[}nondim{]}

\item {} 
\sphinxstylestrong{lf} :: {[}in{]} fraction of width that is “land” {[}nondim{]}

\item {} 
\sphinxstylestrong{bf} :: {[}in{]} fraction of width that is “beach” {[}nondim{]}

\item {} 
\sphinxstylestrong{sf} :: {[}in{]} fraction of width that is “continental slope” {[}nondim{]}

\item {} 
\sphinxstylestrong{sh} :: {[}in{]} depth of shelf as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/scurve}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scurve}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dist\_line\_fixed\_x() (fortran function in module neverworld\_initialization)@\spxentry{dist\_line\_fixed\_x()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{dist\_line\_fixed\_x}}}{\emph{x}, \emph{y}, \emph{x0}, \emph{y0}, \emph{y1}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Distance between points x,y and a line segment (x0,y0) and (x0,y1).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional x\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{y} :: {[}in{]} non\sphinxhyphen{}dimensional y\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} x\sphinxhyphen{}position of line segment {[}nondim{]}

\item {} 
\sphinxstylestrong{y0} :: {[}in{]} y\sphinxhyphen{}position of line segment end{[}nondim{]}

\item {} 
\sphinxstylestrong{y1} :: {[}in{]} y\sphinxhyphen{}position of line segment end{[}nondim{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_y}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_coast}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_ridge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ns\_ridge}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dist\_line\_fixed\_y() (fortran function in module neverworld\_initialization)@\spxentry{dist\_line\_fixed\_y()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{dist\_line\_fixed\_y}}}{\emph{x}, \emph{y}, \emph{x0}, \emph{x1}, \emph{y0}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Distance between points x,y and a line segment (x0,y0) and (x1,y0).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{x} :: {[}in{]} non\sphinxhyphen{}dimensional x\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{y} :: {[}in{]} non\sphinxhyphen{}dimensional y\sphinxhyphen{}coordinate {[}nondim{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} x\sphinxhyphen{}position of line segment end{[}nondim{]}

\item {} 
\sphinxstylestrong{x1} :: {[}in{]} x\sphinxhyphen{}position of line segment end{[}nondim{]}

\item {} 
\sphinxstylestrong{y0} :: {[}in{]} y\sphinxhyphen{}position of line segment {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ew_coast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ew\_coast}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ns\_coast() (fortran function in module neverworld\_initialization)@\spxentry{ns\_coast()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_coast}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{ns\_coast}}}{\emph{lon}, \emph{lat}, \emph{lon0}, \emph{lat0}, \emph{lat1}, \emph{dlon}, \emph{sh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A “coast profile” applied in an N\sphinxhyphen{}S line from lon0,lat0 to lon0,lat1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of coast {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of coast end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lat1} :: {[}in{]} Latitude of coast end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{dlon} :: {[}in{]} “Radius” of coast profile {[}degrees{]}

\item {} 
\sphinxstylestrong{sh} :: {[}in{]} depth of shelf as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ew\_coast() (fortran function in module neverworld\_initialization)@\spxentry{ew\_coast()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ew_coast}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{ew\_coast}}}{\emph{lon}, \emph{lat}, \emph{lon0}, \emph{lon1}, \emph{lat0}, \emph{dlat}, \emph{sh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A “coast profile” applied in an E\sphinxhyphen{}W line from lon0,lat0 to lon1,lat0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of coast end {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lon1} :: {[}in{]} Longitude of coast end {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of coast {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{dlat} :: {[}in{]} “Radius” of coast profile {[}degrees{]}

\item {} 
\sphinxstylestrong{sh} :: {[}in{]} depth of shelf as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cstprof}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cstprof}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_y}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ns\_ridge() (fortran function in module neverworld\_initialization)@\spxentry{ns\_ridge()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/ns_ridge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{ns\_ridge}}}{\emph{lon}, \emph{lat}, \emph{lon0}, \emph{lat0}, \emph{lat1}, \emph{dlon}, \emph{rh}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A NS ridge.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of ridge center {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of ridge end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lat1} :: {[}in{]} Latitude of ridge end {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{dlon} :: {[}in{]} “Radius” of ridge profile {[}degrees{]}

\item {} 
\sphinxstylestrong{rh} :: {[}in{]} depth of ridge as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cone}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/dist_line_fixed_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dist\_line\_fixed\_x}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{circ\_ridge() (fortran function in module neverworld\_initialization)@\spxentry{circ\_ridge()}\spxextra{fortran function in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/circ_ridge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{circ\_ridge}}}{\emph{lon}, \emph{lat}, \emph{lon0}, \emph{lat0}, \emph{ring\_radius}, \emph{ring\_thickness}, \emph{ridge\_height}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
A circular ridge.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{lon} :: {[}in{]} Longitude {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{lon0} :: {[}in{]} Longitude of center of ring {[}degrees\_E{]}

\item {} 
\sphinxstylestrong{lat0} :: {[}in{]} Latitude of center of ring {[}degrees\_N{]}

\item {} 
\sphinxstylestrong{ring\_radius} :: {[}in{]} Radius of ring {[}degrees{]}

\item {} 
\sphinxstylestrong{ring\_thickness} :: {[}in{]} Radial thickness of ring {[}degrees{]}

\item {} 
\sphinxstylestrong{ridge\_height} :: {[}in{]} Ridge height as fraction of full depth {[}nondim{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/cone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cone}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{neverworld\_initialize\_thickness() (fortran subroutine in module neverworld\_initialization)@\spxentry{neverworld\_initialize\_thickness()}\spxextra{fortran subroutine in module neverworld\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/neverworld_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{neverworld\_initialization/}}\sphinxbfcode{\sphinxupquote{neverworld\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{P\_ref}}{}
This subroutine initializes layer thicknesses for the Neverworld test case, by finding the depths of interfaces in a specified latitude\sphinxhyphen{}dependent temperature profile with an exponentially decaying thermocline on top of a linear stratification.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{p\_ref} :: {[}in{]} The coordinate\sphinxhyphen{}density reference pressure {[}R L2 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} {\hyperref[\detokenize{api/generated/modules/neverworld_initialization:f/neverworld_initialization/spike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spike}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{ocean\_da\_core\_mod module reference}
\label{\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod}}\label{\detokenize{api/generated/modules/ocean_da_core_mod:ocean-da-core-mod-module-reference}}\label{\detokenize{api/generated/modules/ocean_da_core_mod::doc}}\index{ocean\_da\_core\_mod (module)@\spxentry{ocean\_da\_core\_mod}\spxextra{module}|spxpagem}
A set of dummy interfaces for compiling the MOM6 DA driver code.

{\hyperref[\detokenize{api/generated/modules/ocean_da_core_mod:detaocean-da-core-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/ocean_da_core_mod:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod/ocean_da_core_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_da\_core\_init()}}}}}
&
Initializes the MOM6 DA driver code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod/get_profiles}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_profiles()}}}}}
&
Get profiles obs within the current analysis interval.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/ocean_da_core_mod:detailed-description}}\label{\detokenize{api/generated/modules/ocean_da_core_mod:detaocean-da-core-mod}}
A set of dummy interfaces for compiling the MOM6 DA driver code.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/ocean_da_core_mod:function-subroutine-documentation}}\index{ocean\_da\_core\_init() (fortran subroutine in module ocean\_da\_core\_mod)@\spxentry{ocean\_da\_core\_init()}\spxextra{fortran subroutine in module ocean\_da\_core\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod/ocean_da_core_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_da\_core\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_da\_core\_init}}}{\emph{Domain}, \emph{global\_grid}, \emph{Profiles}, \emph{model\_time}}{}
Initializes the MOM6 DA driver code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{domain} :: {[}in{]} A MOM domain type

\item {} 
\sphinxstylestrong{global\_grid} :: {[}in{]} The global ODA horizontal grid type

\item {} 
\sphinxstylestrong{profiles} :: This is an unstructured recursive list of profiles which are either within the localized domain corresponding to the Domain argument, or the global profile list (type).

\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} The current model time type.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/init_oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::init\_oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_profiles() (fortran subroutine in module ocean\_da\_core\_mod)@\spxentry{get\_profiles()}\spxextra{fortran subroutine in module ocean\_da\_core\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_da_core_mod:f/ocean_da_core_mod/get_profiles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_da\_core\_mod/}}\sphinxbfcode{\sphinxupquote{get\_profiles}}}{\emph{model\_time}, \emph{Profiles}, \emph{Current\_profiles}}{}
Get profiles obs within the current analysis interval.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{model\_time} :: {[}in{]} The current analysis time.

\item {} 
\sphinxstylestrong{profiles} :: The full recursive list of profiles.

\item {} 
\sphinxstylestrong{current\_profiles} :: A returned list of profiles for the current analysis step.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/oda}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::oda}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{ocean\_da\_types\_mod module reference}
\label{\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod}}\label{\detokenize{api/generated/modules/ocean_da_types_mod:ocean-da-types-mod-module-reference}}\label{\detokenize{api/generated/modules/ocean_da_types_mod::doc}}\index{ocean\_da\_types\_mod (module)@\spxentry{ocean\_da\_types\_mod}\spxextra{module}|spxpagem}
Dummy aata structures and methods for ocean data assimilation.

{\hyperref[\detokenize{api/generated/modules/ocean_da_types_mod:detaocean-da-types-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/ocean_da_types_mod:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/forward_operator_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{forward\_operator\_type}}}}}
&
Example forward operator type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/grid_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid\_type}}}}}
&
Grid type for DA.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/ocean_control_struct}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_control\_struct}}}}}
&
Example type for ocean ensemble DA state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/ocean_profile_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_profile\_type}}}}}
&
Example of a profile type.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/ocean_da_types_mod:detailed-description}}\label{\detokenize{api/generated/modules/ocean_da_types_mod:detaocean-da-types-mod}}
Dummy aata structures and methods for ocean data assimilation.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/ocean_da_types_mod:type-documentation}}\index{forward\_operator\_type (fortran type in module ocean\_da\_types\_mod)@\spxentry{forward\_operator\_type}\spxextra{fortran type in module ocean\_da\_types\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/forward_operator_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ocean\_da\_types\_mod/}}\sphinxbfcode{\sphinxupquote{forward\_operator\_type}}}
Example forward operator type.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: how many?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{state\_size}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(2)}\sphinxstyleemphasis{{]}} :: for

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{state\_var\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: for flattened data

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{i\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}dimension index

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{j\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}dimension index

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coef}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: coefficient

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{grid\_type (fortran type in module ocean\_da\_types\_mod)@\spxentry{grid\_type}\spxextra{fortran type in module ocean\_da\_types\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/grid_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ocean\_da\_types\_mod/}}\sphinxbfcode{\sphinxupquote{grid\_type}}}
Grid type for DA.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: x

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: y

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: z

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: h

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{basin\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: basin mask

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: land mask?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{bathyt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: bathymetry at T points

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tripolar\_n}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True for tripolar grids.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ni}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: ni

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: nj

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: nk

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_control\_struct (fortran type in module ocean\_da\_types\_mod)@\spxentry{ocean\_control\_struct}\spxextra{fortran type in module ocean\_da\_types\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/ocean_control_struct}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ocean\_da\_types\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_control\_struct}}}
Example type for ocean ensemble DA state.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ensemble\_size}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: ensemble size

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ssh}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: sea surface height (m) across ensembles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{h}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer thicknesses (m or kg) across ensembles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer potential temperature (degC) across ensembles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer salinity (psu or g kg\sphinxhyphen{}1) across ensembles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer zonal velocity (m s\sphinxhyphen{}1) across ensembles

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: layer meridional velocity (m s\sphinxhyphen{}1) across ensembles

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_profile\_type (fortran type in module ocean\_da\_types\_mod)@\spxentry{ocean\_profile\_type}\spxextra{fortran type in module ocean\_da\_types\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_da_types_mod:f/ocean_da_types_mod/ocean_profile_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ocean\_da\_types\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_profile\_type}}}
Example of a profile type.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{inst\_type}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A numeric code indicating the type of instrument (e.g. ARGO drifter, CTD, …)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{initialized}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: a True value indicates that this profile has been allocated for use

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{colocated}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: a True value indicated that the measurements of (num\_variables) data are co\sphinxhyphen{}located in space\sphinxhyphen{}time

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ensemble\_size}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: size of the ensemble of model states used in association with this profile

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{num\_variables}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of measurement types associated with this profile.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{var\_id}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: variable ids are defined by the ocean\_types module

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{platform}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: platform types are defined by platform class (e.g. MOORING, DROP, etc.) and instrument type (XBT, CDT, etc.)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{levels}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: number of levels in the current profile

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{basin\_mask}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: 1:Southern Ocean, 2:Atlantic Ocean, 3:Pacific Ocean, 4:Arctic Ocean, 5:Indian Ocean, 6:Mediterranean Sea, 7:Black Sea, 8:Hudson Bay, 9:Baltic Sea, 10:Red Sea, 11:Persian Gulf

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{profile\_flag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: an overall flag for the profile

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: latitude {[}degrees\_N{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: longitude {[}degrees\_E{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{accepted}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: logical flag to disable a profile

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_window}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The time window associated with this profile {[}s{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obs\_error}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The observation error by variable.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{loc\_dist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The impact radius of this observation (m)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{next}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_profile\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: all profiles are stored as linked list.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{prev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_profile\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: previous

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cnext}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_profile\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: current profiles are stored as linked list.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cprev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( ocean\_profile\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: previous

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nbr\_xi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: x nearest neighbor model gridpoint for the profile

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nbr\_yi}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: y nearest neighbor model gridpoint for the profile

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nbr\_dist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: distance to nearest neighbor model gridpoint

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{compute}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: profile is within current compute domain

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{depth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: depth of measurement {[}m{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{data}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: data by variable type

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: flag by depth and variable type

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{forecast}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ensemble member first guess

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{analysis}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: ensemble member analysis

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{obs\_def}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type( forward\_operator\_type )}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: observation forward operator

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: profile time type

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{i\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: model longitude indices respectively

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{j\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: model latitude indices respectively

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{k\_index}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: model depth indices

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tdiff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: difference between model time and observation time

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{filename}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=128)}\sphinxstyleemphasis{{]}} :: a filename

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{ocean\_model\_mod module reference}
\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod}}\label{\detokenize{api/generated/modules/ocean_model_mod:ocean-model-mod-module-reference}}\label{\detokenize{api/generated/modules/ocean_model_mod::doc}}\index{ocean\_model\_mod (module)@\spxentry{ocean\_model\_mod}\spxextra{module}|spxpagem}
Top\sphinxhyphen{}level module for the MOM6 ocean model in coupled mode.

{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:detaocean-model-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/ocean_model_mod:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_public_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_public\_type}}}}}
&
This type is used for communication with other components via the FMS coupler.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_state_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_state\_type}}}}}
&
The {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_state_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_state\_type()}}}}} contains all information about the state of the ocean, with a format that is private so it can be readily changed without disrupting other coupled components.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/ocean_model_mod:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_init()}}}}}
&
ocean\_model\_init initializes the ocean model, including registering fields for restarts and reading restart files if appropriate.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ocean\_model()}}}}}
&
update\_ocean\_model uses the forcing in Ice\_ocean\_boundary to advance the ocean model’s state from the input value of Ocean\_state (which must be for time time\_start\_update) for a time interval of Ocean\_coupling\_time\_step, returning the publicly visible ocean surface properties in Ocean\_sfc and storing the new ocean properties in Ocean\_state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_restart()}}}}}
&
This subroutine writes out the ocean model restart file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_end()}}}}}
&
ocean\_model\_end terminates the model run, saving the ocean state in a restart and deallocating any data associated with the ocean.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_save\_restart()}}}}}
&
ocean\_model\_save\_restart causes restart files associated with the ocean to be written out.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/initialize_ocean_public_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ocean\_public\_type()}}}}}
&
Initialize the public ocean type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/convert_state_to_ocean_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_state\_to\_ocean\_type()}}}}}
&
This subroutine translates the coupler’s ocean\_data\_type into MOM’s surface state variable.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init_sfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_init\_sfc()}}}}}
&
This subroutine extracts the surface properties from the ocean’s internal state and stores them in the ocean type returned to the calling ice model.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_flux\_init()}}}}}
&
ocean\_model\_flux\_init is used to initialize properties of the air\sphinxhyphen{}sea fluxes as determined by various run\sphinxhyphen{}time parameters. It can be called from non\sphinxhyphen{}ocean PEs, or PEs that have not yet been initialzed, and it can safely be called multiple times.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_stock_pe}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_stock\_pe()}}}}}
&
Ocean\_stock\_pe \sphinxhyphen{} returns the integrated stocks of heat, water, etc.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_data2d_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_data2d\_get()}}}}}
&
This subroutine extracts a named 2\sphinxhyphen{}D field from the ocean surface or public type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_data1d_get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_data1d\_get()}}}}}
&
This subroutine extracts a named scalar field from the ocean surface or public type.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_public_type_chksum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_public\_type\_chksum()}}}}}
&
Write out FMS\sphinxhyphen{}format checsums on fields from the ocean surface state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/get_ocean_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ocean\_grid()}}}}}
&
This subroutine gives a handle to the grid from ocean state.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_get_uv_surf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_get\_uv\_surf()}}}}}
&
This subroutine extracts a named (u\sphinxhyphen{} or v\sphinxhyphen{}) 2\sphinxhyphen{}D surface current from ocean internal state.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/ocean_model_mod:detailed-description}}\label{\detokenize{api/generated/modules/ocean_model_mod:detaocean-model-mod}}
Top\sphinxhyphen{}level module for the MOM6 ocean model in coupled mode.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/ocean_model_mod:type-documentation}}\index{ocean\_public\_type (fortran type in module ocean\_model\_mod)@\spxentry{ocean\_public\_type}\spxextra{fortran type in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_public_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_public\_type}}}
This type is used for communication with other components via the FMS coupler. The element names and types can be changed only with great deliberation, hence the persistnce of things like the cutsy element name “avg\_kount”.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{domain}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(domain2d)}\sphinxstyleemphasis{{]}} :: The domain for the surface fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_ocean\_pe}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: .true. on processors that run the ocean model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{instance\_name}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=32)}\sphinxstyleemphasis{{]}} :: A name that can be used to identify this instance of an ocean model, for example in ensembles when writing messages.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pelist}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The list of ocean PEs.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{maskmap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to an array indicating which logical processors are actually used for the ocean code. The other logical processors would be all land points and are not assigned to actual processors. This need not be assigned if all logical processors are used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{stagger}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The staggering relative to the tracer points points of the two velocity components. Valid entries include AGRID, BGRID\_NE, CGRID\_NE, BGRID\_SW, and CGRID\_SW, corresponding to the community\sphinxhyphen{}standard Arakawa notation. (These are named integers taken from mpp\_parameter\_mod.) Following MOM5, stagger is BGRID\_NE by default when the ocean is initialized, but here it is set to \sphinxhyphen{}999 so that a global max across ocean and non\sphinxhyphen{}ocean processors can be used to determine its value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{t\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: SST on t\sphinxhyphen{}cell (degrees Kelvin)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{s\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: SSS on t\sphinxhyphen{}cell (psu)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{u\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: i\sphinxhyphen{}velocity at the locations indicated by stagger {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{v\_surf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: j\sphinxhyphen{}velocity at the locations indicated by stagger {[}m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sea\_lev}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Sea level in m after correction for surface pressure,.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{frazil}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: Accumulated heating {[}J m\sphinxhyphen{}2{]} from frazil.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{area}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: cell area of the ocean surface {[}m2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fields}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(coupler\_2d\_bc\_type)}\sphinxstyleemphasis{{]}} :: A structure that may contain named arrays of tracer\sphinxhyphen{}related surface fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{avg\_kount}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A count of contributions to running sums, used externally by the FMS coupler for accumulating averages of this type.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{axes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(2)}\sphinxstyleemphasis{{]}} :: Axis numbers that are available for I/O using this surface data.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_state\_type (fortran type in module ocean\_model\_mod)@\spxentry{ocean\_state\_type}\spxextra{fortran type in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_state_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_state\_type}}}
The {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_state_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_state\_type()}}}}} contains all information about the state of the ocean, with a format that is private so it can be readily changed without disrupting other coupled components.
contains all information about the state of the ocean, with a format that is private so it can be readily changed without disrupting other coupled components.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{is\_ocean\_pe}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: True if this is an ocean PE.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The ocean model’s time and master clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time\_dyn}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{{]}} :: The ocean model’s time for the dynamics. Time and Time\_dyn should be the same after a full time step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_control}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: An integer that is bit\sphinxhyphen{}tested to determine whether incremental restart files are saved and whether they have a time stamped name. +1 (bit 0) for generic files and +2 (bit 1) for time\sphinxhyphen{}stamped files. A restart file is saved at the end of a run segment unless Restart\_control is negative.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstep}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of calls to update\_ocean that update the dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{nstep\_thermo}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of calls to update\_ocean that update the thermodynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_ice\_shelf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the ice shelf model is enabled.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_waves}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true use wave coupling.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{icebergs\_alter\_ocean}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the icebergs can change ocean the ocean dynamics and forcing fluxes.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{press\_to\_z}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A conversion factor between pressure and ocean depth in m, usually 1/(rho\_0*g) {[}m Pa\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{c\_p}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The heat capacity of seawater {[}J degC\sphinxhyphen{}1 kg\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{offline\_tracer\_mode}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If false, use the model in prognostic mode with the barotropic and baroclinic dynamics, thermodynamics, etc. stepped forward integrated in time. If true, all of the above are bypassed with all fields necessary to integrate only the tracer advection and diffusion equation read in from files stored from a previous integration of the prognostic model.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{single\_step\_call}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, advance the state of MOM with a single step including both dynamics and thermodynamics. If false, the two phases are advanced with separate calls. The default is true.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: (baroclinic) dynamics time step {[}s{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dt\_therm}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: thermodynamics time step {[}s{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{thermo\_spans\_coupling}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, thermodynamic and tracer time steps can span multiple coupled time steps.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diabatic\_first}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, apply diabatic and thermodynamic processes before time stepping the dynamics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dirs}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(directories)}\sphinxstyleemphasis{{]}} :: A structure containing several relevant directory paths.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{forces}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mech\_forcing)}\sphinxstyleemphasis{{]}} :: A structure with the driving mechanical surface forces.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{fluxes}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(forcing)}\sphinxstyleemphasis{{]}} :: A structure containing pointers to the thermodynamic ocean forcing fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_tmp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(forcing)}\sphinxstyleemphasis{{]}} :: A secondary structure containing pointers to the ocean forcing fields for when multiple coupled timesteps are taken per thermodynamic step.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sfc\_state}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(surface)}\sphinxstyleemphasis{{]}} :: A structure containing pointers to the ocean surface state fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{grid}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ocean\_grid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a grid structure containing metrics.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gv}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(verticalgrid\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a structure containing information.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{us}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(unit\_scale\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to a structure containing dimensional.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mom\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_control\_struct)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ice\_shelf\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(ice\_shelf\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the control structure for the.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{marine\_ice\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(marine\_ice\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the control structure for the.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{waves}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(wave\_parameters\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure containing pointers to the surface wave fields.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{forcing\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(surface\_forcing\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM forcing control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer set to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the diagnostic regulatory structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/ocean_model_mod:function-subroutine-documentation}}\index{ocean\_model\_init() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_init()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_init}}}{\emph{Ocean\_sfc}, \emph{OS}, \emph{Time\_init}, \emph{Time\_in}, \emph{wind\_stagger}, \emph{gas\_fields\_ocn}}{}
ocean\_model\_init initializes the ocean model, including registering fields for restarts and reading restart files if appropriate.

This subroutine initializes both the ocean state and the ocean surface type. Because of the way that indicies and domains are handled, Ocean\_sfc must have been used in a previous call to initialize\_ocean\_type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ocean\_sfc} :: {[}inout{]} A structure containing various publicly

\item {} 
\sphinxstylestrong{os} :: A structure whose internal contents are private to {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_mod()}}}}} that may be used to contain all information about the ocean’s interior state.that may be used to contain all information about the ocean’s interior state.

\item {} 
\sphinxstylestrong{time\_init} :: {[}in{]} The start time for the coupled model’s calendar

\item {} 
\sphinxstylestrong{time\_in} :: {[}in{]} The time at which to initialize the ocean model.

\item {} 
\sphinxstylestrong{wind\_stagger} :: {[}in{]} If present, the staggering of the winds that are being provided in calls to update\_ocean\_model

\item {} 
\sphinxstylestrong{gas\_fields\_ocn} :: {[}in{]} If present, this type describes the

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/mom_file_parser:f/mom_file_parser/close_param_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_file\_parser::close\_param\_file}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/convert_state_to_ocean_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_state\_to\_ocean\_type}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_close_registration}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_mediator\_close\_registration}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/initialize_ocean_public_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_ocean\_public\_type}}}}} {\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/marine_ice_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_marine\_ice::marine\_ice\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/mom_wave_interface_init_lite}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::mom\_wave\_interface\_init\_lite}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{update\_ocean\_model() (fortran subroutine in module ocean\_model\_mod)@\spxentry{update\_ocean\_model()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{update\_ocean\_model}}}{\emph{Ice\_ocean\_boundary}, \emph{OS}, \emph{Ocean\_sfc}, \emph{time\_start\_update}, \emph{Ocean\_coupling\_time\_step}, \emph{update\_dyn}, \emph{update\_thermo}, \emph{Ocn\_fluxes\_used}, \emph{start\_cycle}, \emph{end\_cycle}, \emph{cycle\_length}}{}
update\_ocean\_model uses the forcing in Ice\_ocean\_boundary to advance the ocean model’s state from the input value of Ocean\_state (which must be for time time\_start\_update) for a time interval of Ocean\_coupling\_time\_step, returning the publicly visible ocean surface properties in Ocean\_sfc and storing the new ocean properties in Ocean\_state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ice\_ocean\_boundary} :: {[}in{]} A structure containing the various

\item {} 
\sphinxstylestrong{os} :: A pointer to a private structure containing the

\item {} 
\sphinxstylestrong{ocean\_sfc} :: {[}inout{]} A structure containing all the publicly visible

\item {} 
\sphinxstylestrong{time\_start\_update} :: {[}in{]} The time at the beginning of the update step.

\item {} 
\sphinxstylestrong{ocean\_coupling\_time\_step} :: {[}in{]} The amount of time over which to advance the ocean.

\item {} 
\sphinxstylestrong{update\_dyn} :: {[}in{]} If present and false, do not do updates due to the ocean dynamics.

\item {} 
\sphinxstylestrong{update\_thermo} :: {[}in{]} If present and false, do not do updates due to the ocean thermodynamics or remapping.

\item {} 
\sphinxstylestrong{ocn\_fluxes\_used} :: {[}in{]} If present, this indicates whether the cumulative thermodynamic fluxes from the ocean, like frazil, have been used and should be reset.

\item {} 
\sphinxstylestrong{start\_cycle} :: {[}in{]} This indicates whether this call is to be treated as the first call to step\_MOM in a time\sphinxhyphen{}stepping cycle; missing is like true.

\item {} 
\sphinxstylestrong{end\_cycle} :: {[}in{]} This indicates whether this call is to be treated as the last call to step\_MOM in a time\sphinxhyphen{}stepping cycle; missing is like true.

\item {} 
\sphinxstylestrong{cycle\_length} :: {[}in{]} The duration of a coupled time stepping cycle {[}s{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/add_shelf_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::add\_shelf\_forces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_enter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_enter}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/calltree_leave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::calltree\_leave}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/convert_state_to_ocean_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_state\_to\_ocean\_type}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/forcing_diagnostics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::forcing\_diagnostics}}}}} {\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/iceberg_fluxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_marine\_ice::iceberg\_fluxes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_marine_ice:f/mom_marine_ice/iceberg_forces}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_marine\_ice::iceberg\_forces}}}}} {\hyperref[\detokenize{api/generated/modules/mom_forcing_type:f/mom_forcing_type/mech_forcing_diags}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_forcing\_type::mech\_forcing\_diags}}}}} {\hyperref[\detokenize{api/generated/modules/mom_generic_tracer:f/mom_generic_tracer/mom_generic_tracer_fluxes_accumulate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_generic\_tracer::mom\_generic\_tracer\_fluxes\_accumulate}}}}} {\hyperref[\detokenize{api/generated/modules/mom_time_manager:f/mom_time_manager/real_to_time}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_time\_manager::real\_to\_time}}}}} {\hyperref[\detokenize{api/generated/modules/mom:f/mom/step_offline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::step\_offline}}}}} {\hyperref[\detokenize{api/generated/modules/mom_wave_interface:f/mom_wave_interface/update_surface_waves}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_wave\_interface::update\_surface\_waves}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_restart() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_restart()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_restart}}}{\emph{OS}, \emph{timestamp}}{}
This subroutine writes out the ocean model restart file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A pointer to the structure containing the internal ocean state being saved to a restart file

\item {} 
\sphinxstylestrong{timestamp} :: {[}in{]} An optional timestamp string that should be prepended to the file name. (Currently this is unused.)

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/forcing_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::forcing\_save\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::ice\_shelf\_save\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_end() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_end()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_end}}}{\emph{Ocean\_sfc}, \emph{Ocean\_state}, \emph{Time}}{}
ocean\_model\_end terminates the model run, saving the ocean state in a restart and deallocating any data associated with the ocean.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ocean\_sfc} :: {[}inout{]} An {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_public_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_public\_type()}}}}} structure that is to be deallocated upon termination.structure that is to be deallocated upon termination.

\item {} 
\sphinxstylestrong{ocean\_state} :: A pointer to the structure containing the internal ocean state to be deallocated upon termination.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The model time, used for writing restarts.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_diag_mediator:f/mom_diag_mediator/diag_mediator_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_mediator::diag\_mediator\_end}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::ice\_shelf\_end}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_save\_restart}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_save\_restart() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_save\_restart()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_save_restart}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_save\_restart}}}{\emph{OS}, \emph{Time}, \emph{directory}, \emph{filename\_suffix}}{}
ocean\_model\_save\_restart causes restart files associated with the ocean to be written out.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A pointer to the structure containing the internal ocean state (in).

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The model time at this call, needed for mpp\_write calls.

\item {} 
\sphinxstylestrong{directory} :: {[}in{]} An optional directory into which to write these restart files.

\item {} 
\sphinxstylestrong{filename\_suffix} :: {[}in{]} An optional suffix (e.g., a time\sphinxhyphen{}stamp) to append to the restart file names.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/forcing_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing\_gfdl::forcing\_save\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ice_shelf:f/mom_ice_shelf/ice_shelf_save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf::ice\_shelf\_save\_restart}}}}} {\hyperref[\detokenize{api/generated/modules/mom_restart:f/mom_restart/save_restart}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_restart::save\_restart}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_ocean\_public\_type() (fortran subroutine in module ocean\_model\_mod)@\spxentry{initialize\_ocean\_public\_type()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/initialize_ocean_public_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{initialize\_ocean\_public\_type}}}{\emph{input\_domain}, \emph{Ocean\_sfc}, \emph{diag}, \emph{maskmap}, \emph{gas\_fields\_ocn}}{}
Initialize the public ocean type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{input\_domain} :: {[}in{]} The ocean model domain description

\item {} 
\sphinxstylestrong{ocean\_sfc} :: {[}inout{]} A structure containing various publicly visible ocean surface properties after initialization, whose elements are allocated here.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that regulates diagnsotic output

\item {} 
\sphinxstylestrong{maskmap} :: {[}in{]} A mask indicating which virtual processors

\item {} 
\sphinxstylestrong{gas\_fields\_ocn} :: {[}in{]} If present, this type describes the

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{convert\_state\_to\_ocean\_type() (fortran subroutine in module ocean\_model\_mod)@\spxentry{convert\_state\_to\_ocean\_type()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/convert_state_to_ocean_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{convert\_state\_to\_ocean\_type}}}{\emph{sfc\_state}, \emph{Ocean\_sfc}, \emph{G}, \emph{US}, \emph{patm}, \emph{press\_to\_z}}{}
This subroutine translates the coupler’s ocean\_data\_type into MOM’s surface state variable. This may eventually be folded into the MOM code that calculates the surface state in the first place. Note the offset in the arrays because the ocean\_data\_type has no halo points in its arrays and always uses absolute indicies.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{ocean\_sfc} :: {[}inout{]} A structure containing various publicly

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{patm} :: {[}in{]} The pressure at the ocean surface {[}Pa{]}.

\item {} 
\sphinxstylestrong{press\_to\_z} :: {[}in{]} A conversion factor between pressure and ocean depth in m, usually 1/(rho\_0*g) {[}m Pa\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_constants::celsius\_kelvin\_offset}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_init}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init_sfc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ocean\_model\_init\_sfc}}}}} {\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/update_ocean_model}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ocean\_model}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_init\_sfc() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_init\_sfc()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_init_sfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_init\_sfc}}}{\emph{OS}, \emph{Ocean\_sfc}}{}
This subroutine extracts the surface properties from the ocean’s internal state and stores them in the ocean type returned to the calling ice model. It has to be separate from the ocean\_initialization call because the coupler module allocates the space for some of these variables.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: The structure with the complete ocean state

\item {} 
\sphinxstylestrong{ocean\_sfc} :: {[}inout{]} A structure containing various publicly visible ocean surface properties after initialization, whose elements have their data set here.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/convert_state_to_ocean_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{convert\_state\_to\_ocean\_type}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_flux\_init() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_flux\_init()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_flux_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_flux\_init}}}{\emph{OS}, \emph{verbosity}}{}
ocean\_model\_flux\_init is used to initialize properties of the air\sphinxhyphen{}sea fluxes as determined by various run\sphinxhyphen{}time parameters. It can be called from non\sphinxhyphen{}ocean PEs, or PEs that have not yet been initialzed, and it can safely be called multiple times.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: An optional pointer to the ocean state, used to figure out if this is an ocean PE that has already been initialized.

\item {} 
\sphinxstylestrong{verbosity} :: {[}in{]} A 0\sphinxhyphen{}9 integer indicating a level of verbosity.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_flux_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_flux\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_stock\_pe() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_stock\_pe()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_stock_pe}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_stock\_pe}}}{\emph{OS}, \emph{index}, \emph{value}, \emph{time\_index}}{}
Ocean\_stock\_pe \sphinxhyphen{} returns the integrated stocks of heat, water, etc. for conservation checks. Because of the way FMS is coded, only the root PE has the integrated amount, while all other PEs get 0.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A structure containing the internal ocean state. The data in OS is intent in.

\item {} 
\sphinxstylestrong{index} :: {[}in{]} The stock index for the quantity of interest.

\item {} 
\sphinxstylestrong{value} :: {[}out{]} Sum returned for the conservation quantity of interest.

\item {} 
\sphinxstylestrong{time\_index} :: {[}in{]} An unused optional argument, present only for interfacial compatibility with other models.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom:f/mom/get_ocean_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom::get\_ocean\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_data2d\_get() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_data2d\_get()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_data2d_get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_data2d\_get}}}{\emph{OS}, \emph{Ocean}, \emph{name}, \emph{array2D}, \emph{isc}, \emph{jsc}}{}
This subroutine extracts a named 2\sphinxhyphen{}D field from the ocean surface or public type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A pointer to the structure containing the internal ocean state (intent in).

\item {} 
\sphinxstylestrong{ocean} :: {[}in{]} A structure containing various publicly visible ocean surface fields.

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field to extract

\item {} 
\sphinxstylestrong{array2d} :: {[}out{]} The values of the named field, it must cover only the computational domain

\item {} 
\sphinxstylestrong{isc} :: {[}in{]} The starting i\sphinxhyphen{}index of array2D

\item {} 
\sphinxstylestrong{jsc} :: {[}in{]} The starting j\sphinxhyphen{}index of array2D

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_constants::celsius\_kelvin\_offset}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_data1d\_get() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_data1d\_get()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_data1d_get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_data1d\_get}}}{\emph{OS}, \emph{Ocean}, \emph{name}, \emph{value}}{}
This subroutine extracts a named scalar field from the ocean surface or public type.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A pointer to the structure containing the internal ocean state (intent in).

\item {} 
\sphinxstylestrong{ocean} :: {[}in{]} A structure containing various publicly visible ocean surface fields.

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the field to extract

\item {} 
\sphinxstylestrong{value} :: {[}out{]} The value of the named field

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_public\_type\_chksum() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_public\_type\_chksum()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_public_type_chksum}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_public\_type\_chksum}}}{\emph{id}, \emph{timestep}, \emph{ocn}}{}
Write out FMS\sphinxhyphen{}format checsums on fields from the ocean surface state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{id} :: {[}in{]} An identifying string for this call

\item {} 
\sphinxstylestrong{timestep} :: {[}in{]} The number of elapsed timesteps

\item {} 
\sphinxstylestrong{ocn} :: {[}in{]} A structure containing various publicly visible ocean surface fields.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_ocean\_grid() (fortran subroutine in module ocean\_model\_mod)@\spxentry{get\_ocean\_grid()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/get_ocean_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{get\_ocean\_grid}}}{\emph{OS}, \emph{Gridp}}{}
This subroutine gives a handle to the grid from ocean state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A structure containing the internal ocean state

\item {} 
\sphinxstylestrong{gridp} :: The ocean’s grid structure

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{ocean\_model\_get\_uv\_surf() (fortran subroutine in module ocean\_model\_mod)@\spxentry{ocean\_model\_get\_uv\_surf()}\spxextra{fortran subroutine in module ocean\_model\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ocean_model_mod:f/ocean_model_mod/ocean_model_get_uv_surf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ocean\_model\_mod/}}\sphinxbfcode{\sphinxupquote{ocean\_model\_get\_uv\_surf}}}{\emph{OS}, \emph{Ocean}, \emph{name}, \emph{array2D}, \emph{isc}, \emph{jsc}}{}
This subroutine extracts a named (u\sphinxhyphen{} or v\sphinxhyphen{}) 2\sphinxhyphen{}D surface current from ocean internal state.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{os} :: A pointer to the structure containing the internal ocean state (intent in).

\item {} 
\sphinxstylestrong{ocean} :: {[}in{]} A structure containing various publicly visible ocean surface fields.

\item {} 
\sphinxstylestrong{name} :: {[}in{]} The name of the current (ua or va) to extract

\item {} 
\sphinxstylestrong{array2d} :: {[}out{]} The values of the named field, it must cover only the computational domain

\item {} 
\sphinxstylestrong{isc} :: {[}in{]} The starting i\sphinxhyphen{}index of array2D

\item {} 
\sphinxstylestrong{jsc} :: {[}in{]} The starting j\sphinxhyphen{}index of array2D

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{oil\_tracer module reference}
\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer}}\label{\detokenize{api/generated/modules/oil_tracer:oil-tracer-module-reference}}\label{\detokenize{api/generated/modules/oil_tracer::doc}}\index{oil\_tracer (module)@\spxentry{oil\_tracer}\spxextra{module}|spxpagem}
A tracer package to mimic dissolved oil.

{\hyperref[\detokenize{api/generated/modules/oil_tracer:detaoil-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/oil_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer\_cs}}}}}
&
The control structure for the oil tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/oil_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_oil\_tracer()}}}}}
&
Register oil tracer fields and subroutines to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/initialize_oil_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_oil\_tracer()}}}}}
&
Initialize the oil tracers and set up tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer\_column\_physics()}}}}}
&
Apply sources, sinks, diapycnal mixing and rising motions to the oil tracers.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_stock()}}}}}
&
Calculate the mass\sphinxhyphen{}weighted integral of the oil tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{oil\_tracer\_end()}}}}}
&
Deallocate memory associated with this tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/oil_tracer:detailed-description}}\label{\detokenize{api/generated/modules/oil_tracer:detaoil-tracer}}
By Alistair Adcroft and Robert Hallberg, 2010 {\color{red}\bfseries{}*}.

Inline emphasis start\sphinxhyphen{}string without end\sphinxhyphen{}string.


In the midst of the Deepwater Horizon oil spill, it became evident that models were needed to predict the long\sphinxhyphen{}term fate of dissolved oil in the open ocean. This tracer packages mimics the transport, dilution and decay of dissolved oil plumes in the ocean.

This tracer package was central to the simulations used by Adcroft et al., GRL 2010, to prove that the Deepwater Horizon spill was an important regional event, with implications for dissolved oxygen levels in the Gulf of Mexico, but not one that would directly impact the East Coast of the U.S.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/oil_tracer:type-documentation}}\index{oil\_tracer\_cs (fortran type in module oil\_tracer)@\spxentry{oil\_tracer\_cs}\spxextra{fortran type in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{oil\_tracer\_cs}}}
The control structure for the oil tracer package.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of tracers that are actually used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The file in which the age\sphinxhyphen{}tracer initial values can be found, or an empty string for internal initialization.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{z\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, the IC\_file is in Z\sphinxhyphen{}space. The default is false.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_source\_longitude}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Latitude of source location (geographic)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_source\_latitude}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Longitude of source location (geographic)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_source\_i}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Local i of source location (computational)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_source\_j}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: Local j of source location (computational)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_source\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Rate of oil injection {[}kg T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} kg s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_start\_year}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The year in which tracers start aging, or at which the surface value equals young\_val, in years.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_end\_year}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The year in which tracers start aging, or at which the surface value equals young\_val, in years.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this subroutine, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ic\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The (uniform) initial condition value.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{young\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The value assigned to tr at the surface.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The value of tr used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{sfc\_growth\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: The exponential growth rate for the surface value {[}year\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_decay\_days}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: Decay time scale of oil {[}days{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_decay\_rate}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr\_max )}\sphinxstyleemphasis{{]}} :: Decay rate of oil {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]} calculated from oil\_decay\_days.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_source\_k}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr\_max )}\sphinxstyleemphasis{{]}} :: Layer of source.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{oil\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, oil tracers may be reset by the initialization code if they are not found in the restart files.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr\_max )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr\_max )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/oil_tracer:function-subroutine-documentation}}\index{register\_oil\_tracer() (fortran function in module oil\_tracer)@\spxentry{register\_oil\_tracer()}\spxextra{fortran function in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/register_oil_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_oil\_tracer}}}{\emph{HI}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register oil tracer fields and subroutines to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr\_max}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_oil\_tracer() (fortran subroutine in module oil\_tracer)@\spxentry{initialize\_oil\_tracer()}\spxextra{fortran subroutine in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/initialize_oil_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_oil\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{US}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}}{}
Initialize the oil tracers and set up tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_oil\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: Pointer to the control structure for the sponges.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_z_init:f/mom_tracer_z_init/tracer_z_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_z\_init::tracer\_z\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{oil\_tracer\_column\_physics() (fortran subroutine in module oil\_tracer)@\spxentry{oil\_tracer\_column\_physics()}\spxextra{fortran subroutine in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{oil\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{tv}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
Apply sources, sinks, diapycnal mixing and rising motions to the oil tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_oil\_tracer.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{oil\_stock() (fortran function in module oil\_tracer)@\spxentry{oil\_stock()}\spxextra{fortran function in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{oil\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Calculate the mass\sphinxhyphen{}weighted integral of the oil tracer stocks, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_oil\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} the names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} the units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} the coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{oil\_tracer\_surface\_state() (fortran subroutine in module oil\_tracer)@\spxentry{oil\_tracer\_surface\_state()}\spxextra{fortran subroutine in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{oil\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_oil\_tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{oil\_tracer\_end() (fortran subroutine in module oil\_tracer)@\spxentry{oil\_tracer\_end()}\spxextra{fortran subroutine in module oil\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/oil_tracer:f/oil_tracer/oil_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{oil\_tracer/}}\sphinxbfcode{\sphinxupquote{oil\_tracer\_end}}}{\emph{CS}}{}
Deallocate memory associated with this tracer package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_oil\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{p1m\_functions module reference}
\label{\detokenize{api/generated/modules/p1m_functions:f/p1m_functions}}\label{\detokenize{api/generated/modules/p1m_functions:p1m-functions-module-reference}}\label{\detokenize{api/generated/modules/p1m_functions::doc}}\index{p1m\_functions (module)@\spxentry{p1m\_functions}\spxextra{module}|spxpagem}
Linear interpolation functions.

{\hyperref[\detokenize{api/generated/modules/p1m_functions:detap1m-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/p1m_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_interpolation()}}}}}
&
Linearly interpolate between edge values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_boundary\_extrapolation()}}}}}
&
Interpolation by linear polynomials within boundary cells.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/p1m_functions:detailed-description}}\label{\detokenize{api/generated/modules/p1m_functions:detap1m-functions}}
Date of creation: 2008.06.09 L. White.

This module contains p1m (linear) interpolation routines.

p1m interpolation is performed by estimating the edge values and linearly interpolating between them.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/p1m_functions:function-subroutine-documentation}}\index{p1m\_interpolation() (fortran subroutine in module p1m\_functions)@\spxentry{p1m\_interpolation()}\spxextra{fortran subroutine in module p1m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_interpolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p1m\_functions/}}\sphinxbfcode{\sphinxupquote{p1m\_interpolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Linearly interpolate between edge values.

The resulting piecewise interpolant is stored in ‘ppoly’. See ‘ppoly.F90’ for a definition of this structure.

The edge values MUST have been estimated prior to calling this routine.

The estimated edge values must be limited to ensure monotonicity of the interpolant. We also make sure that edge values are NOT discontinuous.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Potentially modified edge values {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Potentially modified piecewise polynomial coefficients, mainly {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/average_discontinuous_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::average\_discontinuous\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/bound_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::bound\_edge\_values}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{p1m\_boundary\_extrapolation() (fortran subroutine in module p1m\_functions)@\spxentry{p1m\_boundary\_extrapolation()}\spxextra{fortran subroutine in module p1m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_boundary_extrapolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p1m\_functions/}}\sphinxbfcode{\sphinxupquote{p1m\_boundary\_extrapolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}}{}
Interpolation by linear polynomials within boundary cells.

The left and right edge values in the left and right boundary cells, respectively, are estimated using a linear extrapolation within the cells.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} edge values of piecewise polynomials {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} coefficients of piecewise polynomials, mainly {[}A{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{p3m\_functions module reference}
\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions}}\label{\detokenize{api/generated/modules/p3m_functions:p3m-functions-module-reference}}\label{\detokenize{api/generated/modules/p3m_functions::doc}}\index{p3m\_functions (module)@\spxentry{p3m\_functions}\spxextra{module}|spxpagem}
Cubic interpolation functions.

{\hyperref[\detokenize{api/generated/modules/p3m_functions:detap3m-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/p3m_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_interpolation()}}}}}
&
Set up a piecewise cubic interpolation from cell averages and estimated edge slopes and values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_limiter()}}}}}
&
Adust a piecewise cubic reconstruction with a limiter that adjusts the edge values and slopes.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_boundary\_extrapolation()}}}}}
&
Calculate the edge values and slopes at boundary cells as part of building a piecewise cubic sub\sphinxhyphen{}grid scale profiles.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/build_cubic_interpolant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_cubic\_interpolant()}}}}}
&
Build cubic interpolant in cell k.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/is_cubic_monotonic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_cubic\_monotonic()}}}}}
&
Check whether the cubic reconstruction in cell k is monotonic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/monotonize_cubic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{monotonize\_cubic()}}}}}
&
Monotonize a cubic curve by modifying the edge slopes.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/p3m_functions:detailed-description}}\label{\detokenize{api/generated/modules/p3m_functions:detap3m-functions}}
Date of creation: 2008.06.09 L. White.

This module contains p3m interpolation routines.

p3m interpolation is performed by estimating the edge values and slopes and constructing a cubic polynomial. We then make sure that the edge values are bounded and continuous and we then modify the slopes to get a monotonic cubic curve.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/p3m_functions:function-subroutine-documentation}}\index{p3m\_interpolation() (fortran subroutine in module p3m\_functions)@\spxentry{p3m\_interpolation()}\spxextra{fortran subroutine in module p3m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_interpolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p3m\_functions/}}\sphinxbfcode{\sphinxupquote{p3m\_interpolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_S}, \emph{ppoly\_coef}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Set up a piecewise cubic interpolation from cell averages and estimated edge slopes and values.

Cubic interpolation between edges.

The edge values and slopes MUST have been estimated prior to calling this routine.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_s} :: {[}inout{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_limiter}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{p3m\_limiter() (fortran subroutine in module p3m\_functions)@\spxentry{p3m\_limiter()}\spxextra{fortran subroutine in module p3m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p3m\_functions/}}\sphinxbfcode{\sphinxupquote{p3m\_limiter}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_S}, \emph{ppoly\_coef}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Adust a piecewise cubic reconstruction with a limiter that adjusts the edge values and slopes.

The p3m limiter operates as follows:
\begin{enumerate}
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
\item {} 
Edge values are bounded

\item {} 
Discontinuous edge values are systematically averaged

\item {} 
Loop on cells and do the following a. Build cubic curve b. Check if cubic curve is monotonic c. If not, monotonize cubic curve and rebuild it

\end{enumerate}

Step 3 of the monotonization process leaves all edge values unchanged.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_s} :: {[}inout{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/average_discontinuous_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::average\_discontinuous\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/bound_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::bound\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/build_cubic_interpolant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_cubic\_interpolant}}}}} \sphinxcode{\sphinxupquote{hneglect\_dflt}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/is_cubic_monotonic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_cubic\_monotonic}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/monotonize_cubic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{monotonize\_cubic}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_interpolation}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{p3m\_boundary\_extrapolation() (fortran subroutine in module p3m\_functions)@\spxentry{p3m\_boundary\_extrapolation()}\spxextra{fortran subroutine in module p3m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_boundary_extrapolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p3m\_functions/}}\sphinxbfcode{\sphinxupquote{p3m\_boundary\_extrapolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_S}, \emph{ppoly\_coef}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Calculate the edge values and slopes at boundary cells as part of building a piecewise cubic sub\sphinxhyphen{}grid scale profiles.

The following explanations apply to the left boundary cell. The same reasoning holds for the right boundary cell.

A cubic needs to be built in the cell and requires four degrees of freedom, which are the edge values and slopes. The right edge values and slopes are taken to be that of the neighboring cell (i.e., the left edge value and slope of the neighboring cell). The left edge value and slope are determined by computing the parabola based on the cell average and the right edge value and slope. The resulting cubic is not necessarily monotonic and the slopes are subsequently modified to yield a monotonic cubic.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_s} :: {[}inout{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of finding edge values {[}H{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/build_cubic_interpolant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_cubic\_interpolant}}}}} \sphinxcode{\sphinxupquote{hneglect\_dflt}} \sphinxcode{\sphinxupquote{hneglect\_edge\_dflt}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/is_cubic_monotonic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_cubic\_monotonic}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/monotonize_cubic}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{monotonize\_cubic}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_cubic\_interpolant() (fortran subroutine in module p3m\_functions)@\spxentry{build\_cubic\_interpolant()}\spxextra{fortran subroutine in module p3m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/build_cubic_interpolant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p3m\_functions/}}\sphinxbfcode{\sphinxupquote{build\_cubic\_interpolant}}}{\emph{h}, \emph{k}, \emph{edge\_values}, \emph{ppoly\_S}, \emph{ppoly\_coef}}{}
Build cubic interpolant in cell k.

Given edge values and edge slopes, compute coefficients of cubic in cell k.

NOTE: edge values and slopes MUST have been properly calculated prior to calling this routine.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The index of the cell to work on

\item {} 
\sphinxstylestrong{edge\_values} :: {[}in{]} Edge value of polynomial in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_s} :: {[}in{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial {[}A{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_limiter}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{is\_cubic\_monotonic() (fortran function in module p3m\_functions)@\spxentry{is\_cubic\_monotonic()}\spxextra{fortran function in module p3m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/is_cubic_monotonic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{p3m\_functions/}}\sphinxbfcode{\sphinxupquote{is\_cubic\_monotonic}}}{\emph{ppoly\_coef}, \emph{k}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Check whether the cubic reconstruction in cell k is monotonic.

This function checks whether the cubic curve in cell k is monotonic. If so, returns 1. Otherwise, returns 0.

The cubic is monotonic if the first derivative is single\sphinxhyphen{}signed in (0,1). Hence, we check whether the roots (if any) lie inside this interval. If there is no root or if both roots lie outside this interval, the cubic is monotonic.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}in{]} Coefficients of cubic polynomial in arbitary units {[}A{]}

\item {} 
\sphinxstylestrong{k} :: {[}in{]} The index of the cell to work on

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_limiter}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{monotonize\_cubic() (fortran subroutine in module p3m\_functions)@\spxentry{monotonize\_cubic()}\spxextra{fortran subroutine in module p3m\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/monotonize_cubic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{p3m\_functions/}}\sphinxbfcode{\sphinxupquote{monotonize\_cubic}}}{\emph{h}, \emph{u0\_l}, \emph{u0\_r}, \emph{sigma\_l}, \emph{sigma\_r}, \emph{slope}, \emph{u1\_l}, \emph{u1\_r}}{}
Monotonize a cubic curve by modifying the edge slopes.

This routine takes care of monotonizing a cubic on {[}0,1{]} by modifying the edge slopes. The edge values are NOT modified. The cubic is entirely determined by the four degrees of freedom u0\_l, u0\_r, u1\_l and u1\_r.

u1\_l and u1\_r are the edge slopes expressed in the GLOBAL coordinate system.

The monotonization occurs as follows.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell width {[}H{]}

\item {} 
\sphinxstylestrong{u0\_l} :: {[}in{]} left edge value in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{u0\_r} :: {[}in{]} right edge value {[}A{]}

\item {} 
\sphinxstylestrong{sigma\_l} :: {[}in{]} left 2nd\sphinxhyphen{}order slopes {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{sigma\_r} :: {[}in{]} right 2nd\sphinxhyphen{}order slopes {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{slope} :: {[}in{]} limited PLM slope {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{u1\_l} :: {[}inout{]} left edge slopes {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{u1\_r} :: {[}inout{]} right edge slopes {[}A H\sphinxhyphen{}1{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_limiter}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{PCM\_functions module reference}
\label{\detokenize{api/generated/modules/PCM_functions:f/PCM_functions}}\label{\detokenize{api/generated/modules/PCM_functions:pcm-functions-module-reference}}\label{\detokenize{api/generated/modules/PCM_functions::doc}}\index{PCM\_functions (module)@\spxentry{PCM\_functions}\spxextra{module}|spxpagem}
Date of creation: 2008.06.06 L. White.

{\hyperref[\detokenize{api/generated/modules/PCM_functions:detapcm-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/PCM_functions:detailed-description}}\label{\detokenize{api/generated/modules/PCM_functions:detapcm-functions}}
This module contains routines that handle one\sphinxhyphen{}dimensionnal finite volume reconstruction using the piecewise constant method (PCM).


\subsection{pcm\_functions module reference}
\label{\detokenize{api/generated/modules/pcm_functions:f/pcm_functions}}\label{\detokenize{api/generated/modules/pcm_functions:pcm-functions-module-reference}}\label{\detokenize{api/generated/modules/pcm_functions::doc}}\index{pcm\_functions (module)@\spxentry{pcm\_functions}\spxextra{module}|spxpagem}
Piecewise constant reconstruction functions.

{\hyperref[\detokenize{api/generated/modules/pcm_functions:detapcm-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/pcm_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/pcm_functions:f/pcm_functions/pcm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcm\_reconstruction()}}}}}
&
Reconstruction by constant polynomials within each cell.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/pcm_functions:detailed-description}}\label{\detokenize{api/generated/modules/pcm_functions:detapcm-functions}}
Piecewise constant reconstruction functions.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/pcm_functions:function-subroutine-documentation}}\index{pcm\_reconstruction() (fortran subroutine in module pcm\_functions)@\spxentry{pcm\_reconstruction()}\spxextra{fortran subroutine in module pcm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pcm_functions:f/pcm_functions/pcm_reconstruction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pcm\_functions/}}\sphinxbfcode{\sphinxupquote{pcm\_reconstruction}}}{\emph{N}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}}{}
Reconstruction by constant polynomials within each cell. There is nothing to do but this routine is provided to ensure a homogeneous interface throughout the regridding toolbox.

It is assumed that the dimension of ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial, with the same units as u.

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial, with the same units as u.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{phillips\_initialization module reference}
\label{\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization}}\label{\detokenize{api/generated/modules/phillips_initialization:phillips-initialization-module-reference}}\label{\detokenize{api/generated/modules/phillips_initialization::doc}}\index{phillips\_initialization (module)@\spxentry{phillips\_initialization}\spxextra{module}|spxpagem}
Initialization for the “Phillips” channel configuration.

{\hyperref[\detokenize{api/generated/modules/phillips_initialization:detaphillips-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/phillips_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialize\_thickness()}}}}}
&
Initialize the thickness field for the Phillips model test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialize\_velocity()}}}}}
&
Initialize the velocity fields for the Phillips model test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialize\_sponges()}}}}}
&
Sets up the the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge for the Phillips model test case.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/sech}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sech()}}}}}
&
sech calculates the hyperbolic secant.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialize\_topography()}}}}}
&
Initialize topography.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/phillips_initialization:detailed-description}}\label{\detokenize{api/generated/modules/phillips_initialization:detaphillips-initialization}}
By Robert Hallberg, April 1994 \sphinxhyphen{} June 2002.

This subroutine initializes the fields for the simulations. The one argument passed to initialize, Time, is set to the current time of the simulation. The fields which are initialized here are: u \sphinxhyphen{} Zonal velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. v \sphinxhyphen{} Meridional velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}. h \sphinxhyphen{} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]} (must be positive) D \sphinxhyphen{} Basin depth {[}Z \textasciitilde{}\textgreater{} m{]} (positive downward) f \sphinxhyphen{} The Coriolis parameter {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}. If ENABLE\_THERMODYNAMICS is defined: T \sphinxhyphen{} Temperature {[}degC{]}. S \sphinxhyphen{} Salinity {[}ppt{]}. If SPONGE is defined: A series of subroutine calls are made to set up the damping rates and reference profiles for all variables that are damped in the sponge. Any user provided tracer code is also first linked through this subroutine.

Forcing\sphinxhyphen{}related fields (taux, tauy, buoy, ustar, etc.) are set in \sphinxcode{\sphinxupquote{MOM\_surface\_forcing.F90}}
.

These variables are all set in the set of subroutines (in this file) Phillips\_initialize\_thickness, Phillips\_initialize\_velocity, Phillips\_initialize\_topography and Phillips\_initialize\_sponges that seet up fields that are specific to the Phillips instability test case.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/phillips_initialization:function-subroutine-documentation}}\index{phillips\_initialize\_thickness() (fortran subroutine in module phillips\_initialization)@\spxentry{phillips\_initialize\_thickness()}\spxextra{fortran subroutine in module phillips\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{phillips\_initialization/}}\sphinxbfcode{\sphinxupquote{phillips\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialize the thickness field for the Phillips model test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{phillips\_initialize\_velocity() (fortran subroutine in module phillips\_initialization)@\spxentry{phillips\_initialize\_velocity()}\spxextra{fortran subroutine in module phillips\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_velocity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{phillips\_initialization/}}\sphinxbfcode{\sphinxupquote{phillips\_initialize\_velocity}}}{\emph{u}, \emph{v}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialize the velocity fields for the Phillips model test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} i\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} j\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for modelparameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/sech}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sech}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{phillips\_initialize\_sponges() (fortran subroutine in module phillips\_initialization)@\spxentry{phillips\_initialize\_sponges()}\spxextra{fortran subroutine in module phillips\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{phillips\_initialization/}}\sphinxbfcode{\sphinxupquote{phillips\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{param\_file}, \emph{CSp}, \emph{h}}{}
Sets up the the inverse restoration time (Idamp), and the values towards which the interface heights and an arbitrary number of tracers should be restored within each sponge for the Phillips model test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{csp} :: A pointer that is set to point to the control structure for the sponge module.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Thickness field {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/initialize_sponge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::initialize\_sponge}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sech() (fortran function in module phillips\_initialization)@\spxentry{sech()}\spxextra{fortran function in module phillips\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/sech}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{phillips\_initialization/}}\sphinxbfcode{\sphinxupquote{sech}}}{\emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
sech calculates the hyperbolic secant.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{x} :: {[}in{]} Input value.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Result.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phillips\_initialize\_velocity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{phillips\_initialize\_topography() (fortran subroutine in module phillips\_initialization)@\spxentry{phillips\_initialize\_topography()}\spxextra{fortran subroutine in module phillips\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/phillips_initialization:f/phillips_initialization/phillips_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{phillips\_initialization/}}\sphinxbfcode{\sphinxupquote{phillips\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
Initialize topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{plm\_functions module reference}
\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions}}\label{\detokenize{api/generated/modules/plm_functions:plm-functions-module-reference}}\label{\detokenize{api/generated/modules/plm_functions::doc}}\index{plm\_functions (module)@\spxentry{plm\_functions}\spxextra{module}|spxpagem}
Piecewise linear reconstruction functions.

{\hyperref[\detokenize{api/generated/modules/plm_functions:detaplm-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/plm_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_slope_wa}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_slope\_wa()}}}}}
&
Returns a limited PLM slope following White and Adcroft, 2008.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_slope_cw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_slope\_cw()}}}}}
&
Returns a limited PLM slope following Colella and Woodward 1984.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_monotonized_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_monotonized\_slope()}}}}}
&
Returns a limited PLM slope following Colella and Woodward 1984.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_extrapolate_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_extrapolate\_slope()}}}}}
&
Returns a PLM slope using h2 extrapolation from a cell to the left.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_reconstruction()}}}}}
&
Reconstruction by linear polynomials within each cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_boundary\_extrapolation()}}}}}
&
Reconstruction by linear polynomials within boundary cells.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/plm_functions:detailed-description}}\label{\detokenize{api/generated/modules/plm_functions:detaplm-functions}}
Date of creation: 2008.06.06 L. White.

This module contains routines that handle one\sphinxhyphen{}dimensionnal finite volume reconstruction using the piecewise linear method (PLM).


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/plm_functions:function-subroutine-documentation}}\index{plm\_slope\_wa() (fortran function in module plm\_functions)@\spxentry{plm\_slope\_wa()}\spxextra{fortran function in module plm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_slope_wa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{plm\_functions/}}\sphinxbfcode{\sphinxupquote{plm\_slope\_wa}}}{\emph{h\_l}, \emph{h\_c}, \emph{h\_r}, \emph{h\_neglect}, \emph{u\_l}, \emph{u\_c}, \emph{u\_r}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{pure}\sphinxstyleemphasis{{]}}}
Returns a limited PLM slope following White and Adcroft, 2008. {[}units of u{]} Note that this is not the same as the Colella and Woodward method.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Thickness of left cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_c} :: {[}in{]} Thickness of center cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Thickness of right cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligible thickness {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{u\_l} :: {[}in{]} Value of left cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_c} :: {[}in{]} Value of center cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_r} :: {[}in{]} Value of right cell {[}units of u{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_plm\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_reconstruction}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{plm\_slope\_cw() (fortran function in module plm\_functions)@\spxentry{plm\_slope\_cw()}\spxextra{fortran function in module plm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_slope_cw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{plm\_functions/}}\sphinxbfcode{\sphinxupquote{plm\_slope\_cw}}}{\emph{h\_l}, \emph{h\_c}, \emph{h\_r}, \emph{h\_neglect}, \emph{u\_l}, \emph{u\_c}, \emph{u\_r}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{pure}\sphinxstyleemphasis{{]}}}
Returns a limited PLM slope following Colella and Woodward 1984.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Thickness of left cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_c} :: {[}in{]} Thickness of center cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_r} :: {[}in{]} Thickness of right cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligible thickness {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{u\_l} :: {[}in{]} Value of left cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_c} :: {[}in{]} Value of center cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_r} :: {[}in{]} Value of right cell {[}units of u{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{plm\_monotonized\_slope() (fortran function in module plm\_functions)@\spxentry{plm\_monotonized\_slope()}\spxextra{fortran function in module plm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_monotonized_slope}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{plm\_functions/}}\sphinxbfcode{\sphinxupquote{plm\_monotonized\_slope}}}{\emph{u\_l}, \emph{u\_c}, \emph{u\_r}, \emph{s\_l}, \emph{s\_c}, \emph{s\_r}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{pure}\sphinxstyleemphasis{{]}}}
Returns a limited PLM slope following Colella and Woodward 1984.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{u\_l} :: {[}in{]} Value of left cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_c} :: {[}in{]} Value of center cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_r} :: {[}in{]} Value of right cell {[}units of u{]}

\item {} 
\sphinxstylestrong{s\_l} :: {[}in{]} PLM slope of left cell {[}units of u{]}

\item {} 
\sphinxstylestrong{s\_c} :: {[}in{]} PLM slope of center cell {[}units of u{]}

\item {} 
\sphinxstylestrong{s\_r} :: {[}in{]} PLM slope of right cell {[}units of u{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_plm\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_reconstruction}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{plm\_extrapolate\_slope() (fortran function in module plm\_functions)@\spxentry{plm\_extrapolate\_slope()}\spxextra{fortran function in module plm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_extrapolate_slope}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{plm\_functions/}}\sphinxbfcode{\sphinxupquote{plm\_extrapolate\_slope}}}{\emph{h\_l}, \emph{h\_c}, \emph{h\_neglect}, \emph{u\_l}, \emph{u\_c}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{pure}\sphinxstyleemphasis{{]}}}
Returns a PLM slope using h2 extrapolation from a cell to the left. Use the negative to extrapolate from the a cell to the right.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{h\_l} :: {[}in{]} Thickness of left cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_c} :: {[}in{]} Thickness of center cell {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligible thickness {[}units of grid thickness{]}

\item {} 
\sphinxstylestrong{u\_l} :: {[}in{]} Value of left cell {[}units of u{]}

\item {} 
\sphinxstylestrong{u\_c} :: {[}in{]} Value of center cell {[}units of u{]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ale_plm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ale\_plm\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_boundary\_extrapolation}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{plm\_reconstruction() (fortran subroutine in module plm\_functions)@\spxentry{plm\_reconstruction()}\spxextra{fortran subroutine in module plm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{plm\_functions/}}\sphinxbfcode{\sphinxupquote{plm\_reconstruction}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}, \emph{h\_neglect}}{}
Reconstruction by linear polynomials within each cell.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N)

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N)

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} edge values of piecewise polynomials, with the same units as u.

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} coefficients of piecewise polynomials, mainly with the same units as u.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_monotonized_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_monotonized\_slope}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_slope_wa}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_slope\_wa}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_unit\_tests}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{plm\_boundary\_extrapolation() (fortran subroutine in module plm\_functions)@\spxentry{plm\_boundary\_extrapolation()}\spxextra{fortran subroutine in module plm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_boundary_extrapolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{plm\_functions/}}\sphinxbfcode{\sphinxupquote{plm\_boundary\_extrapolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}, \emph{h\_neglect}}{}
Reconstruction by linear polynomials within boundary cells.

The left and right edge values in the left and right boundary cells, respectively, are estimated using a linear extrapolation within the cells.

This extrapolation is EXACT when the underlying profile is linear.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N)

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N)

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} edge values of piecewise polynomials, with the same units as u.

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} coefficients of piecewise polynomials, mainly with the same units as u.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions in the same units as h

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_extrapolate_slope}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_extrapolate\_slope}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{polynomial\_functions module reference}
\label{\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions}}\label{\detokenize{api/generated/modules/polynomial_functions:polynomial-functions-module-reference}}\label{\detokenize{api/generated/modules/polynomial_functions::doc}}\index{polynomial\_functions (module)@\spxentry{polynomial\_functions}\spxextra{module}|spxpagem}
Polynomial functions.

{\hyperref[\detokenize{api/generated/modules/polynomial_functions:detapolynomial-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/polynomial_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{evaluation\_polynomial()}}}}}
&
Pointwise evaluation of a polynomial at x.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/first_derivative_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{first\_derivative\_polynomial()}}}}}
&
Calculates the first derivative of a polynomial evaluated at a point x.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/integration_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{integration\_polynomial()}}}}}
&
Exact integration of polynomial of degree npoly.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/polynomial_functions:detailed-description}}\label{\detokenize{api/generated/modules/polynomial_functions:detapolynomial-functions}}
Date of creation: 2008.06.12 L. White.

This module contains routines that handle polynomials.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/polynomial_functions:function-subroutine-documentation}}\index{evaluation\_polynomial() (fortran function in module polynomial\_functions)@\spxentry{evaluation\_polynomial()}\spxextra{fortran function in module polynomial\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{polynomial\_functions/}}\sphinxbfcode{\sphinxupquote{evaluation\_polynomial}}}{\emph{coeff}, \emph{ncoef}, \emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Pointwise evaluation of a polynomial at x.

The polynomial is defined by the coefficients contained in the array of the same name, as follows: C(1) + C(2)x + C(3)x\textasciicircum{}2 + C(4)x\textasciicircum{}3 + … where C refers to the array ‘coeff’. The number of coefficients is given by ncoef and x is the coordinate where the polynomial is to be evaluated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{coeff} :: {[}in{]} The coefficients of the polynomial

\item {} 
\sphinxstylestrong{ncoef} :: {[}in{]} The number of polynomial coefficients

\item {} 
\sphinxstylestrong{x} :: {[}in{]} The position at which to evaluate the polynomial

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_explicit\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_implicit\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h6}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_implicit\_h6}}}}} {\hyperref[\detokenize{api/generated/modules/mom_neutral_diffusion:f/mom_neutral_diffusion/neutral_diffusion_calc_coeffs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_neutral\_diffusion::neutral\_diffusion\_calc\_coeffs}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{first\_derivative\_polynomial() (fortran function in module polynomial\_functions)@\spxentry{first\_derivative\_polynomial()}\spxextra{fortran function in module polynomial\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/first_derivative_polynomial}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{polynomial\_functions/}}\sphinxbfcode{\sphinxupquote{first\_derivative\_polynomial}}}{\emph{coeff}, \emph{ncoef}, \emph{x}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Calculates the first derivative of a polynomial evaluated at a point x.

The polynomial is defined by the coefficients contained in the array of the same name, as follows: C(1) + C(2)x + C(3)x\textasciicircum{}2 + C(4)x\textasciicircum{}3 + … where C refers to the array ‘coeff’. The number of coefficients is given by ncoef and x is the coordinate where the polynomial’s derivative is to be evaluated.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{coeff} :: {[}in{]} The coefficients of the polynomial

\item {} 
\sphinxstylestrong{ncoef} :: {[}in{]} The number of polynomial coefficients

\item {} 
\sphinxstylestrong{x} :: {[}in{]} The position at which to evaluate the derivative

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{integration\_polynomial() (fortran function in module polynomial\_functions)@\spxentry{integration\_polynomial()}\spxextra{fortran function in module polynomial\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/integration_polynomial}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{polynomial\_functions/}}\sphinxbfcode{\sphinxupquote{integration\_polynomial}}}{\emph{xi0}, \emph{xi1}, \emph{Coeff}, \emph{npoly}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Exact integration of polynomial of degree npoly.

The array of coefficients (Coeff) must be of size npoly+1.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{xi0} :: {[}in{]} The lower bound of the integral

\item {} 
\sphinxstylestrong{xi1} :: {[}in{]} The lower bound of the integral

\item {} 
\sphinxstylestrong{coeff} :: {[}in{]} The coefficients of the polynomial

\item {} 
\sphinxstylestrong{npoly} :: {[}in{]} The degree of the polynomial

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{ppm\_functions module reference}
\label{\detokenize{api/generated/modules/ppm_functions:f/ppm_functions}}\label{\detokenize{api/generated/modules/ppm_functions:ppm-functions-module-reference}}\label{\detokenize{api/generated/modules/ppm_functions::doc}}\index{ppm\_functions (module)@\spxentry{ppm\_functions}\spxextra{module}|spxpagem}
Provides functions used with the Piecewise\sphinxhyphen{}Parabolic\sphinxhyphen{}Method in the vertical ALE algorithm.

{\hyperref[\detokenize{api/generated/modules/ppm_functions:detappm-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/ppm_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction()}}}}}
&
Builds quadratic polynomials coefficients from cell mean and edge values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_limiter_standard}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limiter\_standard()}}}}}
&
Adjusts edge values using the standard PPM limiter (Colella \& Woodward, JCP 1984) after first checking that the edge values are bounded by neighbors cell averages and that the edge values are monotonic between cell averages.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_boundary\_extrapolation()}}}}}
&
Reconstruction by parabolas within boundary cells.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/ppm_functions:detailed-description}}\label{\detokenize{api/generated/modules/ppm_functions:detappm-functions}}
Provides functions used with the Piecewise\sphinxhyphen{}Parabolic\sphinxhyphen{}Method in the vertical ALE algorithm.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/ppm_functions:function-subroutine-documentation}}\index{ppm\_reconstruction() (fortran subroutine in module ppm\_functions)@\spxentry{ppm\_reconstruction()}\spxextra{fortran subroutine in module ppm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ppm\_functions/}}\sphinxbfcode{\sphinxupquote{ppm\_reconstruction}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Builds quadratic polynomials coefficients from cell mean and edge values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Cell averages {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge values {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Polynomial coefficients, mainly {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_limiter_standard}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_limiter\_standard}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_ppm\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_limiter\_standard() (fortran subroutine in module ppm\_functions)@\spxentry{ppm\_limiter\_standard()}\spxextra{fortran subroutine in module ppm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_limiter_standard}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ppm\_functions/}}\sphinxbfcode{\sphinxupquote{ppm\_limiter\_standard}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Adjusts edge values using the standard PPM limiter (Colella \& Woodward, JCP 1984) after first checking that the edge values are bounded by neighbors cell averages and that the edge values are monotonic between cell averages.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Potentially modified edge values {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/bound_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::bound\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/check_discontinuous_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::check\_discontinuous\_edge\_values}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_reconstruction}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ppm\_boundary\_extrapolation() (fortran subroutine in module ppm\_functions)@\spxentry{ppm\_boundary\_extrapolation()}\spxextra{fortran subroutine in module ppm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_boundary_extrapolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{ppm\_functions/}}\sphinxbfcode{\sphinxupquote{ppm\_boundary\_extrapolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}, \emph{h\_neglect}}{}
Reconstruction by parabolas within boundary cells.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} edge values of piecewise polynomials {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} coefficients of piecewise polynomials, mainly {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}} {\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/remapping_unit_tests}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::remapping\_unit\_tests}}}}} {\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_ppm\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{pqm\_functions module reference}
\label{\detokenize{api/generated/modules/pqm_functions:f/pqm_functions}}\label{\detokenize{api/generated/modules/pqm_functions:pqm-functions-module-reference}}\label{\detokenize{api/generated/modules/pqm_functions::doc}}\index{pqm\_functions (module)@\spxentry{pqm\_functions}\spxextra{module}|spxpagem}
Piecewise quartic reconstruction functions.

{\hyperref[\detokenize{api/generated/modules/pqm_functions:detapqm-functions}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/pqm_functions:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_reconstruction()}}}}}
&
Reconstruction by quartic polynomials within each cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_limiter()}}}}}
&
Limit the piecewise quartic method reconstruction.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_boundary\_extrapolation()}}}}}
&
Reconstruction by parabolas within boundary cells.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_boundary_extrapolation_v1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_boundary\_extrapolation\_v1()}}}}}
&
Reconstruction by parabolas within boundary cells.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/pqm_functions:detailed-description}}\label{\detokenize{api/generated/modules/pqm_functions:detapqm-functions}}
Date of creation: 2008.06.06 L. White.

This module contains routines that handle one\sphinxhyphen{}dimensionnal finite volume reconstruction using the piecewise quartic method (PQM).


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/pqm_functions:function-subroutine-documentation}}\index{pqm\_reconstruction() (fortran subroutine in module pqm\_functions)@\spxentry{pqm\_reconstruction()}\spxextra{fortran subroutine in module pqm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_reconstruction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pqm\_functions/}}\sphinxbfcode{\sphinxupquote{pqm\_reconstruction}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{edge\_slopes}, \emph{ppoly\_coef}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Reconstruction by quartic polynomials within each cell.

It is assumed that the dimension of ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{edge\_slopes} :: {[}inout{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial, mainly {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_limiter}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pqm\_limiter() (fortran subroutine in module pqm\_functions)@\spxentry{pqm\_limiter()}\spxextra{fortran subroutine in module pqm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_limiter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pqm\_functions/}}\sphinxbfcode{\sphinxupquote{pqm\_limiter}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{edge\_slopes}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Limit the piecewise quartic method reconstruction.

Standard PQM limiter (White \& Adcroft, JCP 2008).

It is assumed that the dimension of ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Potentially modified edge values {[}A{]}

\item {} 
\sphinxstylestrong{edge\_slopes} :: {[}inout{]} Potentially modified edge slopes {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/bound_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::bound\_edge\_values}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/check_discontinuous_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::check\_discontinuous\_edge\_values}}}}} \sphinxcode{\sphinxupquote{hneglect\_dflt}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_reconstruction}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pqm\_boundary\_extrapolation() (fortran subroutine in module pqm\_functions)@\spxentry{pqm\_boundary\_extrapolation()}\spxextra{fortran subroutine in module pqm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_boundary_extrapolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pqm\_functions/}}\sphinxbfcode{\sphinxupquote{pqm\_boundary\_extrapolation}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{ppoly\_coef}}{}
Reconstruction by parabolas within boundary cells.

The following explanations apply to the left boundary cell. The same reasoning holds for the right boundary cell.

A parabola needs to be built in the cell and requires three degrees of freedom, which are the right edge value and slope and the cell average. The right edge values and slopes are taken to be that of the neighboring cell (i.e., the left edge value and slope of the neighboring cell). The resulting parabola is not necessarily monotonic and the traditional PPM limiter is used to modify one of the edge values in order to yield a monotonic parabola.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial, mainly {[}A{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{pqm\_boundary\_extrapolation\_v1() (fortran subroutine in module pqm\_functions)@\spxentry{pqm\_boundary\_extrapolation\_v1()}\spxextra{fortran subroutine in module pqm\_functions}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_boundary_extrapolation_v1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pqm\_functions/}}\sphinxbfcode{\sphinxupquote{pqm\_boundary\_extrapolation\_v1}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_values}, \emph{edge\_slopes}, \emph{ppoly\_coef}, \emph{h\_neglect}}{}
Reconstruction by parabolas within boundary cells.

The following explanations apply to the left boundary cell. The same reasoning holds for the right boundary cell.

A parabola needs to be built in the cell and requires three degrees of freedom, which are the right edge value and slope and the cell average. The right edge values and slopes are taken to be that of the neighboring cell (i.e., the left edge value and slope of the neighboring cell). The resulting parabola is not necessarily monotonic and the traditional PPM limiter is used to modify one of the edge values in order to yield a monotonic parabola.

It is assumed that the size of the array ‘u’ is equal to the number of cells defining ‘grid’ and ‘ppoly’. No consistency check is performed here.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths (size N) {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages (size N) {[}A{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{edge\_slopes} :: {[}inout{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly\_coef} :: {[}inout{]} Coefficients of polynomial, mainly {[}A{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]}

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{pseudo\_salt\_tracer module reference}
\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer}}\label{\detokenize{api/generated/modules/pseudo_salt_tracer:pseudo-salt-tracer-module-reference}}\label{\detokenize{api/generated/modules/pseudo_salt_tracer::doc}}\index{pseudo\_salt\_tracer (module)@\spxentry{pseudo\_salt\_tracer}\spxextra{module}|spxpagem}
A tracer package that mimics salinity.

{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:detapseudo-salt-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/pseudo_salt_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer\_cs}}}}}
&
The control structure for the pseudo\sphinxhyphen{}salt tracer.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/pseudo_salt_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/register_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_pseudo\_salt\_tracer()}}}}}
&
Register the pseudo\sphinxhyphen{}salt tracer with MOM6.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/initialize_pseudo_salt_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_pseudo\_salt\_tracer()}}}}}
&
Initialize the pseudo\sphinxhyphen{}salt tracer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer\_column\_physics()}}}}}
&
Apply sources, sinks and diapycnal diffusion to the tracers in this package.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_stock()}}}}}
&
Calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer\_end()}}}}}
&
Deallocate memory associated with this tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/pseudo_salt_tracer:detailed-description}}\label{\detokenize{api/generated/modules/pseudo_salt_tracer:detapseudo-salt-tracer}}
By Andrew Shao, 2016.

This file contains the routines necessary to model a passive tracer that uses the same boundary fluxes as salinity. At the beginning of the run, salt is set to the same as tvS. Any deviations between this salt\sphinxhyphen{}like tracer and tvS signifies a difference between how active and passive tracers are treated.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/pseudo_salt_tracer:type-documentation}}\index{pseudo\_salt\_tracer\_cs (fortran type in module pseudo\_salt\_tracer)@\spxentry{pseudo\_salt\_tracer\_cs}\spxextra{fortran type in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_tracer\_cs}}}
The control structure for the pseudo\sphinxhyphen{}salt tracer.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the MOM tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ps}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of pseudo\sphinxhyphen{}salt tracer used in this subroutine {[}ppt\}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diff}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The difference between the pseudo\sphinxhyphen{}salt tracer and the real salt {[}ppt{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Hard coding since this should not matter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{id\_psd}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: A diagnostic ID.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)}\sphinxstyleemphasis{{]}} :: A description and metadata for the pseudo\sphinxhyphen{}salt tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/pseudo_salt_tracer:function-subroutine-documentation}}\index{register\_pseudo\_salt\_tracer() (fortran function in module pseudo\_salt\_tracer)@\spxentry{register\_pseudo\_salt\_tracer()}\spxextra{fortran function in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/register_pseudo_salt_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_pseudo\_salt\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Register the pseudo\sphinxhyphen{}salt tracer with MOM6.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_pseudo\_salt\_tracer.

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_pseudo\_salt\_tracer() (fortran subroutine in module pseudo\_salt\_tracer)@\spxentry{initialize\_pseudo\_salt\_tracer()}\spxextra{fortran subroutine in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/initialize_pseudo_salt_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_pseudo\_salt\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}, \emph{tv}}{}
Initialize the pseudo\sphinxhyphen{}salt tracer.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_pseudo\_salt\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: Pointer to the control structure for the sponges.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pseudo\_salt\_tracer\_column\_physics() (fortran subroutine in module pseudo\_salt\_tracer)@\spxentry{pseudo\_salt\_tracer\_column\_physics()}\spxextra{fortran subroutine in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{tv}, \emph{debug}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
Apply sources, sinks and diapycnal diffusion to the tracers in this package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_pseudo\_salt\_tracer.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure pointing to various thermodynamic variables

\item {} 
\sphinxstylestrong{debug} :: {[}in{]} If true calculate checksums

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pseudo\_salt\_stock() (fortran function in module pseudo\_salt\_tracer)@\spxentry{pseudo\_salt\_stock()}\spxextra{fortran function in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_pseudo\_salt\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} The names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} The coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value: the number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{pseudo\_salt\_tracer\_surface\_state() (fortran subroutine in module pseudo\_salt\_tracer)@\spxentry{pseudo\_salt\_tracer\_surface\_state()}\spxextra{fortran subroutine in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_pseudo\_salt\_tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{pseudo\_salt\_tracer\_end() (fortran subroutine in module pseudo\_salt\_tracer)@\spxentry{pseudo\_salt\_tracer\_end()}\spxextra{fortran subroutine in module pseudo\_salt\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/pseudo_salt_tracer:f/pseudo_salt_tracer/pseudo_salt_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{pseudo\_salt\_tracer/}}\sphinxbfcode{\sphinxupquote{pseudo\_salt\_tracer\_end}}}{\emph{CS}}{}
Deallocate memory associated with this tracer package.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_pseudo\_salt\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{regional\_dyes module reference}
\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes}}\label{\detokenize{api/generated/modules/regional_dyes:regional-dyes-module-reference}}\label{\detokenize{api/generated/modules/regional_dyes::doc}}\index{regional\_dyes (module)@\spxentry{regional\_dyes}\spxextra{module}|spxpagem}
A tracer package for using dyes to diagnose regional flows.

{\hyperref[\detokenize{api/generated/modules/regional_dyes:detaregional-dyes}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/regional_dyes:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dye\_tracer\_cs}}}}}
&
The control structure for the regional dyes tracer package.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/regional_dyes:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_dye\_tracer()}}}}}
&
This subroutine is used to register tracer fields and subroutines to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/initialize_dye_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_dye\_tracer()}}}}}
&
This subroutine initializes the CSntr tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dye\_tracer\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dye\_stock()}}}}}
&
This function calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dye\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/regional_dyes_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regional\_dyes\_end()}}}}}
&
Clean up any allocated memory after the run.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/regional_dyes:detailed-description}}\label{\detokenize{api/generated/modules/regional_dyes:detaregional-dyes}}
This file contains an example of the code that is needed to set up and use a set (in this case two) of dynamically passive tracers for diagnostic purposes. The tracers here are dye tracers which are set to 1 within the geographical region specified. The depth which a tracer is set is determined by calculating the depth from the seafloor upwards through the column.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/regional_dyes:type-documentation}}\index{dye\_tracer\_cs (fortran type in module regional\_dyes)@\spxentry{dye\_tracer\_cs}\spxextra{fortran type in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{dye\_tracer\_cs}}}
The control structure for the regional dyes tracer package.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ntr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The number of tracers that are actually used.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_source\_minlon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Minimum longitude of region dye will be injected.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_source\_maxlon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum longitude of region dye will be injected.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_source\_minlat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Minimum latitude of region dye will be injected.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_source\_maxlat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum latitude of region dye will be injected.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_source\_mindepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Minimum depth of region dye will be injected {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{dye\_source\_maxdepth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Maximum depth of region dye will be injected {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this subroutine, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restart\_csp}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(mom\_restart\_cs)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the restart control structure.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)(:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{allocatable}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracers\_may\_reinit}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true the tracers may be initialized if not found in a restart file.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/regional_dyes:function-subroutine-documentation}}\index{register\_dye\_tracer() (fortran function in module regional\_dyes)@\spxentry{register\_dye\_tracer()}\spxextra{fortran function in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/register_dye_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{register\_dye\_tracer}}}{\emph{HI}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This subroutine is used to register tracer fields and subroutines to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_dye\_tracer() (fortran subroutine in module regional\_dyes)@\spxentry{initialize\_dye\_tracer()}\spxextra{fortran subroutine in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/initialize_dye_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{initialize\_dye\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}}{}
This subroutine initializes the CSntr tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_dye\_tracer.

\item {} 
\sphinxstylestrong{sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{dye\_tracer\_column\_physics() (fortran subroutine in module regional\_dyes)@\spxentry{dye\_tracer\_column\_physics()}\spxextra{fortran subroutine in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{dye\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers. The arguments to this subroutine are redundant in that h\_new(k) = h\_old(k) + ea(k) \sphinxhyphen{} eb(k\sphinxhyphen{}1) + eb(k) \sphinxhyphen{} ea(k+1)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_dye\_tracer.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dye\_stock() (fortran function in module regional\_dyes)@\spxentry{dye\_stock()}\spxextra{fortran function in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{dye\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This function calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_dye\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} the names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} the units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} the coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value: the number of stocks calculated here.

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_flow_control:f/mom_tracer_flow_control/call_tracer_stocks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_flow\_control::call\_tracer\_stocks}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dye\_tracer\_surface\_state() (fortran subroutine in module regional\_dyes)@\spxentry{dye\_tracer\_surface\_state()}\spxextra{fortran subroutine in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/dye_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{dye\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations. This particular tracer package does not report anything back to the coupler.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_dye\_tracer.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{regional\_dyes\_end() (fortran subroutine in module regional\_dyes)@\spxentry{regional\_dyes\_end()}\spxextra{fortran subroutine in module regional\_dyes}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regional_dyes:f/regional_dyes/regional_dyes_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regional\_dyes/}}\sphinxbfcode{\sphinxupquote{regional\_dyes\_end}}}{\emph{CS}}{}
Clean up any allocated memory after the run.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_dye\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{regrid\_consts module reference}
\label{\detokenize{api/generated/modules/regrid_consts:f/regrid_consts}}\label{\detokenize{api/generated/modules/regrid_consts:regrid-consts-module-reference}}\label{\detokenize{api/generated/modules/regrid_consts::doc}}\index{regrid\_consts (module)@\spxentry{regrid\_consts}\spxextra{module}|spxpagem}
Contains constants for interpreting input parameters that control regridding.

{\hyperref[\detokenize{api/generated/modules/regrid_consts:detaregrid-consts}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/regrid_consts:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinatemode()}}}}}
&
Parse a string parameter specifying the coordinate mode and return the appropriate enumerated integer.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitsi}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinateunitsi()}}}}}
&
Returns a string with the coordinate units associated with the enumerated integer,.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinateunitss()}}}}}
&
Returns a string with the coordinate units associated with the string defining the coordinate mode.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{state\_dependent\_char()}}}}}
&
Returns true if the coordinate is dependent on the state density, returns false otherwise.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{state\_dependent\_int()}}}}}
&
Returns true if the coordinate is dependent on the state density, returns false otherwise.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/regrid_consts:detailed-description}}\label{\detokenize{api/generated/modules/regrid_consts:detaregrid-consts}}
Contains constants for interpreting input parameters that control regridding.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/regrid_consts:function-subroutine-documentation}}\index{coordinatemode() (fortran function in module regrid\_consts)@\spxentry{coordinatemode()}\spxextra{fortran function in module regrid\_consts}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_consts/}}\sphinxbfcode{\sphinxupquote{coordinatemode}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Parse a string parameter specifying the coordinate mode and return the appropriate enumerated integer.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Enumerated integer indicating coordinate mode

\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} String to indicate coordinate mode

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regridding\_adaptive}} \sphinxcode{\sphinxupquote{regridding\_adaptive\_string}} \sphinxcode{\sphinxupquote{regridding\_arbitrary}} \sphinxcode{\sphinxupquote{regridding\_arbitrary\_string}} \sphinxcode{\sphinxupquote{regridding\_hycom1}} \sphinxcode{\sphinxupquote{regridding\_hycom1\_string}} \sphinxcode{\sphinxupquote{regridding\_layer}} \sphinxcode{\sphinxupquote{regridding\_layer\_string}} \sphinxcode{\sphinxupquote{regridding\_rho}} \sphinxcode{\sphinxupquote{regridding\_rho\_string}} \sphinxcode{\sphinxupquote{regridding\_sigma}} \sphinxcode{\sphinxupquote{regridding\_sigma\_shelf\_zstar}} \sphinxcode{\sphinxupquote{regridding\_sigma\_shelf\_zstar\_string}} \sphinxcode{\sphinxupquote{regridding\_sigma\_string}} \sphinxcode{\sphinxupquote{regridding\_slight}} \sphinxcode{\sphinxupquote{regridding\_slight\_string}} \sphinxcode{\sphinxupquote{regridding\_zstar}} \sphinxcode{\sphinxupquote{regridding\_zstar\_string}} \sphinxcode{\sphinxupquote{regridding\_zstar\_string\_old}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinateunitss}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_calc_hmask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_calc\_hmask}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_configure_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_configure\_axes}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_init}}}}} {\hyperref[\detokenize{api/generated/modules/mom_diag_remap:f/mom_diag_remap/diag_remap_update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_diag\_remap::diag\_remap\_update}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{state\_dependent\_char}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{coordinateunitsi() (fortran function in module regrid\_consts)@\spxentry{coordinateunitsi()}\spxextra{fortran function in module regrid\_consts}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitsi}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_consts/}}\sphinxbfcode{\sphinxupquote{coordinateunitsi}}}{\emph{coordMode}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=16)}\sphinxstyleemphasis{{]}}}
Returns a string with the coordinate units associated with the enumerated integer,.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Units of coordinate

\item[{Parameters}] \leavevmode
\sphinxstylestrong{coordmode} :: {[}in{]} Coordinate mode

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regridding\_adaptive}} \sphinxcode{\sphinxupquote{regridding\_hycom1}} \sphinxcode{\sphinxupquote{regridding\_layer}} \sphinxcode{\sphinxupquote{regridding\_rho}} \sphinxcode{\sphinxupquote{regridding\_sigma}} \sphinxcode{\sphinxupquote{regridding\_sigma\_shelf\_zstar}} \sphinxcode{\sphinxupquote{regridding\_slight}} \sphinxcode{\sphinxupquote{regridding\_zstar}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitss}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinateunitss}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{coordinateunitss() (fortran function in module regrid\_consts)@\spxentry{coordinateunitss()}\spxextra{fortran function in module regrid\_consts}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitss}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_consts/}}\sphinxbfcode{\sphinxupquote{coordinateunitss}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character(len=16)}\sphinxstyleemphasis{{]}}}
Returns a string with the coordinate units associated with the string defining the coordinate mode.
\begin{quote}\begin{description}
\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Units of coordinate

\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} Coordinate mode

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinateunitsi}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinateunitsi}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{state\_dependent\_char() (fortran function in module regrid\_consts)@\spxentry{state\_dependent\_char()}\spxextra{fortran function in module regrid\_consts}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_consts/}}\sphinxbfcode{\sphinxupquote{state\_dependent\_char}}}{\emph{string}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if the coordinate is dependent on the state density, returns false otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{string} :: {[}in{]} String to indicate coordinate mode

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/coordinatemode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coordinatemode}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_int}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{state\_dependent\_int}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{state\_dependent\_int() (fortran function in module regrid\_consts)@\spxentry{state\_dependent\_int()}\spxextra{fortran function in module regrid\_consts}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_consts/}}\sphinxbfcode{\sphinxupquote{state\_dependent\_int}}}{\emph{mode}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Returns true if the coordinate is dependent on the state density, returns false otherwise.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{mode} :: {[}in{]} Coordinate mode

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regridding\_adaptive}} \sphinxcode{\sphinxupquote{regridding\_hycom1}} \sphinxcode{\sphinxupquote{regridding\_layer}} \sphinxcode{\sphinxupquote{regridding\_rho}} \sphinxcode{\sphinxupquote{regridding\_sigma}} \sphinxcode{\sphinxupquote{regridding\_sigma\_shelf\_zstar}} \sphinxcode{\sphinxupquote{regridding\_slight}} \sphinxcode{\sphinxupquote{regridding\_zstar}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_consts:f/regrid_consts/state_dependent_char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{state\_dependent\_char}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{regrid\_edge\_values module reference}
\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values}}\label{\detokenize{api/generated/modules/regrid_edge_values:regrid-edge-values-module-reference}}\label{\detokenize{api/generated/modules/regrid_edge_values::doc}}\index{regrid\_edge\_values (module)@\spxentry{regrid\_edge\_values}\spxextra{module}|spxpagem}
Edge value estimation for high\sphinxhyphen{}order resconstruction.

{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:detaregrid-edge-values}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/regrid_edge_values:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/bound_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bound\_edge\_values()}}}}}
&
Bound edge values by neighboring cell averages.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/average_discontinuous_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{average\_discontinuous\_edge\_values()}}}}}
&
Replace discontinuous collocated edge values with their average.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/check_discontinuous_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_discontinuous\_edge\_values()}}}}}
&
Check discontinuous edge values and replace them with their average if not monotonic.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_explicit\_h2()}}}}}
&
Compute h2 edge values (explicit second order accurate) in the same units as u.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_explicit\_h4()}}}}}
&
Compute h4 edge values (explicit fourth order accurate) in the same units as u.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_implicit\_h4()}}}}}
&
Compute ih4 edge values (implicit fourth order accurate) in the same units as u.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/end_value_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_value\_h4()}}}}}
&
Determine a one\sphinxhyphen{}sided 4th order polynomial fit of u to the data points for the purposes of specifying edge values, as described in the appendix of White and Adcroft JCP 2008.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_slopes\_implicit\_h3()}}}}}
&
Compute ih3 edge slopes (implicit third order accurate) in the same units as h.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_slopes\_implicit\_h5()}}}}}
&
Compute ih5 edge slopes (implicit fifth order accurate)
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h6}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_implicit\_h6()}}}}}
&
Compute ih6 edge values (implicit sixth order accurate) in the same units as u.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/solve_diag_dominant_tridiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solve\_diag\_dominant\_tridiag()}}}}}
&
Solve the tridiagonal system AX = R.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/linear_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linear\_solver()}}}}}
&
Solve the linear system AX = R by Gaussian elimination.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/test_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{test\_line()}}}}}
&
Test that A*C = R to within a tolerance, issuing a fatal error with an explanatory message if they do not.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/regrid_edge_values:detailed-description}}\label{\detokenize{api/generated/modules/regrid_edge_values:detaregrid-edge-values}}
Edge value estimation for high\sphinxhyphen{}order resconstruction.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/regrid_edge_values:function-subroutine-documentation}}\index{bound\_edge\_values() (fortran subroutine in module regrid\_edge\_values)@\spxentry{bound\_edge\_values()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/bound_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{bound\_edge\_values}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_val}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Bound edge values by neighboring cell averages.

In this routine, we loop on all cells to bound their left and right edge values by the cell averages. That is, the left edge value must lie between the left cell average and the central cell average. A similar reasoning applies to the right edge values.

Both boundary edge values are set equal to the boundary cell averages. Any extrapolation scheme is applied after this routine has been called. Therefore, boundary cells are treated as if they were local extrama.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Potentially modified edge values {[}A{]}; the second index is for the two edges of each cell.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_functions::p1m\_interpolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_functions::p3m\_limiter}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_limiter_standard}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_limiter\_standard}}}}} {\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions::pqm\_limiter}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{average\_discontinuous\_edge\_values() (fortran subroutine in module regrid\_edge\_values)@\spxentry{average\_discontinuous\_edge\_values()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/average_discontinuous_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{average\_discontinuous\_edge\_values}}}{\emph{N}, \emph{edge\_val}}{}
Replace discontinuous collocated edge values with their average.

For each interior edge, check whether the edge values are discontinuous. If so, compute the average and replace the edge values by the average.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Edge values that may be modified {[}A{]}; the second index is for the two edges of each cell.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_functions::p1m\_interpolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_functions::p3m\_limiter}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{check\_discontinuous\_edge\_values() (fortran subroutine in module regrid\_edge\_values)@\spxentry{check\_discontinuous\_edge\_values()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/check_discontinuous_edge_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{check\_discontinuous\_edge\_values}}}{\emph{N}, \emph{u}, \emph{edge\_val}}{}
Check discontinuous edge values and replace them with their average if not monotonic.

For each interior edge, check whether the edge values are discontinuous. If so and if they are not monotonic, replace each edge value by their average.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell averages in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Cell edge values {[}A{]}; the second index is for the two edges of each cell.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_limiter_standard}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_limiter\_standard}}}}} {\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_limiter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions::pqm\_limiter}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{edge\_values\_explicit\_h2() (fortran subroutine in module regrid\_edge\_values)@\spxentry{edge\_values\_explicit\_h2()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{edge\_values\_explicit\_h2}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_val}}{}
Compute h2 edge values (explicit second order accurate) in the same units as u.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Returned edge values {[}A{]}; the second index is for the two edges of each cell.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{edge\_values\_explicit\_h4() (fortran subroutine in module regrid\_edge\_values)@\spxentry{edge\_values\_explicit\_h4()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h4}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{edge\_values\_explicit\_h4}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_val}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Compute h4 edge values (explicit fourth order accurate) in the same units as u.

Compute edge values based on fourth\sphinxhyphen{}order explicit estimates. These estimates are based on a cubic interpolant spanning four cells and evaluated at the location of the middle edge. An interpolant spanning cells i\sphinxhyphen{}2, i\sphinxhyphen{}1, i and i+1 is evaluated at edge i\sphinxhyphen{}1/2. The estimate for each edge is unique.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{i}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}    \PYG{n}{i}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}     \PYG{n}{i}     \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}
\end{sphinxVerbatim}

..ooooo.. i\sphinxhyphen{}1/2

The first two edge values are estimated by evaluating the first available cubic interpolant, i.e., the interpolant spanning cells 1, 2, 3 and 4. Similarly, the last two edge values are estimated by evaluating the last available interpolant.

For this fourth\sphinxhyphen{}order scheme, at least four cells must exist.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Returned edge values {[}A{]}; the second index is for the two edges of each cell.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/end_value_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_value\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polynomial\_functions::evaluation\_polynomial}}}}} \sphinxcode{\sphinxupquote{hminfrac}} \sphinxcode{\sphinxupquote{hneglect\_dflt}} \sphinxcode{\sphinxupquote{hneglect\_edge\_dflt}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_linear_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_linear\_system}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{edge\_values\_implicit\_h4() (fortran subroutine in module regrid\_edge\_values)@\spxentry{edge\_values\_implicit\_h4()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{edge\_values\_implicit\_h4}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_val}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Compute ih4 edge values (implicit fourth order accurate) in the same units as u.

Compute edge values based on fourth\sphinxhyphen{}order implicit estimates.

Fourth\sphinxhyphen{}order implicit estimates of edge values are based on a two\sphinxhyphen{}cell stencil. A tridiagonal system is set up and is based on expressing the edge values in terms of neighboring cell averages. The generic relationship is
\begin{equation*}
\begin{split}\alpha u_{i-1/2} + u_{i+1/2} + \beta u_{i+3/2} = a \bar{u}_i + b \bar{u}_{i+1}\end{split}
\end{equation*}
and the stencil looks like this

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{i}     \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}
\end{sphinxVerbatim}

..ooo.. i\sphinxhyphen{}1/2 i+1/2 i+3/2

In this routine, the coefficients
\(\alpha\) , \(\beta\) , \(a\) and \(b\) are computed, the tridiagonal system is built, boundary conditions are prescribed and the system is solved to yield edge\sphinxhyphen{}value estimates.

There are N+1 unknowns and we are able to write N\sphinxhyphen{}1 equations. The boundary conditions close the system.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Returned edge values {[}A{]}; the second index is for the two edges of each cell.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/end_value_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_value\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polynomial\_functions::evaluation\_polynomial}}}}} \sphinxcode{\sphinxupquote{hminfrac}} \sphinxcode{\sphinxupquote{hneglect\_dflt}} \sphinxcode{\sphinxupquote{hneglect\_edge\_dflt}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/solve_diag_dominant_tridiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solve\_diag\_dominant\_tridiag}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_linear_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_linear\_system}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_tridiagonal_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_tridiagonal\_system}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale:f/mom_ale/ts_ppm_edge_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale::ts\_ppm\_edge\_values}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{end\_value\_h4() (fortran subroutine in module regrid\_edge\_values)@\spxentry{end\_value\_h4()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/end_value_h4}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{end\_value\_h4}}}{\emph{dz}, \emph{u}, \emph{Csys}}{}
Determine a one\sphinxhyphen{}sided 4th order polynomial fit of u to the data points for the purposes of specifying edge values, as described in the appendix of White and Adcroft JCP 2008.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{dz} :: {[}in{]} The thicknesses of 4 layers, starting at the edge {[}H{]}. The values of dz must be positive.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} The average properties of 4 layers, starting at the edge {[}A{]}

\item {} 
\sphinxstylestrong{csys} :: {[}out{]} The four coefficients of a 4th order polynomial fit of u as a function of z {[}A H\sphinxhyphen{}(n\sphinxhyphen{}1){]}

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_explicit\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_implicit\_h4}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{edge\_slopes\_implicit\_h3() (fortran subroutine in module regrid\_edge\_values)@\spxentry{edge\_slopes\_implicit\_h3()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{edge\_slopes\_implicit\_h3}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_slopes}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Compute ih3 edge slopes (implicit third order accurate) in the same units as h.

Compute edge slopes based on third\sphinxhyphen{}order implicit estimates. Note that the estimates are fourth\sphinxhyphen{}order accurate on uniform grids

Third\sphinxhyphen{}order implicit estimates of edge slopes are based on a two\sphinxhyphen{}cell stencil. A tridiagonal system is set up and is based on expressing the edge slopes in terms of neighboring cell averages. The generic relationship is
\begin{equation*}
\begin{split}\alpha u'_{i-1/2} + u'_{i+1/2} + \beta u'_{i+3/2} = a \bar{u}_i + b \bar{u}_{i+1}\end{split}
\end{equation*}
and the stencil looks like this

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{i}     \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}
\end{sphinxVerbatim}

..ooo.. i\sphinxhyphen{}1/2 i+1/2 i+3/2

In this routine, the coefficients
\(\alpha\) , \(\beta\) , a and b are computed, the tridiagonal system is built, boundary conditions are prescribed and the system is solved to yield edge\sphinxhyphen{}slope estimates.

There are N+1 unknowns and we are able to write N\sphinxhyphen{}1 equations. The boundary conditions close the system.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_slopes} :: {[}inout{]} Returned edge slopes {[}A H\sphinxhyphen{}1{]}; the second index is for the two edges of each cell.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/end_value_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end\_value\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polynomial\_functions::evaluation\_polynomial}}}}} \sphinxcode{\sphinxupquote{hneglect\_dflt}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/solve_diag_dominant_tridiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solve\_diag\_dominant\_tridiag}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_linear_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_linear\_system}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_tridiagonal_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_tridiagonal\_system}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{edge\_slopes\_implicit\_h5() (fortran subroutine in module regrid\_edge\_values)@\spxentry{edge\_slopes\_implicit\_h5()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h5}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{edge\_slopes\_implicit\_h5}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_slopes}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Compute ih5 edge slopes (implicit fifth order accurate)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_slopes} :: {[}inout{]} Returned edge slopes {[}A H\sphinxhyphen{}1{]}; the second index is for the two edges of each cell.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hneglect\_dflt}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/linear_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linear\_solver}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_tridiagonal_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_tridiagonal\_system}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_remapping:f/mom_remapping/build_reconstructions_1d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_remapping::build\_reconstructions\_1d}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp::regridding\_set\_ppolys}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{edge\_values\_implicit\_h6() (fortran subroutine in module regrid\_edge\_values)@\spxentry{edge\_values\_implicit\_h6()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h6}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{edge\_values\_implicit\_h6}}}{\emph{N}, \emph{h}, \emph{u}, \emph{edge\_val}, \emph{h\_neglect}, \emph{answers\_2018}}{}
Compute ih6 edge values (implicit sixth order accurate) in the same units as u.

Sixth\sphinxhyphen{}order implicit estimates of edge values are based on a four\sphinxhyphen{}cell, three\sphinxhyphen{}edge stencil. A tridiagonal system is set up and is based on expressing the edge values in terms of neighboring cell averages.

The generic relationship is
\begin{equation*}
\begin{split}\alpha u_{i-1/2} + u_{i+1/2} + \beta u_{i+3/2} = a \bar{u}_{i-1} + b \bar{u}_i + c \bar{u}_{i+1} + d \bar{u}_{i+2}\end{split}
\end{equation*}
and the stencil looks like this

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{i}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}     \PYG{n}{i}     \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}    \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{2}
\end{sphinxVerbatim}

..ooooo.. i\sphinxhyphen{}1/2 i+1/2 i+3/2

In this routine, the coefficients
\(\alpha\) , \(\beta\) , a, b, c and d are computed, the tridiagonal system is built, boundary conditions are prescribed and the system is solved to yield edge\sphinxhyphen{}value estimates. This scheme is described in detail by White and Adcroft, 2009, J. Comp. Phys, \sphinxurl{https://doi.org/10.1016/j.jcp.2008.04.026}

Note that the centered stencil only applies to edges 3 to N\sphinxhyphen{}1 (edges are numbered 1 to n+1), which yields N\sphinxhyphen{}3 equations for N+1 unknowns. Two other equations are written by using a right\sphinxhyphen{}biased stencil for edge 2 and a left\sphinxhyphen{}biased stencil for edge N. The prescription of boundary conditions (using sixth\sphinxhyphen{}order polynomials) closes the system.

CAUTION: For each edge, in order to determine the coefficients of the implicit expression, a 6x6 linear system is solved. This may become computationally expensive if regridding is carried out often. Figuring out closed\sphinxhyphen{}form expressions for these coefficients on nonuniform meshes turned out to be intractable.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} cell widths {[}H{]}

\item {} 
\sphinxstylestrong{u} :: {[}in{]} cell average properties (size N) in arbitrary units {[}A{]}

\item {} 
\sphinxstylestrong{edge\_val} :: {[}inout{]} Returned edge values {[}A{]}; the second index is for the two edges of each cell.

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/polynomial_functions:f/polynomial_functions/evaluation_polynomial}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polynomial\_functions::evaluation\_polynomial}}}}} \sphinxcode{\sphinxupquote{hminfrac}} \sphinxcode{\sphinxupquote{hneglect\_edge\_dflt}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/linear_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linear\_solver}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_tridiagonal_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_solvers::solve\_tridiagonal\_system}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{solve\_diag\_dominant\_tridiag() (fortran subroutine in module regrid\_edge\_values)@\spxentry{solve\_diag\_dominant\_tridiag()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/solve_diag_dominant_tridiag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{solve\_diag\_dominant\_tridiag}}}{\emph{Al}, \emph{Ac}, \emph{Au}, \emph{R}, \emph{X}, \emph{N}}{}
Solve the tridiagonal system AX = R.

This routine uses a variant of Thomas’s algorithm to solve the tridiagonal system AX = R, in a form that is guaranteed to avoid dividing by a zero pivot. The matrix A is made up of lower (Al) and upper diagonals (Au) and a central diagonal Ad = Ac+Al+Au, where Al, Au, and Ac are all positive (or negative) definite. However when Ac is smaller than roundoff compared with (Al+Au), the answers are prone to inaccuracy.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} The size of the system

\item {} 
\sphinxstylestrong{ac} :: {[}in{]} Matrix center diagonal offset from Al + Au

\item {} 
\sphinxstylestrong{al} :: {[}in{]} Matrix lower diagonal

\item {} 
\sphinxstylestrong{au} :: {[}in{]} Matrix upper diagonal

\item {} 
\sphinxstylestrong{r} :: {[}in{]} system right\sphinxhyphen{}hand side

\item {} 
\sphinxstylestrong{x} :: {[}out{]} solution vector

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_implicit\_h4}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{linear\_solver() (fortran subroutine in module regrid\_edge\_values)@\spxentry{linear\_solver()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/linear_solver}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{linear\_solver}}}{\emph{N}, \emph{A}, \emph{R}, \emph{X}}{}
Solve the linear system AX = R by Gaussian elimination.

This routine uses Gauss’s algorithm to transform the system’s original matrix into an upper triangular matrix. Back substitution then yields the answer. The matrix A must be square, with the first index varing along the row.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} The size of the system

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} The matrix being inverted {[}nondim{]}

\item {} 
\sphinxstylestrong{r} :: {[}inout{]} system right\sphinxhyphen{}hand side {[}A{]}

\item {} 
\sphinxstylestrong{x} :: {[}inout{]} solution vector {[}A{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_slopes\_implicit\_h5}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h6}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edge\_values\_implicit\_h6}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{test\_line() (fortran subroutine in module regrid\_edge\_values)@\spxentry{test\_line()}\spxextra{fortran subroutine in module regrid\_edge\_values}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/test_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_edge\_values/}}\sphinxbfcode{\sphinxupquote{test\_line}}}{\emph{msg}, \emph{N}, \emph{A}, \emph{C}, \emph{R}, \emph{mag}, \emph{tol}}{}
Test that A*C = R to within a tolerance, issuing a fatal error with an explanatory message if they do not.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{mag} :: {[}in{]} The magnitude of leading order terms in this line

\item {} 
\sphinxstylestrong{n} :: {[}in{]} The number of points in the system

\item {} 
\sphinxstylestrong{a} :: {[}in{]} One of the two vectors being multiplied

\item {} 
\sphinxstylestrong{c} :: {[}in{]} One of the two vectors being multiplied

\item {} 
\sphinxstylestrong{r} :: {[}in{]} The expected solution of the equation

\item {} 
\sphinxstylestrong{msg} :: {[}in{]} An identifying message for this test

\item {} 
\sphinxstylestrong{tol} :: {[}in{]} The fractional tolerance for the two solutions

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{regrid\_interp module reference}
\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}}\label{\detokenize{api/generated/modules/regrid_interp:regrid-interp-module-reference}}\label{\detokenize{api/generated/modules/regrid_interp::doc}}\index{regrid\_interp (module)@\spxentry{regrid\_interp}\spxextra{module}|spxpagem}
Vertical interpolation for regridding.

{\hyperref[\detokenize{api/generated/modules/regrid_interp:detaregrid-interp}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/regrid_interp:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interp_cs_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interp\_cs\_type}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp()}}}}} module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/regrid_interp:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_set\_ppolys()}}}}}
&
Builds an interpolated profile for the densities within each grid cell.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_grid()}}}}}
&
Given target values (e.g., density), build new grid based on polynomial.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_and\_interpolate\_grid()}}}}}
&
Build a grid by interpolating for target values.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/get_polynomial_coordinate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_polynomial\_coordinate()}}}}}
&
Given a target value, find corresponding coordinate for given polynomial.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolation_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolation\_scheme()}}}}}
&
Numeric value of interpolation\_scheme corresponding to scheme name.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_interp\_scheme()}}}}}
&
Store the interpolation\_scheme value in the interp\_CS based on the input string.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_extrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_interp\_extrap()}}}}}
&
Store the boundary\_extrapolation value in the interp\_CS.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/regrid_interp:detailed-description}}\label{\detokenize{api/generated/modules/regrid_interp:detaregrid-interp}}
Vertical interpolation for regridding.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/regrid_interp:type-documentation}}\index{interp\_cs\_type (fortran type in module regrid\_interp)@\spxentry{interp\_cs\_type}\spxextra{fortran type in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interp_cs_type}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{interp\_cs\_type}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp()}}}}} module.
module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{interpolation\_scheme}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}} :: The following parameter is only relevant when used with the target interface densities regridding scheme. It indicates which interpolation to use to determine the grid.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{boundary\_extrapolation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: Indicate whether high\sphinxhyphen{}order boundary extrapolation should be used within boundary cells.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{answers\_2018}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true use older, less acccurate expressions.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/regrid_interp:function-subroutine-documentation}}\index{regridding\_set\_ppolys() (fortran subroutine in module regrid\_interp)@\spxentry{regridding\_set\_ppolys()}\spxextra{fortran subroutine in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{regridding\_set\_ppolys}}}{\emph{CS}, \emph{densities}, \emph{n0}, \emph{h0}, \emph{ppoly0\_E}, \emph{ppoly0\_S}, \emph{ppoly0\_coefs}, \emph{degree}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Builds an interpolated profile for the densities within each grid cell.

It may happen that, given a high\sphinxhyphen{}order interpolator, the number of available layers is insufficient (e.g., there are two available layers for a third\sphinxhyphen{}order PPM ih4 scheme). In these cases, we resort to the simplest continuous linear scheme (P1M h2).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} Interpolation control structure

\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of cells on source grid

\item {} 
\sphinxstylestrong{densities} :: {[}in{]} Actual cell densities {[}A{]}

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} cell widths on source grid {[}H{]}

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}inout{]} Edge value of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{ppoly0\_s} :: {[}inout{]} Edge slope of polynomial {[}A H\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}inout{]} Coefficients of polynomial {[}A{]}

\item {} 
\sphinxstylestrong{degree} :: {[}inout{]} The degree of the polynomials

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]} in the same units as h0.

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations {[}H{]} in the same units as h0.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{degree\_1}} \sphinxcode{\sphinxupquote{degree\_2}} \sphinxcode{\sphinxupquote{degree\_3}} \sphinxcode{\sphinxupquote{degree\_4}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h5}}}}} \sphinxcode{\sphinxupquote{interpolation\_p1m\_h2}} \sphinxcode{\sphinxupquote{interpolation\_p1m\_h4}} \sphinxcode{\sphinxupquote{interpolation\_p1m\_ih4}} \sphinxcode{\sphinxupquote{interpolation\_p3m\_ih4ih3}} \sphinxcode{\sphinxupquote{interpolation\_p3m\_ih6ih5}} \sphinxcode{\sphinxupquote{interpolation\_plm}} \sphinxcode{\sphinxupquote{interpolation\_ppm\_h4}} \sphinxcode{\sphinxupquote{interpolation\_ppm\_ih4}} \sphinxcode{\sphinxupquote{interpolation\_pqm\_ih4ih3}} \sphinxcode{\sphinxupquote{interpolation\_pqm\_ih6ih5}} {\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_functions::p1m\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/p1m_functions:f/p1m_functions/p1m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p1m\_functions::p1m\_interpolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_functions::p3m\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/p3m_functions:f/p3m_functions/p3m_interpolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{p3m\_functions::p3m\_interpolation}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/plm_functions:f/plm_functions/plm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plm\_functions::plm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_boundary_extrapolation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_boundary\_extrapolation}}}}} {\hyperref[\detokenize{api/generated/modules/ppm_functions:f/ppm_functions/ppm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ppm\_functions::ppm\_reconstruction}}}}} {\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_boundary_extrapolation_v1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions::pqm\_boundary\_extrapolation\_v1}}}}} {\hyperref[\detokenize{api/generated/modules/pqm_functions:f/pqm_functions/pqm_reconstruction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pqm\_functions::pqm\_reconstruction}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_and\_interpolate\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{interpolate\_grid() (fortran subroutine in module regrid\_interp)@\spxentry{interpolate\_grid()}\spxextra{fortran subroutine in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolate_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{interpolate\_grid}}}{\emph{n0}, \emph{h0}, \emph{x0}, \emph{ppoly0\_E}, \emph{ppoly0\_coefs}, \emph{target\_values}, \emph{degree}, \emph{n1}, \emph{h1}, \emph{x1}, \emph{answers\_2018}}{}
Given target values (e.g., density), build new grid based on polynomial.

Given the grid ‘grid0’ and the piecewise polynomial interpolant ‘ppoly0’ (possibly discontinuous), the coordinates of the new grid ‘grid1’ are determined by finding the corresponding target interface densities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n0} :: {[}in{]} Number of points on source grid

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} Number of points on target grid

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Thicknesses of source grid cells {[}H{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} Source interface positions {[}H{]}

\item {} 
\sphinxstylestrong{ppoly0\_e} :: {[}in{]} Edge values of interpolating polynomials {[}A{]}

\item {} 
\sphinxstylestrong{ppoly0\_coefs} :: {[}in{]} Coefficients of interpolating polynomials {[}A{]}

\item {} 
\sphinxstylestrong{target\_values} :: {[}in{]} Target values of interfaces {[}A{]}

\item {} 
\sphinxstylestrong{degree} :: {[}in{]} Degree of interpolating polynomials

\item {} 
\sphinxstylestrong{h1} :: {[}inout{]} Thicknesses of target grid cells {[}H{]}

\item {} 
\sphinxstylestrong{x1} :: {[}inout{]} Target interface positions {[}H{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/get_polynomial_coordinate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_polynomial\_coordinate}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{build\_and\_interpolate\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{build\_and\_interpolate\_grid() (fortran subroutine in module regrid\_interp)@\spxentry{build\_and\_interpolate\_grid()}\spxextra{fortran subroutine in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/build_and_interpolate_grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{build\_and\_interpolate\_grid}}}{\emph{CS}, \emph{densities}, \emph{n0}, \emph{h0}, \emph{x0}, \emph{target\_values}, \emph{n1}, \emph{h1}, \emph{x1}, \emph{h\_neglect}, \emph{h\_neglect\_edge}}{}
Build a grid by interpolating for target values.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}in{]} A control structure for {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp()}}}}}

\item {} 
\sphinxstylestrong{n0} :: {[}in{]} The number of points on the input grid

\item {} 
\sphinxstylestrong{n1} :: {[}in{]} The number of points on the output grid

\item {} 
\sphinxstylestrong{densities} :: {[}in{]} Input cell densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{target\_values} :: {[}in{]} Target values of interfaces {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\item {} 
\sphinxstylestrong{h0} :: {[}in{]} Initial cell widths {[}H{]}

\item {} 
\sphinxstylestrong{x0} :: {[}in{]} Source interface positions {[}H{]}

\item {} 
\sphinxstylestrong{h1} :: {[}inout{]} Output cell widths {[}H{]}

\item {} 
\sphinxstylestrong{x1} :: {[}inout{]} Target interface positions {[}H{]}

\item {} 
\sphinxstylestrong{h\_neglect} :: {[}in{]} A negligibly small width for the purpose of cell reconstructions {[}H{]} in the same units as h0.

\item {} 
\sphinxstylestrong{h\_neglect\_edge} :: {[}in{]} A negligibly small width for the purpose of edge value calculations {[}H{]} in the same units as h0.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_grid}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/regridding_set_ppolys}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regridding\_set\_ppolys}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/coord_hycom:f/coord_hycom/build_hycom1_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_hycom::build\_hycom1\_column}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::build\_rho\_column}}}}} {\hyperref[\detokenize{api/generated/modules/coord_rho:f/coord_rho/build_rho_column_iteratively}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{coord\_rho::build\_rho\_column\_iteratively}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_polynomial\_coordinate() (fortran function in module regrid\_interp)@\spxentry{get\_polynomial\_coordinate()}\spxextra{fortran function in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/get_polynomial_coordinate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{get\_polynomial\_coordinate}}}{\emph{N}, \emph{h}, \emph{x\_g}, \emph{edge\_values}, \emph{ppoly\_coefs}, \emph{target\_value}, \emph{degree}, \emph{answers\_2018}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Given a target value, find corresponding coordinate for given polynomial.

Here, ‘ppoly’ is assumed to be a piecewise discontinuous polynomial of degree ‘degree’ throughout the domain defined by ‘grid’. A target value is given and we need to determine the corresponding grid coordinate to define the new grid.

If the target value is out of range, the grid coordinate is simply set to be equal to one of the boundary coordinates, which results in vanished layers near the boundaries.

IT IS ASSUMED THAT THE PIECEWISE POLYNOMIAL IS MONOTONICALLY INCREASING. IF THIS IS NOT THE CASE, THE NEW GRID MAY BE ILL\sphinxhyphen{}DEFINED.

It is assumed that the number of cells defining ‘grid’ and ‘ppoly’ are the same.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} Number of grid cells

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Grid cell thicknesses {[}H{]}

\item {} 
\sphinxstylestrong{x\_g} :: {[}in{]} Grid interface locations {[}H{]}

\item {} 
\sphinxstylestrong{edge\_values} :: {[}in{]} Edge values of interpolating polynomials {[}A{]}

\item {} 
\sphinxstylestrong{ppoly\_coefs} :: {[}in{]} Coefficients of interpolating polynomials {[}A{]}

\item {} 
\sphinxstylestrong{target\_value} :: {[}in{]} Target value to find position for {[}A{]}

\item {} 
\sphinxstylestrong{degree} :: {[}in{]} Degree of the interpolating polynomials

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: The position of x\_g at which target\_value is found {[}H{]}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{nr\_iterations}} \sphinxcode{\sphinxupquote{nr\_offset}} \sphinxcode{\sphinxupquote{nr\_tolerance}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolate_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolate\_grid}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{interpolation\_scheme() (fortran function in module regrid\_interp)@\spxentry{interpolation\_scheme()}\spxextra{fortran function in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolation_scheme}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{interpolation\_scheme}}}{\emph{interp\_scheme}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Numeric value of interpolation\_scheme corresponding to scheme name.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{interp\_scheme} :: {[}in{]} Name of the interpolation scheme Valid values include “P1M\_H2”, “P1M\_H4”, “P1M\_IH2”, “PLM”, “PPM\_H4”, “PPM\_IH4”, “P3M\_IH4IH3”, “P3M\_IH6IH5”, “PQM\_IH4IH3”, and “PQM\_IH6IH5”

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{interpolation\_p1m\_h2}} \sphinxcode{\sphinxupquote{interpolation\_p1m\_h4}} \sphinxcode{\sphinxupquote{interpolation\_p1m\_ih4}} \sphinxcode{\sphinxupquote{interpolation\_p3m\_ih4ih3}} \sphinxcode{\sphinxupquote{interpolation\_p3m\_ih6ih5}} \sphinxcode{\sphinxupquote{interpolation\_plm}} \sphinxcode{\sphinxupquote{interpolation\_ppm\_h4}} \sphinxcode{\sphinxupquote{interpolation\_ppm\_ih4}} \sphinxcode{\sphinxupquote{interpolation\_pqm\_ih4ih3}} \sphinxcode{\sphinxupquote{interpolation\_pqm\_ih6ih5}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_string_functions:f/mom_string_functions/uppercase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_string\_functions::uppercase}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_interp\_scheme}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_interp\_scheme() (fortran subroutine in module regrid\_interp)@\spxentry{set\_interp\_scheme()}\spxextra{fortran subroutine in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_scheme}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{set\_interp\_scheme}}}{\emph{CS}, \emph{interp\_scheme}}{}
Store the interpolation\_scheme value in the interp\_CS based on the input string.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A control structure for {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp()}}}}}

\item {} 
\sphinxstylestrong{interp\_scheme} :: {[}in{]} Name of the interpolation scheme Valid values include “P1M\_H2”, “P1M\_H4”, “P1M\_IH2”, “PLM”, “PPM\_H4”, “PPM\_IH4”, “P3M\_IH4IH3”, “P3M\_IH6IH5”, “PQM\_IH4IH3”, and “PQM\_IH6IH5”

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/interpolation_scheme}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{interpolation\_scheme}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{set\_interp\_extrap() (fortran subroutine in module regrid\_interp)@\spxentry{set\_interp\_extrap()}\spxextra{fortran subroutine in module regrid\_interp}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_interp:f/regrid_interp/set_interp_extrap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_interp/}}\sphinxbfcode{\sphinxupquote{set\_interp\_extrap}}}{\emph{CS}, \emph{extrap}}{}
Store the boundary\_extrapolation value in the interp\_CS.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{cs} :: {[}inout{]} A control structure for {\hyperref[\detokenize{api/generated/modules/regrid_interp:f/regrid_interp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_interp()}}}}}

\item {} 
\sphinxstylestrong{extrap} :: {[}in{]} Indicate whether high\sphinxhyphen{}order boundary extrapolation should be used in boundary cells

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_regridding:f/mom_regridding/set_regrid_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_regridding::set\_regrid\_params}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{regrid\_solvers module reference}
\label{\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers}}\label{\detokenize{api/generated/modules/regrid_solvers:regrid-solvers-module-reference}}\label{\detokenize{api/generated/modules/regrid_solvers::doc}}\index{regrid\_solvers (module)@\spxentry{regrid\_solvers}\spxextra{module}|spxpagem}
Solvers of linear systems.

{\hyperref[\detokenize{api/generated/modules/regrid_solvers:detaregrid-solvers}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/regrid_solvers:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_linear_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solve\_linear\_system()}}}}}
&
Solve the linear system AX = R by Gaussian elimination.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/linear_solver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linear\_solver()}}}}}
&
Solve the linear system AX = R by Gaussian elimination.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_tridiagonal_system}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solve\_tridiagonal\_system()}}}}}
&
Solve the tridiagonal system AX = R.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_diag_dominant_tridiag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solve\_diag\_dominant\_tridiag()}}}}}
&
Solve the tridiagonal system AX = R.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/regrid_solvers:detailed-description}}\label{\detokenize{api/generated/modules/regrid_solvers:detaregrid-solvers}}
Date of creation: 2008.06.12 L. White.

This module contains solvers of linear systems. These routines have now been updated for greater efficiency, especially in special cases.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/regrid_solvers:function-subroutine-documentation}}\index{solve\_linear\_system() (fortran subroutine in module regrid\_solvers)@\spxentry{solve\_linear\_system()}\spxextra{fortran subroutine in module regrid\_solvers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_linear_system}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_solvers/}}\sphinxbfcode{\sphinxupquote{solve\_linear\_system}}}{\emph{A}, \emph{R}, \emph{X}, \emph{N}, \emph{answers\_2018}}{}
Solve the linear system AX = R by Gaussian elimination.

This routine uses Gauss’s algorithm to transform the system’s original matrix into an upper triangular matrix. Back substitution yields the answer. The matrix A must be square, with the first index varing down the column.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} The size of the system

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} The matrix being inverted {[}nondim{]}

\item {} 
\sphinxstylestrong{r} :: {[}inout{]} system right\sphinxhyphen{}hand side {[}A{]}

\item {} 
\sphinxstylestrong{x} :: {[}inout{]} solution vector {[}A{]}

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true or absent use older, less efficient expressions.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_explicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_explicit\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_implicit\_h4}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{linear\_solver() (fortran subroutine in module regrid\_solvers)@\spxentry{linear\_solver()}\spxextra{fortran subroutine in module regrid\_solvers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/linear_solver}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_solvers/}}\sphinxbfcode{\sphinxupquote{linear\_solver}}}{\emph{N}, \emph{A}, \emph{R}, \emph{X}}{}
Solve the linear system AX = R by Gaussian elimination.

This routine uses Gauss’s algorithm to transform the system’s original matrix into an upper triangular matrix. Back substitution then yields the answer. The matrix A must be square, with the first index varing along the row.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} The size of the system

\item {} 
\sphinxstylestrong{a} :: {[}inout{]} The matrix being inverted {[}nondim{]}

\item {} 
\sphinxstylestrong{r} :: {[}inout{]} system right\sphinxhyphen{}hand side {[}A{]}

\item {} 
\sphinxstylestrong{x} :: {[}inout{]} solution vector {[}A{]}

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{solve\_tridiagonal\_system() (fortran subroutine in module regrid\_solvers)@\spxentry{solve\_tridiagonal\_system()}\spxextra{fortran subroutine in module regrid\_solvers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_tridiagonal_system}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_solvers/}}\sphinxbfcode{\sphinxupquote{solve\_tridiagonal\_system}}}{\emph{Al}, \emph{Ad}, \emph{Au}, \emph{R}, \emph{X}, \emph{N}, \emph{answers\_2018}}{}
Solve the tridiagonal system AX = R.

This routine uses Thomas’s algorithm to solve the tridiagonal system AX = R. (A is made up of lower, middle and upper diagonals)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} The size of the system

\item {} 
\sphinxstylestrong{ad} :: {[}in{]} Matrix center diagonal

\item {} 
\sphinxstylestrong{al} :: {[}in{]} Matrix lower diagonal

\item {} 
\sphinxstylestrong{au} :: {[}in{]} Matrix upper diagonal

\item {} 
\sphinxstylestrong{r} :: {[}in{]} system right\sphinxhyphen{}hand side

\item {} 
\sphinxstylestrong{x} :: {[}out{]} solution vector

\item {} 
\sphinxstylestrong{answers\_2018} :: {[}in{]} If true use older, less acccurate expressions.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h3}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_slopes_implicit_h5}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_slopes\_implicit\_h5}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_implicit\_h4}}}}} {\hyperref[\detokenize{api/generated/modules/regrid_edge_values:f/regrid_edge_values/edge_values_implicit_h6}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{regrid\_edge\_values::edge\_values\_implicit\_h6}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{solve\_diag\_dominant\_tridiag() (fortran subroutine in module regrid\_solvers)@\spxentry{solve\_diag\_dominant\_tridiag()}\spxextra{fortran subroutine in module regrid\_solvers}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/regrid_solvers:f/regrid_solvers/solve_diag_dominant_tridiag}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{regrid\_solvers/}}\sphinxbfcode{\sphinxupquote{solve\_diag\_dominant\_tridiag}}}{\emph{Al}, \emph{Ac}, \emph{Au}, \emph{R}, \emph{X}, \emph{N}}{}
Solve the tridiagonal system AX = R.

This routine uses a variant of Thomas’s algorithm to solve the tridiagonal system AX = R, in a form that is guaranteed to avoid dividing by a zero pivot. The matrix A is made up of lower (Al) and upper diagonals (Au) and a central diagonal Ad = Ac+Al+Au, where Al, Au, and Ac are all positive (or negative) definite. However when Ac is smaller than roundoff compared with (Al+Au), the answers are prone to inaccuracy.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{n} :: {[}in{]} The size of the system

\item {} 
\sphinxstylestrong{ac} :: {[}in{]} Matrix center diagonal offset from Al + Au

\item {} 
\sphinxstylestrong{al} :: {[}in{]} Matrix lower diagonal

\item {} 
\sphinxstylestrong{au} :: {[}in{]} Matrix upper diagonal

\item {} 
\sphinxstylestrong{r} :: {[}in{]} system right\sphinxhyphen{}hand side

\item {} 
\sphinxstylestrong{x} :: {[}out{]} solution vector

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{rgc\_initialization module reference}
\label{\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization}}\label{\detokenize{api/generated/modules/rgc_initialization:rgc-initialization-module-reference}}\label{\detokenize{api/generated/modules/rgc_initialization::doc}}\index{rgc\_initialization (module)@\spxentry{rgc\_initialization}\spxextra{module}|spxpagem}
\textless{}undocumented\textgreater{}

{\hyperref[\detokenize{api/generated/modules/rgc_initialization:detargc-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/rgc_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization/rgc_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_initialize\_sponges()}}}}}
&
Sets up the the inverse restoration time, and the values towards which the interface heights, velocities and tracers should be restored within the sponges for the RGC test case.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/rgc_initialization:detailed-description}}\label{\detokenize{api/generated/modules/rgc_initialization:detargc-initialization}}
\textless{}undocumented\textgreater{}


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/rgc_initialization:function-subroutine-documentation}}\index{rgc\_initialize\_sponges() (fortran subroutine in module rgc\_initialization)@\spxentry{rgc\_initialize\_sponges()}\spxextra{fortran subroutine in module rgc\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rgc_initialization:f/rgc_initialization/rgc_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rgc\_initialization/}}\sphinxbfcode{\sphinxupquote{rgc\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{US}, \emph{tv}, \emph{u}, \emph{v}, \emph{PF}, \emph{use\_ALE}, \emph{CSp}, \emph{ACSp}}{}
Sets up the the inverse restoration time, and the values towards which the interface heights, velocities and tracers should be restored within the sponges for the RGC test case.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{u} :: {[}in{]} Array with the u velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}in{]} Array with the v velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{pf} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{use\_ale} :: {[}in{]} If true, indicates model is in ALE mode

\item {} 
\sphinxstylestrong{csp} :: Layer\sphinxhyphen{}mode sponge structure

\item {} 
\sphinxstylestrong{acsp} :: ALE\sphinxhyphen{}mode sponge structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_ml_density}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_ml\_density}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{rgc\_tracer module reference}
\label{\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer}}\label{\detokenize{api/generated/modules/rgc_tracer:rgc-tracer-module-reference}}\label{\detokenize{api/generated/modules/rgc_tracer::doc}}\index{rgc\_tracer (module)@\spxentry{rgc\_tracer}\spxextra{module}|spxpagem}
This module contains the routines used to set up a dynamically passive tracer. Set up and use passive tracers requires the following: (1) register\_RGC\_tracer (2) apply diffusion, physics/chemistry and advect the tracer.

{\hyperref[\detokenize{api/generated/modules/rgc_tracer:detargc-tracer}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/rgc_tracer:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer\_cs}}}}}
&
tracer control structure
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/rgc_tracer:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/register_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_rgc\_tracer()}}}}}
&
This subroutine is used to register tracer fields.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/initialize_rgc_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{initialize\_rgc\_tracer()}}}}}
&
Initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgc\_tracer\_end()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/rgc_tracer:detailed-description}}\label{\detokenize{api/generated/modules/rgc_tracer:detargc-tracer}}
This module contains the routines used to set up a dynamically passive tracer. Set up and use passive tracers requires the following: (1) register\_RGC\_tracer (2) apply diffusion, physics/chemistry and advect the tracer.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/rgc_tracer:type-documentation}}\index{rgc\_tracer\_cs (fortran type in module rgc\_tracer)@\spxentry{rgc\_tracer\_cs}\spxextra{fortran type in module rgc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{rgc\_tracer/}}\sphinxbfcode{\sphinxupquote{rgc\_tracer\_cs}}}
tracer control structure
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The full path to the IC file, or ” ” to initialize internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this package.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_aux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The masked tracer concentration.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr )}\sphinxstyleemphasis{{]}} :: The value of tr used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lenlat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: the latitudinal or y\sphinxhyphen{}direction length of the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lenlon}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: the longitudinal or x\sphinxhyphen{}direction length of the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{csl}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The length of the continental shelf (x dir, km)

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lensponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: the length of the sponge layer.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{mask\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, tracers are masked out in massless layers.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sponges may be applied somewhere in the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr )}\sphinxstyleemphasis{{]}} :: Descriptions and metadata for the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/rgc_tracer:function-subroutine-documentation}}\index{register\_rgc\_tracer() (fortran function in module rgc\_tracer)@\spxentry{register\_rgc\_tracer()}\spxextra{fortran function in module rgc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/register_rgc_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{rgc\_tracer/}}\sphinxbfcode{\sphinxupquote{register\_rgc\_tracer}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This subroutine is used to register tracer fields.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module (in/out).

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer to the tracer registry.

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{initialize\_rgc\_tracer() (fortran subroutine in module rgc\_tracer)@\spxentry{initialize\_rgc\_tracer()}\spxextra{fortran subroutine in module rgc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/initialize_rgc_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rgc\_tracer/}}\sphinxbfcode{\sphinxupquote{initialize\_rgc\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{layer\_CSp}, \emph{sponge\_CSp}}{}
Initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness, in m or kg m\sphinxhyphen{}2.

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} Structure used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used. This is not being used for now.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to RGC\_register\_tracer.

\item {} 
\sphinxstylestrong{layer\_csp} :: A pointer to the control structure

\item {} 
\sphinxstylestrong{sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use. Otherwise this may be unassociated.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ale_sponge:f/mom_ale_sponge/get_ale_sponge_nz_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ale\_sponge::get\_ale\_sponge\_nz\_data}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rgc\_tracer\_column\_physics() (fortran subroutine in module rgc\_tracer)@\spxentry{rgc\_tracer\_column\_physics()}\spxextra{fortran subroutine in module rgc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rgc\_tracer/}}\sphinxbfcode{\sphinxupquote{rgc\_tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{evap\_CFL\_limit}, \emph{minimum\_forcing\_depth}}{}
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call.

\item {} 
\sphinxstylestrong{evap\_cfl\_limit} :: {[}in{]} Limit on the fraction of the water that can be fluxed out of the top layer in a timestep {[}nondim{]}.

\item {} 
\sphinxstylestrong{minimum\_forcing\_depth} :: {[}in{]} The smallest depth over which fluxes can be applied {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/applytracerboundaryfluxesinout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::applytracerboundaryfluxesinout}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_diabatic:f/mom_tracer_diabatic/tracer_vertdiff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_diabatic::tracer\_vertdiff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rgc\_tracer\_end() (fortran subroutine in module rgc\_tracer)@\spxentry{rgc\_tracer\_end()}\spxextra{fortran subroutine in module rgc\_tracer}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rgc_tracer:f/rgc_tracer/rgc_tracer_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rgc\_tracer/}}\sphinxbfcode{\sphinxupquote{rgc\_tracer\_end}}}{\emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to RGC\_register\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{rossby\_front\_2d\_initialization module reference}
\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization}}\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:rossby-front-2d-initialization-module-reference}}\label{\detokenize{api/generated/modules/rossby_front_2d_initialization::doc}}\index{rossby\_front\_2d\_initialization (module)@\spxentry{rossby\_front\_2d\_initialization}\spxextra{module}|spxpagem}
Initial conditions for the 2D Rossby front test.

{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:detarossby-front-2d-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_thickness()}}}}}
&
Initialization of thicknesses in 2D Rossby front test.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_temperature\_salinity()}}}}}
&
Initialization of temperature and salinity in the Rossby front test.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_velocity()}}}}}
&
Initialization of u and v in the Rossby front test.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/ypseudo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ypseudo()}}}}}
&
Pseudo coordinate across domain used by Hml() and dTdy() returns a coordinate from \sphinxhyphen{}PI/2 ..
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/hml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hml()}}}}}
&
Analytic prescription of mixed layer depth in 2d Rossby front test, in the same units as Gmax\_depth.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/dtdy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dtdy()}}}}}
&
Analytic prescription of mixed layer temperature gradient in 2d Rossby front test.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:detailed-description}}\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:detarossby-front-2d-initialization}}

\paragraph{Description of the 2d Rossby front initial conditions}
\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:description-of-the-2d-rossby-front-initial-conditions}}\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:namespacerossby-front-2d-initialization-1section-rossby-front-2d}}
Consistent with a linear equation of state, the system has a constant stratification below the mixed layer, stratified in temperature only. Isotherms are flat below the mixed layer and vertical within. Salinity is constant. The mixed layer has a half sine form so that there are no mixed layer or temperature gradients at the side walls.

Below the mixed layer the potential temperature,
\(\theta(z)\) , is given by
\begin{equation*}
\begin{split}\theta(z) = \theta_0 - \Delta \theta \left( z + h_{ML} \right)\end{split}
\end{equation*}
where \(\theta_0\) and \(\Delta \theta\) are external model parameters.

The depth of the mixed layer,
\(H_{ML}\) is
\begin{equation*}
\begin{split}h_{ML}(y) = h_{min} + \left( h_{max} - h_{min} \right) \cos{\pi y/L}\end{split}
\end{equation*}
. The temperature in mixed layer is given by the reference temperature at \(z=h_{ML}\) so that

\begin{eqnarray} \theta(y,z) = \theta_0 - \Delta \theta \left( z + h_{ML} \right) & \forall & z < h_{ML}(y) T.B.D. \end{eqnarray}


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:function-subroutine-documentation}}\index{rossby\_front\_initialize\_thickness() (fortran subroutine in module rossby\_front\_2d\_initialization)@\spxentry{rossby\_front\_initialize\_thickness()}\spxextra{fortran subroutine in module rossby\_front\_2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization/}}\sphinxbfcode{\sphinxupquote{rossby\_front\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialization of thicknesses in 2D Rossby front test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/hml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hml}}}}} \sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rossby\_front\_initialize\_temperature\_salinity() (fortran subroutine in module rossby\_front\_2d\_initialization)@\spxentry{rossby\_front\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module rossby\_front\_2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization/}}\sphinxbfcode{\sphinxupquote{rossby\_front\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initialization of temperature and salinity in the Rossby front test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file handle

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing T \& S.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/hml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hml}}}}} \sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}

\index{rossby\_front\_initialize\_velocity() (fortran subroutine in module rossby\_front\_2d\_initialization)@\spxentry{rossby\_front\_initialize\_velocity()}\spxextra{fortran subroutine in module rossby\_front\_2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_velocity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization/}}\sphinxbfcode{\sphinxupquote{rossby\_front\_initialize\_velocity}}}{\emph{u}, \emph{v}, \emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialization of u and v in the Rossby front test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} i\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} j\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without setting u \& v.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/dtdy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dtdy}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/hml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hml}}}}} \sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{ypseudo() (fortran function in module rossby\_front\_2d\_initialization)@\spxentry{ypseudo()}\spxextra{fortran function in module rossby\_front\_2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/ypseudo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization/}}\sphinxbfcode{\sphinxupquote{ypseudo}}}{\emph{G}, \emph{lat}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Pseudo coordinate across domain used by Hml() and dTdy() returns a coordinate from \sphinxhyphen{}PI/2 .. PI/2 squashed towards the center of the domain.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{frontfractionalwidth}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/dtdy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dtdy}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/hml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hml}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{hml() (fortran function in module rossby\_front\_2d\_initialization)@\spxentry{hml()}\spxextra{fortran function in module rossby\_front\_2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/hml}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization/}}\sphinxbfcode{\sphinxupquote{hml}}}{\emph{G}, \emph{lat}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Analytic prescription of mixed layer depth in 2d Rossby front test, in the same units as Gmax\_depth.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{hmlmax}} \sphinxcode{\sphinxupquote{hmlmin}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/ypseudo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ypseudo}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_velocity}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{dtdy() (fortran function in module rossby\_front\_2d\_initialization)@\spxentry{dtdy()}\spxextra{fortran function in module rossby\_front\_2d\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/dtdy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{rossby\_front\_2d\_initialization/}}\sphinxbfcode{\sphinxupquote{dtdy}}}{\emph{G}, \emph{dT}, \emph{lat}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
Analytic prescription of mixed layer temperature gradient in 2d Rossby front test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} Top to bottom temperature difference

\item {} 
\sphinxstylestrong{lat} :: {[}in{]} Latitude

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{frontfractionalwidth}} \sphinxcode{\sphinxupquote{hmlmax}} \sphinxcode{\sphinxupquote{hmlmin}} {\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/ypseudo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ypseudo}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/rossby_front_2d_initialization:f/rossby_front_2d_initialization/rossby_front_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rossby\_front\_initialize\_velocity}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{scm\_cvmix\_tests module reference}
\label{\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests}}\label{\detokenize{api/generated/modules/scm_cvmix_tests:scm-cvmix-tests-module-reference}}\label{\detokenize{api/generated/modules/scm_cvmix_tests::doc}}\index{scm\_cvmix\_tests (module)@\spxentry{scm\_cvmix\_tests}\spxextra{module}|spxpagem}
Initial conditions and forcing for the single column model (SCM) CVMix test set.

{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:detascm-cvmix-tests}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/scm_cvmix_tests:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests\_cs}}}}}
&
Container for surface forcing parameters.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/scm_cvmix_tests:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_ts_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests\_ts\_init()}}}}}
&
Initializes temperature and salinity for the SCM CVMix test example.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests\_surface\_forcing\_init()}}}}}
&
Initializes surface forcing for the CVMix test case suite.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests\_wind\_forcing()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scm\_cvmix\_tests\_buoyancy\_forcing()}}}}}
&

\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/scm_cvmix_tests:detailed-description}}\label{\detokenize{api/generated/modules/scm_cvmix_tests:detascm-cvmix-tests}}
Initial conditions and forcing for the single column model (SCM) CVMix test set.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/scm_cvmix_tests:type-documentation}}\index{scm\_cvmix\_tests\_cs (fortran type in module scm\_cvmix\_tests)@\spxentry{scm\_cvmix\_tests\_cs}\spxextra{fortran type in module scm\_cvmix\_tests}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{scm\_cvmix\_tests/}}\sphinxbfcode{\sphinxupquote{scm\_cvmix\_tests\_cs}}}
Container for surface forcing parameters.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usewindstress}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True to use wind stress.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{useheatflux}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True to use heat flux.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{useevaporation}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True to use evaporation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{usediurnalsw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: True to use diurnal sw radiation.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tau\_x}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: (Constant) Wind stress, X {[}Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tau\_y}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: (Constant) Wind stress, Y {[}Pa{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{surf\_hf}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: (Constant) Heat flux {[}degC Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m degC s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{surf\_evap}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: (Constant) Evaporation rate {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_sw}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: maximum of diurnal sw radiation {[}degC Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} degC m s\sphinxhyphen{}1{]}

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{,}\sphinxstyleemphasis{private}\sphinxstyleemphasis{{]}} :: reference density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/scm_cvmix_tests:function-subroutine-documentation}}\index{scm\_cvmix\_tests\_ts\_init() (fortran subroutine in module scm\_cvmix\_tests)@\spxentry{scm\_cvmix\_tests\_ts\_init()}\spxextra{fortran subroutine in module scm\_cvmix\_tests}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_ts_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{scm\_cvmix\_tests/}}\sphinxbfcode{\sphinxupquote{scm\_cvmix\_tests\_ts\_init}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initializes temperature and salinity for the SCM CVMix test example.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}psu{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Input parameter structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scm\_cvmix\_tests\_surface\_forcing\_init() (fortran subroutine in module scm\_cvmix\_tests)@\spxentry{scm\_cvmix\_tests\_surface\_forcing\_init()}\spxextra{fortran subroutine in module scm\_cvmix\_tests}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{scm\_cvmix\_tests/}}\sphinxbfcode{\sphinxupquote{scm\_cvmix\_tests\_surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{param\_file}, \emph{CS}}{}
Initializes surface forcing for the CVMix test case suite.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} Model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Input parameter structure

\item {} 
\sphinxstylestrong{cs} :: Parameter container

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scm\_cvmix\_tests\_wind\_forcing() (fortran subroutine in module scm\_cvmix\_tests)@\spxentry{scm\_cvmix\_tests\_wind\_forcing()}\spxextra{fortran subroutine in module scm\_cvmix\_tests}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_wind_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{scm\_cvmix\_tests/}}\sphinxbfcode{\sphinxupquote{scm\_cvmix\_tests\_wind\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} Surface state structure

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time in days

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Container for SCM parameters

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mom\_domains::to\_all}}

\end{description}\end{quote}

\end{fulllineitems}

\index{scm\_cvmix\_tests\_buoyancy\_forcing() (fortran subroutine in module scm\_cvmix\_tests)@\spxentry{scm\_cvmix\_tests\_buoyancy\_forcing()}\spxextra{fortran subroutine in module scm\_cvmix\_tests}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/scm_cvmix_tests:f/scm_cvmix_tests/scm_cvmix_tests_buoyancy_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{scm\_cvmix\_tests/}}\sphinxbfcode{\sphinxupquote{scm\_cvmix\_tests\_buoyancy\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} Surface state structure

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} Surface fluxes structure

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Current model time

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} Grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: Container for SCM parameters

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{seamount\_initialization module reference}
\label{\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization}}\label{\detokenize{api/generated/modules/seamount_initialization:seamount-initialization-module-reference}}\label{\detokenize{api/generated/modules/seamount_initialization::doc}}\index{seamount\_initialization (module)@\spxentry{seamount\_initialization}\spxextra{module}|spxpagem}
Configures the model for the idealized seamount test case.

{\hyperref[\detokenize{api/generated/modules/seamount_initialization:detaseamount-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/seamount_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialize\_topography()}}}}}
&
Initialization of topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialize\_thickness()}}}}}
&
Initialization of thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{seamount\_initialize\_temperature\_salinity()}}}}}
&
Initial values for temperature and salinity.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/seamount_initialization:detailed-description}}\label{\detokenize{api/generated/modules/seamount_initialization:detaseamount-initialization}}
Configures the model for the idealized seamount test case.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/seamount_initialization:function-subroutine-documentation}}\index{seamount\_initialize\_topography() (fortran subroutine in module seamount\_initialization)@\spxentry{seamount\_initialize\_topography()}\spxextra{fortran subroutine in module seamount\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{seamount\_initialization/}}\sphinxbfcode{\sphinxupquote{seamount\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
Initialization of topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{seamount\_initialize\_thickness() (fortran subroutine in module seamount\_initialization)@\spxentry{seamount\_initialize\_thickness()}\spxextra{fortran subroutine in module seamount\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{seamount\_initialization/}}\sphinxbfcode{\sphinxupquote{seamount\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialization of thicknesses. This subroutine initializes the layer thicknesses to be uniform.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\end{description}\end{quote}

\end{fulllineitems}

\index{seamount\_initialize\_temperature\_salinity() (fortran subroutine in module seamount\_initialization)@\spxentry{seamount\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module seamount\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/seamount_initialization:f/seamount_initialization/seamount_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{seamount\_initialization/}}\sphinxbfcode{\sphinxupquote{seamount\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initial values for temperature and salinity.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} Vertical grid structure

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_rho}} \sphinxcode{\sphinxupquote{regrid\_consts::regridding\_sigma}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{shelfwave\_initialization module reference}
\label{\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization}}\label{\detokenize{api/generated/modules/shelfwave_initialization:shelfwave-initialization-module-reference}}\label{\detokenize{api/generated/modules/shelfwave_initialization::doc}}\index{shelfwave\_initialization (module)@\spxentry{shelfwave\_initialization}\spxextra{module}|spxpagem}
Configures the model for the idealized shelfwave test case.

{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:detashelfwave-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/shelfwave_initialization:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_obc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_obc\_cs}}}}}
&
Control structure for shelfwave open boundaries.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/shelfwave_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/register_shelfwave_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_shelfwave\_obc()}}}}}
&
Add shelfwave to OBC registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_obc\_end()}}}}}
&
Clean up the shelfwave OBC from registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_initialize\_topography()}}}}}
&
Initialization of topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shelfwave\_set\_obc\_data()}}}}}
&
This subroutine sets the properties of flow at open boundary conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/shelfwave_initialization:detailed-description}}\label{\detokenize{api/generated/modules/shelfwave_initialization:detashelfwave-initialization}}
Configures the model for the idealized shelfwave test case.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/shelfwave_initialization:type-documentation}}\index{shelfwave\_obc\_cs (fortran type in module shelfwave\_initialization)@\spxentry{shelfwave\_obc\_cs}\spxextra{fortran type in module shelfwave\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_obc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{shelfwave\_initialization/}}\sphinxbfcode{\sphinxupquote{shelfwave\_obc\_cs}}}
Control structure for shelfwave open boundaries.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lx}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Long\sphinxhyphen{}shore length scale of bathymetry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ly}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Cross\sphinxhyphen{}shore length scale.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{f0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Coriolis parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{jj}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Cross\sphinxhyphen{}shore wave mode.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kk}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Parameter.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ll}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Longshore wavenumber.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{alpha}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: 1/Ly.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{omega}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Frequency.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/shelfwave_initialization:function-subroutine-documentation}}\index{register\_shelfwave\_obc() (fortran function in module shelfwave\_initialization)@\spxentry{register\_shelfwave\_obc()}\spxextra{fortran function in module shelfwave\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/register_shelfwave_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{shelfwave\_initialization/}}\sphinxbfcode{\sphinxupquote{register\_shelfwave\_obc}}}{\emph{param\_file}, \emph{CS}, \emph{OBC\_Reg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Add shelfwave to OBC registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file.

\item {} 
\sphinxstylestrong{cs} :: shelfwave control structure.

\item {} 
\sphinxstylestrong{obc\_reg} :: OBC registry.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{shelfwave\_obc\_end() (fortran subroutine in module shelfwave\_initialization)@\spxentry{shelfwave\_obc\_end()}\spxextra{fortran subroutine in module shelfwave\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_obc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{shelfwave\_initialization/}}\sphinxbfcode{\sphinxupquote{shelfwave\_obc\_end}}}{\emph{CS}}{}
Clean up the shelfwave OBC from registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: shelfwave control structure.

\end{description}\end{quote}

\end{fulllineitems}

\index{shelfwave\_initialize\_topography() (fortran subroutine in module shelfwave\_initialization)@\spxentry{shelfwave\_initialize\_topography()}\spxextra{fortran subroutine in module shelfwave\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{shelfwave\_initialization/}}\sphinxbfcode{\sphinxupquote{shelfwave\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
Initialization of topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{shelfwave\_set\_obc\_data() (fortran subroutine in module shelfwave\_initialization)@\spxentry{shelfwave\_set\_obc\_data()}\spxextra{fortran subroutine in module shelfwave\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/shelfwave_initialization:f/shelfwave_initialization/shelfwave_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{shelfwave\_initialization/}}\sphinxbfcode{\sphinxupquote{shelfwave\_set\_obc\_data}}}{\emph{OBC}, \emph{CS}, \emph{G}, \emph{h}, \emph{Time}}{}
This subroutine sets the properties of flow at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: tidal bay control structure.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{sloshing\_initialization module reference}
\label{\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization}}\label{\detokenize{api/generated/modules/sloshing_initialization:sloshing-initialization-module-reference}}\label{\detokenize{api/generated/modules/sloshing_initialization::doc}}\index{sloshing\_initialization (module)@\spxentry{sloshing\_initialization}\spxextra{module}|spxpagem}
Initialization for the “sloshing” internal waves configuration.

{\hyperref[\detokenize{api/generated/modules/sloshing_initialization:detasloshing-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/sloshing_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sloshing\_initialize\_topography()}}}}}
&
Initialization of topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sloshing\_initialize\_thickness()}}}}}
&
Initialization of thicknesses This routine is called when THICKNESS\_CONFIG is set to ‘sloshing’.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sloshing\_initialize\_temperature\_salinity()}}}}}
&
Initialization of temperature and salinity.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/sloshing_initialization:detailed-description}}\label{\detokenize{api/generated/modules/sloshing_initialization:detasloshing-initialization}}
The module configures the model for the non\sphinxhyphen{}rotating sloshing test case.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/sloshing_initialization:function-subroutine-documentation}}\index{sloshing\_initialize\_topography() (fortran subroutine in module sloshing\_initialization)@\spxentry{sloshing\_initialize\_topography()}\spxextra{fortran subroutine in module sloshing\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{sloshing\_initialization/}}\sphinxbfcode{\sphinxupquote{sloshing\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}}{}
Initialization of topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in the units of depth\_max

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum ocean depth in arbitrary units

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{sloshing\_initialize\_thickness() (fortran subroutine in module sloshing\_initialization)@\spxentry{sloshing\_initialize\_thickness()}\spxextra{fortran subroutine in module sloshing\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{sloshing\_initialization/}}\sphinxbfcode{\sphinxupquote{sloshing\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
Initialization of thicknesses This routine is called when THICKNESS\_CONFIG is set to ‘sloshing’.

This routine initializes layer positions to set off a sloshing motion in the zonal direction in a rectangular basin. All layers have initially the same thickness but all interfaces (except bottom and sea surface) are displaced according to a half\sphinxhyphen{}period cosine, with maximum value on the left and minimum value on the right. This sets off a regular sloshing motion.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{sloshing\_initialize\_temperature\_salinity() (fortran subroutine in module sloshing\_initialization)@\spxentry{sloshing\_initialize\_temperature\_salinity()}\spxextra{fortran subroutine in module sloshing\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/sloshing_initialization:f/sloshing_initialization/sloshing_initialize_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{sloshing\_initialization/}}\sphinxbfcode{\sphinxupquote{sloshing\_initialize\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
Initialization of temperature and salinity.

This subroutine initializes linear profiles for T and S according to reference surface layer salinity and temperature and a specified range. Note that the linear distribution is set up with respect to the layer number, not the physical position).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{soliton\_initialization module reference}
\label{\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization}}\label{\detokenize{api/generated/modules/soliton_initialization:soliton-initialization-module-reference}}\label{\detokenize{api/generated/modules/soliton_initialization::doc}}\index{soliton\_initialization (module)@\spxentry{soliton\_initialization}\spxextra{module}|spxpagem}
Initial conditions for the Equatorial Rossby soliton test (Boyd).

{\hyperref[\detokenize{api/generated/modules/soliton_initialization:detasoliton-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/soliton_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization/soliton_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{soliton\_initialize\_thickness()}}}}}
&
Initialization of thicknesses in Equatorial Rossby soliton test.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization/soliton_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{soliton\_initialize\_velocity()}}}}}
&
Initialization of u and v in the equatorial Rossby soliton test.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/soliton_initialization:detailed-description}}\label{\detokenize{api/generated/modules/soliton_initialization:detasoliton-initialization}}

\paragraph{Description of the equatorial Rossby soliton initial}
\label{\detokenize{api/generated/modules/soliton_initialization:description-of-the-equatorial-rossby-soliton-initial}}\label{\detokenize{api/generated/modules/soliton_initialization:namespacesoliton-initialization-1section-soliton}}
conditions


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/soliton_initialization:function-subroutine-documentation}}\index{soliton\_initialize\_thickness() (fortran subroutine in module soliton\_initialization)@\spxentry{soliton\_initialize\_thickness()}\spxextra{fortran subroutine in module soliton\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization/soliton_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{soliton\_initialization/}}\sphinxbfcode{\sphinxupquote{soliton\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{US}}{}
Initialization of thicknesses in Equatorial Rossby soliton test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thickness that is being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_mesg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_mesg}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{soliton\_initialize\_velocity() (fortran subroutine in module soliton\_initialization)@\spxentry{soliton\_initialize\_velocity()}\spxextra{fortran subroutine in module soliton\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/soliton_initialization:f/soliton_initialization/soliton_initialize_velocity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{soliton\_initialization/}}\sphinxbfcode{\sphinxupquote{soliton\_initialize\_velocity}}}{\emph{u}, \emph{v}, \emph{h}, \emph{G}, \emph{US}}{}
Initialization of u and v in the equatorial Rossby soliton test.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Grid structure

\item {} 
\sphinxstylestrong{u} :: {[}out{]} i\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} j\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{supercritical\_initialization module reference}
\label{\detokenize{api/generated/modules/supercritical_initialization:f/supercritical_initialization}}\label{\detokenize{api/generated/modules/supercritical_initialization:supercritical-initialization-module-reference}}\label{\detokenize{api/generated/modules/supercritical_initialization::doc}}\index{supercritical\_initialization (module)@\spxentry{supercritical\_initialization}\spxextra{module}|spxpagem}
The “super critical” configuration.

{\hyperref[\detokenize{api/generated/modules/supercritical_initialization:detasupercritical-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/supercritical_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/supercritical_initialization:f/supercritical_initialization/supercritical_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{supercritical\_set\_obc\_data()}}}}}
&
This subroutine sets the properties of flow at open boundary conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/supercritical_initialization:detailed-description}}\label{\detokenize{api/generated/modules/supercritical_initialization:detasupercritical-initialization}}
The module configures the model for the “supercritical” experiment.
\sphinxurl{https://marine.rutgers.edu/po/index.php?model=test-problems\&title=supercritical}
.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/supercritical_initialization:function-subroutine-documentation}}\index{supercritical\_set\_obc\_data() (fortran subroutine in module supercritical\_initialization)@\spxentry{supercritical\_set\_obc\_data()}\spxextra{fortran subroutine in module supercritical\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/supercritical_initialization:f/supercritical_initialization/supercritical_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{supercritical\_initialization/}}\sphinxbfcode{\sphinxupquote{supercritical\_set\_obc\_data}}}{\emph{OBC}, \emph{G}, \emph{param\_file}}{}
This subroutine sets the properties of flow at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{tidal\_bay\_initialization module reference}
\label{\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization}}\label{\detokenize{api/generated/modules/tidal_bay_initialization:tidal-bay-initialization-module-reference}}\label{\detokenize{api/generated/modules/tidal_bay_initialization::doc}}\index{tidal\_bay\_initialization (module)@\spxentry{tidal\_bay\_initialization}\spxextra{module}|spxpagem}
Configures the model for the “tidal\_bay” experiment. tidal\_bay = Tidally resonant bay from Zygmunt Kowalik’s class on tides.

{\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:detatidal-bay-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/tidal_bay_initialization:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_obc_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_bay\_obc\_cs}}}}}
&
Control structure for tidal bay open boundaries.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/tidal_bay_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/register_tidal_bay_obc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_tidal\_bay\_obc()}}}}}
&
Add tidal bay to OBC registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_obc_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_bay\_obc\_end()}}}}}
&
Clean up the tidal bay OBC from registry.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tidal\_bay\_set\_obc\_data()}}}}}
&
This subroutine sets the properties of flow at open boundary conditions.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/tidal_bay_initialization:detailed-description}}\label{\detokenize{api/generated/modules/tidal_bay_initialization:detatidal-bay-initialization}}
Configures the model for the “tidal\_bay” experiment. tidal\_bay = Tidally resonant bay from Zygmunt Kowalik’s class on tides.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/tidal_bay_initialization:type-documentation}}\index{tidal\_bay\_obc\_cs (fortran type in module tidal\_bay\_initialization)@\spxentry{tidal\_bay\_obc\_cs}\spxextra{fortran type in module tidal\_bay\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_obc_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{tidal\_bay\_initialization/}}\sphinxbfcode{\sphinxupquote{tidal\_bay\_obc\_cs}}}
Control structure for tidal bay open boundaries.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tide\_flow}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: Maximum tidal flux.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/tidal_bay_initialization:function-subroutine-documentation}}\index{register\_tidal\_bay\_obc() (fortran function in module tidal\_bay\_initialization)@\spxentry{register\_tidal\_bay\_obc()}\spxextra{fortran function in module tidal\_bay\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/register_tidal_bay_obc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{tidal\_bay\_initialization/}}\sphinxbfcode{\sphinxupquote{register\_tidal\_bay\_obc}}}{\emph{param\_file}, \emph{CS}, \emph{OBC\_Reg}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
Add tidal bay to OBC registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} parameter file.

\item {} 
\sphinxstylestrong{cs} :: tidal bay control structure.

\item {} 
\sphinxstylestrong{obc\_reg} :: OBC registry.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_bay\_obc\_end() (fortran subroutine in module tidal\_bay\_initialization)@\spxentry{tidal\_bay\_obc\_end()}\spxextra{fortran subroutine in module tidal\_bay\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_obc_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{tidal\_bay\_initialization/}}\sphinxbfcode{\sphinxupquote{tidal\_bay\_obc\_end}}}{\emph{CS}}{}
Clean up the tidal bay OBC from registry.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: tidal bay control structure.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_boundary_update:f/mom_boundary_update/obc_register_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_boundary\_update::obc\_register\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tidal\_bay\_set\_obc\_data() (fortran subroutine in module tidal\_bay\_initialization)@\spxentry{tidal\_bay\_set\_obc\_data()}\spxextra{fortran subroutine in module tidal\_bay\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/tidal_bay_initialization:f/tidal_bay_initialization/tidal_bay_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{tidal\_bay\_initialization/}}\sphinxbfcode{\sphinxupquote{tidal\_bay\_set\_obc\_data}}}{\emph{OBC}, \emph{CS}, \emph{G}, \emph{h}, \emph{Time}}{}
This subroutine sets the properties of flow at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: tidal bay control structure.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} layer thickness.

\item {} 
\sphinxstylestrong{time} :: {[}in{]} model time.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{tidal\_forcing module reference}
\label{\detokenize{api/generated/modules/tidal_forcing:f/tidal_forcing}}\label{\detokenize{api/generated/modules/tidal_forcing:tidal-forcing-module-reference}}\label{\detokenize{api/generated/modules/tidal_forcing::doc}}\index{tidal\_forcing (module)@\spxentry{tidal\_forcing}\spxextra{module}|spxpagem}
Code by Robert Hallberg, August 2005, based on C\sphinxhyphen{}code by Harper Simmons, February, 2003, in turn based on code by Brian Arbic.

{\hyperref[\detokenize{api/generated/modules/tidal_forcing:detatidal-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/tidal_forcing:detailed-description}}\label{\detokenize{api/generated/modules/tidal_forcing:detatidal-forcing}}
The main subroutine in this file calculates the total tidal contribution to the geopotential, including self\sphinxhyphen{}attraction and loading terms and the astronomical contributions. All options are selected with entries in a file that is parsed at run\sphinxhyphen{}time. Overall tides are enabled with the run\sphinxhyphen{}time parameter ‘TIDES=True’. Tidal constituents must be individually enabled with lines like ‘TIDE\_M2=True’. This file has default values of amplitude, frequency, Love number, and phase at time 0 for the Earth’s M2, S2, N2, K2, K1, O1, P1, Q1, MF, and MM tidal constituents, but the frequency, amplitude and phase ant time 0 for each constituent can be changed at run time by setting variables like TIDE\_M2\_FREQ, TIDE\_M2\_AMP and TIDE\_M2\_PHASE\_T0 (for M2).

In addition, the approach to calculating self\sphinxhyphen{}attraction and loading is set at run time. The default is to use the scalar approximation, with a coefficient TIDE\_SAL\_SCALAR\_VALUE that must be set in the run\sphinxhyphen{}time file (for global runs, 0.094 is typical). Alternately, TIDAL\_SAL\_FROM\_FILE can be set to read the SAL from a file containing the results of a previous simulation. To iterate the SAL to convergence, USE\_PREVIOUS\_TIDES may be useful (for details, see Arbic et al., 2004, DSR II). With TIDAL\_SAL\_FROM\_FILE or USE\_PREVIOUS\_TIDES,a list of input files must be provided to describe each constituent’s properties from a previous solution.


\subsection{user\_change\_diffusivity module reference}
\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity}}\label{\detokenize{api/generated/modules/user_change_diffusivity:user-change-diffusivity-module-reference}}\label{\detokenize{api/generated/modules/user_change_diffusivity::doc}}\index{user\_change\_diffusivity (module)@\spxentry{user\_change\_diffusivity}\spxextra{module}|spxpagem}
Increments the diapycnal diffusivity in a specified band of latitudes and densities.

{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:detauser-change-diffusivity}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/user_change_diffusivity:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff\_cs}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/user_change_diffusivity:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff()}}}}}
&
This subroutine provides an interface for a user to use to modify the main code to alter the diffusivities as needed.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/range_ok}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{range\_ok()}}}}}
&
This subroutine checks whether the 4 values of range are in ascending order.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/val_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{val\_weights()}}}}}
&
This subroutine returns a value that goes smoothly from 0 to 1, stays at 1, and then goes smoothly back to 0 at the four values of range.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff\_init()}}}}}
&
Set up the module control structure.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff\_end()}}}}}
&
Clean up the module control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/user_change_diffusivity:detailed-description}}\label{\detokenize{api/generated/modules/user_change_diffusivity:detauser-change-diffusivity}}
Increments the diapycnal diffusivity in a specified band of latitudes and densities.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/user_change_diffusivity:type-documentation}}\index{user\_change\_diff\_cs (fortran type in module user\_change\_diffusivity)@\spxentry{user\_change\_diff\_cs}\spxextra{fortran type in module user\_change\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{user\_change\_diffusivity/}}\sphinxbfcode{\sphinxupquote{user\_change\_diff\_cs}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diffusivity()}}}}}.
.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{kd\_add}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The scale of a diffusivity that is added everywhere without any filtering or scaling {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{lat\_range}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(4)}\sphinxstyleemphasis{{]}} :: 4 values that define the latitude range over which a diffusivity scaled by Kd\_add is added {[}degLat{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_range}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(4)}\sphinxstyleemphasis{{]}} :: 4 values that define the coordinate potential density range over which a diffusivity scaled by Kd\_add is added {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_abs\_lat}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use the absolute value of latitude when setting lat\_range.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/user_change_diffusivity:function-subroutine-documentation}}\index{user\_change\_diff() (fortran subroutine in module user\_change\_diffusivity)@\spxentry{user\_change\_diff()}\spxextra{fortran subroutine in module user\_change\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_change\_diffusivity/}}\sphinxbfcode{\sphinxupquote{user\_change\_diff}}}{\emph{h}, \emph{tv}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}, \emph{Kd\_lay}, \emph{Kd\_int}, \emph{T\_f}, \emph{S\_f}, \emph{Kd\_int\_add}}{}
This subroutine provides an interface for a user to use to modify the main code to alter the diffusivities as needed. The specific example implemented here augments the diffusivity for a specified range of latitude and coordinate potential density.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: This module’s control structure.

\item {} 
\sphinxstylestrong{kd\_lay} :: {[}inout{]} The diapycnal diffusivity of each layer {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{kd\_int} :: {[}inout{]} The diapycnal diffusivity at each interface {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\item {} 
\sphinxstylestrong{t\_f} :: {[}in{]} Temperature with massless layers filled in vertically {[}degC{]}.

\item {} 
\sphinxstylestrong{s\_f} :: {[}in{]} Salinity with massless layers filled in vertically {[}ppt{]}.

\item {} 
\sphinxstylestrong{kd\_int\_add} :: The diapycnal diffusivity that is being added at each interface {[}Z2 T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m2 s\sphinxhyphen{}1{]}.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_eos:f/mom_eos/eos_domain}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_eos::eos\_domain}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/range_ok}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{range\_ok}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/val_weights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{val\_weights}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{range\_ok() (fortran function in module user\_change\_diffusivity)@\spxentry{range\_ok()}\spxextra{fortran function in module user\_change\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/range_ok}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{user\_change\_diffusivity/}}\sphinxbfcode{\sphinxupquote{range\_ok}}}{\emph{range}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This subroutine checks whether the 4 values of range are in ascending order.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{range} :: {[}in{]} Four values to check.

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{val\_weights() (fortran function in module user\_change\_diffusivity)@\spxentry{val\_weights()}\spxextra{fortran function in module user\_change\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/val_weights}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{user\_change\_diffusivity/}}\sphinxbfcode{\sphinxupquote{val\_weights}}}{\emph{val}, \emph{range}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}}}
This subroutine returns a value that goes smoothly from 0 to 1, stays at 1, and then goes smoothly back to 0 at the four values of range. The transitions are cubic, and have zero first derivatives where the curves hit 0 and 1. The values in range must be in ascending order, as can be checked by calling range\_OK.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{val} :: {[}in{]} Value for which we need an answer {[}arbitrary units{]}.

\item {} 
\sphinxstylestrong{range} :: {[}in{]} Range over which the answer is non\sphinxhyphen{}zero {[}arbitrary units{]}.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value {[}nondim{]}.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_change\_diff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_change\_diff\_init() (fortran subroutine in module user\_change\_diffusivity)@\spxentry{user\_change\_diff\_init()}\spxextra{fortran subroutine in module user\_change\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_change\_diffusivity/}}\sphinxbfcode{\sphinxupquote{user\_change\_diff\_init}}}{\emph{Time}, \emph{G}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
Set up the module control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{diag} :: {[}inout{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/range_ok}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{range\_ok}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_change\_diff\_end() (fortran subroutine in module user\_change\_diffusivity)@\spxentry{user\_change\_diff\_end()}\spxextra{fortran subroutine in module user\_change\_diffusivity}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_change_diffusivity:f/user_change_diffusivity/user_change_diff_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_change\_diffusivity/}}\sphinxbfcode{\sphinxupquote{user\_change\_diff\_end}}}{\emph{CS}}{}
Clean up the module control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module.

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_set_diffusivity:f/mom_set_diffusivity/set_diffusivity_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_set\_diffusivity::set\_diffusivity\_end}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{user\_initialization module reference}
\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization}}\label{\detokenize{api/generated/modules/user_initialization:user-initialization-module-reference}}\label{\detokenize{api/generated/modules/user_initialization::doc}}\index{user\_initialization (module)@\spxentry{user\_initialization}\spxextra{module}|spxpagem}
A template of a user to code up customized initial conditions.

{\hyperref[\detokenize{api/generated/modules/user_initialization:detauser-initialization}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/user_initialization:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_set\_coord()}}}}}
&
Set vertical coordinates.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_topography()}}}}}
&
Initialize topography.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_thickness()}}}}}
&
initialize thicknesses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_velocity()}}}}}
&
initialize velocities.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_init\_temperature\_salinity()}}}}}
&
This function puts the initial layer temperatures and salinities into T(:,:,:) and S(:,:,:).
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_sponges()}}}}}
&
Set up the sponges.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_set\_obc\_data()}}}}}
&
This subroutine sets the properties of flow at open boundary conditions.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_set\_rotation()}}}}}
&

\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log()}}}}}
&
Write output about the parameter values being used.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/user_initialization:detailed-description}}\label{\detokenize{api/generated/modules/user_initialization:detauser-initialization}}
This subroutine initializes the fields for the simulations. The one argument passed to initialize, Time, is set to the current time of the simulation. The fields which might be initialized here are:
\begin{itemize}
\item {} 
u \sphinxhyphen{} Zonal velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
v \sphinxhyphen{} Meridional velocity {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
h \sphinxhyphen{} Layer thickness {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}. (Must be positive.)

\item {} 
GbathyT \sphinxhyphen{} Basin depth {[}Z \textasciitilde{}\textgreater{} m{]}. (Must be positive.)

\item {} 
GCoriolisBu \sphinxhyphen{} The Coriolis parameter {[}T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} s\sphinxhyphen{}1{]}.

\item {} 
GVg\_prime \sphinxhyphen{} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
GVRlay \sphinxhyphen{} Layer potential density (coordinate variable) {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}. If ENABLE\_THERMODYNAMICS is defined:

\item {} 
T \sphinxhyphen{} Temperature {[}degC{]}.

\item {} 
S \sphinxhyphen{} Salinity {[}psu{]}. If BULKMIXEDLAYER is defined:

\item {} 
Rml \sphinxhyphen{} Mixed layer and buffer layer potential densities {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}. If SPONGE is defined:

\item {} 
A series of subroutine calls are made to set up the damping rates and reference profiles for all variables that are damped in the sponge.

\end{itemize}

Any user provided tracer code is also first linked through this subroutine.

These variables are all set in the set of subroutines (in this file) USER\_initialize\_bottom\_depth, USER\_initialize\_thickness, USER\_initialize\_velocity, USER\_initialize\_temperature\_salinity, USER\_initialize\_mixed\_layer\_density, USER\_initialize\_sponges, USER\_set\_coord, and USER\_set\_ref\_profile.

The names of these subroutines should be self\sphinxhyphen{}explanatory. They start with “{\color{red}\bfseries{}USER\_}” to indicate that they will likely have to be modified for each simulation to set the initial conditions and boundary conditions. Most of these take two arguments: an integer argument specifying whether the fields are to be calculated internally or read from a NetCDF file; and a string giving the path to that file. If the field is initialized internally, the path is ignored.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/user_initialization:function-subroutine-documentation}}\index{user\_set\_coord() (fortran subroutine in module user\_initialization)@\spxentry{user\_set\_coord()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_set\_coord}}}{\emph{Rlay}, \emph{g\_prime}, \emph{GV}, \emph{US}, \emph{param\_file}, \emph{eqn\_of\_state}}{}
Set vertical coordinates.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{rlay} :: {[}out{]} Layer potential density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxstylestrong{g\_prime} :: {[}out{]} The reduced gravity at each interface {[}L2 Z\sphinxhyphen{}1 T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_coord_initialization:f/mom_coord_initialization/mom_initialize_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_coord\_initialization::mom\_initialize\_coord}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_initialize\_topography() (fortran subroutine in module user\_initialization)@\spxentry{user\_initialize\_topography()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_topography}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_initialize\_topography}}}{\emph{D}, \emph{G}, \emph{param\_file}, \emph{max\_depth}, \emph{US}}{}
Initialize topography.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The dynamic horizontal grid type

\item {} 
\sphinxstylestrong{d} :: {[}out{]} Ocean bottom depth in m or Z if US is present

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} Parameter file structure

\item {} 
\sphinxstylestrong{max\_depth} :: {[}in{]} Maximum model depth in the units of D

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_fixed_initialization:f/mom_fixed_initialization/mom_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_fixed\_initialization::mom\_initialize\_topography}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_initialize\_thickness() (fortran subroutine in module user\_initialization)@\spxentry{user\_initialize\_thickness()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_initialize\_thickness}}}{\emph{h}, \emph{G}, \emph{GV}, \emph{param\_file}, \emph{just\_read\_params}}{}
initialize thicknesses.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{h} :: {[}out{]} The thicknesses being initialized {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_initialize\_velocity() (fortran subroutine in module user\_initialization)@\spxentry{user\_initialize\_velocity()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_velocity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_initialize\_velocity}}}{\emph{u}, \emph{v}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{just\_read\_params}}{}
initialize velocities.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{u} :: {[}out{]} i\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{v} :: {[}out{]} j\sphinxhyphen{}component of velocity {[}L T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing h.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_init\_temperature\_salinity() (fortran subroutine in module user\_initialization)@\spxentry{user\_init\_temperature\_salinity()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_init_temperature_salinity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_init\_temperature\_salinity}}}{\emph{T}, \emph{S}, \emph{G}, \emph{param\_file}, \emph{eqn\_of\_state}, \emph{just\_read\_params}}{}
This function puts the initial layer temperatures and salinities into T(:,:,:) and S(:,:,:).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{t} :: {[}out{]} Potential temperature {[}degC{]}.

\item {} 
\sphinxstylestrong{s} :: {[}out{]} Salinity {[}ppt{]}.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{eqn\_of\_state} :: Equation of state structure

\item {} 
\sphinxstylestrong{just\_read\_params} :: {[}in{]} If present and true, this call will only read parameters without changing T \& S.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_initialize\_sponges() (fortran subroutine in module user\_initialization)@\spxentry{user\_initialize\_sponges()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_sponges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_initialize\_sponges}}}{\emph{G}, \emph{GV}, \emph{use\_temp}, \emph{tv}, \emph{param\_file}, \emph{CSp}, \emph{h}}{}
Set up the sponges.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} Ocean grid structure.

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure.

\item {} 
\sphinxstylestrong{use\_temp} :: {[}in{]} If true, temperature and salinity are state variables.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{csp} :: A pointer to the sponge control structure.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_state_initialization:f/mom_state_initialization/mom_initialize_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_state\_initialization::mom\_initialize\_state}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_set\_obc\_data() (fortran subroutine in module user\_initialization)@\spxentry{user\_set\_obc\_data()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_obc_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_set\_obc\_data}}}{\emph{OBC}, \emph{tv}, \emph{G}, \emph{param\_file}, \emph{tr\_Reg}}{}
This subroutine sets the properties of flow at open boundary conditions.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{tv} :: {[}in{]} A structure containing pointers to any available thermodynamic fields, including potential temperature and salinity or mixed layer density. Absent fields have NULL ptrs.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{tr\_reg} :: Tracer registry.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_set\_rotation() (fortran subroutine in module user\_initialization)@\spxentry{user\_set\_rotation()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{user\_set\_rotation}}}{\emph{G}, \emph{param\_file}}{}~\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_user\_log() (fortran subroutine in module user\_initialization)@\spxentry{write\_user\_log()}\spxextra{fortran subroutine in module user\_initialization}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_initialization:f/user_initialization/write_user_log}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_initialization/}}\sphinxbfcode{\sphinxupquote{write\_user\_log}}}{\emph{param\_file}}{}
Write output about the parameter values being used.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{first\_call}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_init_temperature_salinity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_init\_temperature\_salinity}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_sponges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_sponges}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_thickness}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_topography}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_topography}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_initialize_velocity}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_velocity}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_set\_coord}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_obc_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_set\_obc\_data}}}}} {\hyperref[\detokenize{api/generated/modules/user_initialization:f/user_initialization/user_set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_set\_rotation}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{user\_revise\_forcing module reference}
\label{\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing}}\label{\detokenize{api/generated/modules/user_revise_forcing:user-revise-forcing-module-reference}}\label{\detokenize{api/generated/modules/user_revise_forcing::doc}}\index{user\_revise\_forcing (module)@\spxentry{user\_revise\_forcing}\spxextra{module}|spxpagem}
Provides a template for users to code updating the forcing fluxes.

{\hyperref[\detokenize{api/generated/modules/user_revise_forcing:detauser-revise-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/user_revise_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing/user_revise_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing\_cs}}}}}
&
Control structure for {\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing()}}}}}.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/user_revise_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing/user_alter_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_alter\_forcing()}}}}}
&
This subroutine sets the surface wind stresses.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing/user_revise_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing\_init()}}}}}
&
Initialize the {\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing()}}}}} control structure.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/user_revise_forcing:detailed-description}}\label{\detokenize{api/generated/modules/user_revise_forcing:detauser-revise-forcing}}
Provides a template for users to code updating the forcing fluxes.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/user_revise_forcing:type-documentation}}\index{user\_revise\_forcing\_cs (fortran type in module user\_revise\_forcing)@\spxentry{user\_revise\_forcing\_cs}\spxextra{fortran type in module user\_revise\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing/user_revise_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{user\_revise\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_revise\_forcing\_cs}}}
Control structure for {\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing()}}}}}.
.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{cdrag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The quadratic bottom drag coefficient.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/user_revise_forcing:function-subroutine-documentation}}\index{user\_alter\_forcing() (fortran subroutine in module user\_revise\_forcing)@\spxentry{user\_alter\_forcing()}\spxextra{fortran subroutine in module user\_revise\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing/user_alter_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_revise\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_alter\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{G}, \emph{CS}}{}
This subroutine sets the surface wind stresses.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}in{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing pointers to any possible forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the fluxes.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_revise\_forcing\_init() (fortran subroutine in module user\_revise\_forcing)@\spxentry{user\_revise\_forcing\_init()}\spxextra{fortran subroutine in module user\_revise\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing/user_revise_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_revise\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_revise\_forcing\_init}}}{\emph{param\_file}, \emph{CS}}{}
Initialize the {\hyperref[\detokenize{api/generated/modules/user_revise_forcing:f/user_revise_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_revise\_forcing()}}}}} control structure.
control structure.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure indicating the open file to parse for model parameter values.

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to surface\_forcing\_init.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{mdl}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{user\_shelf\_init module reference}
\label{\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init}}\label{\detokenize{api/generated/modules/user_shelf_init:user-shelf-init-module-reference}}\label{\detokenize{api/generated/modules/user_shelf_init::doc}}\index{user\_shelf\_init (module)@\spxentry{user\_shelf\_init}\spxextra{module}|spxpagem}
This module specifies the initial values and evolving properties of the MOM6 ice shelf, using user\sphinxhyphen{}provided code.

{\hyperref[\detokenize{api/generated/modules/user_shelf_init:detauser-shelf-init}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/user_shelf_init:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_ice_shelf_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_ice\_shelf\_cs}}}}}
&
The control structure for the user\_ice\_shelf module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/user_shelf_init:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_shelf\_mass()}}}}}
&
This subroutine sets up the initial mass and area covered by the ice shelf, based on user\sphinxhyphen{}provided code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_init_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_init\_ice\_thickness()}}}}}
&
This subroutine updates the ice shelf thickness, as specified by user\sphinxhyphen{}provided code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_update_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_update\_shelf\_mass()}}}}}
&
This subroutine updates the ice shelf mass, as specified by user\sphinxhyphen{}provided code.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log()}}}}}
&
This subroutine writes out the user ice shelf code version number to the model log.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/user_shelf_init:detailed-description}}\label{\detokenize{api/generated/modules/user_shelf_init:detauser-shelf-init}}
This module specifies the initial values and evolving properties of the MOM6 ice shelf, using user\sphinxhyphen{}provided code.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/user_shelf_init:type-documentation}}\index{user\_ice\_shelf\_cs (fortran type in module user\_shelf\_init)@\spxentry{user\_ice\_shelf\_cs}\spxextra{fortran type in module user\_shelf\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_ice_shelf_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{user\_shelf\_init/}}\sphinxbfcode{\sphinxupquote{user\_ice\_shelf\_cs}}}
The control structure for the user\_ice\_shelf module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho\_ocean}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ocean’s typical density {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{max\_draft}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The maximum ocean draft of the ice shelf {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{min\_draft}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The minimum ocean draft of the ice shelf {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flat\_shelf\_width}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The range over which the shelf is min\_draft thick {[}km{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{shelf\_slope\_scale}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The range over which the shelf slopes {[}km{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{pos\_shelf\_edge\_0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The x\sphinxhyphen{}position of the shelf edge at time 0 {[}km{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{shelf\_speed}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The ice shelf speed of translation {[}km day\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{first\_call}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, this module has not been called before.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/user_shelf_init:function-subroutine-documentation}}\index{user\_initialize\_shelf\_mass() (fortran subroutine in module user\_shelf\_init)@\spxentry{user\_initialize\_shelf\_mass()}\spxextra{fortran subroutine in module user\_shelf\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_initialize_shelf_mass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_shelf\_init/}}\sphinxbfcode{\sphinxupquote{user\_initialize\_shelf\_mass}}}{\emph{mass\_shelf}, \emph{area\_shelf\_h}, \emph{h\_shelf}, \emph{hmask}, \emph{G}, \emph{US}, \emph{CS}, \emph{param\_file}, \emph{new\_sim}}{}
This subroutine sets up the initial mass and area covered by the ice shelf, based on user\sphinxhyphen{}provided code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{mass\_shelf} :: {[}out{]} The ice shelf mass per unit area averaged

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}out{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}out{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}out{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{cs} :: A pointer to the user ice shelf control structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{new\_sim} :: {[}in{]} If true, this is a new run; otherwise it is being started from a restart file.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_update_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_update\_shelf\_mass}}}}} {\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/write_user_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_user\_log}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_init_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_init\_ice\_thickness}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_init\_ice\_thickness() (fortran subroutine in module user\_shelf\_init)@\spxentry{user\_init\_ice\_thickness()}\spxextra{fortran subroutine in module user\_shelf\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_init_ice_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_shelf\_init/}}\sphinxbfcode{\sphinxupquote{user\_init\_ice\_thickness}}}{\emph{h\_shelf}, \emph{area\_shelf\_h}, \emph{hmask}, \emph{G}, \emph{US}, \emph{param\_file}}{}
This subroutine updates the ice shelf thickness, as specified by user\sphinxhyphen{}provided code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}out{]} The ice shelf thickness {[}m{]}.

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}out{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}out{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A structure containing unit conversion factors

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_shelf\_mass}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_ice_shelf_initialize:f/mom_ice_shelf_initialize/initialize_ice_thickness}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_ice\_shelf\_initialize::initialize\_ice\_thickness}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_update\_shelf\_mass() (fortran subroutine in module user\_shelf\_init)@\spxentry{user\_update\_shelf\_mass()}\spxextra{fortran subroutine in module user\_shelf\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_update_shelf_mass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_shelf\_init/}}\sphinxbfcode{\sphinxupquote{user\_update\_shelf\_mass}}}{\emph{mass\_shelf}, \emph{area\_shelf\_h}, \emph{h\_shelf}, \emph{hmask}, \emph{G}, \emph{CS}, \emph{Time}, \emph{new\_sim}}{}
This subroutine updates the ice shelf mass, as specified by user\sphinxhyphen{}provided code.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{mass\_shelf} :: {[}inout{]} The ice shelf mass per unit area averaged

\item {} 
\sphinxstylestrong{area\_shelf\_h} :: {[}inout{]} The area per cell covered by the ice shelf {[}L2 \textasciitilde{}\textgreater{} m2{]}.

\item {} 
\sphinxstylestrong{h\_shelf} :: {[}inout{]} The ice shelf thickness {[}Z \textasciitilde{}\textgreater{} m{]}.

\item {} 
\sphinxstylestrong{hmask} :: {[}inout{]} A mask indicating which tracer points are

\item {} 
\sphinxstylestrong{cs} :: A pointer to the user ice shelf control structure

\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{new\_sim} :: {[}in{]} If true, this the start of a new run.

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_shelf\_mass}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_user\_log() (fortran subroutine in module user\_shelf\_init)@\spxentry{write\_user\_log()}\spxextra{fortran subroutine in module user\_shelf\_init}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/write_user_log}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_shelf\_init/}}\sphinxbfcode{\sphinxupquote{write\_user\_log}}}{\emph{param\_file}}{}
This subroutine writes out the user ice shelf code version number to the model log.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/user_shelf_init:f/user_shelf_init/user_initialize_shelf_mass}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_shelf\_mass}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{user\_surface\_forcing module reference}
\label{\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing}}\label{\detokenize{api/generated/modules/user_surface_forcing:user-surface-forcing-module-reference}}\label{\detokenize{api/generated/modules/user_surface_forcing::doc}}\index{user\_surface\_forcing (module)@\spxentry{user\_surface\_forcing}\spxextra{module}|spxpagem}
Template for user to code up surface forcing.

{\hyperref[\detokenize{api/generated/modules/user_surface_forcing:detauser-surface-forcing}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/user_surface_forcing:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_surface_forcing_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing\_cs}}}}}
&
This control structure should be used to store any run\sphinxhyphen{}time variables associated with the user\sphinxhyphen{}specified forcing.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/user_surface_forcing:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_wind_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_wind\_forcing()}}}}}
&
This subroutine sets the surface wind stresses, forcestaux and forcestauy, in {[}R Z L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_buoyancy_forcing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_buoyancy\_forcing()}}}}}
&
This subroutine specifies the current surface fluxes of buoyancy or temperature and fresh water.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_surface\_forcing\_init()}}}}}
&
This subroutine initializes the USER\_surface\_forcing module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/user_surface_forcing:detailed-description}}\label{\detokenize{api/generated/modules/user_surface_forcing:detauser-surface-forcing}}
Template for user to code up surface forcing.


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/user_surface_forcing:type-documentation}}\index{user\_surface\_forcing\_cs (fortran type in module user\_surface\_forcing)@\spxentry{user\_surface\_forcing\_cs}\spxextra{fortran type in module user\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_surface_forcing_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{user\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_surface\_forcing\_cs}}}
This control structure should be used to store any run\sphinxhyphen{}time variables associated with the user\sphinxhyphen{}specified forcing.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_temperature}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, temperature and salinity are used as state variables.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{restorebuoy}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, use restoring surface buoyancy forcing.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{rho0}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The density used in the Boussinesq approximation {[}R \textasciitilde{}\textgreater{} kg m\sphinxhyphen{}3{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{g\_earth}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The gravitational acceleration {[}L2 Z\sphinxhyphen{}1 s\sphinxhyphen{}2 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}2{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{flux\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: The restoring rate at the surface {[}Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} m s\sphinxhyphen{}1{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{gust\_const}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real}\sphinxstyleemphasis{{]}} :: A constant unresolved background gustiness that contributes to ustar {[}R L Z T\sphinxhyphen{}1 \textasciitilde{}\textgreater{} Pa{]}.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/user_surface_forcing:function-subroutine-documentation}}\index{user\_wind\_forcing() (fortran subroutine in module user\_surface\_forcing)@\spxentry{user\_wind\_forcing()}\spxextra{fortran subroutine in module user\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_wind_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_wind\_forcing}}}{\emph{sfc\_state}, \emph{forces}, \emph{day}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine sets the surface wind stresses, forcestaux and forcestauy, in {[}R Z L T\sphinxhyphen{}2 \textasciitilde{}\textgreater{} Pa{]}. These are the stresses in the direction of the model grid (i.e. the same direction as the u\sphinxhyphen{} and v\sphinxhyphen{} velocities).
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{forces} :: {[}inout{]} A structure with the driving mechanical forces

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{g} :: {[}inout{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to user\_surface\_forcing\_init

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_buoyancy\_forcing() (fortran subroutine in module user\_surface\_forcing)@\spxentry{user\_buoyancy\_forcing()}\spxextra{fortran subroutine in module user\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_buoyancy_forcing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_buoyancy\_forcing}}}{\emph{sfc\_state}, \emph{fluxes}, \emph{day}, \emph{dt}, \emph{G}, \emph{US}, \emph{CS}}{}
This subroutine specifies the current surface fluxes of buoyancy or temperature and fresh water. It may also be modified to add surface fluxes of user provided tracers.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{fluxes} :: {[}inout{]} A structure containing thermodynamic forcing fields

\item {} 
\sphinxstylestrong{day} :: {[}in{]} The time of the fluxes

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time over which the fluxes apply {[}s{]}

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: A pointer to the control structure returned by a previous call to user\_surface\_forcing\_init

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_surface\_forcing\_init() (fortran subroutine in module user\_surface\_forcing)@\spxentry{user\_surface\_forcing\_init()}\spxextra{fortran subroutine in module user\_surface\_forcing}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_surface_forcing:f/user_surface_forcing/user_surface_forcing_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_surface\_forcing/}}\sphinxbfcode{\sphinxupquote{user\_surface\_forcing\_init}}}{\emph{Time}, \emph{G}, \emph{US}, \emph{param\_file}, \emph{diag}, \emph{CS}}{}
This subroutine initializes the USER\_surface\_forcing module.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{time} :: {[}in{]} The current model time

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_surface_forcing:f/mom_surface_forcing/surface_forcing_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_surface\_forcing::surface\_forcing\_init}}}}}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{user\_tracer\_example module reference}
\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example}}\label{\detokenize{api/generated/modules/user_tracer_example:user-tracer-example-module-reference}}\label{\detokenize{api/generated/modules/user_tracer_example::doc}}\index{user\_tracer\_example (module)@\spxentry{user\_tracer\_example}\spxextra{module}|spxpagem}
A sample tracer package that has striped initial conditions.

{\hyperref[\detokenize{api/generated/modules/user_tracer_example:detauser-tracer-example}]{\sphinxcrossref{More…}}}


\subsubsection{Data Types}
\label{\detokenize{api/generated/modules/user_tracer_example:data-types}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_example_cs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example\_cs}}}}}
&
The control structure for the USER\_tracer\_example module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/user_tracer_example:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_register_tracer_example}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_register\_tracer\_example()}}}}}
&
This subroutine is used to register tracer fields and subroutines to be used with MOM.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_initialize_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_initialize\_tracer()}}}}}
&
This subroutine initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/tracer_column_physics}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tracer\_column\_physics()}}}}}
&
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_stock}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_stock()}}}}}
&
This function calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_surface_state}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_surface\_state()}}}}}
&
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_example_end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{user\_tracer\_example\_end()}}}}}
&
Clean up allocated memory at the end.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/user_tracer_example:detailed-description}}\label{\detokenize{api/generated/modules/user_tracer_example:detauser-tracer-example}}
Original by Robert Hallberg, 2002.

This file contains an example of the code that is needed to set up and use a set (in this case one) of dynamically passive tracers.

A single subroutine is called from within each file to register each of the tracers for reinitialization and advection and to register the subroutine that initializes the tracers and set up their output and the subroutine that does any tracer physics or chemistry along with diapycnal mixing (included here because some tracers may float or swim vertically or dye diapycnal processes).


\subsubsection{Type Documentation}
\label{\detokenize{api/generated/modules/user_tracer_example:type-documentation}}\index{user\_tracer\_example\_cs (fortran type in module user\_tracer\_example)@\spxentry{user\_tracer\_example\_cs}\spxextra{fortran type in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_example_cs}}\pysigline{\sphinxbfcode{\sphinxupquote{type  }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{user\_tracer\_example\_cs}}}
The control structure for the USER\_tracer\_example module.
\begin{quote}\begin{description}
\item[{Type fields}] \leavevmode\begin{itemize}
\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{coupled\_tracers}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: These tracers are not offered to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tracer\_ic\_file}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{character (len=200)}\sphinxstyleemphasis{{]}} :: The full path to the IC file, or ” ” to initialize internally.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{time}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(time\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the ocean model’s clock.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_reg}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(tracer\_registry\_type)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A pointer to the tracer registry.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real(:,:,:,:)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: The array of tracers used in this subroutine, in g m\sphinxhyphen{}3?

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{land\_val}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{real( ntr )}\sphinxstyleemphasis{{]}} :: The value of tr that is used where land is masked out.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{use\_sponge}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}} :: If true, sponges may be applied somewhere in the domain.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{ind\_tr}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer( ntr )}\sphinxstyleemphasis{{]}} :: Indices returned by aof\_set\_coupler\_flux if it is used and the surface tracer concentrations are to be provided to the coupler.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{diag}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(diag\_ctrl)}\sphinxstyleemphasis{,}\sphinxstyleemphasis{pointer}\sphinxstyleemphasis{{]}} :: A structure that is used to regulate the timing of diagnostic output.

\item {} 
\sphinxbfcode{\sphinxupquote{\%~}}\sphinxbfcode{\sphinxupquote{tr\_desc}}\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{type(vardesc)( ntr )}\sphinxstyleemphasis{{]}} :: Descriptions of each of the tracers.

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/user_tracer_example:function-subroutine-documentation}}\index{user\_register\_tracer\_example() (fortran function in module user\_tracer\_example)@\spxentry{user\_register\_tracer\_example()}\spxextra{fortran function in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_register_tracer_example}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{user\_register\_tracer\_example}}}{\emph{HI}, \emph{GV}, \emph{param\_file}, \emph{CS}, \emph{tr\_Reg}, \emph{restart\_CS}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{logical}\sphinxstyleemphasis{{]}}}
This subroutine is used to register tracer fields and subroutines to be used with MOM.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{hi} :: {[}in{]} A horizontal index type structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{param\_file} :: {[}in{]} A structure to parse for run\sphinxhyphen{}time parameters

\item {} 
\sphinxstylestrong{cs} :: A pointer that is set to point to the control structure for this module

\item {} 
\sphinxstylestrong{tr\_reg} :: A pointer that is set to point to the control structure for the tracer advection and diffusion module

\item {} 
\sphinxstylestrong{restart\_cs} :: A pointer to the restart control structure

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/atmos_ocean_fluxes_mod:f/atmos_ocean_fluxes_mod/aof_set_coupler_flux}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atmos\_ocean\_fluxes\_mod::aof\_set\_coupler\_flux}}}}} {\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_tracer_registry:f/mom_tracer_registry/register_tracer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_tracer\_registry::register\_tracer}}}}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/var_desc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::var\_desc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_initialize\_tracer() (fortran subroutine in module user\_tracer\_example)@\spxentry{user\_initialize\_tracer()}\spxextra{fortran subroutine in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_initialize_tracer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{user\_initialize\_tracer}}}{\emph{restart}, \emph{day}, \emph{G}, \emph{GV}, \emph{h}, \emph{diag}, \emph{OBC}, \emph{CS}, \emph{sponge\_CSp}}{}
This subroutine initializes the NTR tracer fields in tr(:,:,:,:) and it sets up the tracer output.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{restart} :: {[}in{]} .true. if the fields have already been read from a restart file.

\item {} 
\sphinxstylestrong{day} :: {[}in{]} Time of the start of the run.

\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{diag} :: {[}in{]} A structure that is used to regulate diagnostic output.

\item {} 
\sphinxstylestrong{obc} :: This open boundary condition type specifies whether, where, and what open boundary conditions are used.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to USER\_register\_tracer\_example.

\item {} 
\sphinxstylestrong{sponge\_csp} :: A pointer to the control structure for the sponges, if they are in use.

\end{itemize}

\item[{Call to}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_error_handler:f/mom_error_handler/mom_error}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_error\_handler::mom\_error}}}}} \sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}} {\hyperref[\detokenize{api/generated/modules/mom_sponge:f/mom_sponge/set_up_sponge_field}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_sponge::set\_up\_sponge\_field}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{tracer\_column\_physics() (fortran subroutine in module user\_tracer\_example)@\spxentry{tracer\_column\_physics()}\spxextra{fortran subroutine in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/tracer_column_physics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{tracer\_column\_physics}}}{\emph{h\_old}, \emph{h\_new}, \emph{ea}, \emph{eb}, \emph{fluxes}, \emph{dt}, \emph{G}, \emph{GV}, \emph{US}, \emph{CS}}{}
This subroutine applies diapycnal diffusion and any other column tracer physics or chemistry to the tracers from this file. This is a simple example of a set of advected passive tracers. The arguments to this subroutine are redundant in that h\_new(k) = h\_old(k) + ea(k) \sphinxhyphen{} eb(k\sphinxhyphen{}1) + eb(k) \sphinxhyphen{} ea(k+1)
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h\_old} :: {[}in{]} Layer thickness before entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{h\_new} :: {[}in{]} Layer thickness after entrainment {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}.

\item {} 
\sphinxstylestrong{ea} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{eb} :: {[}in{]} an array to which the amount of fluid entrained

\item {} 
\sphinxstylestrong{fluxes} :: {[}in{]} A structure containing pointers to thermodynamic and tracer forcing fields. Unused fields have NULL ptrs.

\item {} 
\sphinxstylestrong{dt} :: {[}in{]} The amount of time covered by this call {[}T \textasciitilde{}\textgreater{} s{]}

\item {} 
\sphinxstylestrong{us} :: {[}in{]} A dimensional unit scaling type

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to USER\_register\_tracer\_example.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ntr}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_tracer\_stock() (fortran function in module user\_tracer\_example)@\spxentry{user\_tracer\_stock()}\spxextra{fortran function in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_stock}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{user\_tracer\_stock}}}{\emph{h}, \emph{stocks}, \emph{G}, \emph{GV}, \emph{CS}, \emph{names}, \emph{units}, \emph{stock\_index}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
This function calculates the mass\sphinxhyphen{}weighted integral of all tracer stocks, returning the number of stocks it has calculated. If the stock\_index is present, only the stock corresponding to that coded index is returned.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{gv} :: {[}in{]} The ocean’s vertical grid structure

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{stocks} :: {[}out{]} the mass\sphinxhyphen{}weighted integrated amount of each tracer, in kg times concentration units {[}kg conc{]}.

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_USER\_tracer.

\item {} 
\sphinxstylestrong{names} :: {[}out{]} The names of the stocks calculated.

\item {} 
\sphinxstylestrong{units} :: {[}out{]} The units of the stocks calculated.

\item {} 
\sphinxstylestrong{stock\_index} :: {[}in{]} The coded index of a specific stock being sought.

\end{itemize}

\item[{Return}] \leavevmode
\sphinxstylestrong{undefined} :: Return value: the number of stocks calculated here.

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ntr}} {\hyperref[\detokenize{api/generated/modules/mom_io:f/mom_io/query_vardesc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_io::query\_vardesc}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_tracer\_surface\_state() (fortran subroutine in module user\_tracer\_example)@\spxentry{user\_tracer\_surface\_state()}\spxextra{fortran subroutine in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_surface_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{user\_tracer\_surface\_state}}}{\emph{sfc\_state}, \emph{h}, \emph{G}, \emph{CS}}{}
This subroutine extracts the surface fields from this tracer package that are to be shared with the atmosphere in coupled configurations.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{g} :: {[}in{]} The ocean’s grid structure

\item {} 
\sphinxstylestrong{sfc\_state} :: {[}inout{]} A structure containing fields that describe the surface state of the ocean.

\item {} 
\sphinxstylestrong{h} :: {[}in{]} Layer thicknesses {[}H \textasciitilde{}\textgreater{} m or kg m\sphinxhyphen{}2{]}

\item {} 
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_USER\_tracer.

\end{itemize}

\item[{Call to}] \leavevmode
\sphinxcode{\sphinxupquote{ntr}}

\end{description}\end{quote}

\end{fulllineitems}

\index{user\_tracer\_example\_end() (fortran subroutine in module user\_tracer\_example)@\spxentry{user\_tracer\_example\_end()}\spxextra{fortran subroutine in module user\_tracer\_example}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/user_tracer_example:f/user_tracer_example/user_tracer_example_end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{user\_tracer\_example/}}\sphinxbfcode{\sphinxupquote{user\_tracer\_example\_end}}}{\emph{CS}}{}
Clean up allocated memory at the end.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{cs} :: The control structure returned by a previous call to register\_USER\_tracer.

\end{description}\end{quote}

\end{fulllineitems}



\subsection{write\_ocean\_obs\_mod module reference}
\label{\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod}}\label{\detokenize{api/generated/modules/write_ocean_obs_mod:write-ocean-obs-mod-module-reference}}\label{\detokenize{api/generated/modules/write_ocean_obs_mod::doc}}\index{write\_ocean\_obs\_mod (module)@\spxentry{write\_ocean\_obs\_mod}\spxextra{module}|spxpagem}
Dummy interfaces for writing ODA data.

{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:detawrite-ocean-obs-mod}]{\sphinxcrossref{More…}}}


\subsubsection{Functions/Subroutines}
\label{\detokenize{api/generated/modules/write_ocean_obs_mod:functions-subroutines}}

\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{ll}
\hline

\endfirsthead

\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline

\endhead

\hline
\multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{continues on next page}}}\\
\endfoot

\endlastfoot

{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/open_profile_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_profile\_file()}}}}}
&
Open a profile file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/write_profile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_profile()}}}}}
&
Write a profile.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/close_profile_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close\_profile\_file()}}}}}
&
Close a profile file.
\\
\hline
{\hyperref[\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/write_ocean_obs_init}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{write\_ocean\_obs\_init()}}}}}
&
Initialize write\_ocean\_obs module.
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}


\subsubsection{Detailed Description}
\label{\detokenize{api/generated/modules/write_ocean_obs_mod:detailed-description}}\label{\detokenize{api/generated/modules/write_ocean_obs_mod:detawrite-ocean-obs-mod}}
Dummy interfaces for writing ODA data.


\subsubsection{Function/Subroutine Documentation}
\label{\detokenize{api/generated/modules/write_ocean_obs_mod:function-subroutine-documentation}}\index{open\_profile\_file() (fortran function in module write\_ocean\_obs\_mod)@\spxentry{open\_profile\_file()}\spxextra{fortran function in module write\_ocean\_obs\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/open_profile_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function }}\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod/}}\sphinxbfcode{\sphinxupquote{open\_profile\_file}}}{\emph{name}, \emph{nvar}, \emph{grid\_lon}, \emph{grid\_lat}, \emph{thread}, \emph{fset}}{\sphinxstyleemphasis{ {[}}\sphinxstyleemphasis{integer}\sphinxstyleemphasis{{]}}}
Open a profile file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{name} :: {[}in{]} File name

\item {} 
\sphinxstylestrong{nvar} :: {[}in{]} Number of variables

\item {} 
\sphinxstylestrong{grid\_lon} :: {[}in{]} Longitude {[}degreeE{]}

\item {} 
\sphinxstylestrong{grid\_lat} :: {[}in{]} Latitude {[}degreeN{]}

\item {} 
\sphinxstylestrong{thread} :: {[}in{]} Thread number

\item {} 
\sphinxstylestrong{fset} :: {[}in{]} File set

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_profile() (fortran subroutine in module write\_ocean\_obs\_mod)@\spxentry{write\_profile()}\spxextra{fortran subroutine in module write\_ocean\_obs\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/write_profile}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod/}}\sphinxbfcode{\sphinxupquote{write\_profile}}}{\emph{unit}, \emph{profile}}{}
Write a profile.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstylestrong{unit} :: {[}in{]} File unit

\item {} 
\sphinxstylestrong{profile} :: {[}in{]} Profile to write

\end{itemize}

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/save_obs_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::save\_obs\_diff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{close\_profile\_file() (fortran subroutine in module write\_ocean\_obs\_mod)@\spxentry{close\_profile\_file()}\spxextra{fortran subroutine in module write\_ocean\_obs\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/close_profile_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod/}}\sphinxbfcode{\sphinxupquote{close\_profile\_file}}}{\emph{unit}}{}
Close a profile file.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\sphinxstylestrong{unit} :: {[}in{]} File unit

\item[{Called from}] \leavevmode
{\hyperref[\detokenize{api/generated/modules/mom_oda_driver_mod:f/mom_oda_driver_mod/save_obs_diff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mom\_oda\_driver\_mod::save\_obs\_diff}}}}}

\end{description}\end{quote}

\end{fulllineitems}

\index{write\_ocean\_obs\_init() (fortran subroutine in module write\_ocean\_obs\_mod)@\spxentry{write\_ocean\_obs\_init()}\spxextra{fortran subroutine in module write\_ocean\_obs\_mod}|spxpagem}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api/generated/modules/write_ocean_obs_mod:f/write_ocean_obs_mod/write_ocean_obs_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subroutine }}\sphinxcode{\sphinxupquote{write\_ocean\_obs\_mod/}}\sphinxbfcode{\sphinxupquote{write\_ocean\_obs\_init}}}{}{}
Initialize write\_ocean\_obs module.

\end{fulllineitems}



\chapter{Bibliography}
\label{\detokenize{zzbibliography:bibliography}}\label{\detokenize{zzbibliography::doc}}



\chapter{Indices and tables}
\label{\detokenize{index:indices-and-tables}}\begin{itemize}
\item {} 
\DUrole{xref,std,std-ref}{genindex}

\item {} 
\DUrole{xref,std,std-ref}{search}

\end{itemize}

\begin{sphinxthebibliography}{10}
\bibitem[1]{zzbibliography:adcroft2019}
A. Adcroft, W. Anderson, V. Balaji, C. Blanton, M. Bushuk, C. O. Dufour, J. P. Dunne, S. M. Griffies, R. Hallberg, M. J. Harrison, I. M. Held, M. F. Jansen, J. G. John, J. P. Krasting, A. R. Langenhorst, S. Legg, Z. Liang, C. McHugh, A. Radhakrishnan, B. G. Reichl, T. Rosati, B. L. Samuels, A. Shao, R. Stouffer, M. Winton, A. T. Wittenberg, B. Xiang, N. Zadeh, and R. Zhang. The GFDL global ocean and sea ice model OM4.0: model description and simulation features. \sphinxstyleemphasis{J. Adv. Mod. Earth Sys.}, 11(10):3167\textendash{}3211, 2019. \sphinxhref{https://doi.org/10.1029/2019ms001726}{doi:10.1029/2019ms001726}.
\bibitem[2]{zzbibliography:adcroft2006}
Alistair Adcroft and Robert Hallberg. On methods for solving the oceanic equations of motion in generalized vertical coordinates. \sphinxstyleemphasis{Ocean Modelling}, 11(1\sphinxhyphen{}2):224\textendash{}233, January 2006. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500305000090}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2004.12.007}{doi:10.1016/j.ocemod.2004.12.007}.
\bibitem[3]{zzbibliography:adcroft2008}
Alistair Adcroft, Robert Hallberg, and Matthew Harrison. A finite volume discretization of the pressure gradient force using analytic integration. \sphinxstyleemphasis{Ocean Modelling}, 22(3\sphinxhyphen{}4):106\textendash{}113, January 2008. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500308000243}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2008.02.001}{doi:10.1016/j.ocemod.2008.02.001}.
\bibitem[4]{zzbibliography:arakawa1990}
Akio Arakawa and Yueh\sphinxhyphen{}Jiuan G. Hsu. Energy conserving and potential\sphinxhyphen{}enstrophy dissipating schemes for the shallow water equations. \sphinxstyleemphasis{Monthly Weather Review}, 118:1960\textendash{}1969, 1990. \sphinxhref{https://doi.org/10.1175/1520-0493(1990)118\textless{}1960:ECAPED\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0493(1990)118\textless{}1960:ECAPED\textgreater{}2.0.CO;2}.
\bibitem[5]{zzbibliography:arakawa1981}
Akio Arakawa and Vivian R. Lamb. A Potential Enstrophy and Energy Conserving Scheme for the Shallow Water Equations. \sphinxstyleemphasis{Monthly Weather Review}, 109(1):18\textendash{}36, January 1981. URL: \sphinxurl{https://journals.ametsoc.org/doi/abs/10.1175/1520-0493(1981)109\%3C0018:APEAEC\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0493(1981)109\textless{}0018:APEAEC\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0493(1981)109\textless{}0018:APEAEC\textgreater{}2.0.CO;2}.
\bibitem[6]{zzbibliography:bleck2002}
Rainer Bleck. An oceanic general circulation model framed in hybrid isopycnic\sphinxhyphen{}Cartesian coordinates. \sphinxstyleemphasis{Ocean Modelling}, 4(1):55\textendash{}88, 2002. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500301000129}, \sphinxhref{https://doi.org/10.1016/S1463-5003(01)00012-9}{doi:10.1016/S1463\sphinxhyphen{}5003(01)00012\sphinxhyphen{}9}.
\bibitem[7]{zzbibliography:bleck1990}
Rainer Bleck and Linda T. Smith. A wind‐driven isopycnic coordinate model of the north and equatorial atlantic ocean: 1. model development and supporting experiments. \sphinxstyleemphasis{JGR Oceans}, 95:3273\textendash{}3285, 1990. \sphinxhref{https://doi.org/10.1029/JC095iC03p03273}{doi:10.1029/JC095iC03p03273}.
\bibitem[8]{zzbibliography:carpenter1990}
Jr. Carpenter, Richard L., Kelvin K. Droegemeier, Paul R. Woodward, and Carl E. Hane. Application of the piecewise parabolic method (ppm) to meteorological modeling. \sphinxstyleemphasis{Monthly Weather Review}, 118:586\textendash{}\textendash{}612, 1990. \sphinxhref{https://doi.org/https://doi.org/10.1175/1520-0493(1990)118\textless{}0586:AOTPPM\textgreater{}2.0.CO;2}{doi:https://doi.org/10.1175/1520\sphinxhyphen{}0493(1990)118\textless{}0586:AOTPPM\textgreater{}2.0.CO;2}.
\bibitem[9]{zzbibliography:colella1984}
Phillip Colella and Paul R Woodward. The Piecewise Parabolic Method (PPM) for gas\sphinxhyphen{}dynamical simulations. \sphinxstyleemphasis{Journal of Computational Physics}, 54(1):174\textendash{}201, April 1984. URL: \sphinxurl{https://www.sciencedirect.com/science/article/pii/0021999184901438}, \sphinxhref{https://doi.org/10.1016/0021-9991(84)90143-8}{doi:10.1016/0021\sphinxhyphen{}9991(84)90143\sphinxhyphen{}8}.
\bibitem[10]{zzbibliography:dukowicz2000}
John K. Dukowicz and John R. Baumgardner. Incremental Remapping as a Transport/Advection Algorithm. \sphinxstyleemphasis{Journal of Computational Physics}, 160(1):318\textendash{}335, May 2000. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S0021999100964659}, \sphinxhref{https://doi.org/10.1006/jcph.2000.6465}{doi:10.1006/jcph.2000.6465}.
\bibitem[11]{zzbibliography:durran2010}
Dale R. Durran. \sphinxstyleemphasis{Numerical Methods for Fluid Dynamics With Applications to Geophysics}. Springer\sphinxhyphen{}Verlag New York, 2010. \sphinxhref{https://doi.org/10.1007/978-1-4419-6412-0}{doi:10.1007/978\sphinxhyphen{}1\sphinxhyphen{}4419\sphinxhyphen{}6412\sphinxhyphen{}0}.
\bibitem[12]{zzbibliography:easter1993}
Richard C. Easter. Two modified versions of bott’s positive\sphinxhyphen{}definite numerical advection scheme. \sphinxstyleemphasis{Monthly Weather Review}, 121:297\textendash{}304, 1993. \sphinxhref{https://doi.org/10.1175/1520-0493(1993)121\textless{}0297:TMVOBP\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0493(1993)121\textless{}0297:TMVOBP\textgreater{}2.0.CO;2}.
\bibitem[13]{zzbibliography:fox-kemper2011}
B. Fox\sphinxhyphen{}Kemper, G. Danabasoglu, R. Ferrari, S. M. Griffies, R. W. Hallberg, M. M. Holland, M. E. Maltrud, S. Peacock, and B. L. Samuels. Parameterization of mixed layer eddies. III: Implementation and impact in global ocean climate simulations. \sphinxstyleemphasis{Ocean Modelling}, 39(1):61\textendash{}78, January 2011. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500310001290}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2010.09.002}{doi:10.1016/j.ocemod.2010.09.002}.
\bibitem[14]{zzbibliography:fox-kemper2008-2}
B. Fox\sphinxhyphen{}Kemper and R. Ferrari. Parameterization of mixed layer eddies. part ii: prognosis and impact. \sphinxstyleemphasis{J. Phys. Oceangraphy}, 38:1166\textendash{}1179, 2008. \sphinxhref{https://doi.org/10.1175/2007JPO3788.1}{doi:10.1175/2007JPO3788.1}.
\bibitem[15]{zzbibliography:fox-kemper2008}
B. Fox\sphinxhyphen{}Kemper, R. Ferrari, and R. Hallberg. Parameterization of mixed layer eddies. part i: theory and diagnosis. \sphinxstyleemphasis{J. Phys. Oceangraphy}, 38:1145\textendash{}1165, 2008. \sphinxhref{https://doi.org/10.1175/2007JPO3792.1}{doi:10.1175/2007JPO3792.1}.
\bibitem[16]{zzbibliography:gent1990}
Peter R. Gent and James C. Mcwilliams. Isopycnal mixing in ocean circulation models. \sphinxstyleemphasis{J. Phys. Oceanogr.}, 20:150\textendash{}155, 1990. \sphinxhref{https://doi.org/10.1175/1520-0485(1990)020\textless{}0150:IMIOCM\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0485(1990)020\textless{}0150:IMIOCM\textgreater{}2.0.CO;2}.
\bibitem[17]{zzbibliography:gent1995}
Peter R. Gent, Jurgen Willebrand, Trevor J. McDougall, and James C. McWilliams. Parameterizing Eddy\sphinxhyphen{}Induced Tracer Transports in Ocean Circulation Models. \sphinxstyleemphasis{Journal of Physical Oceanography}, 25(4):463\textendash{}474, April 1995. URL: \sphinxurl{https://journals.ametsoc.org/doi/10.1175/1520-0485\%281995\%29025\%3C0463\%3APEITTI\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0485(1995)025\textless{}0463:PEITTI\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0485(1995)025\textless{}0463:PEITTI\textgreater{}2.0.CO;2}.
\bibitem[18]{zzbibliography:smgbook}
Stephen M. Griffies. \sphinxstyleemphasis{Fundamentals of Ocean Climate Models}. Princeton University Press, Princeton, USA, 2004. 518+xxxiv pages.
\bibitem[19]{zzbibliography:griffies2000-2}
Stephen M. Griffies, Claus Böning, Frank O. Bryan, Eric P. Chassignet, Rüdiger Gerdes, Hiroyasu Hasumi, Anthony Hirst, Anne\sphinxhyphen{}Marie Treguier, and David Webb. Developments in ocean climate modelling. \sphinxstyleemphasis{Ocean Modelling}, 2(3):123\textendash{}192, January 2000. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500300000147}, \sphinxhref{https://doi.org/10.1016/S1463-5003(00)00014-7}{doi:10.1016/S1463\sphinxhyphen{}5003(00)00014\sphinxhyphen{}7}.
\bibitem[20]{zzbibliography:griffies2000}
Stephen M. Griffies and Robert W. Hallberg. Biharmonic Friction with a Smagorinsky\sphinxhyphen{}Like Viscosity for Use in Large\sphinxhyphen{}Scale Eddy\sphinxhyphen{}Permitting Ocean Models. \sphinxstyleemphasis{Monthly Weather Review}, 128(8):2935\textendash{}2946, August 2000. URL: \sphinxurl{https://journals.ametsoc.org/doi/full/10.1175/1520-0493\%282000\%29128\%3C2935\%3ABFWASL\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0493(2000)128\textless{}2935:BFWASL\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0493(2000)128\textless{}2935:BFWASL\textgreater{}2.0.CO;2}.
\bibitem[21]{zzbibliography:hallberg1997}
Robert Hallberg. Localized Coupling between Surface and Bottom\sphinxhyphen{}Intensified Flow over Topography. \sphinxstyleemphasis{Journal of Physical Oceanography}, 27(6):977\textendash{}998, June 1997. URL: \sphinxurl{http://journals.ametsoc.org/doi/abs/10.1175/1520-0485(1997)027\%3C0977\%3ALCBSAB\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0485(1997)027\textless{}0977:LCBSAB\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0485(1997)027\textless{}0977:LCBSAB\textgreater{}2.0.CO;2}.
\bibitem[22]{zzbibliography:hallberg1997a}
Robert Hallberg. Stable split time stepping schemes for large\sphinxhyphen{}scale ocean modeling. \sphinxstyleemphasis{Journal of Computational Physics}, 135:54\textendash{}65, 1997. \sphinxhref{https://doi.org/DOI:10.1006/jcph.1997.5734}{doi:DOI:10.1006/jcph.1997.5734}.
\bibitem[23]{zzbibliography:hallberg2000}
Robert Hallberg. Time integration of diapycnal diffusion and richardson number\textendash{}dependent mixing in isopycnal coordinate ocean models. \sphinxstyleemphasis{Monthly Weather Review}, 128:1402\textendash{}1419, 2000.
\bibitem[24]{zzbibliography:hallberg2005}
Robert Hallberg. A thermobaric instability of lagrangian vertical coordinate ocean models. \sphinxstyleemphasis{Ocean Modelling}, 2005. \sphinxhref{https://doi.org/10.1016/j.ocemod.2004.01.001}{doi:10.1016/j.ocemod.2004.01.001}.
\bibitem[25]{zzbibliography:hallberg2009}
Robert Hallberg and Alistair Adcroft. Reconciling estimates of the free surface height in Lagrangian vertical coordinate ocean models with mode\sphinxhyphen{}split time stepping. \sphinxstyleemphasis{Ocean Modelling}, 29(1):15\textendash{}26, January 2009. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500309000298}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2009.02.008}{doi:10.1016/j.ocemod.2009.02.008}.
\bibitem[26]{zzbibliography:hirt1997}
C. W. Hirt, A. A. Amsden, and J. L. Cook. An Arbitrary Lagrangian\sphinxhyphen{}Eulerian Computing Method for All Flow Speeds. \sphinxstyleemphasis{Journal of Computational Physics}, 135(2):203\textendash{}216, August 1997. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S0021999197957028}, \sphinxhref{https://doi.org/10.1006/jcph.1997.5702}{doi:10.1006/jcph.1997.5702}.
\bibitem[27]{zzbibliography:huynh1997}
H. T. Huynh. Schemes and constraints for advection. In P. Kutler, J. Flores, and J.J. Chattot, editors, \sphinxstyleemphasis{Fifteenth International Conference on Numerical Methods in Fluid Dynamics}, volume 490. Springer, Berlin, Heidelberg, 1997. \sphinxhref{https://doi.org/10.1007/BFb0107151}{doi:10.1007/BFb0107151}.
\bibitem[28]{zzbibliography:jackett1995}
David R. Jackett and Trevor J. McDougall. Minimal adjustment of hydrographic profiles to achieve static stability. \sphinxstyleemphasis{J. Atmos. Ocean. Tech.}, 12:381\textendash{}389, 1995. \sphinxhref{https://doi.org/10.1175/1520-0426(1995)012\textless{}0381:MAOHPT\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0426(1995)012\textless{}0381:MAOHPT\textgreater{}2.0.CO;2}.
\bibitem[29]{zzbibliography:jackson2008}
L. Jackson, R. Hallberg, and S. Legg. A Parameterization of Shear\sphinxhyphen{}Driven Turbulence for Ocean Climate Models. \sphinxstyleemphasis{Journal of Physical Oceanography}, 38(5):1033\textendash{}1053, May 2008. URL: \sphinxurl{https://journals.ametsoc.org/doi/10.1175/2007JPO3779.1}, \sphinxhref{https://doi.org/10.1175/2007JPO3779.1}{doi:10.1175/2007JPO3779.1}.
\bibitem[30]{zzbibliography:jansen2015}
Malte F. Jansen, Alistair J. Adcroft, Robert Hallberg, and Isaac M. Held. Parameterization of eddy fluxes based on a mesoscale energy budget. \sphinxstyleemphasis{Ocean Modelling}, 92:28\textendash{}41, August 2015. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500315000967}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2015.05.007}{doi:10.1016/j.ocemod.2015.05.007}.
\bibitem[31]{zzbibliography:large1994}
W. G. Large, J. C. McWilliams, and S. C. Doney. Oceanic vertical mixing: A review and a model with a nonlocal boundary layer parameterization. \sphinxstyleemphasis{Reviews of Geophysics}, 32(4):363\textendash{}403, 1994. URL: \sphinxurl{https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/94RG01872}, \sphinxhref{https://doi.org/10.1029/94RG01872}{doi:10.1029/94RG01872}.
\bibitem[32]{zzbibliography:lin1994}
Shian\sphinxhyphen{}Jiann Lin, Winston C. Chao, Y. C. Sud, and G. K. Walker. A class of the van leer\sphinxhyphen{}type transport schemes and its application to the moisture transport in a general circulation model. \sphinxstyleemphasis{Mon. Wea. Rev.}, 122:1575\textendash{}1593, 1994. \sphinxhref{https://doi.org/10.1175/1520-0493(1994)122\textless{}1575:ACOTVL\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0493(1994)122\textless{}1575:ACOTVL\textgreater{}2.0.CO;2}.
\bibitem[33]{zzbibliography:marshall2010}
D. P. Marshall and A. J. Adcroft. Parameterization of ocean eddies: potential vorticity mixing, energetics and arnold first stability theorem. \sphinxstyleemphasis{Ocean Modelling}, 32:188\textendash{}204, 2010. \sphinxhref{https://doi.org/10.1016/j.ocemod.2010.02.001}{doi:10.1016/j.ocemod.2010.02.001}.
\bibitem[34]{zzbibliography:mcdougall2001}
Trevor J. McDougall and Peter C. McIntosh. The Temporal\sphinxhyphen{}Residual\sphinxhyphen{}Mean Velocity. Part II: Isopycnal Interpretation and the Tracer and Momentum Equations. \sphinxstyleemphasis{Journal of Physical Oceanography}, 31(5):1222\textendash{}1246, May 2001. URL: \sphinxurl{https://journals.ametsoc.org/doi/10.1175/1520-0485\%282001\%29031\%3C1222\%3ATTRMVP\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0485(2001)031\textless{}1222:TTRMVP\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0485(2001)031\textless{}1222:TTRMVP\textgreater{}2.0.CO;2}.
\bibitem[35]{zzbibliography:melet2012}
Angelique Melet, Robert Hallberg, Sonya Legg, and Kurt Polzin. Sensitivity of the Ocean State to the Vertical Distribution of Internal\sphinxhyphen{}Tide\sphinxhyphen{}Driven Mixing. \sphinxstyleemphasis{Journal of Physical Oceanography}, 43(3):602\textendash{}615, December 2012. URL: \sphinxurl{https://journals.ametsoc.org/doi/full/10.1175/JPO-D-12-055.1}, \sphinxhref{https://doi.org/10.1175/JPO-D-12-055.1}{doi:10.1175/JPO\sphinxhyphen{}D\sphinxhyphen{}12\sphinxhyphen{}055.1}.
\bibitem[36]{zzbibliography:millero1978}
F.J. Millero. Freezing point of seawater. In \sphinxstyleemphasis{Eight report of the Joint Panel on Oceanographic Tables and Standards (JPOTS)}, number 28, 29\textendash{}35. UNESCO technical papers in marine sciences, 1978. Annex 6. URL: \sphinxurl{https://www.researchgate.net/publication/292574579\_Freezing\_point\_of\_seawater}.
\bibitem[37]{zzbibliography:polzin2009}
Kurt L. Polzin. An abyssal recipe. \sphinxstyleemphasis{Ocean Modelling}, 30(4):298\textendash{}309, January 2009. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500309001565}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2009.07.006}{doi:10.1016/j.ocemod.2009.07.006}.
\bibitem[38]{zzbibliography:reichl2018}
Brandon G. Reichl and Robert Hallberg. A simplified energetics based planetary boundary layer (ePBL) approach for ocean climate simulations. \sphinxstyleemphasis{Ocean Modelling}, 132:112\textendash{}129, December 2018. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S1463500318301069}, \sphinxhref{https://doi.org/10.1016/j.ocemod.2018.10.004}{doi:10.1016/j.ocemod.2018.10.004}.
\bibitem[39]{zzbibliography:roquet2015}
F. Roquet, G. Madec, T. J. McDougall, and P. M. Barker. Accurate polynomial expressions for the density and specific volume of seawater using the teos\sphinxhyphen{}10 standard. \sphinxstyleemphasis{Ocean Modelling}, 90:29\textendash{}43, 2015.
\bibitem[40]{zzbibliography:russell1981}
Gary L. Russell and Jean A. Lerner. A new finite\sphinxhyphen{}differencing scheme for the tracer transport equation. \sphinxstyleemphasis{Journal of Applied Meteorology}, 20:1483\textendash{}1498, 1981. \sphinxhref{https://doi.org/10.1175/1520-0450(1981)020\textless{}1483:ANFDSF\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0450(1981)020\textless{}1483:ANFDSF\textgreater{}2.0.CO;2}.
\bibitem[41]{zzbibliography:sadourny1975}
Robert Sadourny. The Dynamics of Finite\sphinxhyphen{}Difference Models of the Shallow\sphinxhyphen{}Water Equations. \sphinxstyleemphasis{Journal of the Atmospheric Sciences}, 32(4):680\textendash{}689, April 1975. URL: \sphinxurl{https://journals.ametsoc.org/doi/abs/10.1175/1520-0469\%281975\%29032\%3C0680\%3ATDOFDM\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0469(1975)032\textless{}0680:TDOFDM\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0469(1975)032\textless{}0680:TDOFDM\textgreater{}2.0.CO;2}.
\bibitem[42]{zzbibliography:shao2019-in-review}
Andrew Shao, Alistair Adcroft, Robert Hallberg, and Stephen Griffies. A new, general\sphinxhyphen{}coordinate, non\sphinxhyphen{}local neutral diffusion operator. 2019.
\bibitem[43]{zzbibliography:shchepetkin2005}
A. F. Shchepetkin and J. C. McWilliams. The regional ocean modeling system (roms): a split\sphinxhyphen{}explicit, free\sphinxhyphen{}surface, topography\sphinxhyphen{}following coordinates oceanic model. \sphinxstyleemphasis{Ocean Modeling}, 9:347\textendash{}404, 2005.
\bibitem[44]{zzbibliography:st-laurent2002}
L. C. St Laurent, H. L. Simmons, and S. R. Jayne. Estimating tidally driven mixing in the deep ocean. \sphinxstyleemphasis{Geophysical Research Letters}, 29(23):21\textendash{}1\textendash{}21\textendash{}4, December 2002. URL: \sphinxurl{https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2002GL015633}, \sphinxhref{https://doi.org/10.1029/2002GL015633}{doi:10.1029/2002GL015633}.
\bibitem[45]{zzbibliography:sun1999}
Shan Sun, Rainer Bleck, Claes Rooth, John Dukowicz, Eric Chassignet, and Peter Killworth. Inclusion of thermobaricity in isopycnic\sphinxhyphen{}coordinate ocean models. \sphinxstyleemphasis{Journal of Physical Oceanography}, 29:2719\textendash{}2729, 1999.
\bibitem[46]{zzbibliography:gvbook}
Geoffrey K. Vallis. \sphinxstyleemphasis{Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large\sphinxhyphen{}scale Circulation}. Cambridge University Press, Cambridge, 2nd edition, 2017. 946 + xxv pp.
\bibitem[47]{zzbibliography:visbeck1997}
Martin Visbeck, John Marshall, Tom Haine, and Mike Spall. Specification of eddy transfer coefficients in coarse\sphinxhyphen{}resolution ocean circulation models. \sphinxstyleemphasis{J. Phys. Oceanogr.}, 27:381\textendash{}402, 1997. \sphinxhref{https://doi.org/10.1175/1520-0485(1997)027\textless{}0381:SOETCI\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0485(1997)027\textless{}0381:SOETCI\textgreater{}2.0.CO;2}.
\bibitem[48]{zzbibliography:white2008}
Laurent White and Alistair Adcroft. A high\sphinxhyphen{}order finite volume remapping scheme for nonuniform grids: The piecewise quartic method (PQM). \sphinxstyleemphasis{Journal of Computational Physics}, 227(15):7394\textendash{}7422, July 2008. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S0021999108002593}, \sphinxhref{https://doi.org/10.1016/j.jcp.2008.04.026}{doi:10.1016/j.jcp.2008.04.026}.
\bibitem[49]{zzbibliography:white2009}
Laurent White, Alistair Adcroft, and Robert Hallberg. High\sphinxhyphen{}order regridding\sphinxhyphen{}remapping schemes for continuous isopycnal and generalized coordinates in ocean models. \sphinxstyleemphasis{Journal of Computational Physics}, 228(23):8665\textendash{}8692, December 2009. URL: \sphinxurl{http://www.sciencedirect.com/science/article/pii/S0021999109004628}, \sphinxhref{https://doi.org/10.1016/j.jcp.2009.08.016}{doi:10.1016/j.jcp.2009.08.016}.
\bibitem[50]{zzbibliography:wright1997}
Daniel G. Wright. An Equation of State for Use in Ocean Models: Eckart’s Formula Revisited. \sphinxstyleemphasis{Journal of Atmospheric and Oceanic Technology}, 14(3):735\textendash{}740, June 1997. URL: \sphinxurl{https://journals.ametsoc.org/doi/abs/10.1175/1520-0426\%281997\%29014\%3C0735\%3AAEOSFU\%3E2.0.CO\%3B2}, \sphinxhref{https://doi.org/10.1175/1520-0426(1997)014\textless{}0735:AEOSFU\textgreater{}2.0.CO;2}{doi:10.1175/1520\sphinxhyphen{}0426(1997)014\textless{}0735:AEOSFU\textgreater{}2.0.CO;2}.
\bibitem[51]{zzbibliography:teos2010}
IOC, SCOR, and IAPSO. \sphinxstyleemphasis{The international thermodynamic equation of seawater\sphinxhyphen{}2010: calculation and use of thermodynamic properties}. Intergovernmental Oceanographic Commission, Manuals and Guides No. 56, UNESCO, edition, 2010. 196pp.
\end{sphinxthebibliography}


\renewcommand{\indexname}{Fortran Module Index}
\begin{sphinxtheindex}
\let\bigletter\sphinxstyleindexlettergroup
\bigletter{M}
\item\relax\sphinxstyleindexentry{MOM\_energetic\_PBL}\sphinxstyleindexpageref{api/generated/modules/MOM_energetic_PBL:\detokenize{f/MOM_energetic_PBL}}
\item\relax\sphinxstyleindexentry{MOM\_oda\_driver\_mod}\sphinxstyleindexpageref{api/generated/modules/MOM_oda_driver_mod:\detokenize{f/MOM_oda_driver_mod}}
\item\relax\sphinxstyleindexentry{MOM\_tracer\_flow\_control}\sphinxstyleindexpageref{api/generated/modules/MOM_tracer_flow_control:\detokenize{f/MOM_tracer_flow_control}}
\indexspace
\bigletter{N}
\item\relax\sphinxstyleindexentry{NETCDF}\sphinxstyleindexpageref{api/generated/modules/NETCDF:\detokenize{f/NETCDF}}
\indexspace
\bigletter{P}
\item\relax\sphinxstyleindexentry{PCM\_functions}\sphinxstyleindexpageref{api/generated/modules/PCM_functions:\detokenize{f/PCM_functions}}
\indexspace
\bigletter{a}
\item\relax\sphinxstyleindexentry{adjustment\_initialization}\sphinxstyleindexpageref{api/generated/modules/adjustment_initialization:\detokenize{f/adjustment_initialization}}
\item\relax\sphinxstyleindexentry{advection\_test\_tracer}\sphinxstyleindexpageref{api/generated/modules/advection_test_tracer:\detokenize{f/advection_test_tracer}}
\item\relax\sphinxstyleindexentry{atmos\_ocean\_fluxes\_mod}\sphinxstyleindexpageref{api/generated/modules/atmos_ocean_fluxes_mod:\detokenize{f/atmos_ocean_fluxes_mod}}
\indexspace
\bigletter{b}
\item\relax\sphinxstyleindexentry{baroclinic\_zone\_initialization}\sphinxstyleindexpageref{api/generated/modules/baroclinic_zone_initialization:\detokenize{f/baroclinic_zone_initialization}}
\item\relax\sphinxstyleindexentry{basin\_builder}\sphinxstyleindexpageref{api/generated/modules/basin_builder:\detokenize{f/basin_builder}}
\item\relax\sphinxstyleindexentry{benchmark\_initialization}\sphinxstyleindexpageref{api/generated/modules/benchmark_initialization:\detokenize{f/benchmark_initialization}}
\item\relax\sphinxstyleindexentry{bfb\_initialization}\sphinxstyleindexpageref{api/generated/modules/bfb_initialization:\detokenize{f/bfb_initialization}}
\item\relax\sphinxstyleindexentry{bfb\_surface\_forcing}\sphinxstyleindexpageref{api/generated/modules/bfb_surface_forcing:\detokenize{f/bfb_surface_forcing}}
\item\relax\sphinxstyleindexentry{boundary\_impulse\_tracer}\sphinxstyleindexpageref{api/generated/modules/boundary_impulse_tracer:\detokenize{f/boundary_impulse_tracer}}
\indexspace
\bigletter{c}
\item\relax\sphinxstyleindexentry{circle\_obcs\_initialization}\sphinxstyleindexpageref{api/generated/modules/circle_obcs_initialization:\detokenize{f/circle_obcs_initialization}}
\item\relax\sphinxstyleindexentry{coord\_adapt}\sphinxstyleindexpageref{api/generated/modules/coord_adapt:\detokenize{f/coord_adapt}}
\item\relax\sphinxstyleindexentry{coord\_hycom}\sphinxstyleindexpageref{api/generated/modules/coord_hycom:\detokenize{f/coord_hycom}}
\item\relax\sphinxstyleindexentry{coord\_rho}\sphinxstyleindexpageref{api/generated/modules/coord_rho:\detokenize{f/coord_rho}}
\item\relax\sphinxstyleindexentry{coord\_sigma}\sphinxstyleindexpageref{api/generated/modules/coord_sigma:\detokenize{f/coord_sigma}}
\item\relax\sphinxstyleindexentry{coord\_slight}\sphinxstyleindexpageref{api/generated/modules/coord_slight:\detokenize{f/coord_slight}}
\item\relax\sphinxstyleindexentry{coord\_zlike}\sphinxstyleindexpageref{api/generated/modules/coord_zlike:\detokenize{f/coord_zlike}}
\indexspace
\bigletter{d}
\item\relax\sphinxstyleindexentry{dense\_water\_initialization}\sphinxstyleindexpageref{api/generated/modules/dense_water_initialization:\detokenize{f/dense_water_initialization}}
\item\relax\sphinxstyleindexentry{dome2d\_initialization}\sphinxstyleindexpageref{api/generated/modules/dome2d_initialization:\detokenize{f/dome2d_initialization}}
\item\relax\sphinxstyleindexentry{dome\_initialization}\sphinxstyleindexpageref{api/generated/modules/dome_initialization:\detokenize{f/dome_initialization}}
\item\relax\sphinxstyleindexentry{dome\_tracer}\sphinxstyleindexpageref{api/generated/modules/dome_tracer:\detokenize{f/dome_tracer}}
\item\relax\sphinxstyleindexentry{dumbbell\_initialization}\sphinxstyleindexpageref{api/generated/modules/dumbbell_initialization:\detokenize{f/dumbbell_initialization}}
\item\relax\sphinxstyleindexentry{dumbbell\_surface\_forcing}\sphinxstyleindexpageref{api/generated/modules/dumbbell_surface_forcing:\detokenize{f/dumbbell_surface_forcing}}
\item\relax\sphinxstyleindexentry{dyed\_channel\_initialization}\sphinxstyleindexpageref{api/generated/modules/dyed_channel_initialization:\detokenize{f/dyed_channel_initialization}}
\item\relax\sphinxstyleindexentry{dyed\_obc\_tracer}\sphinxstyleindexpageref{api/generated/modules/dyed_obc_tracer:\detokenize{f/dyed_obc_tracer}}
\item\relax\sphinxstyleindexentry{dyed\_obcs\_initialization}\sphinxstyleindexpageref{api/generated/modules/dyed_obcs_initialization:\detokenize{f/dyed_obcs_initialization}}
\indexspace
\bigletter{e}
\item\relax\sphinxstyleindexentry{external\_gwave\_initialization}\sphinxstyleindexpageref{api/generated/modules/external_gwave_initialization:\detokenize{f/external_gwave_initialization}}
\indexspace
\bigletter{f}
\item\relax\sphinxstyleindexentry{fms\_coupler\_util}\sphinxstyleindexpageref{api/generated/modules/fms_coupler_util:\detokenize{f/fms_coupler_util}}
\indexspace
\bigletter{g}
\item\relax\sphinxstyleindexentry{g\_tracer\_utils}\sphinxstyleindexpageref{api/generated/modules/g_tracer_utils:\detokenize{f/g_tracer_utils}}
\item\relax\sphinxstyleindexentry{generic\_tracer}\sphinxstyleindexpageref{api/generated/modules/generic_tracer:\detokenize{f/generic_tracer}}
\indexspace
\bigletter{i}
\item\relax\sphinxstyleindexentry{ideal\_age\_example}\sphinxstyleindexpageref{api/generated/modules/ideal_age_example:\detokenize{f/ideal_age_example}}
\item\relax\sphinxstyleindexentry{idealized\_hurricane}\sphinxstyleindexpageref{api/generated/modules/idealized_hurricane:\detokenize{f/idealized_hurricane}}
\item\relax\sphinxstyleindexentry{isomip\_initialization}\sphinxstyleindexpageref{api/generated/modules/isomip_initialization:\detokenize{f/isomip_initialization}}
\item\relax\sphinxstyleindexentry{isomip\_tracer}\sphinxstyleindexpageref{api/generated/modules/isomip_tracer:\detokenize{f/isomip_tracer}}
\indexspace
\bigletter{k}
\item\relax\sphinxstyleindexentry{kdtree}\sphinxstyleindexpageref{api/generated/modules/kdtree:\detokenize{f/kdtree}}
\item\relax\sphinxstyleindexentry{kelvin\_initialization}\sphinxstyleindexpageref{api/generated/modules/kelvin_initialization:\detokenize{f/kelvin_initialization}}
\indexspace
\bigletter{l}
\item\relax\sphinxstyleindexentry{lock\_exchange\_initialization}\sphinxstyleindexpageref{api/generated/modules/lock_exchange_initialization:\detokenize{f/lock_exchange_initialization}}
\indexspace
\bigletter{m}
\item\relax\sphinxstyleindexentry{meso\_surface\_forcing}\sphinxstyleindexpageref{api/generated/modules/meso_surface_forcing:\detokenize{f/meso_surface_forcing}}
\item\relax\sphinxstyleindexentry{mom}\sphinxstyleindexpageref{api/generated/modules/mom:\detokenize{f/mom}}
\item\relax\sphinxstyleindexentry{mom\_ale}\sphinxstyleindexpageref{api/generated/modules/mom_ale:\detokenize{f/mom_ale}}
\item\relax\sphinxstyleindexentry{mom\_ale\_sponge}\sphinxstyleindexpageref{api/generated/modules/mom_ale_sponge:\detokenize{f/mom_ale_sponge}}
\item\relax\sphinxstyleindexentry{mom\_array\_transform}\sphinxstyleindexpageref{api/generated/modules/mom_array_transform:\detokenize{f/mom_array_transform}}
\item\relax\sphinxstyleindexentry{mom\_barotropic}\sphinxstyleindexpageref{api/generated/modules/mom_barotropic:\detokenize{f/mom_barotropic}}
\item\relax\sphinxstyleindexentry{mom\_bkgnd\_mixing}\sphinxstyleindexpageref{api/generated/modules/mom_bkgnd_mixing:\detokenize{f/mom_bkgnd_mixing}}
\item\relax\sphinxstyleindexentry{mom\_boundary\_update}\sphinxstyleindexpageref{api/generated/modules/mom_boundary_update:\detokenize{f/mom_boundary_update}}
\item\relax\sphinxstyleindexentry{mom\_bulk\_mixed\_layer}\sphinxstyleindexpageref{api/generated/modules/mom_bulk_mixed_layer:\detokenize{f/mom_bulk_mixed_layer}}
\item\relax\sphinxstyleindexentry{mom\_checksum\_packages}\sphinxstyleindexpageref{api/generated/modules/mom_checksum_packages:\detokenize{f/mom_checksum_packages}}
\item\relax\sphinxstyleindexentry{mom\_checksums}\sphinxstyleindexpageref{api/generated/modules/mom_checksums:\detokenize{f/mom_checksums}}
\item\relax\sphinxstyleindexentry{mom\_coms}\sphinxstyleindexpageref{api/generated/modules/mom_coms:\detokenize{f/mom_coms}}
\item\relax\sphinxstyleindexentry{mom\_constants}\sphinxstyleindexpageref{api/generated/modules/mom_constants:\detokenize{f/mom_constants}}
\item\relax\sphinxstyleindexentry{mom\_continuity}\sphinxstyleindexpageref{api/generated/modules/mom_continuity:\detokenize{f/mom_continuity}}
\item\relax\sphinxstyleindexentry{mom\_continuity\_ppm}\sphinxstyleindexpageref{api/generated/modules/mom_continuity_ppm:\detokenize{f/mom_continuity_ppm}}
\item\relax\sphinxstyleindexentry{mom\_controlled\_forcing}\sphinxstyleindexpageref{api/generated/modules/mom_controlled_forcing:\detokenize{f/mom_controlled_forcing}}
\item\relax\sphinxstyleindexentry{mom\_coord\_initialization}\sphinxstyleindexpageref{api/generated/modules/mom_coord_initialization:\detokenize{f/mom_coord_initialization}}
\item\relax\sphinxstyleindexentry{mom\_coriolisadv}\sphinxstyleindexpageref{api/generated/modules/mom_coriolisadv:\detokenize{f/mom_coriolisadv}}
\item\relax\sphinxstyleindexentry{mom\_cpu\_clock}\sphinxstyleindexpageref{api/generated/modules/mom_cpu_clock:\detokenize{f/mom_cpu_clock}}
\item\relax\sphinxstyleindexentry{mom\_cvmix\_conv}\sphinxstyleindexpageref{api/generated/modules/mom_cvmix_conv:\detokenize{f/mom_cvmix_conv}}
\item\relax\sphinxstyleindexentry{mom\_cvmix\_ddiff}\sphinxstyleindexpageref{api/generated/modules/mom_cvmix_ddiff:\detokenize{f/mom_cvmix_ddiff}}
\item\relax\sphinxstyleindexentry{mom\_cvmix\_kpp}\sphinxstyleindexpageref{api/generated/modules/mom_cvmix_kpp:\detokenize{f/mom_cvmix_kpp}}
\item\relax\sphinxstyleindexentry{mom\_cvmix\_shear}\sphinxstyleindexpageref{api/generated/modules/mom_cvmix_shear:\detokenize{f/mom_cvmix_shear}}
\item\relax\sphinxstyleindexentry{mom\_debugging}\sphinxstyleindexpageref{api/generated/modules/mom_debugging:\detokenize{f/mom_debugging}}
\item\relax\sphinxstyleindexentry{mom\_density\_integrals}\sphinxstyleindexpageref{api/generated/modules/mom_density_integrals:\detokenize{f/mom_density_integrals}}
\item\relax\sphinxstyleindexentry{mom\_diabatic\_aux}\sphinxstyleindexpageref{api/generated/modules/mom_diabatic_aux:\detokenize{f/mom_diabatic_aux}}
\item\relax\sphinxstyleindexentry{mom\_diabatic\_driver}\sphinxstyleindexpageref{api/generated/modules/mom_diabatic_driver:\detokenize{f/mom_diabatic_driver}}
\item\relax\sphinxstyleindexentry{mom\_diag\_manager\_wrapper}\sphinxstyleindexpageref{api/generated/modules/mom_diag_manager_wrapper:\detokenize{f/mom_diag_manager_wrapper}}
\item\relax\sphinxstyleindexentry{mom\_diag\_mediator}\sphinxstyleindexpageref{api/generated/modules/mom_diag_mediator:\detokenize{f/mom_diag_mediator}}
\item\relax\sphinxstyleindexentry{mom\_diag\_remap}\sphinxstyleindexpageref{api/generated/modules/mom_diag_remap:\detokenize{f/mom_diag_remap}}
\item\relax\sphinxstyleindexentry{mom\_diag\_vkernels}\sphinxstyleindexpageref{api/generated/modules/mom_diag_vkernels:\detokenize{f/mom_diag_vkernels}}
\item\relax\sphinxstyleindexentry{mom\_diagnostics}\sphinxstyleindexpageref{api/generated/modules/mom_diagnostics:\detokenize{f/mom_diagnostics}}
\item\relax\sphinxstyleindexentry{mom\_diapyc\_energy\_req}\sphinxstyleindexpageref{api/generated/modules/mom_diapyc_energy_req:\detokenize{f/mom_diapyc_energy_req}}
\item\relax\sphinxstyleindexentry{mom\_document}\sphinxstyleindexpageref{api/generated/modules/mom_document:\detokenize{f/mom_document}}
\item\relax\sphinxstyleindexentry{mom\_domains}\sphinxstyleindexpageref{api/generated/modules/mom_domains:\detokenize{f/mom_domains}}
\item\relax\sphinxstyleindexentry{mom\_dyn\_horgrid}\sphinxstyleindexpageref{api/generated/modules/mom_dyn_horgrid:\detokenize{f/mom_dyn_horgrid}}
\item\relax\sphinxstyleindexentry{mom\_dynamics\_split\_rk2}\sphinxstyleindexpageref{api/generated/modules/mom_dynamics_split_rk2:\detokenize{f/mom_dynamics_split_rk2}}
\item\relax\sphinxstyleindexentry{mom\_dynamics\_unsplit}\sphinxstyleindexpageref{api/generated/modules/mom_dynamics_unsplit:\detokenize{f/mom_dynamics_unsplit}}
\item\relax\sphinxstyleindexentry{mom\_dynamics\_unsplit\_rk2}\sphinxstyleindexpageref{api/generated/modules/mom_dynamics_unsplit_rk2:\detokenize{f/mom_dynamics_unsplit_rk2}}
\item\relax\sphinxstyleindexentry{mom\_energetic\_pbl}\sphinxstyleindexpageref{api/generated/modules/mom_energetic_pbl:\detokenize{f/mom_energetic_pbl}}
\item\relax\sphinxstyleindexentry{mom\_entrain\_diffusive}\sphinxstyleindexpageref{api/generated/modules/mom_entrain_diffusive:\detokenize{f/mom_entrain_diffusive}}
\item\relax\sphinxstyleindexentry{mom\_eos}\sphinxstyleindexpageref{api/generated/modules/mom_eos:\detokenize{f/mom_eos}}
\item\relax\sphinxstyleindexentry{mom\_eos\_linear}\sphinxstyleindexpageref{api/generated/modules/mom_eos_linear:\detokenize{f/mom_eos_linear}}
\item\relax\sphinxstyleindexentry{mom\_eos\_nemo}\sphinxstyleindexpageref{api/generated/modules/mom_eos_nemo:\detokenize{f/mom_eos_nemo}}
\item\relax\sphinxstyleindexentry{mom\_eos\_teos10}\sphinxstyleindexpageref{api/generated/modules/mom_eos_teos10:\detokenize{f/mom_eos_teos10}}
\item\relax\sphinxstyleindexentry{mom\_eos\_unesco}\sphinxstyleindexpageref{api/generated/modules/mom_eos_unesco:\detokenize{f/mom_eos_unesco}}
\item\relax\sphinxstyleindexentry{mom\_eos\_wright}\sphinxstyleindexpageref{api/generated/modules/mom_eos_wright:\detokenize{f/mom_eos_wright}}
\item\relax\sphinxstyleindexentry{mom\_error\_handler}\sphinxstyleindexpageref{api/generated/modules/mom_error_handler:\detokenize{f/mom_error_handler}}
\item\relax\sphinxstyleindexentry{mom\_file\_parser}\sphinxstyleindexpageref{api/generated/modules/mom_file_parser:\detokenize{f/mom_file_parser}}
\item\relax\sphinxstyleindexentry{mom\_fixed\_initialization}\sphinxstyleindexpageref{api/generated/modules/mom_fixed_initialization:\detokenize{f/mom_fixed_initialization}}
\item\relax\sphinxstyleindexentry{mom\_forcing\_type}\sphinxstyleindexpageref{api/generated/modules/mom_forcing_type:\detokenize{f/mom_forcing_type}}
\item\relax\sphinxstyleindexentry{mom\_full\_convection}\sphinxstyleindexpageref{api/generated/modules/mom_full_convection:\detokenize{f/mom_full_convection}}
\item\relax\sphinxstyleindexentry{mom\_generic\_tracer}\sphinxstyleindexpageref{api/generated/modules/mom_generic_tracer:\detokenize{f/mom_generic_tracer}}
\item\relax\sphinxstyleindexentry{mom\_geothermal}\sphinxstyleindexpageref{api/generated/modules/mom_geothermal:\detokenize{f/mom_geothermal}}
\item\relax\sphinxstyleindexentry{mom\_get\_input}\sphinxstyleindexpageref{api/generated/modules/mom_get_input:\detokenize{f/mom_get_input}}
\item\relax\sphinxstyleindexentry{mom\_grid}\sphinxstyleindexpageref{api/generated/modules/mom_grid:\detokenize{f/mom_grid}}
\item\relax\sphinxstyleindexentry{mom\_grid\_initialize}\sphinxstyleindexpageref{api/generated/modules/mom_grid_initialize:\detokenize{f/mom_grid_initialize}}
\item\relax\sphinxstyleindexentry{mom\_hor\_index}\sphinxstyleindexpageref{api/generated/modules/mom_hor_index:\detokenize{f/mom_hor_index}}
\item\relax\sphinxstyleindexentry{mom\_hor\_visc}\sphinxstyleindexpageref{api/generated/modules/mom_hor_visc:\detokenize{f/mom_hor_visc}}
\item\relax\sphinxstyleindexentry{mom\_horizontal\_regridding}\sphinxstyleindexpageref{api/generated/modules/mom_horizontal_regridding:\detokenize{f/mom_horizontal_regridding}}
\item\relax\sphinxstyleindexentry{mom\_ice\_shelf}\sphinxstyleindexpageref{api/generated/modules/mom_ice_shelf:\detokenize{f/mom_ice_shelf}}
\item\relax\sphinxstyleindexentry{mom\_ice\_shelf\_dynamics}\sphinxstyleindexpageref{api/generated/modules/mom_ice_shelf_dynamics:\detokenize{f/mom_ice_shelf_dynamics}}
\item\relax\sphinxstyleindexentry{mom\_ice\_shelf\_initialize}\sphinxstyleindexpageref{api/generated/modules/mom_ice_shelf_initialize:\detokenize{f/mom_ice_shelf_initialize}}
\item\relax\sphinxstyleindexentry{mom\_ice\_shelf\_state}\sphinxstyleindexpageref{api/generated/modules/mom_ice_shelf_state:\detokenize{f/mom_ice_shelf_state}}
\item\relax\sphinxstyleindexentry{mom\_int\_tide\_input}\sphinxstyleindexpageref{api/generated/modules/mom_int_tide_input:\detokenize{f/mom_int_tide_input}}
\item\relax\sphinxstyleindexentry{mom\_interface\_heights}\sphinxstyleindexpageref{api/generated/modules/mom_interface_heights:\detokenize{f/mom_interface_heights}}
\item\relax\sphinxstyleindexentry{mom\_internal\_tides}\sphinxstyleindexpageref{api/generated/modules/mom_internal_tides:\detokenize{f/mom_internal_tides}}
\item\relax\sphinxstyleindexentry{mom\_intrinsic\_functions}\sphinxstyleindexpageref{api/generated/modules/mom_intrinsic_functions:\detokenize{f/mom_intrinsic_functions}}
\item\relax\sphinxstyleindexentry{mom\_io}\sphinxstyleindexpageref{api/generated/modules/mom_io:\detokenize{f/mom_io}}
\item\relax\sphinxstyleindexentry{mom\_isopycnal\_slopes}\sphinxstyleindexpageref{api/generated/modules/mom_isopycnal_slopes:\detokenize{f/mom_isopycnal_slopes}}
\item\relax\sphinxstyleindexentry{mom\_kappa\_shear}\sphinxstyleindexpageref{api/generated/modules/mom_kappa_shear:\detokenize{f/mom_kappa_shear}}
\item\relax\sphinxstyleindexentry{mom\_lateral\_boundary\_diffusion}\sphinxstyleindexpageref{api/generated/modules/mom_lateral_boundary_diffusion:\detokenize{f/mom_lateral_boundary_diffusion}}
\item\relax\sphinxstyleindexentry{mom\_lateral\_mixing\_coeffs}\sphinxstyleindexpageref{api/generated/modules/mom_lateral_mixing_coeffs:\detokenize{f/mom_lateral_mixing_coeffs}}
\item\relax\sphinxstyleindexentry{mom\_marine\_ice}\sphinxstyleindexpageref{api/generated/modules/mom_marine_ice:\detokenize{f/mom_marine_ice}}
\item\relax\sphinxstyleindexentry{mom\_meke}\sphinxstyleindexpageref{api/generated/modules/mom_meke:\detokenize{f/mom_meke}}
\item\relax\sphinxstyleindexentry{mom\_meke\_types}\sphinxstyleindexpageref{api/generated/modules/mom_meke_types:\detokenize{f/mom_meke_types}}
\item\relax\sphinxstyleindexentry{mom\_mixed\_layer\_restrat}\sphinxstyleindexpageref{api/generated/modules/mom_mixed_layer_restrat:\detokenize{f/mom_mixed_layer_restrat}}
\item\relax\sphinxstyleindexentry{mom\_neutral\_diffusion}\sphinxstyleindexpageref{api/generated/modules/mom_neutral_diffusion:\detokenize{f/mom_neutral_diffusion}}
\item\relax\sphinxstyleindexentry{mom\_obsolete\_diagnostics}\sphinxstyleindexpageref{api/generated/modules/mom_obsolete_diagnostics:\detokenize{f/mom_obsolete_diagnostics}}
\item\relax\sphinxstyleindexentry{mom\_obsolete\_params}\sphinxstyleindexpageref{api/generated/modules/mom_obsolete_params:\detokenize{f/mom_obsolete_params}}
\item\relax\sphinxstyleindexentry{mom\_ocmip2\_cfc}\sphinxstyleindexpageref{api/generated/modules/mom_ocmip2_cfc:\detokenize{f/mom_ocmip2_cfc}}
\item\relax\sphinxstyleindexentry{mom\_oda\_driver\_mod}\sphinxstyleindexpageref{api/generated/modules/mom_oda_driver_mod:\detokenize{f/mom_oda_driver_mod}}
\item\relax\sphinxstyleindexentry{mom\_offline\_aux}\sphinxstyleindexpageref{api/generated/modules/mom_offline_aux:\detokenize{f/mom_offline_aux}}
\item\relax\sphinxstyleindexentry{mom\_offline\_main}\sphinxstyleindexpageref{api/generated/modules/mom_offline_main:\detokenize{f/mom_offline_main}}
\item\relax\sphinxstyleindexentry{mom\_opacity}\sphinxstyleindexpageref{api/generated/modules/mom_opacity:\detokenize{f/mom_opacity}}
\item\relax\sphinxstyleindexentry{mom\_open\_boundary}\sphinxstyleindexpageref{api/generated/modules/mom_open_boundary:\detokenize{f/mom_open_boundary}}
\item\relax\sphinxstyleindexentry{mom\_pointaccel}\sphinxstyleindexpageref{api/generated/modules/mom_pointaccel:\detokenize{f/mom_pointaccel}}
\item\relax\sphinxstyleindexentry{mom\_pressureforce}\sphinxstyleindexpageref{api/generated/modules/mom_pressureforce:\detokenize{f/mom_pressureforce}}
\item\relax\sphinxstyleindexentry{mom\_pressureforce\_fv}\sphinxstyleindexpageref{api/generated/modules/mom_pressureforce_fv:\detokenize{f/mom_pressureforce_fv}}
\item\relax\sphinxstyleindexentry{mom\_pressureforce\_mont}\sphinxstyleindexpageref{api/generated/modules/mom_pressureforce_mont:\detokenize{f/mom_pressureforce_mont}}
\item\relax\sphinxstyleindexentry{mom\_random}\sphinxstyleindexpageref{api/generated/modules/mom_random:\detokenize{f/mom_random}}
\item\relax\sphinxstyleindexentry{mom\_regridding}\sphinxstyleindexpageref{api/generated/modules/mom_regridding:\detokenize{f/mom_regridding}}
\item\relax\sphinxstyleindexentry{mom\_regularize\_layers}\sphinxstyleindexpageref{api/generated/modules/mom_regularize_layers:\detokenize{f/mom_regularize_layers}}
\item\relax\sphinxstyleindexentry{mom\_remapping}\sphinxstyleindexpageref{api/generated/modules/mom_remapping:\detokenize{f/mom_remapping}}
\item\relax\sphinxstyleindexentry{mom\_restart}\sphinxstyleindexpageref{api/generated/modules/mom_restart:\detokenize{f/mom_restart}}
\item\relax\sphinxstyleindexentry{mom\_safe\_alloc}\sphinxstyleindexpageref{api/generated/modules/mom_safe_alloc:\detokenize{f/mom_safe_alloc}}
\item\relax\sphinxstyleindexentry{mom\_set\_diffusivity}\sphinxstyleindexpageref{api/generated/modules/mom_set_diffusivity:\detokenize{f/mom_set_diffusivity}}
\item\relax\sphinxstyleindexentry{mom\_set\_visc}\sphinxstyleindexpageref{api/generated/modules/mom_set_visc:\detokenize{f/mom_set_visc}}
\item\relax\sphinxstyleindexentry{mom\_shared\_initialization}\sphinxstyleindexpageref{api/generated/modules/mom_shared_initialization:\detokenize{f/mom_shared_initialization}}
\item\relax\sphinxstyleindexentry{mom\_spatial\_means}\sphinxstyleindexpageref{api/generated/modules/mom_spatial_means:\detokenize{f/mom_spatial_means}}
\item\relax\sphinxstyleindexentry{mom\_sponge}\sphinxstyleindexpageref{api/generated/modules/mom_sponge:\detokenize{f/mom_sponge}}
\item\relax\sphinxstyleindexentry{mom\_state\_initialization}\sphinxstyleindexpageref{api/generated/modules/mom_state_initialization:\detokenize{f/mom_state_initialization}}
\item\relax\sphinxstyleindexentry{mom\_string\_functions}\sphinxstyleindexpageref{api/generated/modules/mom_string_functions:\detokenize{f/mom_string_functions}}
\item\relax\sphinxstyleindexentry{mom\_sum\_output}\sphinxstyleindexpageref{api/generated/modules/mom_sum_output:\detokenize{f/mom_sum_output}}
\item\relax\sphinxstyleindexentry{mom\_surface\_forcing}\sphinxstyleindexpageref{api/generated/modules/mom_surface_forcing:\detokenize{f/mom_surface_forcing}}
\item\relax\sphinxstyleindexentry{mom\_surface\_forcing\_gfdl}\sphinxstyleindexpageref{api/generated/modules/mom_surface_forcing_gfdl:\detokenize{f/mom_surface_forcing_gfdl}}
\item\relax\sphinxstyleindexentry{mom\_tfreeze}\sphinxstyleindexpageref{api/generated/modules/mom_tfreeze:\detokenize{f/mom_tfreeze}}
\item\relax\sphinxstyleindexentry{mom\_thickness\_diffuse}\sphinxstyleindexpageref{api/generated/modules/mom_thickness_diffuse:\detokenize{f/mom_thickness_diffuse}}
\item\relax\sphinxstyleindexentry{mom\_tidal\_forcing}\sphinxstyleindexpageref{api/generated/modules/mom_tidal_forcing:\detokenize{f/mom_tidal_forcing}}
\item\relax\sphinxstyleindexentry{mom\_tidal\_mixing}\sphinxstyleindexpageref{api/generated/modules/mom_tidal_mixing:\detokenize{f/mom_tidal_mixing}}
\item\relax\sphinxstyleindexentry{mom\_time\_manager}\sphinxstyleindexpageref{api/generated/modules/mom_time_manager:\detokenize{f/mom_time_manager}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_advect}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_advect:\detokenize{f/mom_tracer_advect}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_diabatic}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_diabatic:\detokenize{f/mom_tracer_diabatic}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_flow\_control}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_flow_control:\detokenize{f/mom_tracer_flow_control}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_hor\_diff}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_hor_diff:\detokenize{f/mom_tracer_hor_diff}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_initialization\_from\_z}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_initialization_from_z:\detokenize{f/mom_tracer_initialization_from_z}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_registry}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_registry:\detokenize{f/mom_tracer_registry}}
\item\relax\sphinxstyleindexentry{mom\_tracer\_z\_init}\sphinxstyleindexpageref{api/generated/modules/mom_tracer_z_init:\detokenize{f/mom_tracer_z_init}}
\item\relax\sphinxstyleindexentry{mom\_transcribe\_grid}\sphinxstyleindexpageref{api/generated/modules/mom_transcribe_grid:\detokenize{f/mom_transcribe_grid}}
\item\relax\sphinxstyleindexentry{mom\_transform\_fms}\sphinxstyleindexpageref{api/generated/modules/mom_transform_fms:\detokenize{f/mom_transform_fms}}
\item\relax\sphinxstyleindexentry{mom\_unit\_scaling}\sphinxstyleindexpageref{api/generated/modules/mom_unit_scaling:\detokenize{f/mom_unit_scaling}}
\item\relax\sphinxstyleindexentry{mom\_unit\_tests}\sphinxstyleindexpageref{api/generated/modules/mom_unit_tests:\detokenize{f/mom_unit_tests}}
\item\relax\sphinxstyleindexentry{mom\_variables}\sphinxstyleindexpageref{api/generated/modules/mom_variables:\detokenize{f/mom_variables}}
\item\relax\sphinxstyleindexentry{mom\_vert\_friction}\sphinxstyleindexpageref{api/generated/modules/mom_vert_friction:\detokenize{f/mom_vert_friction}}
\item\relax\sphinxstyleindexentry{mom\_verticalgrid}\sphinxstyleindexpageref{api/generated/modules/mom_verticalgrid:\detokenize{f/mom_verticalgrid}}
\item\relax\sphinxstyleindexentry{mom\_wave\_interface}\sphinxstyleindexpageref{api/generated/modules/mom_wave_interface:\detokenize{f/mom_wave_interface}}
\item\relax\sphinxstyleindexentry{mom\_wave\_speed}\sphinxstyleindexpageref{api/generated/modules/mom_wave_speed:\detokenize{f/mom_wave_speed}}
\item\relax\sphinxstyleindexentry{mom\_wave\_structure}\sphinxstyleindexpageref{api/generated/modules/mom_wave_structure:\detokenize{f/mom_wave_structure}}
\item\relax\sphinxstyleindexentry{mom\_write\_cputime}\sphinxstyleindexpageref{api/generated/modules/mom_write_cputime:\detokenize{f/mom_write_cputime}}
\indexspace
\bigletter{n}
\item\relax\sphinxstyleindexentry{netcdf}\sphinxstyleindexpageref{api/generated/modules/netcdf:\detokenize{f/netcdf}}
\item\relax\sphinxstyleindexentry{neverworld\_initialization}\sphinxstyleindexpageref{api/generated/modules/neverworld_initialization:\detokenize{f/neverworld_initialization}}
\indexspace
\bigletter{o}
\item\relax\sphinxstyleindexentry{ocean\_da\_core\_mod}\sphinxstyleindexpageref{api/generated/modules/ocean_da_core_mod:\detokenize{f/ocean_da_core_mod}}
\item\relax\sphinxstyleindexentry{ocean\_da\_types\_mod}\sphinxstyleindexpageref{api/generated/modules/ocean_da_types_mod:\detokenize{f/ocean_da_types_mod}}
\item\relax\sphinxstyleindexentry{ocean\_model\_mod}\sphinxstyleindexpageref{api/generated/modules/ocean_model_mod:\detokenize{f/ocean_model_mod}}
\item\relax\sphinxstyleindexentry{oil\_tracer}\sphinxstyleindexpageref{api/generated/modules/oil_tracer:\detokenize{f/oil_tracer}}
\indexspace
\bigletter{p}
\item\relax\sphinxstyleindexentry{p1m\_functions}\sphinxstyleindexpageref{api/generated/modules/p1m_functions:\detokenize{f/p1m_functions}}
\item\relax\sphinxstyleindexentry{p3m\_functions}\sphinxstyleindexpageref{api/generated/modules/p3m_functions:\detokenize{f/p3m_functions}}
\item\relax\sphinxstyleindexentry{pcm\_functions}\sphinxstyleindexpageref{api/generated/modules/pcm_functions:\detokenize{f/pcm_functions}}
\item\relax\sphinxstyleindexentry{phillips\_initialization}\sphinxstyleindexpageref{api/generated/modules/phillips_initialization:\detokenize{f/phillips_initialization}}
\item\relax\sphinxstyleindexentry{plm\_functions}\sphinxstyleindexpageref{api/generated/modules/plm_functions:\detokenize{f/plm_functions}}
\item\relax\sphinxstyleindexentry{polynomial\_functions}\sphinxstyleindexpageref{api/generated/modules/polynomial_functions:\detokenize{f/polynomial_functions}}
\item\relax\sphinxstyleindexentry{ppm\_functions}\sphinxstyleindexpageref{api/generated/modules/ppm_functions:\detokenize{f/ppm_functions}}
\item\relax\sphinxstyleindexentry{pqm\_functions}\sphinxstyleindexpageref{api/generated/modules/pqm_functions:\detokenize{f/pqm_functions}}
\item\relax\sphinxstyleindexentry{pseudo\_salt\_tracer}\sphinxstyleindexpageref{api/generated/modules/pseudo_salt_tracer:\detokenize{f/pseudo_salt_tracer}}
\indexspace
\bigletter{r}
\item\relax\sphinxstyleindexentry{regional\_dyes}\sphinxstyleindexpageref{api/generated/modules/regional_dyes:\detokenize{f/regional_dyes}}
\item\relax\sphinxstyleindexentry{regrid\_consts}\sphinxstyleindexpageref{api/generated/modules/regrid_consts:\detokenize{f/regrid_consts}}
\item\relax\sphinxstyleindexentry{regrid\_edge\_values}\sphinxstyleindexpageref{api/generated/modules/regrid_edge_values:\detokenize{f/regrid_edge_values}}
\item\relax\sphinxstyleindexentry{regrid\_interp}\sphinxstyleindexpageref{api/generated/modules/regrid_interp:\detokenize{f/regrid_interp}}
\item\relax\sphinxstyleindexentry{regrid\_solvers}\sphinxstyleindexpageref{api/generated/modules/regrid_solvers:\detokenize{f/regrid_solvers}}
\item\relax\sphinxstyleindexentry{rgc\_initialization}\sphinxstyleindexpageref{api/generated/modules/rgc_initialization:\detokenize{f/rgc_initialization}}
\item\relax\sphinxstyleindexentry{rgc\_tracer}\sphinxstyleindexpageref{api/generated/modules/rgc_tracer:\detokenize{f/rgc_tracer}}
\item\relax\sphinxstyleindexentry{rossby\_front\_2d\_initialization}\sphinxstyleindexpageref{api/generated/modules/rossby_front_2d_initialization:\detokenize{f/rossby_front_2d_initialization}}
\indexspace
\bigletter{s}
\item\relax\sphinxstyleindexentry{scm\_cvmix\_tests}\sphinxstyleindexpageref{api/generated/modules/scm_cvmix_tests:\detokenize{f/scm_cvmix_tests}}
\item\relax\sphinxstyleindexentry{seamount\_initialization}\sphinxstyleindexpageref{api/generated/modules/seamount_initialization:\detokenize{f/seamount_initialization}}
\item\relax\sphinxstyleindexentry{shelfwave\_initialization}\sphinxstyleindexpageref{api/generated/modules/shelfwave_initialization:\detokenize{f/shelfwave_initialization}}
\item\relax\sphinxstyleindexentry{sloshing\_initialization}\sphinxstyleindexpageref{api/generated/modules/sloshing_initialization:\detokenize{f/sloshing_initialization}}
\item\relax\sphinxstyleindexentry{soliton\_initialization}\sphinxstyleindexpageref{api/generated/modules/soliton_initialization:\detokenize{f/soliton_initialization}}
\item\relax\sphinxstyleindexentry{supercritical\_initialization}\sphinxstyleindexpageref{api/generated/modules/supercritical_initialization:\detokenize{f/supercritical_initialization}}
\indexspace
\bigletter{t}
\item\relax\sphinxstyleindexentry{tidal\_bay\_initialization}\sphinxstyleindexpageref{api/generated/modules/tidal_bay_initialization:\detokenize{f/tidal_bay_initialization}}
\item\relax\sphinxstyleindexentry{tidal\_forcing}\sphinxstyleindexpageref{api/generated/modules/tidal_forcing:\detokenize{f/tidal_forcing}}
\indexspace
\bigletter{u}
\item\relax\sphinxstyleindexentry{user\_change\_diffusivity}\sphinxstyleindexpageref{api/generated/modules/user_change_diffusivity:\detokenize{f/user_change_diffusivity}}
\item\relax\sphinxstyleindexentry{user\_initialization}\sphinxstyleindexpageref{api/generated/modules/user_initialization:\detokenize{f/user_initialization}}
\item\relax\sphinxstyleindexentry{user\_revise\_forcing}\sphinxstyleindexpageref{api/generated/modules/user_revise_forcing:\detokenize{f/user_revise_forcing}}
\item\relax\sphinxstyleindexentry{user\_shelf\_init}\sphinxstyleindexpageref{api/generated/modules/user_shelf_init:\detokenize{f/user_shelf_init}}
\item\relax\sphinxstyleindexentry{user\_surface\_forcing}\sphinxstyleindexpageref{api/generated/modules/user_surface_forcing:\detokenize{f/user_surface_forcing}}
\item\relax\sphinxstyleindexentry{user\_tracer\_example}\sphinxstyleindexpageref{api/generated/modules/user_tracer_example:\detokenize{f/user_tracer_example}}
\indexspace
\bigletter{w}
\item\relax\sphinxstyleindexentry{write\_ocean\_obs\_mod}\sphinxstyleindexpageref{api/generated/modules/write_ocean_obs_mod:\detokenize{f/write_ocean_obs_mod}}
\end{sphinxtheindex}

\renewcommand{\indexname}{Index}
\printindex
\end{document}