| 202 | 
 The boundary conditions at top and bottom are given by: | 
 The boundary conditions at top and bottom are given by: | 
| 203 | 
  | 
  | 
| 204 | 
 \begin{eqnarray*} | 
 \begin{eqnarray*} | 
| 205 | 
 &&\omega =0~\text{at }r=R_{fixed}\text{ (top of the atmosphere)} \\ | 
 &&\omega =0~\text{at }r=R_{fixed} \label{eq:fixed-bc-atmos} | 
| 206 | 
  | 
 \text{ (top of the atmosphere)} \\ | 
| 207 | 
 \omega &=&\frac{Dp_{s}}{Dt}\text{; at }r=R_{moving}\text{ (bottom of the | 
 \omega &=&\frac{Dp_{s}}{Dt}\text{; at }r=R_{moving}\text{ (bottom of the | 
| 208 | 
 atmosphere)} | 
 atmosphere)} | 
| 209 | 
  | 
 \label{eq:moving-bc-atmos} | 
| 210 | 
 \end{eqnarray*} | 
 \end{eqnarray*} | 
| 211 | 
  | 
  | 
| 212 | 
 Then the (hydrostatic form of) eq(\ref{incompressible}) yields a consistent | 
 Then the (hydrostatic form of) eq(\ref{incompressible}) yields a consistent | 
| 218 | 
  | 
  | 
| 219 | 
 In the ocean we interpret:  | 
 In the ocean we interpret:  | 
| 220 | 
 \begin{eqnarray} | 
 \begin{eqnarray} | 
| 221 | 
 r &=&z\text{ is the height} \\ | 
 r &=&z\text{ is the height}  | 
| 222 | 
 \dot{r} &=&\frac{Dz}{Dt}=w\text{ is the vertical velocity} \\ | 
 \label{eq:ocean-z}\\ | 
| 223 | 
 \phi &=&\frac{p}{\rho _{c}}\text{ is the pressure} \\ | 
 \dot{r} &=&\frac{Dz}{Dt}=w\text{ is the vertical velocity}  | 
| 224 | 
  | 
 \label{eq:ocean-w}\\ | 
| 225 | 
  | 
 \phi &=&\frac{p}{\rho _{c}}\text{ is the pressure}  | 
| 226 | 
  | 
 \label{eq:ocean-p}\\ | 
| 227 | 
 b(\theta ,S,r) &=&\frac{g}{\rho _{c}}\left( \rho (\theta ,S,r)-\rho | 
 b(\theta ,S,r) &=&\frac{g}{\rho _{c}}\left( \rho (\theta ,S,r)-\rho | 
| 228 | 
 _{c}\right) \text{ is the buoyancy} | 
 _{c}\right) \text{ is the buoyancy} | 
| 229 | 
  | 
 \label{eq:ocean-b} | 
| 230 | 
 \end{eqnarray} | 
 \end{eqnarray} | 
| 231 | 
 where $\rho _{c}$ is a fixed reference density of water and $g$ is the | 
 where $\rho _{c}$ is a fixed reference density of water and $g$ is the | 
| 232 | 
 acceleration due to gravity.\noindent | 
 acceleration due to gravity.\noindent | 
| 243 | 
 Boundary conditions are: | 
 Boundary conditions are: | 
| 244 | 
  | 
  | 
| 245 | 
 \begin{eqnarray*} | 
 \begin{eqnarray*} | 
| 246 | 
 w &=&0~\text{at }r=R_{fixed}\text{ (ocean bottom)} \\ | 
 w &=&0~\text{at }r=R_{fixed}\text{ (ocean bottom)}  | 
| 247 | 
 w &=&\frac{D\eta }{Dt}\text{ at }r=R_{moving}=\eta \text{ (ocean surface)} | 
 \label{eq:fixed-bc-ocean}\\ | 
| 248 | 
  | 
 w &=&\frac{D\eta }{Dt}\text{ at }r=R_{moving}=\eta \text{ (ocean surface) | 
| 249 | 
  | 
 \label{eq:moving-bc-ocean}} | 
| 250 | 
 \end{eqnarray*} | 
 \end{eqnarray*} | 
| 251 | 
 where $\eta $ is the elevation of the free surface. | 
 where $\eta $ is the elevation of the free surface. | 
| 252 | 
  | 
  | 
| 260 | 
  | 
  | 
| 261 | 
 \begin{equation} | 
 \begin{equation} | 
