The Boussinesq hydrostatic equations of motion in height coordinates are

\textbackslash{}f\{eqnarray\} D\+\_\+t \textbackslash{}boldsymbol\{u\} + f \textbackslash{}widehat\{\textbackslash{}boldsymbol\{k\}\} \textbackslash{}times \textbackslash{}boldsymbol\{u\} + \textbackslash{}frac\{\textbackslash{}rho\}\{\textbackslash{}rho\+\_\+o\} \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}\+Phi + \textbackslash{}frac\{1\}\{\textbackslash{}rho\+\_\+o\} \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z p \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{F\}\} \&\textbackslash{}mbox\{ momentum\} \textbackslash{} \textbackslash{}rho \textbackslash{}, \textbackslash{}frac\{\textbackslash{}partial \textbackslash{}\+Phi\}\{\textbackslash{}partial z\} + \textbackslash{}frac\{\textbackslash{}partial p\}\{\textbackslash{}partial z\} \&= 0 \&\textbackslash{}mbox\{ hydrostatic\} \textbackslash{} \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp \textbackslash{}boldsymbol\{u\} + \textbackslash{}frac\{\textbackslash{}partial w\}\{\textbackslash{}partial z\} \&= 0 \&\textbackslash{}mbox\{ thickness\} \textbackslash{} D\+\_\+t \textbackslash{}theta \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{N\}\}\+\_\+\textbackslash{}theta$^\wedge$\textbackslash{}gamma -\/ \textbackslash{}frac\{\textbackslash{}partial J\+\_\+\textbackslash{}theta$^\wedge$\{(z)\}\}\{\textbackslash{}partial z\} \&\textbackslash{}mbox\{ potential temp\} \textbackslash{} D\+\_\+t S \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{N\}\}\+\_\+\+S$^\wedge$\textbackslash{}gamma -\/ \textbackslash{}frac\{\textbackslash{}partial J\+\_\+\+S$^\wedge$\{(z)\}\}\{\textbackslash{}partial z\} \&\textbackslash{}mbox\{ salinity\} \textbackslash{} \textbackslash{}rho \&= \textbackslash{}rho(S, \textbackslash{}theta, z) \&\textbackslash{}mbox\{ equation of state.\} \textbackslash{}f\}

where notation is described in \mbox{\hyperlink{Notation}{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 {\itshape in situ} density $\rho$ through the \cite{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 {\itshape neutral diffusion} parameterization is detailed in Shao et al. (personal comm.)

The total derivative is

\textbackslash{}f\{eqnarray\} D\+\_\+t \& \textbackslash{}equiv \textbackslash{}frac\{\textbackslash{}partial\}\{\textbackslash{}partial t\} + \textbackslash{}boldsymbol\{v\} \textbackslash{}cdotp \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{} \&= \textbackslash{}frac\{\textbackslash{}partial\}\{\textbackslash{}partial t\} + \textbackslash{}boldsymbol\{u\} \textbackslash{}cdotp \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z + w \textbackslash{}frac\{\textbackslash{}partial\}\{\textbackslash{}partial z\}. \textbackslash{}f\}

The non-\/divergence of flow allows a total derivative to be re-\/written in flux form\+:

\textbackslash{}f\{eqnarray\} D\+\_\+t \textbackslash{}theta \&= \textbackslash{}frac\{\textbackslash{}partial\}\{\textbackslash{}partial t\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{}cdotp ( \textbackslash{}boldsymbol\{v\} \textbackslash{}theta ) \textbackslash{} \&= \textbackslash{}frac\{\textbackslash{}partial\}\{\textbackslash{}partial t\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp ( \textbackslash{}boldsymbol\{u\} \textbackslash{}theta ) + \textbackslash{}frac\{\textbackslash{}partial ( w \textbackslash{}theta )\}\{\textbackslash{}partial z\}. \textbackslash{}f\}

The above equations of motion can thus be written as\+:

\textbackslash{}f\{eqnarray\} D\+\_\+t \textbackslash{}boldsymbol\{u\} + f \textbackslash{}widehat\{\textbackslash{}boldsymbol\{k\}\} \textbackslash{}times \textbackslash{}boldsymbol\{u\} + \textbackslash{}frac\{\textbackslash{}rho\}\{\textbackslash{}rho\+\_\+o\}\textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}\+Phi + \textbackslash{}frac\{1\}\{\textbackslash{}rho\+\_\+o\} \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z p \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{F\}\} \&\textbackslash{}mbox\{ momentum\}\textbackslash{} \textbackslash{}rho \textbackslash{}, \textbackslash{}frac\{\textbackslash{}partial \textbackslash{}\+Phi\}\{\textbackslash{}partial z\} + \textbackslash{}frac\{\textbackslash{}partial p\}\{\textbackslash{}partial z\} \&= 0 \&\textbackslash{}mbox\{ hydrostatic\} \textbackslash{} \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp \textbackslash{}boldsymbol\{u\} + \textbackslash{}frac\{\textbackslash{}partial w\}\{\textbackslash{}partial z\} \&= 0 \&\textbackslash{}mbox\{ thickness\} \textbackslash{} \textbackslash{}frac\{\textbackslash{}partial \textbackslash{}theta\}\{\textbackslash{}partial t\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp ( \textbackslash{}boldsymbol\{u\} \textbackslash{}theta ) + \textbackslash{}frac\{\textbackslash{}partial ( w \textbackslash{}theta )\}\{\textbackslash{}partial z\} \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{N\}\}\+\_\+\textbackslash{}theta$^\wedge$\textbackslash{}gamma -\/ \textbackslash{}frac\{\textbackslash{}partial J\+\_\+\textbackslash{}theta$^\wedge$\{(z)\}\}\{\textbackslash{}partial z\} \&\textbackslash{}mbox\{ potential temp\} \textbackslash{} \textbackslash{}frac\{\textbackslash{}partial S\}\{\textbackslash{}partial t\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp ( \textbackslash{}boldsymbol\{u\} S ) + \textbackslash{}frac\{\textbackslash{}partial ( w S )\}\{\textbackslash{}partial z\} \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{N\}\}\+\_\+\+S$^\wedge$\textbackslash{}gamma -\/ \textbackslash{}frac\{\textbackslash{}partial J\+\_\+\+S$^\wedge$\{(z)\}\}\{\textbackslash{}partial z\} \&\textbackslash{}mbox\{ salinity\} \textbackslash{} \textbackslash{}rho \&= \textbackslash{}rho(S, \textbackslash{}theta, z) \&\textbackslash{}mbox\{ equation of state.\} \textbackslash{}f\}\hypertarget{Governing_Equations_vector_invariant_eqns}{}\section{Vector Invariant Equations}\label{Governing_Equations_vector_invariant_eqns}
M\+O\+M6 solves the momentum equations written in vector-\/invariant form.

