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.
apdx_invariants.tex in NEMO/trunk/doc/latex/NEMO/subfiles – NEMO

source: NEMO/trunk/doc/latex/NEMO/subfiles/apdx_invariants.tex

Last change on this file was 14257, checked in by nicolasmartin, 3 years ago

Overall review of LaTeX sources (not tested completely as of now):

  • Reworking global files: main document.tex, add glossary.tex, cosmetic changes...
  • Ignore missing namelists (namsbc_isf, namsbc_iscpl and namptr)
  • Removal of references for unused indices (\hfile, \ifile and \jp)
  • Update of .svnignore and svn:ignore properties accordingly
  • Split of manual abstract into a common NEMO abs for all and a specific one for each engine
  • Shrinking variables names used in the frontmatter
File size: 71.4 KB
Line 
1\documentclass[../main/NEMO_manual]{subfiles}
2
3\begin{document}
4
5\chapter{Discrete Invariants of the Equations}
6\label{apdx:INVARIANTS}
7
8\chaptertoc
9
10\paragraph{Changes record} ~\\
11
12{\footnotesize
13  \begin{tabularx}{\textwidth}{l||X|X}
14    Release & Author(s) & Modifications \\
15    \hline
16    {\em   4.0} & {\em ...} & {\em ...} \\
17    {\em   3.6} & {\em ...} & {\em ...} \\
18    {\em   3.4} & {\em ...} & {\em ...} \\
19    {\em <=3.4} & {\em ...} & {\em ...}
20  \end{tabularx}
21}
22
23\clearpage
24
25%%%  Appendix put in cmtgm as it has not been updated for \zstar and s coordinate
26%I'm writting this appendix. It will be available in a forthcoming release of the documentation
27
28%\cmtgm{
29
30%% =================================================================================================
31\section{Introduction / Notations}
32\label{sec:INVARIANTS_0}
33
34Notation used in this appendix in the demonstations:
35
36fluxes at the faces of a $T$-box:
37\[
38  U = e_{2u}\,e_{3u}\; u  \qquad  V = e_{1v}\,e_{3v}\; v  \qquad W = e_{1w}\,e_{2w}\; \omega
39\]
40
41volume of cells at $u$-, $v$-, and $T$-points:
42\[
43  b_u = e_{1u}\,e_{2u}\,e_{3u}  \qquad  b_v = e_{1v}\,e_{2v}\,e_{3v}  \qquad b_t = e_{1t}\,e_{2t}\,e_{3t}
44\]
45
46partial derivative notation: $\partial_\bullet = \frac{\partial}{\partial \bullet}$
47
48$dv=e_1\,e_2\,e_3 \,di\,dj\,dk$  is the volume element, with only $e_3$ that depends on time.
49$D$ and $S$ are the ocean domain volume and surface, respectively.
50No wetting/drying is allow (\ie\ $\frac{\partial S}{\partial t} = 0$).
51Let $k_s$ and $k_b$ be the ocean surface and bottom, resp.
52(\ie\ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth).
53\begin{flalign*}
54  z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s}  e_3(\tilde{k}) \;d\tilde{k}
55  = \eta - \int\limits_k^{k_s}  e_3 \;d\tilde{k}
56\end{flalign*}
57
58Continuity equation with the above notation:
59\[
60  \frac{1}{e_{3t}} \partial_t (e_{3t})+ \frac{1}{b_t}  \biggl\{  \delta_i [U] + \delta_j [V] + \delta_k [W] \biggr\} = 0
61\]
62
63A quantity, $Q$ is conserved when its domain averaged time change is zero, that is when:
64\[
65  \partial_t \left( \int_D{ Q\;dv } \right) =0
66\]
67Noting that the coordinate system used ....  blah blah
68\[
69  \partial_t \left( \int_D {Q\;dv} \right) =  \int_D { \partial_t \left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }
70  =  \int_D { \frac{1}{e_3} \partial_t \left( e_3 \, Q \right) dv } =0
71\]
72equation of evolution of $Q$ written as
73the time evolution of the vertical content of $Q$ like for tracers, or momentum in flux form,
74the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:
75\begin{flalign*}
76  \partial_t \left(   \int_D{ \frac{1}{2} \,Q^2\;dv }   \right)
77  =&  \int_D{ \frac{1}{2} \partial_t \left( \frac{1}{e_3}\left( e_3 \, Q \right)^2 \right) e_1e_2\;di\,dj\,dk } \\
78  =&  \int_D {         Q   \;\partial_t\left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }
79  -  \int_D { \frac{1}{2} Q^2 \,\partial_t  (e_3) \;e_1e_2\;di\,dj\,dk } \\
80\end{flalign*}
81that is in a more compact form :
82\begin{flalign}
83  \label{eq:INVARIANTS_Q2_flux}
84  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
85  =&                   \int_D { \frac{Q}{e_3}  \partial_t \left( e_3 \, Q \right) dv }
86  -   \frac{1}{2} \int_D {  \frac{Q^2}{e_3} \partial_t (e_3) \;dv }
87\end{flalign}
88equation of evolution of $Q$ written as the time evolution of $Q$ like for momentum in vector invariant form,
89the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:
90\begin{flalign*}
91  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
92  =&  \int_D { \frac{1}{2} \partial_t \left( e_3 \, Q^2 \right) \;e_1e_2\;di\,dj\,dk } \\
93  =& \int_D {         Q      \partial_t Q  \;e_1e_2e_3\;di\,dj\,dk }
94  +  \int_D { \frac{1}{2} Q^2 \, \partial_t e_\;e_1e_2\;di\,dj\,dk } \\
95\end{flalign*}
96that is in a more compact form:
97\begin{flalign}
98  \label{eq:INVARIANTS_Q2_vect}
99  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
100  =& \int_D {         Q   \,\partial_t Q  \;dv }
101  +   \frac{1}{2} \int_D { \frac{1}{e_3} Q^2 \partial_t e_3 \;dv }
102\end{flalign}
103
104%% =================================================================================================
105\section{Continuous conservation}
106\label{sec:INVARIANTS_1}
107
108The discretization of pimitive equation in $s$-coordinate (\ie\ time and space varying vertical coordinate)
109must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy.
110
111Let us first establish those constraint in the continuous world.
112The total energy (\ie\ kinetic plus potential energies) is conserved:
113\begin{flalign}
114  \label{eq:INVARIANTS_Tot_Energy}
115  \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 +  \rho \, g \, z \right) \;dv \right)  = & 0
116\end{flalign}
117under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations),
118mass conservation, and closed domain.
119
120This equation can be transformed to obtain several sub-equalities.
121The transformation for the advection term depends on whether the vector invariant form or
122the flux form is used for the momentum equation.
123Using \autoref{eq:INVARIANTS_Q2_vect} and introducing \autoref{eq:SCOORD_dyn_vect} in
124\autoref{eq:INVARIANTS_Tot_Energy} for the former form and
125using \autoref{eq:INVARIANTS_Q2_flux} and introducing \autoref{eq:SCOORD_dyn_flux} in
126\autoref{eq:INVARIANTS_Tot_Energy} for the latter form leads to:
127
128% \label{eq:INVARIANTS_E_tot}
129advection term (vector invariant form):
130\[
131  % \label{eq:INVARIANTS_E_tot_vect_vor_1}
132  \int\limits_D  \zeta \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\
133\]
134\[
135  % \label{eq:INVARIANTS_E_tot_vect_adv_1}
136  \int\limits_D  \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right)     dv
137  + \int\limits_D  \textbf{U}_h \cdot \nabla_z \textbf{U}_h  \;dv
138  -  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0
139\]
140advection term (flux form):
141\[
142  % \label{eq:INVARIANTS_E_tot_flux_metric}
143  \int\limits_D  \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1  \right)\;
144  \left(  \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0
145\]
146\[
147  % \label{eq:INVARIANTS_E_tot_flux_adv}
148  \int\limits_D \textbf{U}_h \cdot     \left(                 {{
149        \begin{array} {*{20}c}
150          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
151          \nabla \cdot \left( \textbf{U}\,v \right) \hfill
152        \end{array}}
153    }           \right)   \;dv
154  +   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0
155\]
156coriolis term
157\[
158  % \label{eq:INVARIANTS_E_tot_cor}
159  \int\limits_D  f   \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0
160\]
161pressure gradient:
162\[
163  % \label{eq:INVARIANTS_E_tot_pg_1}
164  - \int\limits_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
165  = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
166  + \int\limits_D g\, \rho \; \partial_t z  \;dv
167\]
168
169where $\nabla_h = \left. \nabla \right|_k$ is the gradient along the $s$-surfaces.
170
171blah blah....
172
173The prognostic ocean dynamics equation can be summarized as follows:
174\[
175  \text{NXT} = \dbinom  {\text{VOR} + \text{KEG} + \text {ZAD} }
176  {\text{COR} + \text{ADV}                       }
177  + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF}
178\]
179
180Vector invariant form:
181% \label{eq:INVARIANTS_E_tot_vect}
182\[
183  % \label{eq:INVARIANTS_E_tot_vect_vor_2}
184  \int\limits_D   \textbf{U}_h \cdot \text{VOR} \;dv   = 0
185\]
186\[
187  % \label{eq:INVARIANTS_E_tot_vect_adv_2}
188  \int\limits_D  \textbf{U}_h \cdot \text{KEG}  \;dv
189  + \int\limits_D  \textbf{U}_h \cdot \text{ZAD}  \;dv
190  -  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0
191\]
192\[
193  % \label{eq:INVARIANTS_E_tot_pg_2}
194  - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv
195  = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
196  + \int\limits_D g\, \rho \; \partial_t z  \;dv
197\]
198
199Flux form:
200\begin{subequations}
201  \label{eq:INVARIANTS_E_tot_flux}
202  \[
203    % \label{eq:INVARIANTS_E_tot_flux_metric_2}
204    \int\limits_D  \textbf{U}_h \cdot \text {COR} \;  dv   = 0
205  \]
206  \[
207    % \label{eq:INVARIANTS_E_tot_flux_adv_2}
208    \int\limits_D \textbf{U}_h \cdot \text{ADV}   \;dv
209    +   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3  \;dv } =\;0
210  \]
211  \begin{equation}
212    \label{eq:INVARIANTS_E_tot_pg_3}
213    - \int\limits_\textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv
214    = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
215    + \int\limits_D g\, \rho \; \partial_t  z  \;dv
216  \end{equation}
217\end{subequations}
218
219\autoref{eq:INVARIANTS_E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE.
220Indeed the left hand side of \autoref{eq:INVARIANTS_E_tot_pg_3} can be transformed as follows:
221\begin{flalign*}
222  \partial_\left( \int\limits_D { \rho \, g \, z  \;dv} \right)
223  &= + \int\limits_D \frac{1}{e_3} \partial_t (e_3\,\rho) \;g\;z\;\;dv
224  +  \int\limits_D g\, \rho \; \partial_t z  \;dv   &&&\\
225  &= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
226  + \int\limits_D g\, \rho \; \partial_t z \;dv   &&&\\
227  &= + \int\limits_\rho \,g \left( \textbf {U}_h \cdot \nabla_h z + \omega \frac{1}{e_3} \partial_k z \right\;dv
228  + \int\limits_D g\, \rho \; \partial_t z \;dv   &&&\\
229  &= + \int\limits_\rho \,g \left( \omega + \partial_t z + \textbf {U}_h \cdot \nabla_h z  \right\;dv  &&&\\
230  &=+  \int\limits_D g\, \rho \; w \; dv   &&&\\
231\end{flalign*}
232where the last equality is obtained by noting that the brackets is exactly the expression of $w$,
233the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{eq:SCOORD_w_s}).
234
235The left hand side of \autoref{eq:INVARIANTS_E_tot_pg_3} can be transformed as follows:
236\begin{flalign*}
237  - \int\limits_\left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv
238  = - \int\limits_\left( \nabla_h p + \rho \, g \nabla_h z \right) \cdot \textbf{U}_h \;dv   &&&\\
239  \allowdisplaybreaks
240  &= - \int\limits_\nabla_h  p \cdot \textbf{U}_h \;dv   - \int\limits_\rho \, g \, \nabla_h z \cdot \textbf{U}_h \;dv   &&&\\
241  \allowdisplaybreaks
242  &= +\int\limits_D p \,\nabla_h \cdot \textbf{U}_h \;dv   + \int\limits_\rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
243  \allowdisplaybreaks
244  &= -\int\limits_D p \left( \frac{1}{e_3} \partial_t e_3 + \frac{1}{e_3} \partial_k \omega  \right) \;dv
245  +\int\limits_\rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
246  \allowdisplaybreaks
247  &= -\int\limits_D \frac{p}{e_3} \partial_t e_\;dv
248  +\int\limits_D \frac{1}{e_3} \partial_k p\; \omega \;dv
249  +\int\limits_\rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
250  &= -\int\limits_D \frac{p}{e_3} \partial_t e_\;dv
251  -\int\limits_D \rho \, g \, \omega \;dv
252  +\int\limits_\rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
253  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \; \;dv
254  - \int\limits_\rho \, g \, w \;dv
255  + \int\limits_D   \rho \, g \, \partial_t z \;dv   &&&\\
256  \allowdisplaybreaks
257  \intertext{introducing the hydrostatic balance $\partial_k p=-\rho \,g\,e_3$ in the last term,
258    it becomes:}
259  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv
260  - \int\limits_\rho \, g \, w \;dv
261  - \int\limits_\frac{1}{e_3} \partial_k p\, \partial_t z \;dv   &&&\\
262  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv
263  - \int\limits_\rho \, g \, w \;dv
264  + \int\limits_D \,\frac{p}{e_3}\partial_t ( \partial_k z )  dv   &&&\\
265  %
266  &= - \int\limits_\rho \, g \, w \;dv   &&&\\
267\end{flalign*}
268
269%gm comment
270\cmtgm{
271The last equality comes from the following equation,
272\begin{flalign*}
273  \int\limits_D p \frac{1}{e_3} \frac{\partial e_3}{\partial t}\; \;dv
274  = \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv \quad,
275\end{flalign*}
276that can be demonstrated as follows:
277
278\begin{flalign*}
279  \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
280  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t} \;dv
281  -  \int\limits_D    \rho \, g \, \frac{\partial}{\partial t} \left\int\limits_k^{k_s}  e_3 \;d\tilde{k} \right) \;dv   &&&\\
282  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t} \;dv
283  -  \int\limits_D    \rho \, g    \left\int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \;dv   &&&\\
284  %
285  \allowdisplaybreaks
286  \intertext{The second term of the right hand side can be transformed by applying the integration by part rule:
287    $\left[ a\,b \right]_{k_b}^{k_s} = \int_{k_b}^{k_s}  a\,\frac{\partial b}{\partial k}       \;dk
288    + \int_{k_b}^{k_s}      \frac{\partial a}{\partial k} \,b \;dk $
289    to the following function: $a=  \int_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k}$
290    and $b=  \int_k^{k_s}  \rho \, e_3 \;d\tilde{k}$
291    (note that $\frac{\partial}{\partial k} \left(  \int_k^{k_s}  a \;d\tilde{k}  \right) = - a$ as $k$ is the lower bound of the integral).
292    This leads to:  }
293\end{flalign*}
294\begin{flalign*}
295  &\left[ \int\limits_{k}^{k_s}  \frac{\partial e_3}{\partial t} \,dk \cdot \int\limits_{k}^{k_s}  \rho \, e_3 \,dk   \right]_{k_b}^{k_s}
296  =-\int\limits_{k_b}^{k_s} \left\int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right\rho \,e_3 \;dk
297  -\int\limits_{k_b}^{k_s}  \frac{\partial e_3}{\partial t}  \left\int\limits_k^{k_s}  \rho \, e_3 \;d\tilde{k} \right)   dk  &&&\\
298  \allowdisplaybreaks
299  \intertext{Noting that $\frac{\partial \eta}{\partial t}
300    = \frac{\partial}{\partial t}  \left( \int_{k_b}^{k_s}   e_3  \;d\tilde{k}  \right)
301    = \int_{k_b}^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k}$
302    and
303    $p(k) = \int_k^{k_s}  \rho \,g \, e_3 \;d\tilde{k} $,
304    but also that $\frac{\partial \eta}{\partial t}$ does not depends on $k$, it comes:
305  }
306  & - \int\limits_{k_b}^{k_s}  \rho \, \frac{\partial \eta}{\partial t} \, e_3 \;dk
307  = - \int\limits_{k_b}^{k_s} \left\int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)   \, \rho \, g   e_3\;dk
308  - \int\limits_{k_b}^{k_s}  \frac{\partial e_3}{\partial t} \frac{p}{g}         \;dk       &&&\\
309\end{flalign*}
310Mutliplying by $g$ and integrating over the $(i,j)$ domain it becomes:
311\begin{flalign*}
312  \int\limits_\rho \, g \, \left\int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)    \;dv
313  =  \int\limits_\rho \, g \, \frac{\partial \eta}{\partial t} dv
314  - \int\limits_\frac{p}{e_3}\frac{\partial e_3}{\partial t}         \;dv
315\end{flalign*}
316Using this property, we therefore have:
317\begin{flalign*}
318  \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
319  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t}   \;dv
320  - \left\int\limits_\rho \, g \, \frac{\partial \eta}{\partial t} dv
321    - \int\limits_\frac{p}{e_3}\frac{\partial e_3}{\partial t}   \;dv  \right)    &&&\\
322  %
323  &=\int\limits_D \frac{p}{e_3} \frac{\partial (e_3\,\rho)}{\partial t}\; \;dv
324\end{flalign*}
325% end gm comment
326}
327
328%% =================================================================================================
329\section{Discrete total energy conservation: vector invariant form}
330\label{sec:INVARIANTS_2}
331
332%% =================================================================================================
333\subsection{Total energy conservation}
334\label{subsec:INVARIANTS_KE+PE_vect}
335
336The discrete form of the total energy conservation, \autoref{eq:INVARIANTS_Tot_Energy}, is given by:
337\begin{flalign*}
338  \partial_\left\sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v +  \rho \, g \, z_t \,b_\biggr\} \right) &=0
339\end{flalign*}
340which in vector invariant forms, it leads to:
341\begin{equation}
342  \label{eq:INVARIANTS_KE+PE_vect_discrete}
343  \begin{split}
344    \sum\limits_{i,j,k} \biggl\{   u\,                        \partial_t u         \;b_u
345    + v\,                        \partial_t v          \;b_\biggr\}
346    + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{  \frac{u^2}{e_{3u}}\partial_t e_{3u} \;b_u
347    +  \frac{v^2}{e_{3v}}\partial_t e_{3v} \;b_v   \biggr\}      \\
348    = - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}}\partial_t (e_{3t} \rho) \, g \, z_t \;b_\biggr\}
349    - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_\biggr\}
350  \end{split}
351\end{equation}
352
353Substituting the discrete expression of the time derivative of the velocity either in vector invariant,
354leads to the discrete equivalent of the four equations \autoref{eq:INVARIANTS_E_tot_flux}.
355
356%% =================================================================================================
357\subsection{Vorticity term (coriolis + vorticity part of the advection)}
358\label{subsec:INVARIANTS_vor}
359
360Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$),
361or the planetary ($q=f/e_{3f}$), or the total potential vorticity ($q=(\zeta +f) /e_{3f}$).
362Two discretisation of the vorticity term (ENE and EEN) allows the conservation of the kinetic energy.
363%% =================================================================================================
364\subsubsection{Vorticity term with ENE scheme (\protect\np[=.true.]{ln_dynvor_ene}{ln\_dynvor\_ene})}
365\label{subsec:INVARIANTS_vorENE}
366
367For the ENE scheme, the two components of the vorticity term are given by:
368\[
369  - e_3 \, q \;{\textbf{k}}\times {\textbf {U}}_h    \equiv
370  \left( {{
371        \begin{array} {*{20}c}
372          + \frac{1} {e_{1u}} \;
373          \overline {\, q \ \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j}        \hfill \\
374          - \frac{1} {e_{2v}} \;
375          \overline {\, q \ \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i}       \hfill
376        \end{array}
377      } }    \right)
378\]
379
380This formulation does not conserve the enstrophy but it does conserve the total kinetic energy.
381Indeed, the kinetic energy tendency associated to the vorticity term and
382averaged over the ocean domain can be transformed as follows:
383\begin{flalign*}
384  &\int\limits_D -  \left(  e_3 \, q \;\textbf{k} \times \textbf{U}_\right) \cdot \textbf{U}_\;  dv &&  \\
385  & \qquad \qquad
386  {
387    \begin{array}{*{20}l}
388      &\equiv \sum\limits_{i,j,k}   \biggl\{
389        \frac{1} {e_{1u}} \overline { \,q\ \overline{ V }^{\,i+1/2}} ^{\,j} \, u \; b_u
390        - \frac{1} {e_{2v}}\overline { \, q\ \overline{ U }^{\,j+1/2}} ^{\,i} \, v \; b_v \; \biggr\}    \\
391      &\equiv  \sum\limits_{i,j,k}  \biggl\{
392        \overline { \,q\ \overline{ V }^{\,i+1/2}}^{\,j} \; U
393        - \overline { \,q\ \overline{ U }^{\,j+1/2}}^{\,i} \; V  \; \biggr\}     \\
394      &\equiv \sum\limits_{i,j,k} q \  \biggl\{  \overline{ V }^{\,i+1/2}\; \overline{ U }^{\,j+1/2}
395        - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2}         \biggr\}  \quad  \equiv 0
396    \end{array}
397  }
398\end{flalign*}
399In other words, the domain averaged kinetic energy does not change due to the vorticity term.
400
401%% =================================================================================================
402\subsubsection{Vorticity term with EEN scheme (\protect\np[=.true.]{ln_dynvor_een}{ln\_dynvor\_een})}
403\label{subsec:INVARIANTS_vorEEN_vect}
404
405With the EEN scheme, the vorticity terms are represented as:
406\begin{equation}
407  \label{eq:INVARIANTS_dynvor_een1}
408  \left\{ {
409      \begin{aligned}
410        +q\,e_3 \, v    &\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}
411        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v} e_{3v} \ \right)^{i+i_p-1/2}_{j+j_p}   \\
412        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}
413        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u} e_{3u} \ \right)^{i+i_p}_{j+j_p-1/2}
414      \end{aligned}
415    } \right.
416\end{equation}
417where the indices $i_p$ and $j_p$ take the following value: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$,
418and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:
419\begin{equation}
420  \label{eq:INVARIANTS_Q_triads}
421  _i^j \mathbb{Q}^{i_p}_{j_p}
422  = \frac{1}{12} \ \left(   q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p}  \right)
423\end{equation}
424
425This formulation does conserve the total kinetic energy.
426Indeed,
427\begin{flalign*}
428  &\int\limits_D - \textbf{U}_h \cdot   \left\zeta \;\textbf{k} \times \textbf{U}_\right\;  dv &&  \\
429  \equiv \sum\limits_{i,j,k} &   \biggl\{
430  \left\sum_{\substack{i_p,\,k_p}}
431    {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \right] U^{i+1/2}_{j}    %   &&\\
432  - \left\sum_{\substack{i_p,\,k_p}}
433    {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p}  \right] V^{i}_{j+1/2}    \biggr\}     && \\ \\
434  \equiv \sum\limits_{i,j,k} &  \sum_{\substack{i_p,\,k_p}} \biggl\{  \ \
435  {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p}  \, U^{i+1/2}_{j}     %  &&\\
436  - {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \, V^{i}_{j+1/2}     \ \;     \biggr\}     &&  \\
437  %
438  \allowdisplaybreaks
439  \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:}
440  %
441  \equiv \sum\limits_{i,j,k} & \biggl\{  \ \
442  {^{i+1}_j     }\mathbb{Q}^{-1/2}_{+1/2} \;V^{i+1}_{j+1/2} \; U^{\,i+1/2}_{j}
443  -  {^i_{j}\quad}\mathbb{Q}^{-1/2}_{+1/2} \; U^{i-1/2}_{j}    \; V^{\,i}_{j+1/2}         &&  \\
444  &       + {^{i+1}_j     }\mathbb{Q}^{-1/2}_{-1/2} \; V^{i+1}_{j-1/2} \; U^{\,i+1/2}_{j}
445  - {^i_{j+1}     }\mathbb{Q}^{-1/2}_{-1/2} \; U^{i-1/2}_{j+1} \; V^{\,i}_{j+1/2}        \biggr.     &&  \\
446  &       + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}   \; U^{\,i+1/2}_{j}
447  - {^i_{j}\quad}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}   \; V^{\,i}_{j+1/2}          \biggr.        &&  \\
448  &       + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{-1/2} \; V^{i}_{j-1/2}     \; U^{\,i+1/2}_{j}
449  -  {^i_{j+1}     }\mathbb{Q}^{+1/2}_{-1/2} \; U^{i+1/2}_{j+1}\; V^{\,i}_{j+1/2}  \ \;     \biggr\}     &&  \\
450  %
451  \allowdisplaybreaks
452  \intertext{The summation is done over all $i$ and $j$ indices, it is therefore possible to introduce
453    a shift of $-1$ either in $i$ or $j$ direction in some of the term of the summation (first term of the
454    first and second lines, second term of the second and fourth lines). By doning so, we can regroup
455    all the terms of the summation by triad at a ($i$,$j$) point. In other words, we regroup all the terms
456    in the neighbourhood  that contain a triad at the same ($i$,$j$) indices. It becomes: }
457  \allowdisplaybreaks
458  %
459  \equiv \sum\limits_{i,j,k} & \biggl\{  \ \
460  {^{i}_j}\mathbb{Q}^{-1/2}_{+1/2}  \left[  V^{i}_{j+1/2}\, U^{\,i-1/2}_{j}
461    -  U^{i-1/2}_{j} \, V^{\,i}_{j+1/2}      \right]    &&  \\
462  &       + {^{i}_j}\mathbb{Q}^{-1/2}_{-1/2}  \left[  V^{i}_{j-1/2} \, U^{\,i-1/2}_{j}
463    -    U^{i-1/2}_{j} \, V^{\,i}_{j-1/2}      \right]    \biggr.   &&  \\
464  &      + {^{i}_j}\mathbb{Q}^{+1/2}_{+1/2}  \left[  V^{i}_{j+1/2} \, U^{\,i+1/2}_{j}
465    -    U^{i+1/2}_{j} \, V^{\,i}_{j+1/2}     \right\biggr&&  \\
466  &     + {^{i}_j}\mathbb{Q}^{+1/2}_{-1/2}  \left[   V^{i}_{j-1/2} \, U^{\,i+1/2}_{j}
467    -    U^{i+1/2}_{j-1} \, V^{\,i}_{j-1/2}  \right\ \;   \biggr\}   \qquad
468  \equiv \ 0   &&
469\end{flalign*}
470
471%% =================================================================================================
472\subsubsection{Gradient of kinetic energy / Vertical advection}
473\label{subsec:INVARIANTS_zad}
474
475The change of Kinetic Energy (KE) due to the vertical advection is exactly balanced by the change of KE due to the horizontal gradient of KE~:
476\[
477  \int_D \textbf{U}_h \cdot \frac{1}{e_3 } \omega \partial_k \textbf{U}_h \;dv
478  =  -   \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv
479  +   \frac{1}{2} \int_D {  \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv }
480\]
481Indeed, using successively \autoref{eq:DOM_di_adj} (\ie\ the skew symmetry property of the $\delta$ operator)
482and the continuity equation, then \autoref{eq:DOM_di_adj} again,
483then the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj}
484(\ie\ the symmetry property of the $\overline {\,\cdot \,}$ operator)
485applied in the horizontal and vertical directions, it becomes:
486\begin{flalign*}
487  & - \int_D \textbf{U}_h \cdot \text{KEG}\;dv
488  = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv    &&&\\
489  %
490  \equiv  & -  \sum\limits_{i,j,k} \frac{1}{2}  \biggl\{
491  \frac{1} {e_{1u}}  \delta_{i+1/2}   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  u \ b_u
492  + \frac{1} {e_{2v}}  \delta_{j+1/2}   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  v \ b_v   \biggr\}     &&&  \\
493  %
494  \equiv & + \sum\limits_{i,j,k} \frac{1}{2}  \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right)\;
495  \biggl\{ \delta_{i} \left[  U   \right] +  \delta_{j} \left[  V  \right]    \biggr\}       &&&  \\
496  \allowdisplaybreaks
497  %
498  \equiv   & - \sum\limits_{i,j,k}  \frac{1}{2}
499  \left(       \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right\;
500  \biggl\{   \frac{b_t}{e_{3t}} \partial_t (e_{3t})  +  \delta_k \left[  W   \right]    \biggr\}    &&&\\
501  \allowdisplaybreaks
502  %
503  \equiv & +  \sum\limits_{i,j,k} \frac{1}{2} \delta_{k+1/2}   \left[ \overline{ u^2}^{\,i} + \overline{ v^2}^{\,j}   \right] \;  W
504  -  \sum\limits_{i,j,k} \frac{1}{2} \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right) \;\partial_t b_t   &&& \\
505  \allowdisplaybreaks
506  %
507  \equiv   & + \sum\limits_{i,j,k} \frac{1} {2} \left(    \overline{\delta_{k+1/2} \left[ u^2 \right]}^{\,i}
508    + \overline{\delta_{k+1/2} \left[ v^2 \right]}^{\,j}    \right) \; W
509  -  \sum\limits_{i,j,k}  \left\frac{u^2}{2}\,\partial_t \overline{b_t}^{\,{i+1/2}}
510    + \frac{v^2}{2}\,\partial_t \overline{b_t}^{\,{j+1/2}}   \right)    &&& \\
511  \allowdisplaybreaks
512  \intertext{Assuming that $b_u= \overline{b_t}^{\,i+1/2}$ and $b_v= \overline{b_t}^{\,j+1/2}$, or at least that the time
513    derivative of these two equations is satisfied, it becomes:}
514  %
515  \equiv &     \sum\limits_{i,j,k} \frac{1} {2}
516  \biggl\{ \; \overline{W}^{\,i+1/2}\;\delta_{k+1/2} \left[ u^2 \right]
517  + \overline{W}^{\,j+1/2}\;\delta_{k+1/2} \left[ v^2 \right]  \;  \biggr\}
518  -  \sum\limits_{i,j,k}  \left\frac{u^2}{2}\,\partial_t b_u
519    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
520  \allowdisplaybreaks
521  %
522  \equiv &     \sum\limits_{i,j,k}
523  \biggl\{ \; \overline{W}^{\,i+1/2}\; \overline {u}^{\,k+1/2}\; \delta_{k+1/2}[ u ]
524  + \overline{W}^{\,j+1/2}\; \overline {v}^{\,k+1/2}\; \delta_{k+1/2}[ v ]  \;  \biggr\}
525  -  \sum\limits_{i,j,k}  \left\frac{u^2}{2}\,\partial_t b_u
526    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
527  %
528  \allowdisplaybreaks
529  \equiv  &  \sum\limits_{i,j,k}
530  \biggl\{ \; \frac{1} {b_u } \; \overline { \overline{W}^{\,i+1/2}\,\delta_{k+1/2}  \left[ u \right] }^{\,k} \;u\;b_u
531  + \frac{1} {b_v } \; \overline { \overline{W}^{\,j+1/2} \delta_{k+1/2}  \left[ v \right]  }^{\,k} \;v\;b_\; \biggr\}
532  -  \sum\limits_{i,j,k}  \left\frac{u^2}{2}\,\partial_t b_u
533    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
534  %
535  \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD),
536    while the second term corresponds exactly to \autoref{eq:INVARIANTS_KE+PE_vect_discrete}, therefore:}
537  \equiv&                   \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv
538  + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\
539  \equiv&                   \int\limits_D \textbf{U}_h \cdot w \partial_k \textbf{U}_h \;dv
540  + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\
541\end{flalign*}
542
543There is two main points here.
544First, the satisfaction of this property links the choice of the discrete formulation of the vertical advection and
545of the horizontal gradient of KE.
546Choosing one imposes the other.
547For example KE can also be discretized as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$.
548This leads to the following expression for the vertical advection:
549\[
550  \frac{1} {e_3 }\; \omega\; \partial_k \textbf{U}_h
551  \equiv \left( {{
552        \begin{array} {*{20}c}
553          \frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \;  \overline{\overline {e_{1t}\,e_{2t} \,\omega\;\delta_{k+1/2}
554          \left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k}  \hfill \\
555          \frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \;   \overline{\overline {e_{1t}\,e_{2t} \,\omega \;\delta_{k+1/2}
556          \left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill
557        \end{array}
558      } } \right)
559\]
560a formulation that requires an additional horizontal mean in contrast with the one used in \NEMO.
561Nine velocity points have to be used instead of 3.
562This is the reason why it has not been chosen.
563
564Second, as soon as the chosen $s$-coordinate depends on time,
565an extra constraint arises on the time derivative of the volume at $u$- and $v$-points:
566\begin{flalign*}
567  e_{1u}\,e_{2u}\,\partial_t (e_{3u}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,i+1/2}    \\
568  e_{1v}\,e_{2v}\,\partial_t (e_{3v})  =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,j+1/2}
569\end{flalign*}
570which is (over-)satified by defining the vertical scale factor as follows:
571\begin{flalign*}
572  % \label{eq:INVARIANTS_e3u-e3v}
573  e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2}    \\
574  e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2}
575\end{flalign*}
576
577Blah blah required on the the step representation of bottom topography.....
578
579%% =================================================================================================
580\subsection{Pressure gradient term}
581\label{subsec:INVARIANTS_2.6}
582
583\cmtgm{
584  A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero.
585  In the $z$-coordinate, this property is satisfied locally on a C-grid with 2nd order finite differences
586  (property \autoref{eq:DOM_curl_grad}).
587}
588
589When the equation of state is linear
590(\ie\ when an advection-diffusion equation for density can be derived from those of temperature and salinity)
591the change of KE due to the work of pressure forces is balanced by
592the change of potential energy due to buoyancy forces:
593\[
594  - \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
595  = - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right) \,g\,z \;dv
596  + \int_D g\, \rho \; \partial_t (z)  \;dv
597\]
598
599This property can be satisfied in a discrete sense for both $z$- and $s$-coordinates.
600Indeed, defining the depth of a $T$-point, $z_t$,
601as the sum of the vertical scale factors at $w$-points starting from the surface,
602the work of pressure forces can be written as:
603\begin{flalign*}
604  &- \int_\left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
605  \equiv \sum\limits_{i,j,k} \biggl\{ \;  - \frac{1} {e_{1u}}   \Bigl(
606  \delta_{i+1/2} [p_t] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} [z_t]     \Bigr\; u\;b_u && \\
607  & \qquad \qquad  \qquad \qquad  \qquad \quad \ \,
608  - \frac{1} {e_{2v}}    \Bigl(
609  \delta_{j+1/2} [p_t] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2} [z_t]      \Bigr\; v\;b_v \;  \biggr\}   && \\
610  %
611  \allowdisplaybreaks
612  \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of
613    the $\delta$ operator, \autoref{eq:DYN_wzv}, the continuity equation, \autoref{eq:DYN_hpg_sco},
614    the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $,
615    which comes from the definition of $z_t$, it becomes: }
616  \allowdisplaybreaks
617  %
618  \equiv& +  \sum\limits_{i,j,k}   g  \biggl\{
619  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
620  +   \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
621  +\Bigl\delta_i[U] + \delta_j [V]  \Bigr)\;\frac{p_t}{g} \biggr\}  &&\\
622  %
623  \equiv& +  \sum\limits_{i,j,k}   g   \biggl\{
624  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
625  +   \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
626  -       \left(   \frac{b_t}{e_{3t}} \partial_t (e_{3t})  +  \delta_k \left[ W \right]    \right) \frac{p_t}{g}    \biggr\}   &&&\\
627  %
628  \equiv& +  \sum\limits_{i,j,k}  g   \biggl\{
629  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
630  +   \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
631  +   \frac{W}{g}\;\delta_{k+1/2} [p_t]
632  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
633  %
634  \equiv& +  \sum\limits_{i,j,k}  g   \biggl\{
635  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
636  +   \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
637  -   W\;e_{3w} \overline \rho^{\,k+1/2}
638  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
639  %
640  \equiv& +  \sum\limits_{i,j,k}    g   \biggl\{
641  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
642  +   \overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
643  +   W\; \overline \rho^{\,k+1/2}\;\delta_{k+1/2} [z_t]
644  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
645  %
646  \allowdisplaybreaks
647  %
648  \equiv& - \sum\limits_{i,j,k}   g \; z_t      \biggl\{
649  \delta_\left[ U\;  \overline \rho^{\,i+1/2}   \right]
650  +   \delta_j    \left[ V\;  \overline \rho^{\,j+1/2}   \right]
651  +   \delta_k    \left[ W\;  \overline \rho^{\,k+1/2}   \right]       \biggr\}
652  - \sum\limits_{i,j,k}       \biggl\{ p_t\;\partial_t b_t    \biggr\}   &&&\\
653  %
654  \equiv& + \sum\limits_{i,j,k}   g \; z_t    \biggl\{      \partial_t ( e_{3t} \,\rho)    \biggr\}  \; b_t
655  -  \sum\limits_{i,j,k}                 \biggl\{  p_t\;\partial_t b_t                     \biggr\}              &&&\\
656  %
657\end{flalign*}
658The first term is exactly the first term of the right-hand-side of \autoref{eq:INVARIANTS_KE+PE_vect_discrete}.
659It remains to demonstrate that the last term,
660which is obviously a discrete analogue of $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to
661the last term of \autoref{eq:INVARIANTS_KE+PE_vect_discrete}.
662In other words, the following property must be satisfied:
663\begin{flalign*}
664  \sum\limits_{i,j,k}  \biggl\{  p_t\;\partial_t b_t                  \biggr\}
665  \equiv  \sum\limits_{i,j,k}  \biggl\{ \rho \,g\,\partial_t (z_t) \,b_\biggr\}
666\end{flalign*}
667
668Let introduce $p_w$ the pressure at $w$-point such that $\delta_k [p_w] = - \rho \,g\,e_{3t}$.
669The right-hand-side of the above equation can be transformed as follows:
670
671\begin{flalign*}
672  \sum\limits_{i,j,k}  \biggl\{ \rho \,g\,\partial_t (z_t) \,b_\biggr\}
673  &\equiv   - \sum\limits_{i,j,k}  \biggl\{ \delta_k [p_w]\,\partial_t (z_t) \,e_{1t}\,e_{2t}  \biggr\}        &&&\\
674  %
675  &\equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \delta_{k+1/2} [\partial_t (z_t)] \,e_{1t}\,e_{2t}  \biggr\}
676  \equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (e_{3w}) \,e_{1t}\,e_{2t}  \biggr\}        &&&\\
677  &\equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (b_w) \biggr\}
678  %
679  % & \equiv     \sum\limits_{i,j,k} \biggl\{  \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w   \right)   \biggr\}           &&&\\
680  % & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t \left(    \delta_k [z_t]   \right)  e_{1w}\,e_{2w}   \biggr\}           &&&\\
681  % & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t b_w   \biggr\}
682\end{flalign*}
683therefore, the balance to be satisfied is:
684\begin{flalign*}
685  \sum\limits_{i,j,k}  \biggl\{  p_t\;\partial_t (b_t) \biggr\}  \equiv  \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (b_w) \biggr\}
686\end{flalign*}
687which is a purely vertical balance:
688\begin{flalign*}
689  \sum\limits_{k}  \biggl\{  p_t\;\partial_t (e_{3t}) \biggr\}  \equiv  \sum\limits_{k}  \biggl\{  p_w\, \partial_t (e_{3w}) \biggr\}
690\end{flalign*}
691Defining $p_w = \overline{p_t}^{\,k+1/2}$
692
693%gm comment
694\cmtgm{
695  \begin{flalign*}
696    \sum\limits_{i,j,k} \biggl\{   p_t\;\partial_t b_t   \biggr\}                                &&&\\
697    %
698    & \equiv     \sum\limits_{i,j,k} \biggl\{  \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w    \biggr\}           &&&\\
699    & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t \left(    \delta_{k+1/2} [z_t]   \right)  e_{1w}\,e_{2w}   \biggr\}           &&&\\
700    & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t b_w   \biggr\}
701  \end{flalign*}
702
703  \begin{flalign*}
704    \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
705    \equiv&  \sum\limits_{i,j,k}   \biggl\{  \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} p   \biggr\} \; b_t   &&&\\
706    \equiv&  \sum\limits_{i,j,k}   \biggl\{      \biggr\} \; b_t   &&&\\
707  \end{flalign*}
708
709  %
710  \begin{flalign*}
711    \equiv& - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
712    + \int\limits_D g\, \rho \; \frac{\partial z}{\partial t}  \;dv     &&& \\
713  \end{flalign*}
714  %
715}
716%end gm comment
717
718Note that this property strongly constrains the discrete expression of both the depth of $T-$points and
719of the term added to the pressure gradient in the $s$-coordinate.
720Nevertheless, it is almost never satisfied since a linear equation of state is rarely used.
721
722%% =================================================================================================
723\section{Discrete total energy conservation: flux form}
724\label{sec:INVARIANTS_3}
725
726%% =================================================================================================
727\subsection{Total energy conservation}
728\label{subsec:INVARIANTS_KE+PE_flux}
729
730The discrete form of the total energy conservation, \autoref{eq:INVARIANTS_Tot_Energy}, is given by:
731\begin{flalign*}
732  \partial_t \left\sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v +  \rho \, g \, z_t \,b_\biggr\} \right) &=0  \\
733\end{flalign*}
734which in flux form, it leads to:
735\begin{flalign*}
736  \sum\limits_{i,j,k} \biggl\{  \frac{u    }{e_{3u}}\,\frac{\partial (e_{3u}u)}{\partial t} \,b_u
737  +  \frac{v    }{e_{3v}}\,\frac{\partial (e_{3v}v)}{\partial t} \,b_\biggr\}
738  &  -  \frac{1}{2} \sum\limits_{i,j,k} \biggl\{  \frac{u^2}{e_{3u}}\frac{\partial    e_{3u}    }{\partial t} \,b_u
739  +  \frac{v^2}{e_{3v}}\frac{\partial    e_{3v}    }{\partial t} \,b_v   \biggr\} \\
740  &= - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_3t}\frac{\partial e_{3t} \rho}{\partial t} \, g \, z_t \,b_\biggr\}
741  - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\frac{\partial z_t}{\partial t} \,b_\biggr\} \\
742\end{flalign*}
743
744Substituting the discrete expression of the time derivative of the velocity either in
745vector invariant or in flux form, leads to the discrete equivalent of the ????
746
747%% =================================================================================================
748\subsection{Coriolis and advection terms: flux form}
749\label{subsec:INVARIANTS_3.2}
750
751%% =================================================================================================
752\subsubsection{Coriolis plus ``metric'' term}
753\label{subsec:INVARIANTS_3.3}
754
755In flux from the vorticity term reduces to a Coriolis term in which
756the Coriolis parameter has been modified to account for the ``metric'' term.
757This altered Coriolis parameter is discretised at an f-point.
758It is given by:
759\[
760  f+\frac{1} {e_1 e_2 } \left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\;
761  \equiv \;
762  f+\frac{1} {e_{1f}\,e_{2f}} \left( \overline v^{\,i+1/2} \delta_{i+1/2} \left[ e_{2u} \right]
763    -\overline u^{\,j+1/2} \delta_{j+1/2} \left[ e_{1u}  \right] \right)
764\]
765
766Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form.
767It therefore conserves the total KE.
768The derivation is the same as for the vorticity term in the vector invariant form (\autoref{subsec:INVARIANTS_vor}).
769
770%% =================================================================================================
771\subsubsection{Flux form advection}
772\label{subsec:INVARIANTS_3.4}
773
774The flux form operator of the momentum advection is evaluated using
775a centered second order finite difference scheme.
776Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum.
777Because of the centered second order scheme, it conserves the horizontal kinetic energy, that is:
778
779\begin{equation}
780  \label{eq:INVARIANTS_ADV_KE_flux}
781  -  \int_D \textbf{U}_h \cdot     \left(                 {{
782        \begin{array} {*{20}c}
783          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
784          \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
785        \end{array}
786      } }           \right)   \;dv
787  -   \frac{1}{2} \int_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv } =\;0
788\end{equation}
789
790Let us first consider the first term of the scalar product
791(\ie\ just the the terms associated with the i-component of the advection):
792\begin{flalign*}
793  &  - \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv   \\
794  %
795  \equiv& - \sum\limits_{i,j,k} \biggl\{    \frac{1} {b_u}    \biggl(
796  \delta_{i+1/2}  \left[   \overline {U}^{\,i}      \;\overline u^{\,i}          \right]
797  + \delta_j           \left[   \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]
798  + \delta_k          \left[   \overline {W}^{\,i+1/2}\;\overline u^{\,k+1/2} \right]  \biggr)   \;   \biggr\} \, b_u \;u &&&  \\
799  %
800  \equiv& - \sum\limits_{i,j,k}
801  \biggl\{
802  \delta_{i+1/2} \left[   \overline {U}^{\,i}\;  \overline u^{\,i}  \right]
803  + \delta_j          \left[   \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]
804  + \delta_k         \left[   \overline {W}^{\,i+12}\;\overline u^{\,k+1/2}  \right]
805  \; \biggr\} \; u     \\
806  %
807  \equiv& + \sum\limits_{i,j,k}
808  \biggl\{
809  \overline {U}^{\,i}\; \overline u^{\,i}    \delta_i \left[ u \right]
810  + \overline {V}^{\,i+1/2}\; \overline u^{\,j+1/2}   \delta_{j+1/2} \left[ u \right]
811  + \overline {W}^{\,i+1/2}\; \overline u^{\,k+1/2}   \delta_{k+1/2}    \left[ u \right]     \biggr\}     && \\
812  %
813  \equiv& + \frac{1}{2} \sum\limits_{i,j,k}    \biggl\{
814  \overline{U}^{\,i}       \delta_i       \left[ u^2 \right]
815  + \overline{V}^{\,i+1/2}    \delta_{j+/2}  \left[ u^2 \right]
816  + \overline{W}^{\,i+1/2}    \delta_{k+1/2}    \left[ u^2 \right]      \biggr\} && \\
817  %
818  \equiv& -  \sum\limits_{i,j,k}    \frac{1}{2}   \bigg\{
819  U  \; \delta_{i+1/2}    \left[ \overline {u^2}^{\,i} \right]
820  + V  \; \delta_{j+1/2}    \left[ \overline {u^2}^{\,i} \right]
821  + W \; \delta_{k+1/2}   \left[ \overline {u^2}^{\,i} \right]     \biggr\}    &&& \\
822  %
823  \equiv& - \sum\limits_{i,j,k}  \frac{1}{2}  \overline {u^2}^{\,i}     \biggl\{
824  \delta_{i+1/2}  \left[ U  \right]
825  + \delta_{j+1/2}   \left[ V  \right]
826  + \delta_{k+1/2}   \left[ W \right]     \biggr\}    &&& \\
827  %
828  \equiv& + \sum\limits_{i,j,k}  \frac{1}{2}  \overline {u^2}^{\,i}
829  \biggl\{     \left(   \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t}   \right) \; b_t     \biggr\}    &&& \\
830\end{flalign*}
831Applying similar manipulation applied to the second term of the scalar product leads to:
832\[
833  -  \int_D \textbf{U}_h \cdot     \left(                 {{
834        \begin{array} {*{20}c}
835          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
836          \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
837        \end{array}
838      } }           \right)   \;dv
839  \equiv + \sum\limits_{i,j,k}  \frac{1}{2\left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right)
840  \biggl\{     \left(   \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t}   \right) \; b_t     \biggr\}
841\]
842which is the discrete form of $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv $.
843\autoref{eq:INVARIANTS_ADV_KE_flux} is thus satisfied.
844
845When the UBS scheme is used to evaluate the flux form momentum advection,
846the discrete operator does not contribute to the global budget of linear momentum (flux form).
847The horizontal kinetic energy is not conserved, but forced to decay (\ie\ the scheme is diffusive).
848
849%% =================================================================================================
850\section{Discrete enstrophy conservation}
851\label{sec:INVARIANTS_4}
852
853%% =================================================================================================
854\subsubsection{Vorticity term with ENS scheme  (\protect\np[=.true.]{ln_dynvor_ens}{ln\_dynvor\_ens})}
855\label{subsec:INVARIANTS_vorENS}
856
857In the ENS scheme, the vorticity term is descretized as follows:
858\begin{equation}
859  \label{eq:INVARIANTS_dynvor_ens}
860  \left\{
861    \begin{aligned}
862      +\frac{1}{e_{1u}} & \overline{q}^{\,i}  & {\overline{ \overline{\left( e_{1v}\,e_{3v}\;  v \right) } } }^{\,i, j+1/2}    \\
863      - \frac{1}{e_{2v}} & \overline{q}^{\,j}  & {\overline{ \overline{\left( e_{2u}\,e_{3u}\; u \right) } } }^{\,i+1/2, j}
864    \end{aligned}
865  \right.
866\end{equation}
867
868The scheme does not allow but the conservation of the total kinetic energy but the conservation of $q^2$,
869the potential enstrophy for a horizontally non-divergent flow (\ie\ when $\chi$=$0$).
870Indeed, using the symmetry or skew symmetry properties of the operators
871( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}),
872it can be shown that:
873\begin{equation}
874  \label{eq:INVARIANTS_1.1}
875  \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0
876\end{equation}
877where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element.
878Indeed, using \autoref{eq:DYN_vor_ens},
879the discrete form of the right hand side of \autoref{eq:INVARIANTS_1.1} can be transformed as follow:
880\begin{flalign*}
881  &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times
882  \left(  e_3 \, q \; \textbf{k} \times  \textbf{U}_h   \right)\;   dv \\
883  %
884  & \qquad
885  {
886    \begin{array}{*{20}l}
887      &\equiv \sum\limits_{i,j,k}
888        q \ \left\{  \delta_{i+1/2}  \left[ - \,\overline {q}^{\,i}\;  \overline{\overline  U }^{\,i,j+1/ 2} \right]
889        - \delta_{j+1/2} \left[   \overline {q}^{\,j}\;  \overline{\overline  V }^{\,i+1/2, j} \right]     \right\}    \\
890      %
891      &\equiv \sum\limits_{i,j,k}
892        \left\{   \delta_i [q] \; \overline{q}^{\,i} \; \overline{  \overline U  }^{\,i,j+1/2}
893        + \delta_j [q] \; \overline{q}^{\,j} \; \overline{\overline V }^{\,i+1/2,j}        \right\}       &&  \\
894      %
895      &\equiv \,\frac{1} {2} \sum\limits_{i,j,k}
896        \left\{         \delta_\left[ q^2 \right] \; \overline{\overline U }^{\,i,j+1/2}
897        + \delta_\left[ q^2 \right] \; \overline{\overline V }^{\,i+1/2,j}      \right\}    &&  \\
898      %
899      &\equiv - \frac{1} {2} \sum\limits_{i,j,k}   q^2 \;
900        \left\{    \delta_{i+1/2}   \left[   \overline{\overline{ U }}^{\,i,j+1/2}    \right]
901        + \delta_{j+1/2}  \left[   \overline{\overline{ V }}^{\,i+1/2,j}     \right]    \right\}    && \\
902    \end{array}
903  }
904  %
905  \allowdisplaybreaks
906  \intertext{ Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2}
907    \left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$,
908    and introducing the horizontal divergence $\chi $, it becomes: }
909  \allowdisplaybreaks
910  %
911  & \qquad {
912    \begin{array}{*{20}l}
913      &\equiv \sum\limits_{i,j,k} - \frac{1} {2} q^2 \; \overline{\overline{ e_{1t}\,e_{2t}\,e_{3t}^{}\, \chi}}^{\,i+1/2,j+1/2}
914        \quad \equiv 0 &&
915    \end{array}
916  }
917\end{flalign*}
918The later equality is obtain only when the flow is horizontally non-divergent, \ie\ $\chi$=$0$.
919
920%% =================================================================================================
921\subsubsection{Vorticity Term with EEN scheme (\protect\np[=.true.]{ln_dynvor_een}{ln\_dynvor\_een})}
922\label{subsec:INVARIANTS_vorEEN}
923
924With the EEN scheme, the vorticity terms are represented as:
925\begin{equation}
926  \label{eq:INVARIANTS_dynvor_een2}
927  \left\{ {
928      \begin{aligned}
929        +q\,e_3 \, v    &\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}
930        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v} e_{3v} \ \right)^{i+i_p-1/2}_{j+j_p}   \\
931        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}
932        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u} e_{3u} \ \right)^{i+i_p}_{j+j_p-1/2}   \\
933      \end{aligned}
934    } \right.
935\end{equation}
936where the indices $i_p$ and $k_p$ take the following values:
937$i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$,
938and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:
939\begin{equation}
940  \tag{\ref{eq:INVARIANTS_Q_triads}}
941  _i^j \mathbb{Q}^{i_p}_{j_p}
942  = \frac{1}{12} \ \left(   q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p}  \right)
943\end{equation}
944
945This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie\ $\chi=0$).
946
947Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $,
948similar manipulation can be done for the 3 others.
949The discrete form of the right hand side of \autoref{eq:INVARIANTS_1.1} applied to
950this triad only can be transformed as follow:
951
952\begin{flalign*}
953  &\int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \\
954  %
955  \equiv& \sum\limits_{i,j,k}
956  {q} \    \biggl\{ \;\;
957  \delta_{i+1/2} \left[   -\, {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; U^{i+1/2}_{j}}    \right]
958  - \delta_{j+1/2} \left[       {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; V^{i}_{j+1/2}}    \right]
959  \;\;\biggr\}        &&  \\
960  %
961  \equiv& \sum\limits_{i,j,k}
962  \biggl\{   \delta_i [q] \  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; U^{i+1/2}_{j}}
963  + \delta_j [q] \  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; V^{i}_{j+1/2}}   \biggr\}
964  && \\
965  %
966  ... & &&\\
967  &Demonstation \ to \ be \ done... &&\\
968  ... & &&\\
969  %
970  \equiv& \frac{1} {2} \sum\limits_{i,j,k}
971  \biggl\{  \delta_i    \Bigl[    \left(  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2   \Bigr]\;
972  \overline{\overline {U}}^{\,i,j+1/2}
973  + \delta_j   \Bigl[    \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2     \Bigr]\;
974  \overline{\overline {V}}^{\,i+1/2,j}
975  \biggr\}
976  &&  \\
977  %
978  \equiv& - \frac{1} {2} \sum\limits_{i,j,k}    \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2\;
979  \biggl\{    \delta_{i+1/2}
980  \left[   \overline{\overline {U}}^{\,i,j+1/2}    \right]
981  + \delta_{j+1/2}
982  \left[   \overline{\overline {V}}^{\,i+1/2,j}     \right]
983  \biggr\}    && \\
984  %
985  \equiv& \sum\limits_{i,j,k} - \frac{1} {2} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2
986  \; \overline{\overline{ b_t^{}\, \chi}}^{\,i+1/2,\,j+1/2}  &&\\
987  %
988  \ \ \equiv& \ 0     &&\\
989\end{flalign*}
990
991%% =================================================================================================
992\section{Conservation properties on tracers}
993\label{sec:INVARIANTS_5}
994
995All the numerical schemes used in \NEMO\ are written such that the tracer content is conserved by
996the internal dynamics and physics (equations in flux form).
997For advection,
998only the CEN2 scheme (\ie\ $2^{nd}$ order finite different scheme) conserves the global variance of tracer.
999Nevertheless the other schemes ensure that the global variance decreases
1000(\ie\ they are at least slightly diffusive).
1001For diffusion, all the schemes ensure the decrease of the total tracer variance, except the iso-neutral operator.
1002There is generally no strict conservation of mass,
1003as the equation of state is non linear with respect to $T$ and $S$.
1004In practice, the mass is conserved to a very high accuracy.
1005%% =================================================================================================
1006\subsection{Advection term}
1007\label{subsec:INVARIANTS_5.1}
1008
1009conservation of a tracer, $T$:
1010\[
1011  \frac{\partial }{\partial t} \left(   \int_D {T\;dv}   \right)
1012  =  \int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv }=0
1013\]
1014
1015conservation of its variance:
1016\begin{flalign*}
1017  \frac{\partial }{\partial t} \left( \int_D {\frac{1}{2} T^2\;dv} \right)
1018  =&  \int_D { \frac{1}{e_3} Q      \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }
1019  -   \frac{1}{2} \int_D {  T^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv }
1020\end{flalign*}
1021
1022Whatever the advection scheme considered it conserves of the tracer content as
1023all the scheme are written in flux form.
1024Indeed, let $T$ be the tracer and its $\tau_u$, $\tau_v$, and $\tau_w$ interpolated values at velocity point
1025(whatever the interpolation is),
1026the conservation of the tracer content due to the advection tendency is obtained as follows:
1027\begin{flalign*}
1028  &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv    &&&\\
1029  &\equiv - \sum\limits_{i,j,k}    \biggl\{
1030  \frac{1} {b_t}  \left\delta_i    \left[   U \;\tau_u   \right]
1031    + \delta_j    \left[   V  \;\tau_v   \right] \right)
1032  + \frac{1} {e_{3t}} \delta_k \left[ w\;\tau_w \right]    \biggl\}  b_t   &&&\\
1033  %
1034  &\equiv - \sum\limits_{i,j,k}     \left\{
1035    \delta_\left[   U \;\tau_u   \right]
1036    + \delta_\left[   V  \;\tau_v   \right]
1037    + \delta_k \left[ W \;\tau_w \right] \right\}   && \\
1038  &\equiv 0 &&&
1039\end{flalign*}
1040
1041The conservation of the variance of tracer due to the advection tendency can be achieved only with the CEN2 scheme,
1042\ie\ when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$.
1043It can be demonstarted as follows:
1044\begin{flalign*}
1045  &\int_D { \frac{1}{e_3} Q      \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }
1046  = - \int\limits_D \tau\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\
1047  \equiv& - \sum\limits_{i,j,k} T\;
1048  \left\{
1049    \delta_\left[ U  \overline T^{\,i+1/2}  \right]
1050    + \delta_\left[ V  \overline T^{\,j+1/2}  \right]
1051    + \delta_k \left[ W \overline T^{\,k+1/2} \right]          \right\} && \\
1052  \equiv& + \sum\limits_{i,j,k}
1053  \left\{     U  \overline T^{\,i+1/2} \,\delta_{i+1/2}  \left[ T \right]
1054    +  V  \overline T^{\,j+1/2} \;\delta_{j+1/2}  \left[ T \right]
1055    +  W \overline T^{\,k+1/2}\;\delta_{k+1/2} \left[ T \right]     \right\}      &&\\
1056  \equiv&  + \frac{1} {2}  \sum\limits_{i,j,k}
1057  \Bigl\{   U  \;\delta_{i+1/2} \left[ T^2 \right]
1058  + V  \;\delta_{j+1/2}  \left[ T^2 \right]
1059  + W \;\delta_{k+1/2} \left[ T^2 \right]   \Bigr\}     && \\
1060  \equiv& - \frac{1} {2}  \sum\limits_{i,j,k} T^2
1061  \Bigl\{    \delta_\left[ U  \right]
1062  + \delta_\left[ V  \right]
1063  + \delta_k \left[ W \right]     \Bigr\}      &&&  \\
1064  \equiv& + \frac{1} {2}  \sum\limits_{i,j,k} T^2
1065  \Bigl\{   \frac{1}{e_{3t}} \frac{\partial e_{3t}\,T }{\partial t}     \Bigr\}      &&& \\
1066\end{flalign*}
1067which is the discrete form of $ \frac{1}{2} \int_D {  T^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv }$.
1068
1069%% =================================================================================================
1070\section{Conservation properties on lateral momentum physics}
1071\label{sec:INVARIANTS_dynldf_properties}
1072
1073The discrete formulation of the horizontal diffusion of momentum ensures
1074the conservation of potential vorticity and the horizontal divergence,
1075and the dissipation of the square of these quantities
1076(\ie\ enstrophy and the variance of the horizontal divergence) as well as
1077the dissipation of the horizontal kinetic energy.
1078In particular, when the eddy coefficients are horizontally uniform,
1079it ensures a complete separation of vorticity and horizontal divergence fields,
1080so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence
1081(variance of the horizontal divergence) and \textit{vice versa}.
1082
1083These properties of the horizontal diffusion operator are a direct consequence of
1084properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}.
1085When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken,
1086the term associated with the horizontal gradient of the divergence is locally zero.
1087
1088%% =================================================================================================
1089\subsection{Conservation of potential vorticity}
1090\label{subsec:INVARIANTS_6.1}
1091
1092The lateral momentum diffusion term conserves the potential vorticity:
1093\begin{flalign*}
1094  &\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times
1095  \Bigl[    \nabla_\left( A^{\,lm}\;\chi  \right)
1096  - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)    \Bigr]\;dv   \\
1097  % \end{flalign*}
1098  %%%%%%%%%% recheck here....  (gm)
1099  % \begin{flalign*}
1100  =& \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times
1101  \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)  \Bigr]\;dv  \\
1102  % \end{flalign*}
1103  % \begin{flalign*}
1104  \equiv& \sum\limits_{i,j}
1105  \left\{
1106    \delta_{i+1/2} \left[  \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right]
1107    + \delta_{j+1/2} \left[  \frac {e_{1u}} {e_{2u}\,e_{3u}}  \delta_j \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right]
1108  \right\}   \\
1109  %
1110  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
1111  %
1112  \equiv& \sum\limits_{i,j,k}
1113  -\,\left\{
1114    \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right]
1115    + \frac{e_{1u}} {e_{2u}\,e_{3u}}  \delta_\left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right]
1116  \right\} \quad \equiv 0
1117  \\
1118\end{flalign*}
1119
1120%% =================================================================================================
1121\subsection{Dissipation of horizontal kinetic energy}
1122\label{subsec:INVARIANTS_6.2}
1123
1124The lateral momentum diffusion term dissipates the horizontal kinetic energy:
1125%\begin{flalign*}
1126\[
1127  \begin{split}
1128    \int_D \textbf{U}_h \cdot
1129    \left[ \nabla_h     \right.   &     \left.       \left( A^{\,lm}\;\chi \right)
1130      - \nabla_h \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)     \right] \; dv    \\
1131    \\  %%%
1132    \equiv& \sum\limits_{i,j,k}
1133    \left\{
1134      \frac{1} {e_{1u}}               \delta_{i+1/2} \left[  A_T^{\,lm}          \chi     \right]
1135      - \frac{1} {e_{2u}\,e_{3u}}  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta   \right]
1136    \right\} \; e_{1u}\,e_{2u}\,e_{3u} \;u     \\
1137    &\;\; +    \left\{
1138      \frac{1} {e_{2u}}             \delta_{j+1/2} \left[ A_T^{\,lm}          \chi    \right]
1139      + \frac{1} {e_{1v}\,e_{3v}} \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]
1140    \right\} \; e_{1v}\,e_{2u}\,e_{3v} \;v     \qquad \\
1141    \\  %%%
1142    \equiv& \sum\limits_{i,j,k}
1143    \Bigl\{
1144    e_{2u}\,e_{3u} \;u\;  \delta_{i+1/2} \left[ A_T^{\,lm}           \chi    \right]
1145    - e_{1u}             \;u\;  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta  \right]
1146    \Bigl\}
1147    \\
1148    &\;\; + \Bigl\{
1149    e_{1v}\,e_{3v} \;v\;  \delta_{j+1/2\left[ A_T^{\,lm}           \chi    \right]
1150    + e_{2v}             \;v\;  \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]
1151    \Bigl\}      \\
1152    \\  %%%
1153    \equiv& \sum\limits_{i,j,k}
1154    - \Bigl(
1155    \delta_i   \left[  e_{2u}\,e_{3u} \;\right]
1156    + \delta_j  \left[  e_{1v}\,e_{3v}  \;\right]
1157    \Bigr) \;  A_T^{\,lm} \chi   \\
1158    &\;\; - \Bigl(
1159    \delta_{i+1/2\left[  e_{2v}  \;\right]
1160    - \delta_{j+1/2\left[  e_{1u} \;\right]
1161    \Bigr)\;  A_f^{\,lm} e_{3f} \zeta      \\
1162    \\  %%%
1163    \equiv& \sum\limits_{i,j,k}
1164    - A_T^{\,lm}  \,\chi^2   \;e_{1t}\,e_{2t}\,e_{3t}
1165    - A_f ^{\,lm}  \,\zeta^2 \;e_{1f }\,e_{2f }\,e_{3f}
1166    \quad \leq 0       \\
1167  \end{split}
1168\]
1169
1170%% =================================================================================================
1171\subsection{Dissipation of enstrophy}
1172\label{subsec:INVARIANTS_6.3}
1173
1174The lateral momentum diffusion term dissipates the enstrophy when the eddy coefficients are horizontally uniform:
1175\begin{flalign*}
1176  &\int\limits_\zeta \; \textbf{k} \cdot \nabla \times
1177  \left[   \nabla_h \left( A^{\,lm}\;\chi  \right)
1178    - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)   \right]\;dv &&&\\
1179  &\quad = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times
1180  \left[    \nabla_h \times \left( \zeta \; \textbf{k} \right)   \right]\;dv &&&\\
1181  &\quad \equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}
1182  \left\{     \delta_{i+1/2} \left[  \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ e_{3f} \zeta  \right]   \right]
1183    + \delta_{j+1/2} \left[  \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta  \right]   \right]      \right\}   &&&\\
1184  %
1185  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
1186  %
1187  &\quad \equiv  - A^{\,lm} \sum\limits_{i,j,k}
1188  \left\{    \left\frac{1} {e_{1v}\,e_{3v}}  \delta_i \left[ e_{3f} \zeta  \right]  \right)^2   b_v
1189    + \left\frac{1} {e_{2u}\,e_{3u}}  \delta_j \left[ e_{3f} \zeta  \right] \right)^2   b_\right\}  \quad \leq \;0    &&&\\
1190\end{flalign*}
1191
1192%% =================================================================================================
1193\subsection{Conservation of horizontal divergence}
1194\label{subsec:INVARIANTS_6.4}
1195
1196When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken,
1197the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}.
1198The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform.
1199\begin{flalign*}
1200  & \int\limits_\nabla_h \cdot
1201  \Bigl[     \nabla_h \left( A^{\,lm}\;\chi \right)
1202  - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \Bigr]  dv
1203  = \int\limits_\nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi  \right)   dv   \\
1204  %
1205  &\equiv \sum\limits_{i,j,k}
1206  \left\{   \delta_i \left[ A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]  \right]
1207    + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    \\
1208  %
1209  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
1210  %
1211  &\equiv \sum\limits_{i,j,k}
1212  - \left\{   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2} \left[ \chi \right] \delta_{i+1/2} \left[ 1 \right]
1213    + \frac{e_{1v}\,e_{3v}} {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right]    \right\}
1214  \quad \equiv 0
1215\end{flalign*}
1216
1217%% =================================================================================================
1218\subsection{Dissipation of horizontal divergence variance}
1219\label{subsec:INVARIANTS_6.5}
1220
1221\begin{flalign*}
1222  &\int\limits_D \chi \;\nabla_h \cdot
1223  \left[    \nabla_h              \left( A^{\,lm}\;\chi                    \right)
1224    - \nabla_h   \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \right]\;  dv
1225  = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\;  dv    \\
1226  %
1227  &\equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1t}\,e_{2t}\,e_{3t}}  \chi
1228  \left\{
1229    \delta_\left[   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]   \right]
1230    + \delta_\left[   \frac{e_{1v}\,e_{3v}} {e_{2v}}   \delta_{j+1/2} \left[ \chi \right]   \right]
1231  \right\} \;   e_{1t}\,e_{2t}\,e_{3t}    \\
1232  %
1233  \intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:}
1234  %
1235  &\equiv - A^{\,lm} \sum\limits_{i,j,k}
1236  \left\{    \left\frac{1} {e_{1u}}  \delta_{i+1/2}  \left[ \chi \right]  \right)^2  b_u
1237    + \left\frac{1} {e_{2v}}  \delta_{j+1/2}  \left[ \chi \right]  \right)^2  b_v    \right\}
1238  \quad \leq 0
1239\end{flalign*}
1240
1241%% =================================================================================================
1242\section{Conservation properties on vertical momentum physics}
1243\label{sec:INVARIANTS_7}
1244
1245As for the lateral momentum physics,
1246the continuous form of the vertical diffusion of momentum satisfies several integral constraints.
1247The first two are associated with the conservation of momentum and the dissipation of horizontal kinetic energy:
1248\begin{align*}
1249  \int\limits_D   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1250  \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\;  dv
1251  \qquad \quad &= \vec{\textbf{0}}
1252  %
1253  \intertext{and}
1254  %
1255                 \int\limits_D
1256                 \textbf{U}_h \cdot   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1257                 \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\; dv    \quad &\leq 0
1258\end{align*}
1259
1260The first property is obvious.
1261The second results from:
1262\begin{flalign*}
1263  \int\limits_D
1264  \textbf{U}_h \cdot   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1265  \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\;dv    &&&\\
1266\end{flalign*}
1267\begin{flalign*}
1268  &\equiv \sum\limits_{i,j,k}
1269  \left(
1270    u\; \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2}  \left[ u \right]  \right]\;  e_{1u}\,e_{2u}
1271    + v\; \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}   \left[ v \right]  \right]\;  e_{1v}\,e_{2v} \right)   &&&
1272  %
1273  \intertext{since the horizontal scale factor does not depend on $k$, it follows:}
1274  %
1275  &\equiv - \sum\limits_{i,j,k}
1276  \left\frac{A_u^{\,vm}} {e_{3uw}} \left( \delta_{k+1/2} \left[ u \right] \right)^2\; e_{1u}\,e_{2u}
1277    + \frac{A_v^{\,vm}} {e_{3vw}}  \left( \delta_{k+1/2} \left[ v \right] \right)^2\; e_{1v}\,e_{2v}  \right)
1278  \quad \leq 0   &&&
1279\end{flalign*}
1280
1281The vorticity is also conserved.
1282Indeed:
1283\begin{flalign*}
1284  \int \limits_D
1285  \frac{1} {e_3 } \textbf{k} \cdot \nabla \times
1286  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}  \left(
1287      \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k}
1288    \right\right)\; dv   &&&
1289\end{flalign*}
1290\begin{flalign*}
1291  \equiv \sum\limits_{i,j,k}  \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}}
1292  \bigg\{    \biggr.   \quad
1293  \delta_{i+1/2}
1294  &\left(   \frac{e_{2v}} {e_{3v}} \delta_\left[  \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ v \right]  \right\right)   &&\\
1295  \biggl.
1296  - \delta_{j+1/2}
1297  &\left(   \frac{e_{1u}} {e_{3u}} \delta_k \left[  \frac{1} {e_{3uw}}\delta_{k+1/2} \left[ u \right]  \right]   \right)
1298  \biggr\} \;
1299  e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0   &&
1300\end{flalign*}
1301
1302If the vertical diffusion coefficient is uniform over the whole domain, the enstrophy is dissipated, \ie
1303\begin{flalign*}
1304  \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times
1305  \left(   \frac{1} {e_3}\; \frac{\partial } {\partial k}
1306    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)   \right)\; dv = 0   &&&
1307\end{flalign*}
1308
1309This property is only satisfied in $z$-coordinates:
1310\begin{flalign*}
1311  \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times
1312  \left\frac{1} {e_3}\; \frac{\partial } {\partial k}
1313    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}  \right)   \right)\; dv   &&&
1314\end{flalign*}
1315\begin{flalign*}
1316  \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \;
1317  \biggl\{  \biggr\quad
1318  \delta_{i+1/2}
1319  &\left(   \frac{e_{2v}} {e_{3v}} \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}[v]  \right]   \right)   &&\\
1320  - \delta_{j+1/2}
1321  &\biggl.
1322  \left(   \frac{e_{1u}} {e_{3u}} \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u]  \right]    \right) \biggr\}   &&
1323\end{flalign*}
1324\begin{flalign*}
1325  \equiv \sum\limits_{i,j,k} \zeta \;e_{3f}
1326  \biggl\{     \biggr\quad
1327  \frac{1} {e_{3v}} \delta_k
1328  &\left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ \delta_{i+1/2} \left[ e_{2v}\,v \right] \right]   \right]    &&\\
1329  \biggl.
1330  - \frac{1} {e_{3u}} \delta_k
1331  &\left[  \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ \delta_{j+1/2} \left[ e_{1u}\,u \right] \right\right\biggr\}  &&
1332\end{flalign*}
1333Using the fact that the vertical diffusion coefficients are uniform,
1334and that in $z$-coordinate, the vertical scale factors do not depend on $i$ and $j$ so that:
1335$e_{3f} =e_{3u} =e_{3v} =e_{3t} $ and $e_{3w} =e_{3uw} =e_{3vw} $, it follows:
1336\begin{flalign*}
1337  \equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k
1338  \left[   \frac{1} {e_{3w}} \delta_{k+1/2} \Bigl[   \delta_{i+1/2} \left[ e_{2v}\,v \right]
1339    - \delta_{j+1/ 2} \left[ e_{1u}\,u \right]   \Bigr]    \right]    &&&
1340\end{flalign*}
1341\begin{flalign*}
1342  \equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}}
1343  \left( \delta_{k+1/2} \left[ \zeta  \right] \right)^2 \; e_{1f}\,e_{2f}  \; \leq 0    &&&
1344\end{flalign*}
1345Similarly, the horizontal divergence is obviously conserved:
1346
1347\begin{flalign*}
1348  \int\limits_D \nabla \cdot
1349  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1350    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0    &&&
1351\end{flalign*}
1352and the square of the horizontal divergence decreases (\ie\ the horizontal divergence is dissipated) if
1353the vertical diffusion coefficient is uniform over the whole domain:
1354
1355\begin{flalign*}
1356  \int\limits_D \chi \;\nabla \cdot
1357  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1358    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}  \right) \right)\;  dv = 0  &&&
1359\end{flalign*}
1360This property is only satisfied in the $z$-coordinate:
1361\begin{flalign*}
1362  \int\limits_D \chi \;\nabla \cdot
1363  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1364    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right\right)\; dv    &&&
1365\end{flalign*}
1366\begin{flalign*}
1367  \equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1t}\,e_{2t}}
1368  \biggl\{  \Biggr\quad
1369  \delta_{i+1/2}
1370  &\left(   \frac{e_{2u}} {e_{3u}} \delta_k
1371    \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right)    &&\\
1372  \Biggl.
1373  + \delta_{j+1/2}
1374  &\left( \frac{e_{1v}} {e_{3v}} \delta_k
1375    \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} [v] \right]   \right)
1376  \Biggr\} \;  e_{1t}\,e_{2t}\,e_{3t}   &&
1377\end{flalign*}
1378
1379\begin{flalign*}
1380  \equiv A^{\,vm} \sum\limits_{i,j,k}  \chi \,
1381  \biggl\{  \biggr\quad
1382  \delta_{i+1/2}
1383  &\left(
1384    \delta_k \left[
1385      \frac{1} {e_{3uw}} \delta_{k+1/2} \left[ e_{2u}\,u \right] \right]   \right)    && \\
1386  \biggl.
1387  + \delta_{j+1/2}
1388  &\left(    \delta_k \left[
1389      \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ e_{1v}\,v \right] \right]   \right)   \biggr\}    &&
1390\end{flalign*}
1391
1392\begin{flalign*}
1393  \equiv -A^{\,vm} \sum\limits_{i,j,k}
1394  \frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\; \biggl\{
1395  \delta_{k+1/2} \Bigl[
1396  \delta_{i+1/2} \left[ e_{2u}\,u \right]
1397  + \delta_{j+1/2} \left[ e_{1v}\,v \right]  \Bigr]    \biggr\}    &&&
1398\end{flalign*}
1399
1400\begin{flalign*}
1401  \equiv -A^{\,vm} \sum\limits_{i,j,k}
1402  \frac{1} {e_{3w}} \delta_{k+1/2} \left[ \chi \right]\; \delta_{k+1/2} \left[ e_{1t}\,e_{2t} \;\chi \right]   &&&
1403\end{flalign*}
1404
1405\begin{flalign*}
1406  \equiv -A^{\,vm} \sum\limits_{i,j,k}
1407  \frac{e_{1t}\,e_{2t}} {e_{3w}}\; \left( \delta_{k+1/2} \left[ \chi \right]  \right)^2     \quad  \equiv 0    &&&
1408\end{flalign*}
1409
1410%% =================================================================================================
1411\section{Conservation properties on tracer physics}
1412\label{sec:INVARIANTS_8}
1413
1414The numerical schemes used for tracer subgridscale physics are written such that
1415the heat and salt contents are conserved (equations in flux form).
1416Since a flux form is used to compute the temperature and salinity,
1417the quadratic form of these quantities (\ie\ their variance) globally tends to diminish.
1418As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear.
1419
1420%% =================================================================================================
1421\subsection{Conservation of tracers}
1422\label{subsec:INVARIANTS_8.1}
1423
1424constraint of conservation of tracers:
1425\begin{flalign*}
1426  &\int\limits_\nabla  \cdot \left( A\;\nabla T \right)\;dv  &&& \\ \\
1427  &\equiv \sum\limits_{i,j,k}
1428  \biggl\{  \biggr.
1429  \delta_i
1430  \left[
1431    A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2}
1432    \left[ T \right]
1433  \right]
1434  + \delta_j
1435  \left[
1436    A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2}
1437    \left[ T \right]
1438  \right] && \\
1439  & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\;
1440  + \delta_k
1441  \left[
1442    A_w^{\,vT} \frac{e_{1t}\,e_{2t}} {e_{3t}} \delta_{k+1/2}
1443    \left[ T \right]
1444  \right]
1445  \biggr\}   \quad  \equiv 0
1446  &&
1447\end{flalign*}
1448
1449In fact, this property simply results from the flux form of the operator.
1450
1451%% =================================================================================================
1452\subsection{Dissipation of tracer variance}
1453\label{subsec:INVARIANTS_8.2}
1454
1455constraint on the dissipation of tracer variance:
1456\begin{flalign*}
1457  \int\limits_D T\;\nabla & \cdot \left( A\;\nabla T \right)\;dv  &&&\\
1458  &\equiv   \sum\limits_{i,j,k} \; T
1459  \biggl\{  \biggr.
1460  \delta_i \left[ A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[T\right] \right]
1461  & + \delta_j \left[ A_v^{\,lT} \frac{e_{1v} \,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[T\right] \right]
1462  \quad&& \\
1463  \biggl.
1464  &&+ \delta_k \left[A_w^{\,vT}\frac{e_{1t}\,e_{2t}} {e_{3t}}\delta_{k+1/2}\left[T\right]\right]
1465  \biggr\} &&
1466\end{flalign*}
1467\begin{flalign*}
1468  \equiv - \sum\limits_{i,j,k}
1469  \biggl\{  \biggr\quad
1470  &    A_u^{\,lT} \left( \frac{1} {e_{1u}} \delta_{i+1/2} \left[ T \right]  \right)^2   e_{1u}\,e_{2u}\,e_{3u}    && \\
1471  & + A_v^{\,lT} \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ T \right]  \right)^2   e_{1v}\,e_{2v}\,e_{3v}     && \\ \biggl.
1472  & + A_w^{\,vT} \left( \frac{1} {e_{3w}} \delta_{k+1/2} \left[ T \right]   \right)^2    e_{1w}\,e_{2w}\,e_{3w}   \biggr\}
1473  \quad      \leq 0      &&
1474\end{flalign*}
1475
1476%%%%  end of appendix in gm comment
1477%}
1478
1479\subinc{\input{../../global/epilogue}}
1480
1481\end{document}
Note: See TracBrowser for help on using the repository browser.