| 262 | 
 \phi (x,y,r)=\phi _{s}(x,y)+\phi _{hyd}(x,y,r)+\phi _{nh}(x,y,r) | 
 \phi (x,y,r)=\phi _{s}(x,y)+\phi _{hyd}(x,y,r)+\phi _{nh}(x,y,r) | 
| 263 | 
 \label{pressuresplit} | 
 \label{eq:phi-split} | 
| 264 | 
 \end{equation} | 
 \end{equation} | 
| 265 | 
 and write eq(\ref{incompressible}a) in the form: | 
 and write eq(\ref{incompressible}a) in the form: | 
| 266 | 
  | 
  | 
| 267 | 
 \begin{equation} | 
 \begin{equation} | 
| 268 | 
 \frac{\partial \vec{\mathbf{v}_{h}}}{\partial t}+\mathbf{\nabla }_{h}\phi | 
 \frac{\partial \vec{\mathbf{v}_{h}}}{\partial t}+\mathbf{\nabla }_{h}\phi | 
| 269 | 
 _{s}+\mathbf{\nabla }_{h}\phi _{hyd}+\epsilon _{nh}\mathbf{\nabla }_{h}\phi | 
 _{s}+\mathbf{\nabla }_{h}\phi _{hyd}+\epsilon _{nh}\mathbf{\nabla }_{h}\phi | 
| 270 | 
 _{nh}=\vec{\mathbf{G}}_{\vec{v}_{h}}  \label{hor-mtm} | 
 _{nh}=\vec{\mathbf{G}}_{\vec{v}_{h}}  \label{eq:mom-h} | 
| 271 | 
 \end{equation} | 
 \end{equation} | 
| 272 | 
  | 
  | 
| 273 | 
 \begin{equation} | 
 \begin{equation} | 
| 274 | 
 \frac{\partial \phi _{hyd}}{\partial r}=-b  \label{hydro} | 
 \frac{\partial \phi _{hyd}}{\partial r}=-b  \label{eq:hydrostatic} | 
| 275 | 
 \end{equation} | 
 \end{equation} | 
| 276 | 
  | 
  | 
| 277 | 
 \begin{equation} | 
 \begin{equation} | 
| 278 | 
 \epsilon _{nh}\frac{\partial \dot{r}}{\partial t}+\frac{\partial \phi _{nh}}{% | 
 \epsilon _{nh}\frac{\partial \dot{r}}{\partial t}+\frac{\partial \phi _{nh}}{% | 
| 279 | 
 \partial r}=G_{\dot{r}}  \label{vertmtm} | 
 \partial r}=G_{\dot{r}}  \label{eq:mom-w} | 
| 280 | 
 \end{equation} | 
 \end{equation} | 
| 281 | 
 Here $\epsilon _{nh}$ is a non-hydrostatic parameter. | 
 Here $\epsilon _{nh}$ is a non-hydrostatic parameter. | 
| 282 | 
  | 
  | 
| 306 | 
 \textit{Coriolis} \\  | 
 \textit{Coriolis} \\  | 
| 307 | 
 \textit{\ Forcing/Dissipation} | 
 \textit{\ Forcing/Dissipation} | 
| 308 | 
 \end{tabular} | 
 \end{tabular} | 
| 309 | 
 \right. \qquad  \label{Gu} | 
 \right. \qquad  \label{eq:gu-speherical} | 
| 310 | 
 \end{equation} | 
 \end{equation} | 
| 311 | 
  | 
  | 
| 312 | 
 \begin{equation} | 
 \begin{equation} | 
| 325 | 
 \textit{Coriolis} \\  | 
 \textit{Coriolis} \\  | 
| 326 | 
 \textit{\ Forcing/Dissipation} | 
 \textit{\ Forcing/Dissipation} | 
| 327 | 
 \end{tabular} | 
 \end{tabular} | 
| 328 | 
 \right. \qquad  \label{Gv} | 
 \right. \qquad  \label{eq:gv-spherical} | 
| 329 | 
 \end{equation} | 
 \end{equation} | 
| 330 | 
 \qquad \qquad \qquad \qquad \qquad | 
 \qquad \qquad \qquad \qquad \qquad | 
| 331 | 
  | 
  | 
| 345 | 
 \textit{Coriolis} \\  | 
 \textit{Coriolis} \\  | 
| 346 | 
 \textit{\ Forcing/Dissipation} | 
 \textit{\ Forcing/Dissipation} | 
| 347 | 
 \end{tabular} | 
 \end{tabular} | 
| 348 | 
 \right.  \label{Gw} | 
 \right.  \label{eq:gw-spherical} | 
| 349 | 
 \end{equation} | 
 \end{equation} | 
