New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 817 for trunk/DOC/BETA/Chapters/Annex_C.tex – NEMO

Ignore:
Timestamp:
2008-02-09T15:13:48+01:00 (16 years ago)
Author:
gm
Message:

trunk - update including Steven correction of the first 5 chapters (until DYN) and activation of Appendix A & B

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DOC/BETA/Chapters/Annex_C.tex

    r707 r817  
    22% Chapter Ñ Appendix C : Discrete Invariants of the Equations 
    33% ================================================================ 
    4 \chapter{Appendix C : Discrete Invariants of the Equations} 
     4\chapter{Discrete Invariants of the Equations} 
    55\label{Apdx_C} 
    66\minitoc 
     7 
     8%%%  Appendix put in gmcomment as it has not been updated for z* and s coordinate 
     9I'm writting this appendix. It will be available in a forthcoming release of the documentation 
     10 
     11\gmcomment{ 
    712 
    813% ================================================================ 
     
    1419 
    1520First, the boundary condition on the vertical velocity (no flux through the surface and the bottom) is established for the discrete set of momentum equations. Then, it is shown that the non linear terms of the momentum equation are written such that the potential enstrophy of a horizontally non divergent flow is preserved while all the other non-diffusive terms preserve the kinetic energy: the energy is also preserved in practice. In addition, an option is also offer for the vorticity term discretization which provides  
    16 a total kinetic energy conserving discretization for that term. Note that although these properties are established in the curvilinear $s$-coordinate system, they still hold in the curvilinear $z$-coordinate system. 
     21a total kinetic energy conserving discretization for that term.  
     22 
     23Nota Bene: these properties are established here in the rigid-lid case and for the 2nd order centered scheme. A forthcoming update will be their generalisation to the free surface case 
     24and higher order scheme. 
    1725 
    1826% ------------------------------------------------------------------------------------------------------------- 
     
    2533The discrete set of momentum equations used in rigid lid approximation  
    2634automatically satisfies the surface and bottom boundary conditions  
    27 ($w_{surface} =w_{bottom} =~0$, no flux through the surface and the bottom).  
     35(no flux through the surface and the bottom: $w_{surface} =w_{bottom} =~0$).  
    2836Indeed, taking the discrete horizontal divergence of the vertical sum of the  
    2937horizontal momentum equations (Eqs. (II.2.1) and (II.2.2)~) wheighted by the  
    3038vertical scale factors, it becomes: 
    3139\begin{flalign*} 
    32 \frac{\partial } {\partial t} 
    33    \left(  
    34    \sum\limits_k \chi  
    35    \right) 
    36 \equiv \frac{\partial } {\partial t} 
    37    \left(  
    38    w_{surface} -w_{bottom}   
    39    \right) 
    40    &&&\\ 
     40\frac{\partial } {\partial t}  \left( \sum\limits_k    \chi    \right) 
     41\equiv  
     42\frac{\partial } {\partial t}  \left(  w_{surface} -w_{bottom}     \right)&&&\\ 
    4143\end{flalign*} 
    4244\begin{flalign*} 
     
    9193% ------------------------------------------------------------------------------------------------------------- 
    9294\subsection{Coriolis and advection terms: vector invariant form} 
    93 \label{Apdx_C.1.2} 
     95\label{Apdx_C_vor_zad} 
    9496 
    9597% ------------------------------------------------------------------------------------------------------------- 
     
    9799% ------------------------------------------------------------------------------------------------------------- 
    98100\subsubsection{Vorticity Term} 
    99 \label{Apdx_C.1.2.1}  
    100  
    101 Potential vorticity is located at $f$-points and defined as: $\zeta / e_{3f}$. The standard discrete formulation of the relative vorticity term obviously conserves potential vorticity. It also conserves the potential enstrophy for a horizontally non-divergent flow (i.e. $\chi $=0) but not the total kinetic energy. Indeed, using the symmetry or skew symmetry properties of the operators (Eqs (II.1.10) and (II.1.11)), it can be shown that: 
     101\label{Apdx_C_vor}  
     102 
     103Potential vorticity is located at $f$-points and defined as: $\zeta / e_{3f}$. The standard discrete formulation of the relative vorticity term obviously conserves potential vorticity (ENS scheme). It also conserves the potential enstrophy for a horizontally non-divergent flow (i.e. $\chi $=0) but not the total kinetic energy. Indeed, using the symmetry or skew symmetry properties of the operators (Eqs \eqref{DOM_mi_adj} and \eqref{DOM_di_adj}), it can be shown that: 
    102104\begin{equation} \label{Apdx_C_1.1} 
    103 \int_D {\zeta / e_3\,\;{\textbf{k}}\cdot \frac{1} {e_3 }\nabla \times \left( {\zeta \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0 
     105\int_D {\zeta / e_3\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {\zeta \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0 
    104106\end{equation} 
    105  
    106 where $dv=e_1 \,e_2 \,e_3 \;di\,dj\,dk$ is the volume element. Indeed, using  
    107 (II.2.11), the discrete form of the right hand side of (C.1.1) can be  
    108 transformed as follow: 
     107where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. Indeed, using  
     108\eqref{Eq_dynvor_ens}, the discrete form of the right hand side of \eqref{Apdx_C_1.1}  
     109can be transformed as follow: 
    109110\begin{flalign*}  
    110 \int_D \zeta / e_3\,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times  
     111&\int_D \zeta / e_3\,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times  
    111112   \left(  
    112113   \zeta \; \textbf{k} \times  \textbf{U}_h   
    113114   \right)\; 
    114115   dv 
    115    &&&\\ 
    116 \end{flalign*} 
    117 \begin{flalign*} 
    118 \equiv \sum\limits_{i,j,k}  
     116   &&& \displaybreak[0] \\ 
     117% 
     118\equiv& \sum\limits_{i,j,k}  
    119119\frac{\zeta / e_{3f}} {e_{1f}\,e_{2f}\,e_{3f}}  
    120120   \biggl\{ \quad 
    121121   \delta_{i+1/2}  
    122       &\left[  
     122      \left[  
    123123         - \overline {\left( {\zeta / e_{3f}} \right)}^{\,i}\; 
    124124            \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/ 2}  
    125125       \right]   
    126    && 
    127    \biggr. \\  
    128    \biggl.  
     126   &&  \\ & \qquad \qquad \qquad \;\; 
    129127   - \delta_{j+1/2}  
    130       &\left[  \;\;\; 
     128      \left[   \;\;\; 
    131129           \overline {\left( \zeta / e_{3f} \right)}^{\,j}\; 
    132130           \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}  
    133131      \right]  
    134    \biggr\} \; 
    135    e_{1f}\,e_{2f}\,e_{3f} 
    136    &&\\  
    137 \end{flalign*} 
    138 \begin{flalign*} 
    139 \equiv \sum\limits_{i,j,k}  
    140    \biggl\{ \quad 
    141    \delta_i  
    142       &\left[ \zeta / e_{3f} \right] \; 
    143       \overline {\left( \zeta / e_{3f} \right)}^{\,i}\;  
    144       \overline{\overline {\left( e_{1u}\,e_{3u}\,u \right)}}^{\,i,j+1/2}  
    145       &&  
    146    \biggr. \\  
    147    \biggl.  
    148    + \delta_j  
    149       &\left[ \zeta / e_{3f} \right] \; 
    150       \overline {\left( \zeta / e_{3f} \right)}^{\,j} \;  
    151       \overline{\overline {\left( e_{2v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}  \; 
     132   \;\;\biggr\} \;  e_{1f}\,e_{2f}\,e_{3f}       && \displaybreak[0] \\  
     133% 
     134\equiv& \sum\limits_{i,j,k}  
     135   \biggl\{   \delta_i     \left[   \frac{\zeta} {e_{3f}}   \right] \; 
     136           \overline{  \left(   \frac{\zeta} {e_{3f}}   \right)  }^{\,i}\;  
     137           \overline{  \overline{   \left( e_{1u}\,e_{3u}\,u \right)  }  }^{\,i,j+1/2}  
     138         + \delta_j   \left[   \frac{\zeta} {e_{3f}}   \right] \; 
     139            \overline{   \left(  \frac{\zeta} {e_{3f}}    \right)  }^{\,j} \;  
     140      \overline{\overline {\left( e_{2v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}         \biggr\}  
     141      &&&& \displaybreak[0] \\  
     142% 
     143\equiv& \frac{1} {2} \sum\limits_{i,j,k}   
     144   \biggl\{ \delta_i    \Bigl[    \left(  \frac{\zeta} {e_{3f}} \right)^2   \Bigr]\; 
     145         \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/2}  
     146            + \delta_j  \Bigl[    \left( \zeta / e_{3f} \right)^2     \Bigr]\;  
     147         \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}  
    152148   \biggr\}  
    153       &&  \\  
    154 \end{flalign*} 
    155  
    156 \begin{flalign*} 
    157 \equiv \frac{1} {2} \sum\limits_{i,j,k}   
    158    \biggl\{ \quad 
    159    \delta_i  
    160       &\Bigl[  
    161          \left( \zeta / e_{3f} \right)^2  
    162       \Bigr]\; 
    163    \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/2}  
    164    && 
    165    \biggr. \\  
    166    \biggl.  
    167    + \delta_j  
    168       &\Bigl[  
    169          \left( \zeta / e_{3f} \right)^2  
    170       \Bigr]\;  
    171       \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}  
    172    \biggr\}  
    173    &&  \\  
    174 \end{flalign*} 
    175  
    176 \begin{flalign*} 
    177 \equiv - \frac{1} {2} \sum\limits_{i,j,k}    \left( \zeta / e_{3f} \right)^2\; 
    178    \biggl\{    \quad 
    179    \delta_{i+1/2}  
    180       &\left[  
    181       \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/2}  
    182       \right]   
    183       && 
    184    \biggr. \\  
    185    \biggl.  
    186    + \delta_{j+1/2} 
    187       &\left[  
    188       \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}  
    189       \right]   
    190    \biggr\}  
    191    && \\  
    192 \end{flalign*} 
    193  
    194  
     149   && \displaybreak[0] \\  
     150% 
     151\equiv& - \frac{1} {2} \sum\limits_{i,j,k}   \left(  \frac{\zeta} {e_{3f}} \right)^2\; 
     152   \biggl\{    \delta_{i+1/2}  
     153         \left[   \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/2}    \right]   
     154               + \delta_{j+1/2} 
     155      \left[   \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}     \right]   
     156   \biggr\}    && \\  
     157\end{flalign*} 
    195158Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2}  
    196159\left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$,  
    197160and introducing the horizontal divergence $\chi $, it becomes: 
    198 \begin{equation*} 
    199 \equiv \sum\limits_{i,j,k} - \frac{1} {2} \left( \zeta / e_{3f} \right)^2 \; \overline{\overline{ e_1T\,e_2T\,e_3T\, \chi}}^{\,i+1/2,j+1/2} \equiv 0 
    200 \end{equation*} 
     161\begin{align*} 
     162\equiv& \sum\limits_{i,j,k} - \frac{1} {2} \left(  \frac{\zeta} {e_{3f}} \right)^2 \; \overline{\overline{ e_1T\,e_2T\,e_3T\, \chi}}^{\,i+1/2,j+1/2} \;\;\equiv 0  
     163\qquad \qquad \qquad \qquad \qquad \qquad \qquad &&&&\\ 
     164\end{align*} 
    201165 
    202166Note that the demonstration is done here for the relative potential  
    203 vorticity but it still hold for the planetary ($f/e_3$ ) and the total  
     167vorticity but it still hold for the planetary ($f/e_3$) and the total  
    204168potential vorticity $((\zeta +f) /e_3 )$. Another formulation of  
    205 the two components of the vorticity term is optionally offered : 
     169the two components of the vorticity term is optionally offered (ENE scheme) : 
    206170\begin{equation*} 
    207171\frac{1} {e_3 }\nabla \times  
     
    228192enstrophy on the relative vorticity term and energy on the Coriolis term. 
    229193\begin{flalign*} 
    230 \int\limits_D \textbf{U}_h \times  
    231    \left(  
    232    \zeta \;\textbf{k} \times \textbf{U}_h  
    233    \right)\; 
    234    dv 
    235    &&& \\ 
    236 \end{flalign*} 
    237  
    238 \begin{flalign*} 
    239 \equiv \sum\limits_{i,j,k}  
    240    \biggl\{    \quad 
    241    &   \overline {\left( \zeta / e_{3f}      \right)  
    242         \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j} \; e_{2u}\,e_{3u}\,u  
    243    && 
    244    \biggr. \\ 
    245    \biggl.  
    246    -& \overline {\left( \zeta / e_{3f}       \right)  
    247        \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i} \; e_{1v}\,e_{3v}\,v \; 
    248    \biggr\}  
    249    && \\ 
    250 \end{flalign*} 
    251  
    252 \begin{flalign*} 
    253 \equiv \sum\limits_{i,j,k} 
    254 \Bigl(  
    255 \zeta / e_{3f}  
    256 \Bigr)\; 
    257    \biggl\{ \quad 
    258    &  \overline {\left( e_{1v}\,e_{3v} \,v \right)}^{\,i+1/2}\;\; 
    259        \overline {\left( e_{2u}\,e_{3u} \,u \right)}^{\,j+1/2}  
    260    && 
    261    \biggr. \\  
    262    \biggl.  
    263    -& \overline {\left( e_{2u}\,e_{3u} \,u \right)}^{\,j+1/2}\;\; 
    264         \overline {\left( e_{1v}\,e_{3v} \,v \right)}^{\,i+1/2}\;  
    265    \biggr\} \;  
     194&\int\limits_D \textbf{U}_h \times   \left(  \zeta \;\textbf{k} \times \textbf{U}_h  \right)  \;  dv &&  \\ 
     195\equiv& \sum\limits_{i,j,k}   \biggl\{     
     196      \overline {\left(  \frac{\zeta} {e_{3f}}      \right)  
     197        \overline {\left( e_{1v}e_{3v}v \right)}^{\,i+1/2}} ^{\,j} \, e_{2u}e_{3u}u  
     198   - \overline {\left(  \frac{\zeta} {e_{3f}}       \right)  
     199       \overline {\left( e_{2u}e_{3u}u \right)}^{\,j+1/2}} ^{\,i} \, e_{1v}e_{3v}v \; 
     200                                   \biggr\}      
     201\\ 
     202\equiv& \sum\limits_{i,j,k}  \frac{\zeta} {e_{3f}} 
     203   \biggl\{  \overline {\left( e_{1v}e_{3v} v \right)}^{\,i+1/2}\; 
     204             \overline {\left( e_{2u}e_{3u} u \right)}^{\,j+1/2}         
     205        - \overline {\left( e_{2u}e_{3u} u \right)}^{\,j+1/2}\; 
     206               \overline {\left( e_{1v}e_{3v} v \right)}^{\,i+1/2} 
     207   \biggr\} 
    266208   \equiv 0 
    267    && \\  
    268 \end{flalign*} 
     209\end{flalign*} 
     210 
    269211 
    270212% ------------------------------------------------------------------------------------------------------------- 
     
    272214% ------------------------------------------------------------------------------------------------------------- 
    273215\subsubsection{Gradient of Kinetic Energy / Vertical Advection} 
    274 \label{Apdx_C.1.2.2}  
     216\label{Apdx_C_zad}  
    275217 
    276218The change of Kinetic Energy (KE) due to the vertical advection is exactly  
    277219balanced by the change of KE due to the horizontal gradient of KE~: 
    278220\begin{equation*} 
    279       \int_D \textbf{U}_h \cdot \nabla_h \left( 1/2\;\textbf{U}_h^2 \right)\;dv 
     221      \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv 
    280222 = - \int_D \textbf{U}_h \cdot w \frac{\partial \textbf{U}_h} {\partial k}\;dv 
    281223\end{equation*} 
    282 Indeed, using successively (II.1.10) and the continuity of mass (II.2.5),  
    283 (II.1.10), and the commutativity of operators $\overline {\,\cdot \,} $ and  
    284 $\delta$, and finally (II.1.11) successively in the horizontal and in the vertical  
    285 direction, it becomes: 
    286 \begin{flalign*} 
    287 \int_D \textbf{U}_h \cdot \nabla_h \left( 1/2\; \textbf{U}_h^2 \right)\;dv &&&\\ 
    288 \end{flalign*} 
    289  
    290 \begin{flalign*} 
    291 \equiv \frac{1} {2} \sum\limits_{i,j,k}  
    292    \biggl\{ \quad 
    293    &\frac{1} {e_{1u}}  \delta_{i+1/2}  
    294       \left[  
    295          \overline {u^2}^{\,i}  
    296       + \overline {v^2}^{\,j}  
    297       \right] 
    298       \;u\;e_{1u}\,e_{2u}\,e_{3u}   
    299       && 
    300    \biggr. \\  
    301    \biggl.  
    302    & + \frac{1} {e_{2v}}  \delta_{j+1/2}  
    303       \left[  
    304          \overline {u^2}^{\,i}  
    305       + \overline {v^2}^{\,j}  
    306       \right] 
    307       \;v\;e_{1v}\,e_{2v}\,e_{3v}  \; 
     224Indeed, using successively \eqref{DOM_di_adj} ($i.e.$ the skew symmetry property of the $\delta$ operator) and the incompressibility, then again \eqref{DOM_di_adj}, then  
     225the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \eqref{DOM_mi_adj} ($i.e.$ the  symmetry property of the $\overline {\,\cdot \,}$ operator) applied in the horizontal and vertical direction, it becomes: 
     226\begin{flalign*} 
     227&\int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv   &&&\\ 
     228\equiv& \frac{1}{2} \sum\limits_{i,j,k}  
     229   \biggl\{  
     230   \frac{1} {e_{1u}}  \delta_{i+1/2}  
     231   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}    \right]  u\,e_{1u}e_{2u}e_{3u}   
     232     + \frac{1} {e_{2v}}  \delta_{j+1/2}  
     233   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  v\,e_{1v}e_{2v}e_{3v}  
    308234   \biggr\}  
    309    && \\  
    310 \end{flalign*} 
    311  
    312 \begin{flalign*} 
    313 \equiv  &\frac{1} {2}\quad \sum\limits_{i,j,k}  
    314    \left(  
    315       \overline {u^2}^{\,i} 
    316    + \overline {v^2}^{\,j}  
    317    \right)\; 
    318 \delta_k  
    319    \left[ 
    320     e_{1T}\,e_{2T} \,w  
    321     \right] 
    322     && \\ 
    323 \end{flalign*} 
    324 \begin{flalign*} 
    325 \equiv &\frac{1} {2} - \sum\limits_{i,j,k}  \delta_{k+1/2}  
     235   &&& \displaybreak[0] \\  
     236% 
     237\equiv&  \frac{1}{2} \sum\limits_{i,j,k}  
     238   \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right)\; 
     239   \delta_k \left[  e_{1T}\,e_{2T} \,w   \right] 
     240% 
     241\;\; \equiv -\frac{1}{2} \sum\limits_{i,j,k}  \delta_{k+1/2}  
    326242   \left[  
    327243      \overline{ u^2}^{\,i}  
     
    329245   \right] \; 
    330246   e_{1v}\,e_{2v}\,w  
    331    && \\ 
    332 \end{flalign*} 
    333 \begin{flalign*} 
    334 \equiv &\frac{1} {2} \quad \sum\limits_{i,j,k}  
    335    \left(  
    336       \overline {\delta_{k+1/2} \left[ u^2 \right]}^{\,i}  
    337    + \overline {\delta_{k+1/2} \left[ v^2 \right]}^{\,j}  
    338    \right)\; 
    339    e_{1T}\,e_{2T} \,w  
    340    && \\ 
    341 \end{flalign*} 
    342 \begin{flalign*} 
    343 \equiv \frac{1} {2} \quad \sum\limits_{i,j,k}  
    344    \biggl\{ \quad 
    345    & \overline {e_{1T}\,e_{2T} \,w}^{\,i+1/2}\;2   \overline {u}^{\,k+1/2}\; \delta_{k+1/2}  
    346       \left[ u \right]  
    347    && 
    348    \biggr. \\  
    349    \biggl. 
    350    & + \overline {e_{1T}\,e_{2T} \,w}^{\,j+1/2}\;2    \overline {v}^{\,k+1/2}\; \delta_{k+1/2}        \left[ v \right]  \; 
     247   &&& \displaybreak[0]\\ 
     248% 
     249\equiv &\frac{1} {2} \sum\limits_{i,j,k}  
     250   \left(    \overline {\delta_{k+1/2} \left[ u^2 \right]}^{\,i}  
     251      + \overline {\delta_{k+1/2} \left[ v^2 \right]}^{\,j}    \right) \; e_{1T}\,e_{2T} \,w  
     252   && \displaybreak[0] \\ 
     253 
     254\equiv &\frac{1} {2} \sum\limits_{i,j,k}  
     255   \biggl\{  \overline {e_{1T}\,e_{2T} \,w}^{\,i+1/2}\;2     
     256         \overline {u}^{\,k+1/2}\; \delta_{k+1/2}         \left[ u \right]     %&&&  \\ 
     257    + \overline {e_{1T}\,e_{2T} \,w}^{\,j+1/2}\;2  \overline {v}^{\,k+1/2}\; \delta_{k+1/2}        \left[ v \right]  \; 
    351258   \biggr\}  
    352    &&\\  
    353 \end{flalign*} 
    354 \begin{flalign*} 
    355 \equiv \quad -\sum\limits_{i,j,k}   
    356    \biggl\{ \quad 
    357    &\frac{1} {b_u } \; 
     259   &&\displaybreak[0] \\  
     260% 
     261\equiv& -\sum\limits_{i,j,k}   
     262   \biggl\{ 
     263   \quad \frac{1} {b_u } \; 
    358264   \overline {\Bigl\{ \overline {e_{1T}\,e_{2T} \,w}^{\,i+1/2}\,\delta_{k+1/2} 
    359265      \left[ u \right]  
    360266             \Bigr\} }^{\,k} \;u\;e_{1u}\,e_{2u}\,e_{3u}   
    361    && 
    362    \biggr. \\  
    363    \biggl.   
    364    & + \frac{1} {b_v } \; 
     267   && \\ 
     268   &\qquad \quad\; + \frac{1} {b_v } \; 
    365269   \overline {\Bigl\{ \overline {e_{1T}\,e_{2T} \,w}^{\,j+1/2} \delta_{k+1/2} 
    366270       \left[ v \right]  
     
    368272   \biggr\}  
    369273   && \\  
    370 \end{flalign*} 
    371 \begin{flalign*} 
    372 \equiv -\int\limits_D \textbf{U}_h \cdot w \frac{\partial \textbf{U}_h} {\partial k}\;dv  &&&\\ 
    373 \end{flalign*} 
    374  
    375 The main point here is that the respect of this property links the choice of the discrete formulation of vertical advection and of horizontal gradient of KE. Choosing one imposes the other. For example KE can also be defined as $1/2(\overline u^{\,i} + \overline v^{\,j})$, but this leads to the following expression for the vertical advection~: 
     274\equiv& -\int\limits_D \textbf{U}_h \cdot w \frac{\partial \textbf{U}_h} {\partial k}\;dv &&&\\ 
     275\end{flalign*} 
     276 
     277The main point here is that the satisfaction of this property links the choice of the discrete formulation of vertical advection and of horizontal gradient of KE. Choosing one imposes the other. For example KE can also be discretized as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$. This leads to the following expression for the vertical advection: 
    376278\begin{equation*} 
    377279\frac{1} {e_3 }\; w\; \frac{\partial \textbf{U}_h } {\partial k} 
     
    385287\end{array}} } \right) 
    386288\end{equation*} 
    387  
    388 This formulation requires one more horizontal mean, and thus the use of 9 velocity points instead of 3. This is the reason why it has not been retained in the model. 
     289a formulation that requires a additional horizontal mean compare to the one used in NEMO. Nine velocity points have to be used instead of 3. This is the reason why it has not been choosen. 
     290 
    389291% ------------------------------------------------------------------------------------------------------------- 
    390292%       Coriolis and advection terms: flux form 
     
    399301\label{Apdx_C.1.3.1}  
    400302 
    401 In flux from the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the ``metric'' term. This altered Coriolis parameter is thus discretised at F-point. It is given by:  
     303In flux from the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the ``metric'' term. This altered Coriolis parameter is discretised at F-point. It is given by:  
    402304\begin{equation*} 
    403305f+\frac{1} {e_1 e_2 }  
     
    409311\end{equation*} 
    410312 
    411 Then any of the scheme presented above for the vorticity term in the vector invariant formulation can be used, except of course the mixed scheme. However, the energy conserving scheme has exclusively been used to date. 
     313The ENE scheme is then applied to obtain the vorticity term in flux form. It therefore conserves the total KE. The demonstration is same as for the vorticity term in vector invariant form (\S\ref{Apdx_C_vor}). 
    412314 
    413315% ------------------------------------------------------------------------------------------------------------- 
     
    417319\label{Apdx_C.1.3.2}  
    418320 
    419 The flux form operator of the momentum advection is evaluated using a second order finite difference scheme. Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum. Moreover, it conserves the horizontal kinetic energy, that is : 
     321The flux form operator of the momentum advection is evaluated using a centered second order finite difference scheme. Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum. Because of the centered second order scheme, it conserves the horizontal kinetic energy, that is : 
    420322 
    421323\begin{equation} \label{Apdx_C_I.3.10} 
     
    429331Let us demonstrate this property for the first term of the scalar product (i.e. considering just the the terms associated with the i-component of the advection): 
    430332\begin{flalign*} 
    431 \int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right)\;dv   &&&\\ 
    432 \end{flalign*} 
    433  
    434 \begin{flalign*} 
    435 \equiv \sum\limits_{i,j,k}  
     333&\int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv    &&&\\ 
     334% 
     335\equiv& \sum\limits_{i,j,k}  
     336\biggl\{    \frac{1} {e_{1u}\, e_{2u}\,e_{3u}}    \biggl(    
     337      \delta_{i+1/2}  \left[   \overline {e_{2u}\,e_{3u}\,u}^{\,i}      \;\overline u^{\,i}          \right]    
     338   + \delta_j           \left[   \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]  
     339      &&& \\ & \qquad \qquad \qquad \qquad \qquad \qquad 
     340   + \delta_k          \left[   \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}\;\overline u^{\,k+1/2} \right] 
     341         \biggr)   \;   \biggr\} \, e_{1u}\,e_{2u}\,e_{3u} \;u  
     342      &&& \displaybreak[0] \\  
     343% 
     344\equiv& \sum\limits_{i,j,k}  
    436345   \biggl\{  
    437    \frac{1} {e_{1u}\, e_{2u}\,e_{3u}}  
    438       \biggl(  \quad \biggr. 
    439       &    \delta_{i+1/2}  
    440          \left[  
    441          \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;\overline u^{\,i}  
    442          \right] 
    443       && \\ 
    444       & + \delta_j  
    445          \left[  
    446          \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;\overline u^{\,j+1/2}  
    447          \right]  
    448       && 
    449    \biggr.\\  
    450    \biggl.  
    451       & + \delta_k      \biggl.  
    452          \left[  
    453          \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}\;\overline u^{\,k+1/2}  
    454          \right]\;  
    455       \biggr)\;  
    456    \biggr\} \,  
    457    e_{1u}\,e_{2u}\,e_{3u} \;u  
    458    && \\  
    459 \end{flalign*} 
    460  
    461 \begin{flalign*} 
    462 \equiv \sum\limits_{i,j,k}  
    463    \biggl\{  
    464    \delta_{i+1/2}  
    465       \left[  
    466       \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;    \overline u^{\,i}  
    467       \right] 
    468    & + \delta_j  
    469       \left[  
    470       \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;\overline u^{\,j+1/2}  
    471       \right] 
    472    && 
    473    \biggr.\\ 
    474    \biggl. 
    475    & + \delta_k  
    476       \left[  
    477       \overline {e_{1w}\,e_{2w}\,w}^{\,i+12}\;\overline u^{\,k+1/2}  
    478       \right]\;  
    479    \biggr\} 
    480    && \\ 
    481 \end{flalign*} 
    482  
    483 \begin{flalign*} 
    484 \equiv \sum\limits_{i,j,k} 
     346      \delta_{i+1/2} \left[   \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;  \overline u^{\,i}  \right] 
     347   + \delta_j          \left[   \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right] 
     348      &&& \\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad 
     349   + \delta_k         \left[   \overline {e_{1w}\,e_{2w}\,w}^{\,i+12}\;\overline u^{\,k+1/2}  \right] 
     350      \; \biggr\}    &&& \displaybreak[0] \\ 
     351% 
     352\equiv& \sum\limits_{i,j,k} 
    485353   \biggl\{  
    486354      \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;        \overline u^{\,i}       \delta_i  
    487355      \left[ u \right]  
    488    & + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;   \overline u^{\,j+1/2}   \delta_{j+1/2}  
     356        + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;   \overline u^{\,j+1/2}   \delta_{j+1/2}  
    489357      \left[ u \right]  
    490    && 
    491    \biggr. \\ 
    492    \biggl. 
    493    & + \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}\;   \overline u^{\,k+1/2}   \delta_{k+1/2}  
    494       \left[ u \right]  
    495    \biggr\}  
    496    && \\ 
    497 \end{flalign*} 
    498  
    499 \begin{flalign*} 
    500 \equiv \sum\limits_{i,j,k} 
     358      &&& \\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad 
     359       + \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}\; \overline u^{\,k+1/2}   \delta_{k+1/2}    \left[ u \right]     \biggr\}     && \displaybreak[0] \\ 
     360% 
     361\equiv& \sum\limits_{i,j,k} 
    501362   \biggl\{  
    502363        \overline {e_{2u}\,e_{3u}\,u}^{\,i}        \delta_i       \left[ u^2 \right]  
    503    & + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}     \delta_{j+/2}  \left[ u^2 \right] 
    504    &&  
    505    \biggr. \\ 
    506    \biggl. 
    507    & + \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}  \delta_{k+1/2}    \left[ u^2 \right]  
     364    + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}      \delta_{j+/2}  \left[ u^2 \right] 
     365    + \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}   \delta_{k+1/2}    \left[ u^2 \right]  
    508366   \biggr\}  
    509    && \\ 
    510 \end{flalign*} 
    511  
    512 \begin{flalign*} 
    513 \equiv \sum\limits_{i,j,k} 
     367   && \displaybreak[0] \\ 
     368% 
     369\equiv& \sum\limits_{i,j,k} 
    514370   \bigg\{  
    515371      e_{2u}\,e_{3u}\,u\;     \delta_{i+1/2}       \left[ \overline {u^2}^{\,i} \right] 
    516    & + e_{1u}\,e_{3u}\,v\; \delta_{j+1/2}    \; \left[ \overline {u^2}^{\,i} \right] 
    517    && 
    518    \biggr.\\ 
    519    \biggl. 
    520    & + e_{1w}\,e_{2w}\,w\; \delta_{k+1/2}       \left[ \overline {u^2}^{\,i} \right]  
     372        + e_{1u}\,e_{3u}\,v\; \delta_{j+1/2}    \; \left[ \overline {u^2}^{\,i} \right] 
     373    + e_{1w}\,e_{2w}\,w\;  \delta_{k+1/2}       \left[ \overline {u^2}^{\,i} \right]  
    521374   \biggr\}  
    522    && \\ 
    523 \end{flalign*} 
    524  
    525 \begin{flalign*} 
    526 \equiv \sum\limits_{i,j,k} 
     375   && \displaybreak[0] \\ 
     376% 
     377\equiv& \sum\limits_{i,j,k} 
    527378\overline {u^2}^{\,i}  
    528379   \biggl\{  
     
    530381   + \delta_{j+1/2}  \left[ e_{1u}\,e_{3u}\,v  \right] 
    531382   + \delta_{k+1/2}  \left[ e_{1w}\,e_{2w}\,w \right]  
    532    \biggr\}  
     383   \biggr\}  \;\;  \equiv 0 
    533384   &&& \\ 
    534385\end{flalign*} 
    535386 
    536 \begin{flalign*} 
    537 \equiv 0    &&&\\ 
    538 \end{flalign*} 
     387When the UBS scheme is used to evaluate the flux form momentum advection, the discrete operator does not contribute to the global budget of linear momentum (flux form). The horizontal kinetic energy is not conserved, but forced to decrease (the scheme is diffusive).  
    539388 
    540389% ------------------------------------------------------------------------------------------------------------- 
     
    545394 
    546395 
    547 A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. In $z-$coordinates, this properties is satisfied locally with the choice of discretization we have made (property (II.1.9)~). When the equation of state is linear (i.e. when a advective-diffusive equation for density can be derived from those of temperature and salinity) the change of KE due to the work of pressure forces is balanced by the change of potential energy due to buoyancy forces.  
     396A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. In $z$-coordinate, this properties is satisfied locally on a C-grid with 2nd order finite differences (property \eqref{Eq_DOM_curl_grad}). When the equation of state is linear ($i.e.$ when an advective-diffusive equation for density can be derived from those of temperature and salinity) the change of KE due to the work of pressure forces is balanced by the change of potential energy due to buoyancy forces:  
    548397\begin{equation*} 
    549398\int_D - \frac{1} {\rho_o} \left. \nabla p^h \right|_z \cdot \textbf{U}_h \;dv  
     
    551400\end{equation*} 
    552401 
    553 This property is satisfied in both $z- $and $s-$coordinates. Indeed, defining the depth of a $T$-point, $z_T$ defined as the sum of the vertical scale factors at $w$-points starting from the surface, it can be written as: 
    554 \begin{flalign*} 
    555 \int_D - \frac{1} {\rho_o} \left. \nabla p^h \right|_z \cdot \textbf{U}_h \;dv   &&& \\ 
    556 \end{flalign*} 
    557 \begin{flalign*} 
    558 \equiv \sum\limits_{i,j,k}  
    559    \biggl\{ \;     
    560    & - \frac{1} {\rho_o e_{1u}}  
    561       \Bigl(  
    562       \delta_{i+1/2} \left[ p^h \right] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2}  
    563          \left[ z_T \right]  
    564       \Bigr)\; 
    565       u\;e_{1u}\,e_{2u}\,e_{3u}   
    566    && 
    567    \biggr. \\  
    568    \biggl. 
    569    & - \frac{1} {\rho_o e_{2v}}    
    570       \Bigl(  
    571       \delta_{j+1/2} \left[ p^h \right] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2}  
    572          \left[ z_T \right]  
    573       \Bigr)\; 
    574       v\;e_{1v}\,e_{2v}\,e_{3v} \; 
    575    \biggr\}  
    576    && \\  
    577 \end{flalign*} 
    578  
    579 Using (II.1.10), the continuity equation (II.2.5), and the hydrostatic  
    580 equation (II.2.4), it turns out to be:  
    581 \begin{multline*}  
    582 \equiv \frac{1} {\rho_o} \sum\limits_{i,j,k}     
    583    \biggl\{  
     402This property can be satisfied in discrete sense for both $z$- and $s$-coordinates. Indeed, defining the depth of a $T$-point, $z_T$ defined as the sum of the vertical scale factors at $w$-points starting from the surface, the workof pressure forces can be written as: 
     403\begin{flalign*} 
     404&\int_D - \frac{1} {\rho_o} \left. \nabla p^h \right|_z \cdot \textbf{U}_h \;dv   &&& \\ 
     405\equiv& \sum\limits_{i,j,k} \biggl\{ \;  - \frac{1} {\rho_o e_{1u}}   \Bigl(  
     406\delta_{i+1/2} \left[ p^h \right] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]  
     407               \Bigr)  \; u\;e_{1u}\,e_{2u}\,e_{3u}   
     408   &&  \\ & \qquad \qquad 
     409                                 - \frac{1} {\rho_o e_{2v}}    \Bigl(  
     410\delta_{j+1/2} \left[ p^h \right] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2}  \left[ z_T \right]  
     411               \Bigr)  \; v\;e_{1v}\,e_{2v}\,e_{3v} \; 
     412   \biggr\}   && \\  
     413\end{flalign*} 
     414 
     415Using  \eqref{DOM_di_adj}, $i.e.$ the skew symmetry property of the $\delta$ operator, \eqref{Eq_wzv}, the continuity equation), and \eqref{Eq_dynhpg_sco}, the hydrostatic  
     416equation in $s$-coordinate, it turns out to be:  
     417\begin{flalign*}  
     418\equiv& \frac{1} {\rho_o} \sum\limits_{i,j,k}    \biggl\{  
    584419      e_{2u}\,e_{3u} \;u\;g\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2}[ z_T]     
    585    +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2}\;\delta_{j+1/2}[ z_T]   
    586     \biggr. \\   
    587 \shoveright { 
    588    +\biggl.  
    589       \Bigl( 
    590        \delta_i[ e_{2u}\,e_{3u}\,u] + \delta_j [ e_{1v}\,e_{3v}\,v] 
    591        \Bigr)\;p^h 
    592    \biggr\} } \\ 
    593 \end{multline*} 
    594  
    595 \begin{multline*} 
    596 \equiv \frac{1} {\rho_o } \sum\limits_{i,j,k} 
     420   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2}\;\delta_{j+1/2}[ z_T]      
     421&& \\  & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \;\;\, 
     422   +\Bigl(  \delta_i[ e_{2u}\,e_{3u}\,u] + \delta_j [ e_{1v}\,e_{3v}\,v]  \Bigr)\;p^h \biggr\}  &&\\ 
     423% 
     424\equiv& \frac{1} {\rho_o } \sum\limits_{i,j,k} 
    597425   \biggl\{  
    598426       e_{2u}\,e_{3u} \;u\;g\;   \overline \rho^{\,i+1/2} \delta_{i+1/2} \left[ z_T \right] 
    599427   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2} \delta_{j+1/2} \left[ z_T \right]  
    600    \biggr. \\  
    601 \shoveright { 
    602    \biggl.  
    603     - \delta_k  
    604       \left[ e_{1w} e_{2w}\,w \right]\;p^h  
    605    \biggr\} } \\  
    606 \end{multline*} 
    607  
    608 \begin{multline*} 
    609 \equiv \frac{1} {\rho_o } \sum\limits_{i,j,k} 
     428   &&&\\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \;\;\, 
     429    - \delta_k \left[ e_{1w} e_{2w}\,w \right]\;p^h   \biggr\}   &&&\\  
     430% 
     431\equiv& \frac{1} {\rho_o } \sum\limits_{i,j,k} 
    610432   \biggl\{  
    611433      e_{2u}\,e_{3u} \;u\;g\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right] 
    612    +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2} \;\delta_{j+1/2} \left[ z_T \right]   \biggr. \\  
    613 \shoveright{ 
    614    \biggl.  
     434   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2} \;\delta_{j+1/2} \left[ z_T \right]  
     435   &&& \\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \;\;\, 
    615436   +   e_{1w} e_{2w} \;w\;\delta_{k+1/2} \left[ p_h \right]  
    616    \biggr\} }  \\  
    617 \end{multline*} 
    618  
    619 \begin{multline*} 
    620 \equiv \frac{g} {\rho_o}  \sum\limits_{i,j,k} 
     437   \biggr\}  &&&\\  
     438% 
     439\equiv& \frac{g} {\rho_o}  \sum\limits_{i,j,k} 
    621440   \biggl\{  
    622441      e_{2u}\,e_{3u} \;u\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right] 
    623    +  e_{1v}\,e_{3v} \;v\; \overline \rho^{\,j+1/2}\;\delta_{j+1/2} \left[ z_T \right]       \biggr. \\ 
    624 \shoveright{  
    625    \biggl.  
     442   +  e_{1v}\,e_{3v} \;v\; \overline \rho^{\,j+1/2}\;\delta_{j+1/2} \left[ z_T \right]     
     443   &&& \\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \;\;\, 
    626444   -  e_{1w} e_{2w} \;w\;e_{3w} \overline \rho^{\,k+1/2}  
    627    \biggr\} \\  
    628 \end{multline*} 
     445   \biggr\}   &&&\\  
     446\end{flalign*} 
    629447noting that by definition of $z_T$, $\delta_{k+1/2} \left[ z_T \right] \equiv - e_{3w} $, thus: 
    630448\begin{multline*} 
     
    639457   \biggr\} } \\  
    640458\end{multline*} 
    641 Using (II.1.10), it becomes~: 
    642 \begin{flalign*} 
    643 \equiv - \frac{g} {\rho_o} \sum\limits_{i,j,k} z_T  
     459Using \eqref{DOM_di_adj}, it becomes: 
     460\begin{flalign*} 
     461\equiv& - \frac{g} {\rho_o} \sum\limits_{i,j,k} z_T  
    644462   \biggl\{  
    645463      \delta_i    \left[ e_{2u}\,e_{3u}\,u\; \overline \rho^{\,i+1/2}   \right] 
     
    648466   \biggr\}  
    649467   &&& \\ 
    650 \end{flalign*} 
    651 \begin{flalign*} 
    652 \equiv -\int_D \nabla \cdot \left( \rho \, \textbf{U} \right)\;g\;z\;\;dv  &&& \\ 
     468% 
     469\equiv& -\int_D \nabla \cdot \left( \rho \, \textbf{U} \right)\;g\;z\;\;dv    &&& \\ 
    653470\end{flalign*} 
    654471 
    655472Note that this property strongly constraints the discrete expression of both  
    656473the depth of $T-$points and of the term added to the pressure gradient in  
    657 $s-$coordinates.  
     474$s$-coordinate. Nevertheless, it is almost never satisfied as a linear equation of state  
     475is rarely used. 
    658476 
    659477% ------------------------------------------------------------------------------------------------------------- 
     
    669487With the rigid-lid approximation, the change of KE due to the work of surface pressure forces is exactly zero. This is satisfied in discrete form, at the precision required on the elliptic solver used to solve this equation. This can be demonstrated as follows: 
    670488\begin{flalign*} 
    671 \int\limits_D  - \frac{1} {\rho_o} \nabla_h \left( p_s \right) \cdot \textbf{U}_h \;dv &&& \\ 
    672 \end{flalign*} 
    673  
    674 \begin{flalign*} 
    675 \equiv \sum\limits_{i,j,k}  
    676    \biggl\{    \quad 
    677       & \left(  
    678        - M_u - \frac{1} {H_u \,e_{2u}}  \delta_j   \left[ \partial_t \psi  \right]  
    679         \right)\; 
    680         u\;e_{1u}\,e_{2u}\,e_{3u}  
    681    && 
    682    \biggr. \\ 
    683    \biggl.  
    684       + & \left(  
    685          - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi \right]  
    686           \right)\; 
    687           v\;e_{1v}\,e_{2v}\,e_{3v}    \; 
    688    \biggr\}  
    689    &&  \\ 
    690 \end{flalign*} 
    691  
    692 \begin{flalign*} 
    693 \equiv \sum\limits_{i,j}  
    694    \Biggl\{    \quad 
    695       &\biggl(  
    696       - M_u - \frac{1} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi  \right]  
    697       \biggr) 
    698       \biggl(  
    699       \sum\limits_k  u\;e_{3u}   
    700       \biggr)\; 
    701       e_{1u}\,e_{2u}  
    702    && 
    703    \Biggr.  \\ 
    704    \Biggl.  
    705    + & \biggl(  
    706       - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi  \right] 
    707          \biggr) 
    708          \biggl(  
    709          \sum\limits_k   v\;e_{3v} 
    710           \biggr)\; 
    711           e_{1v}\,e_{2v} \; 
    712    \Biggr\}  
     489\int\limits_D  - \frac{1} {\rho_o} \nabla_h \left( p_s \right) \cdot \textbf{U}_h \;dv%   &&& \\ 
     490% 
     491&\equiv \sum\limits_{i,j,k}   \biggl\{    \; 
     492    \left(  - M_u - \frac{1} {H_u \,e_{2u}}  \delta_j    \left[ \partial_t \psi  \right]   \right)\; 
     493    u\;e_{1u}\,e_{2u}\,e_{3u}   
     494&&&\\&  \qquad \;\;\, 
     495      + \left(  - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi \right]     \right)\; 
     496     v\;e_{1v}\,e_{2v}\,e_{3v}   \; \biggr\}       
     497&&&\\ 
     498\\ 
     499% 
     500&\equiv \sum\limits_{i,j}  \Biggl\{   \; 
     501   \biggl( - M_u - \frac{1} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi  \right]   \biggr) 
     502   \biggl( \sum\limits_k  u\;e_{3u}   \biggr)\;  e_{1u}\,e_{2u}  
     503&&&\\&  \qquad \;\;\, 
     504   + \biggl( - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi  \right]   \biggr) 
     505      \biggl(   \sum\limits_k   v\;e_{3v}   \biggr)\;   e_{1v}\,e_{2v} \;   \Biggr\}  
    713506   && \\  
    714 \end{flalign*} 
    715 using the relation between \textit{$\psi $} and the vertically sum of the velocity, it becomes~: 
    716  
    717 \begin{flalign*} 
    718 \equiv \sum\limits_{i,j}  
    719    \biggl\{    \quad 
    720       &\left(  
     507% 
     508\intertext{using the relation between \textit{$\psi $} and the vertically sum of the velocity, it becomes:} 
     509% 
     510&\equiv \sum\limits_{i,j}  
     511   \biggl\{  \;    
     512      \left( \;\;\, 
    721513      M_u + \frac{1} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi \right]  
    722514      \right)\; 
    723515      e_{1u} \,\delta_j  
    724516         \left[ \partial_t \psi  \right]  
    725    && 
    726    \biggr. \\  
    727    \biggl.  
    728       +& \left(  
     517   && \\ &  \qquad \;\;\, 
     518      + \left(  
    729519      - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi \right]  
    730520      \right)\; 
     
    732522   \biggr\}  
    733523   && \\  
    734 \end{flalign*} 
    735 applying the adjoint of the $\delta$ operator, it is now: 
    736  
    737 \begin{flalign*} 
    738 \equiv \sum\limits_{i,j}  - \partial_t \psi \; 
    739    \biggl\{    \quad 
    740    &  \delta_{j+1/2} \left[ e_{1u} M_u \right]  
     524% 
     525\intertext{applying the adjoint of the $\delta$ operator, it is now:} 
     526% 
     527&\equiv \sum\limits_{i,j}  - \partial_t \psi \; 
     528   \biggl\{    \; 
     529     \delta_{j+1/2} \left[ e_{1u} M_u \right]  
    741530     - \delta_{i+1/2} \left[ e_{1v} M_v \right]  
    742    && 
    743    \biggr.  \\  
    744    \biggl.  
    745    +& \delta_{i+1/2}  
     531   && \\ &  \qquad \;\;\, 
     532   + \delta_{i+1/2}  
    746533      \left[ \frac{e_{2v}} {H_v \,e_{2v}}  \delta_i \left[ \partial_t \psi \right]  
    747534      \right]  
     
    749536       \left[ \frac{e_{1u}} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi \right]  
    750537       \right]   
    751    \biggr\}  
    752    \equiv 0  
    753    && \\  
    754 \end{flalign*} 
    755  
    756 The last equality is obtained using (II.2.3), the discrete barotropic streamfunction time evolution equation. By the way, this shows that (II.2.3) is the only way do compute the streamfunction, otherwise the surface pressure forces will work. Nevertheless, since the elliptic equation verified by $\psi $ is solved numerically by an iterative solver, the property is only satisfied at the precision required on the solver. 
     538   \biggr\}   &&&\\ 
     539   &\equiv 0                   && \\  
     540\end{flalign*} 
     541 
     542The last equality is obtained using \eqref{Eq_dynspg_rl}, the discrete barotropic streamfunction time evolution equation. By the way, this shows that \eqref{Eq_dynspg_rl} is the only way do compute the streamfunction, otherwise the surface pressure forces will work. Nevertheless, since the elliptic equation verified by $\psi $ is solved numerically by an iterative solver, the property is only satisfied at the precision required on the solver. 
    757543 
    758544% ================================================================ 
     
    763549 
    764550 
    765 The numerical schemes are written such that the heat and salt contents are conserved by the internal dynamics (equations in flux form, second order centered finite differences). As a form flux is used to compute the temperature and salinity, the quadratic form of these quantities (i.e. their variance) is globally conserved, too. There is generally no strict conservation of mass, as the equation of state is non linear with respect to $T$ and $S$. In practice, the mass is conserved with a very good accuracy.  
    766  
     551All the numerical schemes used in NEMO are written such that the tracer content is conserved by the internal dynamics and physics (equations in flux form). For advection, only the CEN2 scheme ($i.e.$ 2nd order finite different scheme) conserves the global variance of tracer. Nevertheless the other schemes ensure that the global variance decreases ($i.e.$ they are at least slightly diffusive). For diffusion, all the schemes ensure the decrease of the total tracer variance, but the iso-neutral operator. There is generally no strict conservation of mass, as the equation of state is non linear with respect to $T$ and $S$. In practice, the mass is conserved with a very good accuracy.  
    767552% ------------------------------------------------------------------------------------------------------------- 
    768553%       Advection Term 
     
    771556\label{Apdx_C.2.1} 
    772557 
    773 Conservation of the tracer 
    774  
    775 The flux form  
    776 \begin{flalign*} 
    777 \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv &&& 
    778 \end{flalign*} 
    779 \begin{flalign*} 
    780  \equiv  \sum\limits_{i,j,k}     \left\{ 
     558Whatever the advection scheme considered it conserves of the tracer content as all the scheme are written in flux form. Let $\tau$ be the tracer interpolated at velocity point (whatever the interpolation is). The conservation of the tracer content is obtained as follows:  
     559\begin{flalign*} 
     560&\int_D \nabla \cdot \left( T \textbf{U} \right)\;dv    &&&\\ 
     561&\equiv  \sum\limits_{i,j,k}    \biggl\{ 
    781562    \frac{1} {e_{1T}\,e_{2T}\,e_{3T}}  
    782     \left(  
    783      \delta_i  
    784       \left[  
    785       e_{2u}\,e_{3u} \,\overline T^{\,i+1/2}\,u  
    786       \right] 
    787     \right. \right. 
    788 & + \left. \delta_j \left[ e_{1v}\,e_{3v} \,\overline T^{\,j+1/2}\,v \right] \right) && \\  
    789  & + \left. \frac{1} {e_{3T}} \delta_k \left[ \overline T^{\,k+1/2}\,w \right] \ \ \right\}  
    790    \ \ e_{1T}\,e_{2T}\,e_{3T} && 
    791 \end{flalign*} 
    792  
    793 \begin{flalign*} 
    794  \equiv&  \sum\limits_{i,j,k}     \left\{ 
     563    \left(  \delta_i    \left[   e_{2u}\,e_{3u}\; u \;\tau_u   \right] 
     564           + \delta_j    \left[   e_{1v}\,e_{3v}\; v  \;\tau_v   \right] \right)  
     565&&&\\& \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad 
     566   + \frac{1} {e_{3T}} \delta_k \left[ w\;\tau \right]    \biggl\}  e_{1T}\,e_{2T}\,e_{3T} &&&\\ 
     567% 
     568&\equiv  \sum\limits_{i,j,k}     \left\{ 
    795569      \delta_i  \left[ e_{2u}\,e_{3u}  \,\overline T^{\,i+1/2}\,u \right] 
    796570         + \delta_j  \left[ e_{1v}\,e_{3v}  \,\overline T^{\,j+1/2}\,v \right]  
    797571   + \delta_k \left[ e_{1T}\,e_{2T} \,\overline T^{\,k+1/2}\,w \right] \right\}  
    798     &&  
    799 \end{flalign*} 
    800 \begin{flalign*} 
    801  \equiv 0 &&& 
    802 \end{flalign*} 
    803  
    804 Conservation of the variance of tracer 
    805 \begin{flalign*} 
    806 \int\limits_D T\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\ 
    807 \end{flalign*} 
    808 \begin{flalign*} 
     572    && \\ 
     573&\equiv 0 &&& 
     574\end{flalign*} 
     575 
     576The conservation of the variance of tracer can be achieved only with the CEN2 scheme. It can be demonstarted as follows: 
     577\begin{flalign*} 
     578&\int\limits_D T\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\ 
    809579\equiv& \sum\limits_{i,j,k} T\; 
    810580   \left\{ 
     
    814584   \right\}  
    815585   && \\ 
    816 \end{flalign*} 
    817 \begin{flalign*} 
    818 \equiv \sum\limits_{i,j,k}  
     586\equiv& \sum\limits_{i,j,k}  
    819587   \left\{ 
    820588   -           e_{2u}\,e_{3u} \overline T^{\,i+1/2}\,u\,\delta_{i+1/2}  \left[ T \right] \right. 
    821    -&        e_{1v}\,e_{3v}  \overline T^{\,j+1/2}\,v\;\delta_{j+1/2}  \left[ T \right] 
    822     &&\\ 
    823    -& \left. e_{1T}\,e_{2T} \overline T^{\,k+1/2}w\;\delta_{k+1/2} \left[ T \right] 
     589   -           e_{1v}\,e_{3v}  \overline T^{\,j+1/2}\,v\;\delta_{j+1/2}  \left[ T \right] 
     590&&&\\& \qquad \qquad \qquad \qquad \qquad \qquad \quad \; 
     591   - \left. e_{1T}\,e_{2T} \overline T^{\,k+1/2}w\;\delta_{k+1/2} \left[ T \right] 
    824592   \right\}  
    825593   &&\\ 
    826 \end{flalign*} 
    827 \begin{flalign*} 
    828594\equiv&  -\frac{1} {2}  \sum\limits_{i,j,k} 
    829595   \Bigl\{ 
     
    833599   \Bigr\}  
    834600   && \\  
    835 \end{flalign*} 
    836 \begin{flalign*} 
    837601\equiv& \frac{1} {2}  \sum\limits_{i,j,k} T^2 
    838602   \Bigl\{ 
     
    841605   + \delta_k \left[ e_{1T}\,e_{2T}\,w \right] 
    842606   \Bigr\}  
    843    &&\\ 
    844 \end{flalign*} 
    845 \begin{flalign*} 
    846 \equiv 0 &&& 
     607\quad \equiv 0 &&& 
    847608\end{flalign*} 
    848609 
     
    866627 
    867628These properties of the horizontal diffusive operator are a direct  
    868 consequence of properties (II.1.8) and (II.1.9). When the vertical curl of  
    869 the horizontal diffusion of momentum (discrete sense) is taken, the term  
    870 associated to the horizontal gradient of the divergence is zero locally.  
     629consequence of properties \eqref{Eq_DOM_curl_grad} and \eqref{Eq_DOM_div_curl}. When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken, the term associated to the horizontal gradient of the divergence is zero locally.  
    871630 
    872631% ------------------------------------------------------------------------------------------------------------- 
     
    878637The lateral momentum diffusion term conserves the potential vorticity : 
    879638\begin{flalign*} 
    880 \int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times  
     639&\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times  
    881640   \Bigl[ \nabla_h  
    882641      \left( A^{\,lm}\;\chi  \right) 
    883642   - \nabla_h \times 
    884643      \left( A^{\,lm}\;\zeta \; \textbf{k} \right) 
    885    \Bigr]\;dv &&& \\ 
    886 \end{flalign*} 
     644   \Bigr]\;dv  = 0 
     645\end{flalign*} 
     646%%%%%%%%%%  recheck here....  (gm) 
    887647\begin{flalign*} 
    888648= \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times  
     
    891651   \Bigr]\;dv &&& \\  
    892652\end{flalign*} 
    893  
    894653\begin{flalign*} 
    895654\equiv& \sum\limits_{i,j} 
     
    907666   \right\}  
    908667   && \\  
    909 \end{flalign*} 
    910 Using (II.1.10), it follows: 
    911  
    912 \begin{flalign*} 
     668% 
     669\intertext{Using \eqref{DOM_di_adj}, it follows:} 
     670% 
    913671\equiv& \sum\limits_{i,j,k}  
    914672   -\,\left\{ 
     
    928686 
    929687 
    930 The lateral momentum diffusion term dissipates the horizontal kinetic  
    931 energy: 
    932 \begin{flalign*} 
     688The lateral momentum diffusion term dissipates the horizontal kinetic energy: 
     689%\begin{flalign*} 
     690\begin{equation*} 
     691\begin{split} 
    933692\int_D \textbf{U}_h \cdot  
    934    \left[ \nabla_h  
    935       \left( A^{\,lm}\;\chi \right) 
    936    - \nabla_h \times  
    937       \left( A^{\,lm}\;\zeta \;\textbf{k} \right)  
    938    \right]\;dv &&& \\ 
    939 \end{flalign*} 
    940 \begin{flalign*} 
    941 \equiv \sum\limits_{i,j,k} \quad 
    942    &\left\{ 
    943    \frac{1} {e_{1u}}            \delta_{i+1/2} 
    944       \left[ A_T^{\,lm} \chi  \right] 
    945    - \frac{1} {e_{2u}\,e_{3u}}  \delta_j 
    946       \left[ A_f^{\,lm} e_{3f} \zeta   \right] 
    947    \right\}\;  
    948    e_{1u}\,e_{2u}\,e_{3u} \;u  
    949     &&\\ 
    950    & + \left\{ 
    951    \frac{1} {e_{2u}}             \delta_{j+1/2} 
    952       \left[ A_T^{\,lm} \chi  \right]  
    953    + \frac{1} {e_{1v}\,e_{3v}} \delta_i 
    954    \left[ A_f^{\,lm} e_{3f} \zeta  \right]  
    955    \right\}\;  
    956    e_{1v}\,e_{2u}\,e_{3v} \;v   
    957    && \\  
    958 \end{flalign*} 
    959 \begin{flalign*}  
    960 \equiv \sum\limits_{i,j,k} \quad 
    961    &\left\{ 
    962      e_{2u}\,e_{3u} \;u\;\delta_{i+1/2}  
    963       \left[ A_T^{\,lm} \chi  \right] 
    964    - e_{1u} \;u\;\delta_j  
    965       \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
    966     \right\}  
    967     &&\\  
    968    & + \left\{ 
    969       e_{1v}\,e_{3v} \;v\;\delta_{j+1/2}  
    970       \left[ A_T^{\,lm} \chi  \right] 
    971    + e_{2v} \;v\;\delta_i  
    972       \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
    973    \right\}  
    974    &&\\  
    975 \end{flalign*} 
    976 \begin{flalign*} 
    977 \equiv \sum\limits_{i,j,k} \quad 
    978    -& \Bigl( 
    979      \delta_i  
    980       \left[ e_{2u}\,e_{3u} \;u \right] 
    981    + \delta_j  
    982       \left[ e_{1v}\,e_{3v} \;v \right]  
    983         \Bigr)\; 
    984    A_T^{\,lm} \chi  
    985    && \\  
    986    -& \Bigl( 
    987      \delta_{i+1/2}  
    988       \left[ e_{2v} \;v \right] 
    989    - \delta_{j+1/2}  
    990       \left[ e_{1u} \;u \right]  
    991         \Bigr)\; 
    992    A_f^{\,lm} e_{3f} \zeta  
    993    &&\\  
    994 \end{flalign*} 
    995 \begin{flalign*} 
    996 \equiv \sum\limits_{i,j,k}  
    997    - A_T^{\,lm} \,\chi^2   \;e_{1T}\,e_{2T}\,e_{3T} 
    998    - A_f^{\,lm}  \,\zeta^2 \;e_{1f}\,e_{2f}\,e_{3f}   
    999    \quad \leq 0 
    1000    &&&\\ 
    1001 \end{flalign*} 
     693   \left[ \nabla_h      \right.   &     \left.       \left( A^{\,lm}\;\chi \right)       
     694   - \nabla_h \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)     \right] \; dv    \\ 
     695\\  %%% 
     696\equiv& \sum\limits_{i,j,k}  
     697   \left\{ 
     698     \frac{1} {e_{1u}}               \delta_{i+1/2} \left[  A_T^{\,lm}          \chi     \right] 
     699   - \frac{1} {e_{2u}\,e_{3u}}  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta   \right] 
     700   \right\} \; e_{1u}\,e_{2u}\,e_{3u} \;u     \\ 
     701&\;\; +  \left\{ 
     702      \frac{1} {e_{2u}}             \delta_{j+1/2} \left[ A_T^{\,lm}          \chi    \right]  
     703   + \frac{1} {e_{1v}\,e_{3v}} \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]  
     704   \right\} \; e_{1v}\,e_{2u}\,e_{3v} \;v     \qquad \\  
     705\\  %%% 
     706\equiv& \sum\limits_{i,j,k}  
     707   \Bigl\{ 
     708     e_{2u}\,e_{3u} \;u\;  \delta_{i+1/2} \left[ A_T^{\,lm}           \chi    \right] 
     709   - e_{1u}             \;u\;  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
     710    \Bigl\}  
     711    \\  
     712&\;\; + \Bigl\{ 
     713      e_{1v}\,e_{3v} \;v\;  \delta_{j+1/2}  \left[ A_T^{\,lm}           \chi    \right] 
     714   + e_{2v}             \;v\;  \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
     715   \Bigl\}      \\  
     716\\  %%% 
     717\equiv& \sum\limits_{i,j,k}  
     718   - \Bigl( 
     719     \delta_i   \left[  e_{2u}\,e_{3u} \;u  \right] 
     720   + \delta_j  \left[  e_{1v}\,e_{3v}  \;v  \right]  
     721        \Bigr) \;  A_T^{\,lm} \chi   \\  
     722&\;\; - \Bigl( 
     723     \delta_{i+1/2}  \left[  e_{2v}  \;v  \right] 
     724   - \delta_{j+1/2}  \left[  e_{1u} \;u  \right]  
     725        \Bigr)\;  A_f^{\,lm} e_{3f} \zeta      \\  
     726\\  %%% 
     727\equiv& \sum\limits_{i,j,k}  
     728   - A_T^{\,lm}  \,\chi^2   \;e_{1T}\,e_{2T}\,e_{3T} 
     729   - A_f ^{\,lm}  \,\zeta^2 \;e_{1f }\,e_{2f }\,e_{3f}   
     730\quad \leq 0       \\ 
     731\end{split} 
     732\end{equation*} 
    1002733 
    1003734% ------------------------------------------------------------------------------------------------------------- 
     
    1011742coefficients are horizontally uniform: 
    1012743\begin{flalign*} 
    1013 \int\limits_D  \zeta \; \textbf{k} \cdot \nabla \times  
     744&\int\limits_D  \zeta \; \textbf{k} \cdot \nabla \times  
    1014745   \left[  
    1015746     \nabla_h  
     
    1018749      \left( A^{\,lm}\;\zeta \; \textbf{k} \right) 
    1019750   \right]\;dv &&&\\ 
    1020 \end{flalign*} 
    1021 \begin{flalign*} 
    1022  = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times  
     751&= A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times  
    1023752   \left[  
    1024753   \nabla_h \times  
    1025754      \left( \zeta \; \textbf{k} \right) 
    1026    \right]\;dv &&&\\ 
    1027 \end{flalign*} 
    1028 \begin{flalign*} 
    1029 \equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}  
     755   \right]\;dv &&&\displaybreak[0]\\ 
     756&\equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}  
    1030757   \left\{ 
    1031758     \delta_{i+1/2}  
     
    1041768   \right\}  
    1042769   &&&\\  
    1043 \end{flalign*} 
    1044 Using (II.1.10), it becomes~: 
    1045  
    1046 \begin{flalign*} 
    1047 \equiv  - A^{\,lm} \sum\limits_{i,j,k}  
     770% 
     771\intertext{Using \eqref{DOM_di_adj}, it follows:} 
     772% 
     773&\equiv  - A^{\,lm} \sum\limits_{i,j,k}  
    1048774   \left\{ 
    1049775     \left(  
     
    1055781      \left[ e_{3f} \zeta  \right] 
    1056782     \right)^2   e_{1u}\,e_{2u}\,e_{3u} 
    1057      \right\}  
    1058      \; \leq \;0  
    1059      &&&\\  
     783     \right\}      &&&\\ 
     784& \leq \;0       &&&\\  
    1060785\end{flalign*} 
    1061786 
     
    1072797horizontally uniform. 
    1073798\begin{flalign*} 
    1074   \int\limits_D  \nabla_h \cdot  
     799& \int\limits_D  \nabla_h \cdot  
    1075800   \Bigl[  
    1076801     \nabla_h  
     
    1084809   dv  
    1085810&&&\\ 
    1086 \end{flalign*} 
    1087 \begin{flalign*} 
    1088 \equiv \sum\limits_{i,j,k}  
     811&\equiv \sum\limits_{i,j,k}  
    1089812   \left\{  
    1090813     \delta_i 
     
    1100823   \right\} 
    1101824   &&&\\  
    1102 \end{flalign*} 
    1103 Using (II.1.10), it follows: 
    1104  
    1105 \begin{flalign*} 
    1106 \equiv \sum\limits_{i,j,k}  
     825% 
     826\intertext{Using \eqref{DOM_di_adj}, it follows:} 
     827% 
     828&\equiv \sum\limits_{i,j,k}  
    1107829   - \left\{ 
    1108830   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2}  
     
    1126848 
    1127849\begin{flalign*} 
    1128       \int\limits_D \chi \;\nabla_h \cdot  
    1129    \left[  
    1130      \nabla_h  
    1131       \left( A^{\,lm}\;\chi  \right) 
    1132    - \nabla_h \times  
    1133       \left( A^{\,lm}\;\zeta \;\textbf{k} \right) 
    1134    \right]\; 
    1135    dv 
    1136  = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h  
    1137    \left( \chi \right)\; 
    1138    dv 
    1139 &&&\\  
    1140 \end{flalign*} 
    1141  
    1142 \begin{flalign*} 
    1143 \equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1T}\,e_{2T}\,e_{3T}}  \chi  
     850&\int\limits_D \chi \;\nabla_h \cdot  
     851   \left[    \nabla_h              \left( A^{\,lm}\;\chi                    \right) 
     852           - \nabla_h   \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \right]\;  dv 
     853 = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\;  dv    &&&\\  
     854% 
     855&\equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1T}\,e_{2T}\,e_{3T}}  \chi  
    1144856   \left\{ 
    1145    \delta_i  
    1146    \left[  
    1147    \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2}  
    1148       \left[ \chi \right]  
    1149    \right] 
    1150    + \delta_j  
    1151    \left[  
    1152    \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2}  
    1153       \left[ \chi \right] 
    1154    \right] 
    1155    \right\} \; 
    1156    e_{1T}\,e_{2T}\,e_{3T}  
    1157    &&&\\  
    1158 \end{flalign*} 
    1159 Using (II.1.10), it turns out to be: 
    1160  
    1161 \begin{flalign*} 
    1162 \equiv - A^{\,lm} \sum\limits_{i,j,k} 
     857      \delta_i  \left[   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]   \right] 
     858   + \delta_j  \left[   \frac{e_{1v}\,e_{3v}} {e_{2v}}   \delta_{j+1/2} \left[ \chi \right]   \right] 
     859   \right\} \;   e_{1T}\,e_{2T}\,e_{3T}    &&&\\  
     860% 
     861\intertext{Using \eqref{DOM_di_adj}, it turns out to be:} 
     862% 
     863&\equiv - A^{\,lm} \sum\limits_{i,j,k} 
    1163864   \left\{  
    1164    \left(  
    1165    \frac{1} {e_{1u}}  \delta_{i+1/2}  
    1166       \left[ \chi \right] 
    1167    \right)^2    
    1168    e_{1u}\,e_{2u}\,e_{3u} 
    1169    + \left( 
    1170    \frac{1} {e_{2v}}  \delta_{j+1/2}  
    1171       \left[ \chi \right] 
    1172    \right)^2 
    1173    e_{1v}\,e_{2v}\,e_{3v} 
    1174    \right\} \;  
    1175    \leq 0  
    1176    &&&\\ 
     865   \left(  \frac{1} {e_{1u}}  \delta_{i+1/2}  \left[ \chi \right]  \right)^2  e_{1u}\,e_{2u}\,e_{3u} 
     866+ \left(  \frac{1} {e_{2v}}  \delta_{j+1/2}  \left[ \chi \right]  \right)^2  e_{1v}\,e_{2v}\,e_{3v} 
     867   \right\} \;    &&&\\ 
     868&\leq 0              &&&\\ 
    1177869\end{flalign*} 
    1178870 
     
    1185877 
    1186878As for the lateral momentum physics, the continuous form of the vertical diffusion of momentum satisfies the several integral constraints. The first two are associated to the conservation of momentum and the dissipation of horizontal kinetic energy: 
    1187 \begin{flalign*} 
     879\begin{align*} 
    1188880 \int\limits_D   
    1189881    \frac{1} {e_3 }\; \frac{\partial } {\partial k} 
     
    1191883   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
    1192884   \right)\; 
    1193    dv \quad  = \vec{\textbf{0}} 
    1194    &&&\\ 
    1195 \end{flalign*} 
    1196 and 
    1197 \begin{flalign*} 
     885   dv \qquad \quad &= \vec{\textbf{0}} 
     886   \\ 
     887% 
     888\intertext{and} 
     889% 
    1198890\int\limits_D  
    1199891   \textbf{U}_h \cdot  
     
    1202894   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
    1203895   \right)\; 
    1204    dv \quad \leq 0 
    1205    &&&\\ 
    1206 \end{flalign*} 
     896   dv \quad &\leq 0 
     897   \\ 
     898\end{align*} 
    1207899The first property is obvious. The second results from: 
    1208900 
     
    1217909\end{flalign*} 
    1218910\begin{flalign*} 
    1219 \equiv \sum\limits_{i,j,k}  
     911&\equiv \sum\limits_{i,j,k}  
    1220912   \left(  
    1221913     u\; \delta_k  
     
    1233925   \right) 
    1234926   &&&\\  
    1235 \end{flalign*} 
    1236 as the horizontal scale factor do not depend on $k$, it follows: 
    1237  
    1238 \begin{flalign*} 
    1239 \equiv - \sum\limits_{i,j,k}  
     927% 
     928\intertext{as the horizontal scale factor do not depend on $k$, it follows:} 
     929% 
     930&\equiv - \sum\limits_{i,j,k}  
    1240931   \left(  
    1241932      \frac{A_u^{\,vm}} {e_{3uw}} 
     
    1254945    &&&\\ 
    1255946\end{flalign*} 
     947 
    1256948The vorticity is also conserved. Indeed: 
    1257949\begin{flalign*} 
     
    15321224constraint of conservation of tracers: 
    15331225\begin{flalign*} 
    1534 \int\limits_D  T\;\nabla  \cdot \left( A\;\nabla T \right)\;dv  &&&\\  
    1535 \end{flalign*} 
    1536 \begin{flalign*} 
    1537 \equiv \sum\limits_{i,j,k}  
     1226&\int\limits_D  T\;\nabla  \cdot \left( A\;\nabla T \right)\;dv  &&&\\  
     1227\\ 
     1228&\equiv \sum\limits_{i,j,k}  
    15381229   \biggl\{    \biggr. 
    15391230   \delta_i  
     
    15431234      \right] 
    15441235   + \delta_j  
    1545       &\left[  
     1236      \left[  
    15461237      A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2}  
    15471238         \left[ T \right]  
    15481239      \right] 
    1549    &&\\  
    1550    \biggl.  
     1240   &&\\  & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\; 
    15511241   + \delta_k  
    1552       &\left[  
     1242      \left[  
    15531243      A_w^{\,vT} \frac{e_{1T}\,e_{2T}} {e_{3T}} \delta_{k+1/2}  
    15541244         \left[ T \right]  
    15551245      \right] 
    1556    \biggr\}  
     1246   \biggr\}   \quad  \equiv 0 
    15571247   &&\\  
    1558 \end{flalign*} 
    1559 \begin{flalign*} 
    1560 \equiv 0 &&&\\ 
    15611248\end{flalign*} 
    15621249 
     
    15721259\int\limits_D T\;\nabla \cdot \left( A\;\nabla T \right)\;dv   &&&\\  
    15731260\end{flalign*} 
    1574  
    15751261\begin{flalign*} 
    15761262\equiv \sum\limits_{i,j,k} T 
     
    15961282   &&\\  
    15971283\end{flalign*} 
    1598  
    15991284\begin{flalign*} 
    16001285\equiv - \sum\limits_{i,j,k}  
     
    16261311\end{flalign*} 
    16271312 
     1313 
     1314%%%%  end of appendix in gm comment 
     1315} 
Note: See TracChangeset for help on using the changeset viewer.