A vector identity allows the total derivative of velocity to be written in the vector-\/invariant form\+:

\textbackslash{}f\{eqnarray\} D\+\_\+t \textbackslash{}boldsymbol\{u\} \&= \textbackslash{}partial\+\_\+t \textbackslash{}boldsymbol\{u\} + \textbackslash{}boldsymbol\{v\} \textbackslash{}cdotp \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{}boldsymbol\{u\} \textbackslash{} \&= \textbackslash{}partial\+\_\+t \textbackslash{}boldsymbol\{u\} + \textbackslash{}boldsymbol\{u\} \textbackslash{}cdotp \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}boldsymbol\{u\} + w \textbackslash{}partial\+\_\+z \textbackslash{}boldsymbol\{u\} \textbackslash{} \&= \textbackslash{}partial\+\_\+t \textbackslash{}boldsymbol\{u\} + \textbackslash{}left( \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{}times \textbackslash{}boldsymbol\{u\} \textbackslash{}right) \textbackslash{}times \textbackslash{}boldsymbol\{v\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{}underbrace\{\textbackslash{}frac\{1\}\{2\} \textbackslash{}left$\vert$\textbackslash{}boldsymbol\{u\}\textbackslash{}right$\vert$$^\wedge$2\}\+\_\+\{\textbackslash{}equiv K\} . \textbackslash{}f\}

The flux-\/form equations of motion in height coordinates can thus be written succinctly as\+:

\textbackslash{}f\{eqnarray\} \textbackslash{}partial\+\_\+t \textbackslash{}boldsymbol\{u\} + \textbackslash{}left( f \textbackslash{}widehat\{\textbackslash{}boldsymbol\{k\}\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{}times \textbackslash{}boldsymbol\{u\} \textbackslash{}right) \textbackslash{}times \textbackslash{}boldsymbol\{v\} + \textbackslash{}boldsymbol\{\textbackslash{}nabla\} K
\begin{DoxyItemize}
\item \textbackslash{}frac\{\textbackslash{}rho\}\{\textbackslash{}rho\+\_\+o\} \textbackslash{}boldsymbol\{\textbackslash{}nabla\} \textbackslash{}\+Phi + \textbackslash{}frac\{1\}\{\textbackslash{}rho\+\_\+o\} \textbackslash{}boldsymbol\{\textbackslash{}nabla\} p \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{F\}\} \&\textbackslash{}mbox\{ momentum\} \textbackslash{} \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp \textbackslash{}boldsymbol\{u\} + \textbackslash{}partial\+\_\+z w \&= 0 \&\textbackslash{}mbox\{ thickness\} \textbackslash{} \textbackslash{}partial\+\_\+t \textbackslash{}theta + \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp ( \textbackslash{}boldsymbol\{u\} \textbackslash{}theta ) + \textbackslash{}partial\+\_\+z ( w \textbackslash{}theta ) \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{N\}\}\+\_\+\textbackslash{}theta$^\wedge$\textbackslash{}gamma -\/ \textbackslash{}frac\{\textbackslash{}partial J\+\_\+\textbackslash{}theta$^\wedge$\{(z)\}\}\{\textbackslash{}partial z\} \&\textbackslash{}mbox\{ potential temp\} \textbackslash{} \textbackslash{}partial\+\_\+t S + \textbackslash{}boldsymbol\{\textbackslash{}nabla\}\+\_\+z \textbackslash{}cdotp ( \textbackslash{}boldsymbol\{u\} S ) + \textbackslash{}partial\+\_\+z ( w S ) \&= \textbackslash{}boldsymbol\{\textbackslash{}mathcal\{N\}\}\+\_\+\+S$^\wedge$\textbackslash{}gamma -\/ \textbackslash{}frac\{\textbackslash{}partial J\+\_\+\+S$^\wedge$\{(z)\}\}\{\textbackslash{}partial z\} \&\textbackslash{}mbox\{ salinity\} \textbackslash{} \textbackslash{}rho \&= \textbackslash{}rho(S, \textbackslash{}theta, z) \&\textbackslash{}mbox\{ equation of state\} \textbackslash{}f\}
\end{DoxyItemize}

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