| 350 | 
 \qquad \qquad \qquad \qquad \qquad | 
 \qquad \qquad \qquad \qquad \qquad | 
| 351 | 
  | 
  | 
| 417 | 
 here) by: | 
 here) by: | 
| 418 | 
  | 
  | 
| 419 | 
 \begin{equation} | 
 \begin{equation} | 
| 420 | 
 \dot{r}=\frac{Dp}{Dt}=\frac{Dp_{hyd}}{Dt}  \label{quasinonhydro} | 
 \dot{r}=\frac{Dp}{Dt}=\frac{Dp_{hyd}}{Dt}  \label{eq:quasi-nh-w} | 
| 421 | 
 \end{equation} | 
 \end{equation} | 
| 422 | 
 where $p_{hy}$ is the hydrostatic pressure. | 
 where $p_{hy}$ is the hydrostatic pressure. | 
| 423 | 
  | 
  | 
| 477 | 
 dividing the total (pressure/geo) potential in to three parts, a surface | 
 dividing the total (pressure/geo) potential in to three parts, a surface | 
| 478 | 
 part, $\phi _{s}(x,y)$, a hydrostatic part $\phi _{hyd}(x,y,r)$ and a | 
 part, $\phi _{s}(x,y)$, a hydrostatic part $\phi _{hyd}(x,y,r)$ and a | 
| 479 | 
 non-hydrostatic part $\phi _{nh}(x,y,r)$, as in (\ref{pressuresplit}), and | 
 non-hydrostatic part $\phi _{nh}(x,y,r)$, as in (\ref{pressuresplit}), and | 
| 480 | 
 writing the momentum equation in the form  | 
 writing the momentum equation | 
| 481 | 
 \begin{equation} | 
 as in (\ref{eq:mom-h}). | 
 | 
 \frac{\partial }{\partial t}\vec{\mathbf{v}_{h}}+\mathbf{\nabla }_{h}\phi | 
  | 
 | 
 _{s}+\mathbf{\nabla }_{h}\phi _{hyd}+\epsilon _{nh}\mathbf{\nabla }\phi | 
  | 
 | 
 _{nh}=\vec{\mathbf{G}}_{\vec{v}}  \label{mtm-split} | 
  | 
 | 
 \end{equation} | 
  | 
 | 
 as in (\ref{hor-mtm}). | 
  | 
| 482 | 
  | 
  | 
| 483 | 
 \subsubsection{Hydrostatic pressure} | 
 \subsubsection{Hydrostatic pressure} | 
| 484 | 
  | 
  | 
| 491 | 
 \] | 
 \] | 
| 492 | 
 and so | 
 and so | 
| 493 | 
  | 
  | 
| 494 | 
 \[ | 
 \begin{equation} | 
| 495 | 
 \phi _{hyd}(x,y,r)=\int_{r}^{R_{o}}bdr  | 
 \phi _{hyd}(x,y,r)=\int_{r}^{R_{o}}bdr  | 
| 496 | 
 \] | 
 \label{eq:hydro-phi} | 
| 497 | 
  | 
 \end{equation} | 
| 498 | 
  | 
  | 
| 499 | 
 \subsubsection{Surface pressure} | 
 \subsubsection{Surface pressure} | 
| 500 | 
  | 
  | 
| 519 | 
 \begin{equation} | 
 \begin{equation} | 
| 520 | 
 \frac{\partial \eta }{\partial t}+\mathbf{\nabla }_{h}\cdot | 
 \frac{\partial \eta }{\partial t}+\mathbf{\nabla }_{h}\cdot | 
| 521 | 
 \int_{R_{fixed}}^{R_{moving}}\vec{\mathbf{v}}_{h}dr=0 | 
 \int_{R_{fixed}}^{R_{moving}}\vec{\mathbf{v}}_{h}dr=0 | 
| 522 | 
 \label{integralcontinuity} | 
 \label{eq:free-surface} | 
| 523 | 
 \end{equation} | 
 \end{equation} | 
| 524 | 
  | 
  | 
| 525 | 
 Whether $\phi $ is pressure (ocean model, $p/\rho _{c}$) or geopotential | 
 Whether $\phi $ is pressure (ocean model, $p/\rho _{c}$) or geopotential | 
| 526 | 
 (atmospheric model), in (\ref{mtm-split}), the horizontal gradient term can | 
 (atmospheric model), in (\ref{mtm-split}), the horizontal gradient term can | 
| 527 | 
 be written  | 
 be written  | 
| 528 | 
 \begin{equation} | 
 \begin{equation} | 
