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.
Annex_C.tex in trunk/DOC/BETA/Chapters – NEMO

source: trunk/DOC/BETA/Chapters/Annex_C.tex @ 817

Last change on this file since 817 was 817, checked in by gm, 16 years ago

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

  • Property svn:executable set to *
File size: 50.1 KB
Line 
1% ================================================================
2% Chapter Ñ Appendix C : Discrete Invariants of the Equations
3% ================================================================
4\chapter{Discrete Invariants of the Equations}
5\label{Apdx_C}
6\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{
12
13% ================================================================
14% Conservation Properties on Ocean Dynamics
15% ================================================================
16\section{Conservation Properties on Ocean Dynamics}
17\label{Apdx_C.1}
18
19
20First, 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
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.
25
26% -------------------------------------------------------------------------------------------------------------
27%       Bottom Boundary Condition on Vertical Velocity Field
28% -------------------------------------------------------------------------------------------------------------
29\subsection{Bottom Boundary Condition on Vertical Velocity Field}
30\label{Apdx_C.1.1}
31
32
33The discrete set of momentum equations used in rigid lid approximation
34automatically satisfies the surface and bottom boundary conditions
35(no flux through the surface and the bottom: $w_{surface} =w_{bottom} =~0$).
36Indeed, taking the discrete horizontal divergence of the vertical sum of the
37horizontal momentum equations (Eqs. (II.2.1) and (II.2.2)~) wheighted by the
38vertical scale factors, it becomes:
39\begin{flalign*}
40\frac{\partial } {\partial t}  \left( \sum\limits_k    \chi    \right)
41\equiv 
42\frac{\partial } {\partial t}  \left(  w_{surface} -w_{bottom}     \right)&&&\\
43\end{flalign*}
44\begin{flalign*}
45\equiv \frac{1} {e_{1T}\,e_{2T}\,e_{3T}} 
46   \biggl\{ \quad
47   \delta_i
48      &\left[
49      e_{2u}\,H_u
50         \left(
51         M_u - M_u - \frac{1} {H_u\,e_{2u}} \delta_j
52            \left[ \partial_t\, \psi \right] 
53         \right)
54      \right] &&
55   \biggr. \\
56   \biggl.
57   + \delta_j
58      &\left[
59      e_{1v}\,H_v
60         \left( M_v - M_v - \frac{1} {H_v\,e_{1v}} \delta_i
61            \left[ \partial_i\, \psi \right] 
62         \right)
63      \right]
64   \biggr\}&& \\
65\end{flalign*}
66\begin{flalign*}
67\equiv \frac{1} {e_{1T} \,e_{2T} \,e_{3T}} \;
68   \biggl\{ 
69   - \delta_i
70      \Bigl[
71      \delta_j
72         \left[ \partial_t \psi  \right] 
73      \Bigr]
74   + \delta_j
75      \Bigl[
76      \delta_i
77         \left[ \partial_t \psi  \right] 
78      \Bigr]\; 
79   \biggr\}\;
80   \equiv 0
81   &&&\\
82\end{flalign*}
83
84
85The surface boundary condition associated with the rigid lid approximation ($w_{surface} =0)$ is imposed in the computation of the vertical velocity (II.2.5). Therefore, it turns out to be:
86\begin{equation*}
87\frac{\partial } {\partial t}w_{bottom} \equiv 0
88\end{equation*}
89As the bottom velocity is initially set to zero, it remains zero all the time. Symmetrically, if $w_{bottom} =0$ is used in the computation of the vertical velocity (upward integral of the horizontal divergence), the same computation leads to $w_{surface} =0$ as soon as the surface vertical velocity is initially set to zero.
90
91% -------------------------------------------------------------------------------------------------------------
92%       Coriolis and advection terms: vector invariant form
93% -------------------------------------------------------------------------------------------------------------
94\subsection{Coriolis and advection terms: vector invariant form}
95\label{Apdx_C_vor_zad}
96
97% -------------------------------------------------------------------------------------------------------------
98%       Vorticity Term
99% -------------------------------------------------------------------------------------------------------------
100\subsubsection{Vorticity Term}
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:
104\begin{equation} \label{Apdx_C_1.1}
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
106\end{equation}
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:
110\begin{flalign*} 
111&\int_D \zeta / e_3\,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times 
112   \left(
113   \zeta \; \textbf{k} \times  \textbf{U}_
114   \right)\;
115   dv
116   &&& \displaybreak[0] \\
117%
118\equiv& \sum\limits_{i,j,k} 
119\frac{\zeta / e_{3f}} {e_{1f}\,e_{2f}\,e_{3f}} 
120   \biggl\{ \quad
121   \delta_{i+1/2} 
122      \left[
123         - \overline {\left( {\zeta / e_{3f}} \right)}^{\,i}\;
124            \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/ 2} 
125       \right
126   &&  \\ & \qquad \qquad \qquad \;\;
127   - \delta_{j+1/2} 
128      \left[   \;\;\;
129           \overline {\left( \zeta / e_{3f} \right)}^{\,j}\;
130           \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j} 
131      \right]
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_\Bigl[    \left( \zeta / e_{3f} \right)^2     \Bigr]\; 
147         \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j} 
148   \biggr\} 
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*}
158Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2}
159\left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$,
160and introducing the horizontal divergence $\chi $, it becomes:
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*}
165
166Note that the demonstration is done here for the relative potential
167vorticity but it still hold for the planetary ($f/e_3$) and the total
168potential vorticity $((\zeta +f) /e_3 )$. Another formulation of
169the two components of the vorticity term is optionally offered (ENE scheme) :
170\begin{equation*}
171\frac{1} {e_3 }\nabla \times 
172   \left(
173   \zeta \;{\textbf{k}}\times {\textbf {U}}_h
174   \right)
175\equiv 
176   \left( {{
177   \begin{array} {*{20}c}
178      + \frac{1} {e_{1u}} \; 
179      \overline {\left( \zeta / e_{3f}      \right)   
180      \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j} 
181      \hfill \\
182      - \frac{1} {e_{2v}} \; 
183      \overline {\left( \zeta / e_{3f}      \right)
184      \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i} 
185      \hfill \\
186   \end{array}} } 
187   \right)
188\end{equation*}
189
190This formulation does not conserve the enstrophy but the total kinetic
191energy. It is also possible to mix the two formulations in order to conserve
192enstrophy on the relative vorticity term and energy on the Coriolis term.
193\begin{flalign*}
194&\int\limits_D \textbf{U}_h \times   \left\zeta \;\textbf{k} \times \textbf{U}_\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\}
208   \equiv 0
209\end{flalign*}
210
211
212% -------------------------------------------------------------------------------------------------------------
213%       Gradient of Kinetic Energy / Vertical Advection
214% -------------------------------------------------------------------------------------------------------------
215\subsubsection{Gradient of Kinetic Energy / Vertical Advection}
216\label{Apdx_C_zad} 
217
218The change of Kinetic Energy (KE) due to the vertical advection is exactly
219balanced by the change of KE due to the horizontal gradient of KE~:
220\begin{equation*}
221      \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv
222 = - \int_D \textbf{U}_h \cdot w \frac{\partial \textbf{U}_h} {\partial k}\;dv
223\end{equation*}
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} 
234   \biggr\} 
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} 
242   \left[
243      \overline{ u^2}^{\,i} 
244   + \overline{ v^2}^{\,j} 
245   \right] \;
246   e_{1v}\,e_{2v}\,w
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}\;\overline {v}^{\,k+1/2}\; \delta_{k+1/2}        \left[ v \right]  \;
258   \biggr\} 
259   &&\displaybreak[0] \\ 
260%
261\equiv& -\sum\limits_{i,j,k} 
262   \biggl\{
263   \quad \frac{1} {b_u } \;
264   \overline {\Bigl\{ \overline {e_{1T}\,e_{2T} \,w}^{\,i+1/2}\,\delta_{k+1/2}
265      \left[ u \right] 
266             \Bigr\} }^{\,k} \;u\;e_{1u}\,e_{2u}\,e_{3u} 
267   && \\
268   &\qquad \quad\; + \frac{1} {b_v } \;
269   \overline {\Bigl\{ \overline {e_{1T}\,e_{2T} \,w}^{\,j+1/2} \delta_{k+1/2}
270       \left[ v \right] 
271         \Bigr\} }^{\,k} \;v\;e_{1v}\,e_{2v}\,e_{3v}  \;
272   \biggr\} 
273   && \\ 
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:
278\begin{equation*}
279\frac{1} {e_3 }\; w\; \frac{\partial \textbf{U}_h } {\partial k}
280\equiv \left( {{\begin{array} {*{20}c}
281\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \;
282\overline{\overline {e_{1T}\,e_{2T} \,w\;\delta_{k+1/2} 
283\left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k}  \hfill \\
284\frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \;
285\overline{\overline {e_{1T}\,e_{2T} \,w\;\delta_{k+1/2}
286\left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill \\
287\end{array}} } \right)
288\end{equation*}
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
291% -------------------------------------------------------------------------------------------------------------
292%       Coriolis and advection terms: flux form
293% -------------------------------------------------------------------------------------------------------------
294\subsection{Coriolis and advection terms: flux form}
295\label{Apdx_C.1.3}
296
297% -------------------------------------------------------------------------------------------------------------
298%       Coriolis plus ``metric'' Term
299% -------------------------------------------------------------------------------------------------------------
300\subsubsection{Coriolis plus ``metric'' Term}
301\label{Apdx_C.1.3.1} 
302
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:
304\begin{equation*}
305f+\frac{1} {e_1 e_2 } 
306\left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\;
307\equiv \;
308f+\frac{1} {e_{1f}\,e_{2f}} 
309\left( \overline v^{\,i+1/2} \delta_{i+1/2} \left[ e_{2u} \right] 
310-\overline u^{\,j+1/2} \delta_{j+1/2} \left[ e_{1u}  \right] \right)
311\end{equation*}
312
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}).
314
315% -------------------------------------------------------------------------------------------------------------
316%       Flux form advection
317% -------------------------------------------------------------------------------------------------------------
318\subsubsection{Flux form advection}
319\label{Apdx_C.1.3.2} 
320
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 :
322
323\begin{equation} \label{Apdx_C_I.3.10}
324\int_D \textbf{U}_h \cdot 
325\left( {{\begin{array} {*{20}c}
326\nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
327\nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
328\end{array}} } \right)\;dv =\;0
329\end{equation}
330
331Let 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):
332\begin{flalign*}
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} 
345   \biggl\{ 
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}
353   \biggl\{ 
354      \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;        \overline u^{\,i}       \delta_i
355      \left[ u \right] 
356        + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;   \overline u^{\,j+1/2}   \delta_{j+1/2} 
357      \left[ u \right] 
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}
362   \biggl\{ 
363        \overline {e_{2u}\,e_{3u}\,u}^{\,i}        \delta_i       \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] 
366   \biggr\} 
367   && \displaybreak[0] \\
368%
369\equiv& \sum\limits_{i,j,k}
370   \bigg\{ 
371      e_{2u}\,e_{3u}\,u\;     \delta_{i+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] 
374   \biggr\} 
375   && \displaybreak[0] \\
376%
377\equiv& \sum\limits_{i,j,k}
378\overline {u^2}^{\,i} 
379   \biggl\{ 
380      \delta_{i+1/2}    \left[ e_{2u}\,e_{3u}\,u  \right]
381   + \delta_{j+1/2}  \left[ e_{1u}\,e_{3u}\,v  \right]
382   + \delta_{k+1/2}  \left[ e_{1w}\,e_{2w}\,w \right] 
383   \biggr\}  \;\;  \equiv 0
384   &&& \\
385\end{flalign*}
386
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).
388
389% -------------------------------------------------------------------------------------------------------------
390%       Hydrostatic Pressure Gradient Term
391% -------------------------------------------------------------------------------------------------------------
392\subsection{Hydrostatic Pressure Gradient Term}
393\label{Apdx_C.1.4}
394
395
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:
397\begin{equation*}
398\int_D - \frac{1} {\rho_o} \left. \nabla p^h \right|_z \cdot \textbf{U}_h \;dv
399= \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
400\end{equation*}
401
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\{ 
419      e_{2u}\,e_{3u} \;u\;g\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2}[ z_T]   
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}
425   \biggl\{ 
426       e_{2u}\,e_{3u} \;u\;g\;   \overline \rho^{\,i+1/2} \delta_{i+1/2} \left[ z_T \right]
427   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2} \delta_{j+1/2} \left[ z_T \right] 
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}
432   \biggl\{ 
433      e_{2u}\,e_{3u} \;u\;g\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]
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 \;\;\,
436   +   e_{1w} e_{2w} \;w\;\delta_{k+1/2} \left[ p_h \right] 
437   \biggr\}  &&&\\ 
438%
439\equiv& \frac{g} {\rho_o}  \sum\limits_{i,j,k}
440   \biggl\{ 
441      e_{2u}\,e_{3u} \;u\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]
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 \;\;\,
444   -  e_{1w} e_{2w} \;w\;e_{3w} \overline \rho^{\,k+1/2} 
445   \biggr\}   &&&\\ 
446\end{flalign*}
447noting that by definition of $z_T$, $\delta_{k+1/2} \left[ z_T \right] \equiv - e_{3w} $, thus:
448\begin{multline*}
449\equiv \frac{g} {\rho_o}  \sum\limits_{i,j,k}
450   \biggl\{ 
451      e_{2u}\,e_{3u} \;u\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]
452   +  e_{1v}\,e_{3v} \;v\; \overline \rho^{\,j+1/2} \delta_{j+1/2} \left[ z_T \right]
453   \biggr. \\ 
454\shoveright{
455   \biggl.
456   +  e_{1w} e_{2w} \;w\;  \overline \rho^{\,k+1/2}\;\delta_{k+1/2} \left[ z_T \right] 
457   \biggr\} } \\ 
458\end{multline*}
459Using \eqref{DOM_di_adj}, it becomes:
460\begin{flalign*}
461\equiv& - \frac{g} {\rho_o} \sum\limits_{i,j,k} z_T
462   \biggl\{ 
463      \delta_i    \left[ e_{2u}\,e_{3u}\,u\; \overline \rho^{\,i+1/2}   \right]
464   +  \delta_j    \left[ e_{1v}\,e_{3v}\,v\; \overline \rho^{\,j+1/2}   \right]
465   +  \delta_k    \left[ e_{1w} e_{2w}\,w\;  \overline \rho^{\,k+1/2}   \right] 
466   \biggr\} 
467   &&& \\
468%
469\equiv& -\int_D \nabla \cdot \left( \rho \, \textbf{U} \right)\;g\;z\;\;dv    &&& \\
470\end{flalign*}
471
472Note that this property strongly constraints the discrete expression of both
473the depth of $T-$points and of the term added to the pressure gradient in
474$s$-coordinate. Nevertheless, it is almost never satisfied as a linear equation of state
475is rarely used.
476
477% -------------------------------------------------------------------------------------------------------------
478%       Surface Pressure Gradient Term
479% -------------------------------------------------------------------------------------------------------------
480\subsection{Surface Pressure Gradient Term}
481\label{Apdx_C.1.5}
482
483
484The surface pressure gradient has no contribution to the evolution of the vorticity. This property is trivially satisfied locally as the equation verified by $\psi $ has been derived from the discrete formulation of the momentum equation and of the curl. But it has to be noticed that since the elliptic equation verified by $\psi $ is solved numerically by an iterative solver (preconditioned conjugate gradient or successive over relaxation), the
485property is only satisfied at the precision required on the solver used.
486
487With 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:
488\begin{flalign*}
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\} 
506   && \\ 
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( \;\;\,
513      M_u + \frac{1} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi \right] 
514      \right)\;
515      e_{1u} \,\delta_j
516         \left[ \partial_t \psi  \right] 
517   && \\ &  \qquad \;\;\,
518      + \left(
519      - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi \right] 
520      \right)\;
521      e_{2v} \,\delta_i \left[ \partial_t \psi \right]   \;
522   \biggr\} 
523   && \\ 
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] 
530     - \delta_{i+1/2} \left[ e_{1v} M_v \right] 
531   && \\ &  \qquad \;\;\,
532   + \delta_{i+1/2} 
533      \left[ \frac{e_{2v}} {H_v \,e_{2v}}  \delta_i \left[ \partial_t \psi \right] 
534      \right]
535   + \delta_{j+1/2} 
536       \left[ \frac{e_{1u}} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi \right] 
537       \right
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.
543
544% ================================================================
545% Conservation Properties on Tracers
546% ================================================================
547\section{Conservation Properties on Tracers}
548\label{Apdx_C.2}
549
550
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.
552% -------------------------------------------------------------------------------------------------------------
553%       Advection Term
554% -------------------------------------------------------------------------------------------------------------
555\subsection{Advection Term}
556\label{Apdx_C.2.1}
557
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\{
562    \frac{1} {e_{1T}\,e_{2T}\,e_{3T}} 
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\{
569      \delta_\left[ e_{2u}\,e_{3u}  \,\overline T^{\,i+1/2}\,u \right]
570         + \delta_\left[ e_{1v}\,e_{3v}  \,\overline T^{\,j+1/2}\,v \right] 
571   + \delta_k \left[ e_{1T}\,e_{2T} \,\overline T^{\,k+1/2}\,w \right] \right\} 
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 &&&\\
579\equiv& \sum\limits_{i,j,k} T\;
580   \left\{
581      \delta_\left[ e_{2u}\,e_{3u} \overline T^{\,i+1/2}\,u \right]
582   + \delta_\left[ e_{1v}\,e_{3v} \overline T^{\,j+1/2}\,v \right]
583   + \delta_k \left[ e_{1T}\,e_{2T} \overline T^{\,k+1/2}w \right]
584   \right\} 
585   && \\
586\equiv& \sum\limits_{i,j,k} 
587   \left\{
588   -           e_{2u}\,e_{3u} \overline T^{\,i+1/2}\,u\,\delta_{i+1/2}  \left[ T \right] \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]
592   \right\} 
593   &&\\
594\equiv&  -\frac{1} {2}  \sum\limits_{i,j,k}
595   \Bigl\{
596      e_{2u}\,e_{3u} \;  u\;\delta_{i+1/2} \left[ T^2 \right]
597   + e_{1v}\,e_{3v} \;  v\;\delta_{j+1/2}  \left[ T^2 \right]
598   + e_{1T}\,e_{2T} \;w\;\delta_{k+1/2} \left[ T^2 \right]
599   \Bigr\} 
600   && \\ 
601\equiv& \frac{1} {2}  \sum\limits_{i,j,k} T^2
602   \Bigl\{
603      \delta_\left[ e_{2u}\,e_{3u}\,u \right]
604   + \delta_\left[ e_{1v}\,e_{3v}\,v \right]
605   + \delta_k \left[ e_{1T}\,e_{2T}\,w \right]
606   \Bigr\} 
607\quad \equiv 0 &&&
608\end{flalign*}
609
610
611% ================================================================
612% Conservation Properties on Lateral Momentum Physics
613% ================================================================
614\section{Conservation Properties on Lateral Momentum Physics}
615\label{Apdx_C.3}
616
617
618The discrete formulation of the horizontal diffusion of momentum ensures the
619conservation of potential vorticity and horizontal divergence and the
620dissipation of the square of these quantities (i.e. enstrophy and the
621variance of the horizontal divergence) as well as the dissipation of the
622horizontal kinetic energy. In particular, when the eddy coefficients are
623horizontally uniform, it ensures a complete separation of vorticity and
624horizontal divergence fields, so that diffusion (dissipation) of vorticity
625(enstrophy) does not generate horizontal divergence (variance of the
626horizontal divergence) and \textit{vice versa}.
627
628These properties of the horizontal diffusive operator are a direct
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.
630
631% -------------------------------------------------------------------------------------------------------------
632%       Conservation of Potential Vorticity
633% -------------------------------------------------------------------------------------------------------------
634\subsection{Conservation of Potential Vorticity}
635\label{Apdx_C.3.1}
636
637The lateral momentum diffusion term conserves the potential vorticity :
638\begin{flalign*}
639&\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 
640   \Bigl[ \nabla_h
641      \left( A^{\,lm}\;\chi  \right)
642   - \nabla_h \times
643      \left( A^{\,lm}\;\zeta \; \textbf{k} \right)
644   \Bigr]\;dv  = 0
645\end{flalign*}
646%%%%%%%%%%  recheck here....  (gm)
647\begin{flalign*}
648= \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times 
649   \Bigl[ \nabla_h \times 
650      \left( A^{\,lm}\;\zeta \; \textbf{k} \right)
651   \Bigr]\;dv &&& \\ 
652\end{flalign*}
653\begin{flalign*}
654\equiv& \sum\limits_{i,j}
655   \left\{
656   \delta_{i+1/2} 
657   \left[
658   \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i
659      \left[ A_f^{\,lm} e_{3f} \zeta  \right]
660    \right]
661   + \delta_{j+1/2} 
662   \left[
663   \frac {e_{1u}} {e_{2u}\,e_{3u}} \delta_j
664      \left[ A_f^{\,lm} e_{3f} \zeta  \right]
665   \right]
666   \right\} 
667   && \\ 
668%
669\intertext{Using \eqref{DOM_di_adj}, it follows:}
670%
671\equiv& \sum\limits_{i,j,k} 
672   -\,\left\{
673      \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i
674      \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right]
675   + \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j
676      \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right]
677   \right\} \quad \equiv 0
678   && \\ 
679\end{flalign*}
680
681% -------------------------------------------------------------------------------------------------------------
682%       Dissipation of Horizontal Kinetic Energy
683% -------------------------------------------------------------------------------------------------------------
684\subsection{Dissipation of Horizontal Kinetic Energy}
685\label{Apdx_C.3.2}
686
687
688The lateral momentum diffusion term dissipates the horizontal kinetic energy:
689%\begin{flalign*}
690\begin{equation*}
691\begin{split}
692\int_D \textbf{U}_h \cdot 
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_\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*}
733
734% -------------------------------------------------------------------------------------------------------------
735%       Dissipation of Enstrophy
736% -------------------------------------------------------------------------------------------------------------
737\subsection{Dissipation of Enstrophy}
738\label{Apdx_C.3.3}
739
740
741The lateral momentum diffusion term dissipates the enstrophy when the eddy
742coefficients are horizontally uniform:
743\begin{flalign*}
744&\int\limits_\zeta \; \textbf{k} \cdot \nabla \times 
745   \left[
746     \nabla_h
747      \left( A^{\,lm}\;\chi  \right)
748   -\nabla_h \times 
749      \left( A^{\,lm}\;\zeta \; \textbf{k} \right)
750   \right]\;dv &&&\\
751&= A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times 
752   \left[
753   \nabla_h \times 
754      \left( \zeta \; \textbf{k} \right)
755   \right]\;dv &&&\displaybreak[0]\\
756&\equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f} 
757   \left\{
758     \delta_{i+1/2} 
759   \left[
760   \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i
761      \left[ e_{3f} \zeta  \right]
762   \right]
763   + \delta_{j+1/2} 
764   \left[
765   \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j
766      \left[ e_{3f} \zeta  \right]
767   \right]
768   \right\} 
769   &&&\\ 
770%
771\intertext{Using \eqref{DOM_di_adj}, it follows:}
772%
773&\equiv  - A^{\,lm} \sum\limits_{i,j,k} 
774   \left\{
775     \left(
776     \frac{1} {e_{1v}\,e_{3v}}  \delta_i
777      \left[ e_{3f} \zeta  \right] 
778     \right)^2   e_{1v}\,e_{2v}\,e_{3v}
779   + \left(
780     \frac{1} {e_{2u}\,e_{3u}}  \delta_j
781      \left[ e_{3f} \zeta  \right]
782     \right)^2   e_{1u}\,e_{2u}\,e_{3u}
783     \right\}      &&&\\
784& \leq \;0       &&&\\ 
785\end{flalign*}
786
787% -------------------------------------------------------------------------------------------------------------
788%       Conservation of Horizontal Divergence
789% -------------------------------------------------------------------------------------------------------------
790\subsection{Conservation of Horizontal Divergence}
791\label{Apdx_C.3.4}
792
793When the horizontal divergence of the horizontal diffusion of momentum
794(discrete sense) is taken, the term associated to the vertical curl of the
795vorticity is zero locally, due to (II.1.8). The resulting term conserves the
796$\chi$ and dissipates $\chi^2$ when the eddy coefficients are
797horizontally uniform.
798\begin{flalign*}
799& \int\limits_\nabla_h \cdot 
800   \Bigl[
801     \nabla_h
802      \left( A^{\,lm}\;\chi \right)
803   - \nabla_h \times 
804      \left( A^{\,lm}\;\zeta \;\textbf{k} \right)
805   \Bigr]
806   dv
807= \int\limits_\nabla_h \cdot \nabla_h
808   \left( A^{\,lm}\;\chi  \right)
809   dv
810&&&\\
811&\equiv \sum\limits_{i,j,k} 
812   \left\{ 
813     \delta_i
814      \left[
815      A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} 
816         \left[ \chi \right] 
817      \right]
818   + \delta_j
819      \left[
820      A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} 
821         \left[ \chi \right] 
822      \right]
823   \right\}
824   &&&\\ 
825%
826\intertext{Using \eqref{DOM_di_adj}, it follows:}
827%
828&\equiv \sum\limits_{i,j,k} 
829   - \left\{
830   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2} 
831      \left[ \chi \right]
832   \delta_{i+1/2} 
833      \left[ 1 \right] 
834   + \frac{e_{1v}\,e_{3v}} {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} 
835      \left[ \chi \right]
836   \delta_{j+1/2} 
837      \left[ 1 \right]
838   \right\} \;
839   \equiv 0
840   &&& \\ 
841\end{flalign*}
842
843% -------------------------------------------------------------------------------------------------------------
844%       Dissipation of Horizontal Divergence Variance
845% -------------------------------------------------------------------------------------------------------------
846\subsection{Dissipation of Horizontal Divergence Variance}
847\label{Apdx_C.3.5}
848
849\begin{flalign*}
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 
856   \left\{
857      \delta_\left[   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]   \right]
858   + \delta_\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}
864   \left\{ 
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              &&&\\
869\end{flalign*}
870
871% ================================================================
872% Conservation Properties on Vertical Momentum Physics
873% ================================================================
874\section{Conservation Properties on Vertical Momentum Physics}
875\label{Apdx_C_4}
876
877
878As 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:
879\begin{align*}
880 \int\limits_
881    \frac{1} {e_3 }\; \frac{\partial } {\partial k}
882   \left(
883   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}
884   \right)\;
885   dv \qquad \quad &= \vec{\textbf{0}}
886   \\
887%
888\intertext{and}
889%
890\int\limits_D
891   \textbf{U}_h \cdot 
892   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
893   \left(
894   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}
895   \right)\;
896   dv \quad &\leq 0
897   \\
898\end{align*}
899The first property is obvious. The second results from:
900
901\begin{flalign*}
902\int\limits_D
903   \textbf{U}_h \cdot 
904   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
905   \left(
906   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
907   \right)\;dv
908   &&&\\
909\end{flalign*}
910\begin{flalign*}
911&\equiv \sum\limits_{i,j,k} 
912   \left(
913     u\; \delta_k
914      \left[
915      \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
916         \left[ u \right] 
917      \right]\;
918      e_{1u}\,e_{2u} 
919   + v\;\delta_k
920      \left[
921      \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
922         \left[ v \right] 
923      \right]\;
924      e_{1v}\,e_{2v} 
925   \right)
926   &&&\\ 
927%
928\intertext{as the horizontal scale factor do not depend on $k$, it follows:}
929%
930&\equiv - \sum\limits_{i,j,k} 
931   \left(
932      \frac{A_u^{\,vm}} {e_{3uw}}
933      \left(
934      \delta_{k+1/2} 
935         \left[ u \right] 
936      \right)^2\;
937      e_{1u}\,e_{2u} 
938   + \frac{A_v^{\,vm}} {e_{3vw}} 
939      \left( \delta_{k+1/2} 
940         \left[ v \right] 
941      \right)^2\;
942      e_{1v}\,e_{2v}
943   \right)
944    \quad \leq 0
945    &&&\\
946\end{flalign*}
947
948The vorticity is also conserved. Indeed:
949\begin{flalign*}
950\int \limits_D
951   \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 
952      \left(
953      \frac{1} {e_3 }\; \frac{\partial } {\partial k}
954         \left(
955         \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k} 
956         \right)
957      \right)\;
958      dv
959      &&&\\ 
960\end{flalign*}
961\begin{flalign*}
962\equiv \sum\limits_{i,j,k}  \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}}
963   \bigg\{    \biggr.   \quad
964   \delta_{i+1/2} 
965      &\left(
966      \frac{e_{2v}} {e_{3v}} \delta_k
967         \left[
968         \frac{1} {e_{3vw}} \delta_{k+1/2} 
969            \left[ v \right] 
970         \right]
971      \right)
972    &&\\
973   \biggl.
974   - \delta_{j+1/2} 
975      &\left(
976      \frac{e_{1u}} {e_{3u}} \delta_k
977         \left[
978         \frac{1} {e_{3uw}}\delta_{k+1/2} 
979            \left[ u \right]
980         \right]
981      \right)
982   \biggr\} \;
983   e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0
984   && \\
985\end{flalign*}
986If the vertical diffusion coefficient is uniform over the whole domain, the
987enstrophy is dissipated, i.e.
988\begin{flalign*}
989\int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 
990   \left(
991   \frac{1} {e_3}\; \frac{\partial } {\partial k}
992      \left(
993      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
994      \right)
995   \right)\;
996   dv = 0
997   &&&\\
998\end{flalign*}
999This property is only satisfied in $z$-coordinates:
1000
1001\begin{flalign*}
1002\int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 
1003   \left(
1004   \frac{1} {e_3}\; \frac{\partial } {\partial k}
1005      \left(
1006      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1007      \right)
1008   \right)\;
1009   dv
1010   &&& \\ 
1011\end{flalign*}
1012\begin{flalign*}
1013\equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \;
1014   \biggl\{    \biggr\quad
1015   \delta_{i+1/2} 
1016      &\left(
1017         \frac{e_{2v}} {e_{3v}} \delta_k
1018         \left[
1019         \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1020            \left[ v \right] 
1021         \right]
1022         \right)
1023         &&\\
1024   - \delta_{j+1/2} 
1025      &\biggl.
1026      \left(   
1027         \frac{e_{1u}} {e_{3u}} \delta_k
1028         \left[
1029         \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1030            \left[ u \right]
1031          \right]
1032         \right)
1033   \biggr\} 
1034   &&\\ 
1035\end{flalign*}
1036\begin{flalign*}
1037\equiv \sum\limits_{i,j,k} \zeta \;e_{3f} 
1038   \biggl\{    \biggr\quad
1039   \frac{1} {e_{3v}} \delta_k
1040      &\left[
1041      \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1042         \left[ \delta_{i+1/2} 
1043            \left[ e_{2v}\,v \right]
1044          \right]
1045      \right]
1046      &&\\ 
1047    \biggl.
1048   - \frac{1} {e_{3u}} \delta_k
1049      &\left[
1050      \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1051         \left[ \delta_{j+1/2} 
1052            \left[ e_{1u}\,u \right]
1053          \right]
1054      \right]
1055   \biggr\} 
1056   &&\\ 
1057\end{flalign*}
1058Using the fact that the vertical diffusive coefficients are uniform and that in $z$-coordinates, the vertical scale factors do not depends on $i$ and $j$ so that: $e_{3f} =e_{3u} =e_{3v} =e_{3T} $ and $e_{3w} =e_{3uw} =e_{3vw} $, it follows:
1059\begin{flalign*}
1060\equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k
1061   \left[
1062   \frac{1} {e_{3w}} \delta_{k+1/2} 
1063      \Bigl[
1064      \delta_{i+1/2} 
1065         \left[ e_{2v}\,v \right]
1066      - \delta_{j+1/ 2} 
1067         \left[ e_{1u}\,u \right]
1068       \Bigr]
1069   \right]
1070   &&&\\
1071\end{flalign*}
1072\begin{flalign*}
1073\equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}}
1074   \left(
1075   \delta_{k+1/2} 
1076      \left[ \zeta  \right]
1077    \right)^2 \;
1078    e_{1f}\,e_{2f} 
1079    \; \leq 0
1080    &&&\\
1081\end{flalign*}
1082Similarly, the horizontal divergence is obviously conserved:
1083
1084\begin{flalign*}
1085\int\limits_D \nabla \cdot 
1086   \left(
1087   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1088      \left(
1089      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1090      \right)
1091   \right)\;
1092   dv = 0
1093   &&&\\
1094\end{flalign*}
1095and the square of the horizontal divergence decreases (i.e. the horizontal divergence is dissipated) if vertical diffusion coefficient is uniform over the whole domain:
1096
1097\begin{flalign*}
1098\int\limits_D \chi \;\nabla \cdot 
1099   \left(
1100   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1101      \left(
1102      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1103      \right)
1104   \right)\;
1105   dv = 0
1106   &&&\\
1107\end{flalign*}
1108This property is only satisfied in $z$-coordinates:
1109
1110\begin{flalign*}
1111\int\limits_D \chi \;\nabla \cdot 
1112   \left(
1113   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1114      \left(
1115      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1116      \right)
1117   \right)\;
1118   dv
1119   &&&\\
1120\end{flalign*}
1121\begin{flalign*}
1122\equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1T}\,e_{2T}}
1123   \biggl\{    \Biggr\quad
1124   \delta_{i+1/2} 
1125      &\left(
1126         \frac{e_{2u}} {e_{3u}} \delta_k
1127            \left[
1128         \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1129            \left[ u \right] 
1130         \right]
1131       \right)
1132       &&\\ 
1133   \Biggl.
1134   + \delta_{j+1/2} 
1135      &\left(
1136      \frac{e_{1v}} {e_{3v}} \delta_k
1137         \left[
1138         \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1139            \left[ v \right]
1140          \right]
1141      \right)
1142   \Biggr\} \;
1143   e_{1T}\,e_{2T}\,e_{3T} 
1144   &&\\ 
1145\end{flalign*}
1146
1147\begin{flalign*}
1148\equiv A^{\,vm} \sum\limits_{i,j,k}  \chi \,
1149   \biggl\{ \biggr\quad
1150   \delta_{i+1/2}
1151      &\left(
1152         \delta_k
1153         \left[
1154         \frac{1} {e_{3uw}} \delta_{k+1/2} 
1155            \left[ e_{2u}\,u \right]
1156          \right]
1157         \right)
1158         && \\ 
1159   \biggl.
1160   + \delta_{j+1/2} 
1161      &\left(
1162         \delta_k
1163         \left[
1164         \frac{1} {e_{3vw}} \delta_{k+1/2} 
1165            \left[ e_{1v}\,v \right]
1166          \right]
1167         \right)
1168   \biggr\} 
1169   && \\ 
1170\end{flalign*}
1171
1172\begin{flalign*}
1173\equiv -A^{\,vm} \sum\limits_{i,j,k} 
1174\frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\;
1175   \biggl\{ 
1176   \delta_{k+1/2} 
1177      \Bigl[
1178         \delta_{i+1/2} 
1179         \left[ e_{2u}\,u \right]
1180      + \delta_{j+1/2} 
1181         \left[ e_{1v}\,v \right]
1182      \Bigr]
1183   \biggr\} 
1184   &&&\\
1185\end{flalign*}
1186
1187\begin{flalign*}
1188\equiv -A^{\,vm} \sum\limits_{i,j,k}
1189 \frac{1} {e_{3w}} 
1190\delta_{k+1/2} 
1191   \left[ \chi \right]\;
1192\delta_{k+1/2} 
1193   \left[ e_{1T}\,e_{2T} \;\chi \right]
1194&&&\\
1195\end{flalign*}
1196
1197\begin{flalign*}
1198\equiv -A^{\,vm} \sum\limits_{i,j,k} 
1199\frac{e_{1T}\,e_{2T}} {e_{3w}}\;
1200   \left(
1201   \delta_{k+1/2} 
1202      \left[ \chi \right]
1203   \right)^2
1204   \quad  \equiv 0
1205&&&\\
1206\end{flalign*}
1207
1208% ================================================================
1209% Conservation Properties on Tracer Physics
1210% ================================================================
1211\section{Conservation Properties on Tracer Physics}
1212\label{Apdx_C.5}
1213
1214
1215
1216The numerical schemes used for tracer subgridscale physics are written such that the heat and salt contents are conserved (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) globally tends to diminish. As for the advection term, there is generally no strict conservation of mass even if, in practice, the mass is conserved with a very good accuracy.
1217
1218% -------------------------------------------------------------------------------------------------------------
1219%       Conservation of Tracers
1220% -------------------------------------------------------------------------------------------------------------
1221\subsection{Conservation of Tracers}
1222\label{Apdx_C.5.1}
1223
1224constraint of conservation of tracers:
1225\begin{flalign*}
1226&\int\limits_D  T\;\nabla  \cdot \left( A\;\nabla T \right)\;dv  &&&\\ 
1227\\
1228&\equiv \sum\limits_{i,j,k} 
1229   \biggl\{    \biggr.
1230   \delta_i
1231      \left[
1232      A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} 
1233         \left[ T \right]
1234      \right]
1235   + \delta_j
1236      \left[
1237      A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} 
1238         \left[ T \right] 
1239      \right]
1240   &&\\  & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\;
1241   + \delta_k
1242      \left[
1243      A_w^{\,vT} \frac{e_{1T}\,e_{2T}} {e_{3T}} \delta_{k+1/2} 
1244         \left[ T \right] 
1245      \right]
1246   \biggr\}   \quad  \equiv 0
1247   &&\\ 
1248\end{flalign*}
1249
1250
1251% -------------------------------------------------------------------------------------------------------------
1252%       Dissipation of Tracer Variance
1253% -------------------------------------------------------------------------------------------------------------
1254\subsection{Dissipation of Tracer Variance}
1255\label{Apdx_C.5.2}
1256
1257constraint of dissipation of tracer variance:
1258\begin{flalign*}
1259\int\limits_D T\;\nabla \cdot \left( A\;\nabla T \right)\;dv   &&&\\ 
1260\end{flalign*}
1261\begin{flalign*}
1262\equiv \sum\limits_{i,j,k} T
1263   \biggl\{    \biggr.
1264   \delta_i
1265      \left[
1266      A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} 
1267         \left[ T \right] 
1268      \right]
1269   + \delta_j
1270      &\left[
1271      A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} 
1272         \left[ T \right] 
1273      \right]
1274      && \\ 
1275    \biggl.
1276    + \delta_k
1277      &\left[
1278      A_w^{\,vT} \frac{e_{1T}\,e_{2T}} {e_{3T}} \delta_{k+1/2} 
1279         \left[ T \right] 
1280      \right]
1281   \biggr\} 
1282   &&\\ 
1283\end{flalign*}
1284\begin{flalign*}
1285\equiv - \sum\limits_{i,j,k} 
1286   \biggl\{    \biggr\quad
1287   & A_u^{\,lT} 
1288      \left(
1289      \frac{1} {e_{1u}} \delta_{i+1/2} 
1290         \left[ T \right]
1291      \right)^2
1292      e_{1u}\,e_{2u}\,e_{3u}
1293   && \\
1294   & + A_v^{\,lT} 
1295      \left(
1296      \frac{1} {e_{2v}} \delta_{j+1/2} 
1297         \left[ T \right] 
1298      \right)^2
1299      e_{1v}\,e_{2v}\,e_{3v}
1300   && \\ 
1301   \biggl.
1302   & + A_w^{\,vT} 
1303      \left(
1304      \frac{1} {e_{3w}} \delta_{k+1/2} 
1305         \left[ T \right] 
1306      \right)^2
1307      e_{1w}\,e_{2w}\,e_{3w} 
1308   \biggr\} 
1309   \quad \leq 0
1310   && \\ 
1311\end{flalign*}
1312
1313
1314%%%%  end of appendix in gm comment
1315}
Note: See TracBrowser for help on using the repository browser.