| 529 | 
 \mathbf{\nabla }_{h}\phi _{s}=\mathbf{\nabla }_{h}b\eta   \label{link} | 
 \mathbf{\nabla }_{h}\phi _{s}=\mathbf{\nabla }_{h}b\eta    | 
| 530 | 
  | 
 \label{eq:phi-surf} | 
| 531 | 
 \end{equation} | 
 \end{equation} | 
| 532 | 
 where $b$ is the buoyancy. | 
 where $b$ is the buoyancy. | 
| 533 | 
  | 
  | 
| 545 | 
 \begin{equation} | 
 \begin{equation} | 
| 546 | 
 \nabla _{3}^{2}\phi _{nh}=\nabla .\vec{\mathbf{G}}_{\vec{v}}-\left( \mathbf{% | 
 \nabla _{3}^{2}\phi _{nh}=\nabla .\vec{\mathbf{G}}_{\vec{v}}-\left( \mathbf{% | 
| 547 | 
 \nabla }_{h}^{2}\phi _{s}+\mathbf{\nabla }^{2}\phi _{hyd}\right) =\nabla .% | 
 \nabla }_{h}^{2}\phi _{s}+\mathbf{\nabla }^{2}\phi _{hyd}\right) =\nabla .% | 
| 548 | 
 \vec{\mathbf{F}}  \label{3dinvert} | 
 \vec{\mathbf{F}}  \label{eq:3d-invert} | 
| 549 | 
 \end{equation} | 
 \end{equation} | 
| 550 | 
  | 
  | 
| 551 | 
 For a given rhs this 3-d elliptic equation must be inverted for $\phi _{nh}$ | 
 For a given rhs this 3-d elliptic equation must be inverted for $\phi _{nh}$ | 
| 574 | 
  | 
  | 
| 575 | 
 \begin{equation} | 
 \begin{equation} | 
| 576 | 
 \widehat{n}.\nabla \phi _{nh}=\widehat{n}.\vec{\mathbf{F}} | 
 \widehat{n}.\nabla \phi _{nh}=\widehat{n}.\vec{\mathbf{F}} | 
| 577 | 
 \label{inhomneumann} | 
 \label{eq:inhom-neumann-nh} | 
| 578 | 
 \end{equation} | 
 \end{equation} | 
| 579 | 
 where | 
 where | 
| 580 | 
  | 
  | 
| 603 | 
 {inhomneumann}) the modified boundary condition becomes: | 
 {inhomneumann}) the modified boundary condition becomes: | 
| 604 | 
  | 
  | 
| 605 | 
 \begin{equation} | 
 \begin{equation} | 
| 606 | 
 \widehat{n}.\nabla \phi _{nh}=0  \label{homneuman} | 
 \widehat{n}.\nabla \phi _{nh}=0  \label{eq:hom-neumann-nh} | 
| 607 | 
 \end{equation} | 
 \end{equation} | 
| 608 | 
  | 
  | 
| 609 | 
 If the flow is `close' to hydrostatic balance then the 3-d inversion | 
 If the flow is `close' to hydrostatic balance then the 3-d inversion | 
| 627 | 
 Many forms of momentum dissipation are available in the model. Laplacian and | 
 Many forms of momentum dissipation are available in the model. Laplacian and | 
| 628 | 
 biharmonic frictions are commonly used: | 
 biharmonic frictions are commonly used: | 
| 629 | 
  | 
  | 
| 630 | 
 \[ | 
 \begin{equation} | 
| 631 | 
 D_{V}=A_{h}\nabla _{h}^{2}v+A_{v}\frac{\partial ^{2}v}{\partial z^{2}}% | 
 D_{V}=A_{h}\nabla _{h}^{2}v+A_{v}\frac{\partial ^{2}v}{\partial z^{2}}% | 
| 632 | 
 +A_{4}\nabla _{h}^{4}v | 
 +A_{4}\nabla _{h}^{4}v | 
| 633 | 
 \] | 
 \label{eq:dissipation} | 
| 634 | 
  | 
 \end{equation} | 
| 635 | 
 where $A_{h}$ and $A_{v}\ $are (constant) horizontal and vertical viscosity | 
 where $A_{h}$ and $A_{v}\ $are (constant) horizontal and vertical viscosity | 
| 636 | 
 coefficients and $A_{4}\ $is the horizontal coefficient for biharmonic | 
 coefficients and $A_{4}\ $is the horizontal coefficient for biharmonic | 
| 637 | 
 friction. These coefficients are the same for all velocity components. | 
 friction. These coefficients are the same for all velocity components. | 
| 641 | 
 The mixing terms for the temperature and salinity equations have a similar | 
 The mixing terms for the temperature and salinity equations have a similar | 
| 642 | 
 form to that of momentum except that the diffusion tensor can be | 
 form to that of momentum except that the diffusion tensor can be | 
| 643 | 
 non-diagonal and have varying coefficients. $\qquad $% | 
 non-diagonal and have varying coefficients. $\qquad $% | 
| 644 | 
 \[ | 
 \begin{equation} | 
| 645 | 
 D_{T,S}=\nabla .[\underline{\underline{K}}\nabla (T,S)]+K_{4}\nabla | 
 D_{T,S}=\nabla .[\underline{\underline{K}}\nabla (T,S)]+K_{4}\nabla | 
| 646 | 
 _{h}^{4}(T,S) | 
 _{h}^{4}(T,S) | 
| 647 | 
 \] | 
 \label{eq:diffusion} | 
| 648 | 
  | 
 \end{equation} | 
| 649 | 
 where $\underline{\underline{K}}\ $is the diffusion tensor and the $K_{4}\ $% | 
 where $\underline{\underline{K}}\ $is the diffusion tensor and the $K_{4}\ $% | 
| 650 | 
 horizontal coefficient for biharmonic diffusion. In the simplest case where | 
 horizontal coefficient for biharmonic diffusion. In the simplest case where | 
| 651 | 
 the subgrid-scale fluxes of heat and salt are parameterized with constant | 
 the subgrid-scale fluxes of heat and salt are parameterized with constant | 
| 652 | 
 horizontal and vertical diffusion coefficients, $\underline{\underline{K}}$, | 
 horizontal and vertical diffusion coefficients, $\underline{\underline{K}}$, | 
| 653 | 
 reduces to a diagonal matrix with constant coefficients: | 
 reduces to a diagonal matrix with constant coefficients: | 
| 654 | 
  | 
  | 
| 655 | 
 \[ | 
 \begin{equation} | 
| 656 | 
 \qquad \qquad \qquad \qquad K=\left(  | 
 \qquad \qquad \qquad \qquad K=\left(  | 
| 657 | 
 \begin{array}{ccc} | 
 \begin{array}{ccc} | 
| 658 | 
 K_{h} & 0 & 0 \\  | 
 K_{h} & 0 & 0 \\  | 
| 660 | 
 0 & 0 & K_{v} | 
 0 & 0 & K_{v} | 
| 661 | 
 \end{array} | 
 \end{array} | 
| 662 | 
 \right) \qquad \qquad \qquad  | 
 \right) \qquad \qquad \qquad  | 
| 663 | 
 \] | 
 \label{eq:diagonal-diffusion-tensor} | 
| 664 | 
  | 
 \end{equation} | 
| 665 | 
 where $K_{h}\ $and $K_{v}\ $are the horizontal and vertical diffusion | 
 where $K_{h}\ $and $K_{v}\ $are the horizontal and vertical diffusion | 
| 666 | 
 coefficients. These coefficients are the same for all tracers (temperature, | 
 coefficients. These coefficients are the same for all tracers (temperature, | 
| 667 | 
 salinity ... ). | 
 salinity ... ). | 
| 675 | 
 \frac{D\vec{\mathbf{v}}}{Dt}=\frac{\partial \vec{\mathbf{v}}}{\partial t}% | 
 \frac{D\vec{\mathbf{v}}}{Dt}=\frac{\partial \vec{\mathbf{v}}}{\partial t}% | 
| 676 | 
 +\left( \nabla \times \vec{\mathbf{v}}\right) \times \vec{\mathbf{v}}+\nabla | 
 +\left( \nabla \times \vec{\mathbf{v}}\right) \times \vec{\mathbf{v}}+\nabla | 
| 677 | 
 \left[ \frac{1}{2}(\vec{\mathbf{v}}\cdot \vec{\mathbf{v}})\right]  | 
 \left[ \frac{1}{2}(\vec{\mathbf{v}}\cdot \vec{\mathbf{v}})\right]  | 
| 678 | 
 \label{vecinvariant} | 
 \label{eq:vi-identity} | 
| 679 | 
 \end{equation} | 
 \end{equation} | 
| 680 | 
 This permits alternative numerical treatments of the non-linear terms based | 
 This permits alternative numerical treatments of the non-linear terms based | 
| 681 | 
 on their representation as a vorticity flux. Because gradients of coordinate | 
 on their representation as a vorticity flux. Because gradients of coordinate |