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/NEMO/DOC/BETA/Chapters – NEMO

source: trunk/NEMO/DOC/BETA/Chapters/Annex_C.tex @ 705

Last change on this file since 705 was 705, checked in by smasson, 17 years ago

Historical date: first beta version of the documentation, see ticket:1

  • Property svn:executable set to *
File size: 49.2 KB
Line 
1% ================================================================
2% Chapter Ñ Appendix C : Discrete Invariants of the Equations
3% ================================================================
4\chapter{Appendix C : Discrete Invariants of the Equations}
5\label{Apdx_C}
6\minitoc
7
8% ================================================================
9% Conservation Properties on Ocean Dynamics
10% ================================================================
11\section{Conservation Properties on Ocean Dynamics}
12\label{Apdx_C.1}
13
14
15First, 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
16a total kinetic energy conserving discretization for that term. Note that although these properties are established in the curvilinear $s$-coordinate system, they still hold in the curvilinear $z$-coordinate system.
17
18% -------------------------------------------------------------------------------------------------------------
19%       Bottom Boundary Condition on Vertical Velocity Field
20% -------------------------------------------------------------------------------------------------------------
21\subsection{Bottom Boundary Condition on Vertical Velocity Field}
22\label{Apdx_C.1.1}
23
24
25The discrete set of momentum equations used in rigid lid approximation
26automatically satisfies the surface and bottom boundary conditions
27($w_{surface} =w_{bottom} =~0$, no flux through the surface and the bottom).
28Indeed, taking the discrete horizontal divergence of the vertical sum of the
29horizontal momentum equations (Eqs. (II.2.1) and (II.2.2)~) wheighted by the
30vertical scale factors, it becomes:
31\begin{flalign*}
32\frac{\partial } {\partial t}
33   \left(
34   \sum\limits_k \chi 
35   \right)
36\equiv \frac{\partial } {\partial t}
37   \left(
38   w_{surface} -w_{bottom} 
39   \right)
40   &&&\\
41\end{flalign*}
42\begin{flalign*}
43\equiv \frac{1} {e_{1T}\,e_{2T}\,e_{3T}} 
44   \biggl\{ \quad
45   \delta_i
46      &\left[
47      e_{2u}\,H_u
48         \left(
49         M_u - M_u - \frac{1} {H_u\,e_{2u}} \delta_j
50            \left[ \partial_t\, \psi \right] 
51         \right)
52      \right] &&
53   \biggr. \\
54   \biggl.
55   + \delta_j
56      &\left[
57      e_{1v}\,H_v
58         \left( M_v - M_v - \frac{1} {H_v\,e_{1v}} \delta_i
59            \left[ \partial_i\, \psi \right] 
60         \right)
61      \right]
62   \biggr\}&& \\
63\end{flalign*}
64\begin{flalign*}
65\equiv \frac{1} {e_{1T} \,e_{2T} \,e_{3T}} \;
66   \biggl\{ 
67   - \delta_i
68      \Bigl[
69      \delta_j
70         \left[ \partial_t \psi  \right] 
71      \Bigr]
72   + \delta_j
73      \Bigl[
74      \delta_i
75         \left[ \partial_t \psi  \right] 
76      \Bigr]\; 
77   \biggr\}\;
78   \equiv 0
79   &&&\\
80\end{flalign*}
81
82
83The 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:
84\begin{equation*}
85\frac{\partial } {\partial t}w_{bottom} \equiv 0
86\end{equation*}
87As 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.
88
89% -------------------------------------------------------------------------------------------------------------
90%       Coriolis and advection terms: vector invariant form
91% -------------------------------------------------------------------------------------------------------------
92\subsection{Coriolis and advection terms: vector invariant form}
93\label{Apdx_C.1.2}
94
95% -------------------------------------------------------------------------------------------------------------
96%       Vorticity Term
97% -------------------------------------------------------------------------------------------------------------
98\subsubsection{Vorticity Term}
99\label{Apdx_C.1.2.1} 
100
101Potential vorticity is located at $f$-points and defined as: $\zeta / e_{3f}$. The standard discrete formulation of the relative vorticity term obviously conserves potential vorticity. It also conserves the potential enstrophy for a horizontally non-divergent flow (i.e. $\chi $=0) but not the total kinetic energy. Indeed, using the symmetry or skew symmetry properties of the operators (Eqs (II.1.10) and (II.1.11)), it can be shown that:
102\begin{equation} \label{Apdx_C_1.1}
103\int_D {\zeta / e_3\,\;{\textbf{k}}\cdot \frac{1} {e_3 }\nabla \times \left( {\zeta \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0
104\end{equation}
105
106where $dv=e_1 \,e_2 \,e_3 \;di\,dj\,dk$ is the volume element. Indeed, using
107(II.2.11), the discrete form of the right hand side of (C.1.1) can be
108transformed as follow:
109\begin{flalign*} 
110\int_D \zeta / e_3\,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times 
111   \left(
112   \zeta \; \textbf{k} \times  \textbf{U}_
113   \right)\;
114   dv
115   &&&\\
116\end{flalign*}
117\begin{flalign*}
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   &&
127   \biggr. \\ 
128   \biggl.
129   - \delta_{j+1/2} 
130      &\left\;\;\;
131           \overline {\left( \zeta / e_{3f} \right)}^{\,j}\;
132           \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j} 
133      \right]
134   \biggr\} \;
135   e_{1f}\,e_{2f}\,e_{3f}
136   &&\\ 
137\end{flalign*}
138\begin{flalign*}
139\equiv \sum\limits_{i,j,k} 
140   \biggl\{ \quad
141   \delta_i
142      &\left[ \zeta / e_{3f} \right] \;
143      \overline {\left( \zeta / e_{3f} \right)}^{\,i}\; 
144      \overline{\overline {\left( e_{1u}\,e_{3u}\,u \right)}}^{\,i,j+1/2} 
145      && 
146   \biggr. \\ 
147   \biggl.
148   + \delta_j
149      &\left[ \zeta / e_{3f} \right] \;
150      \overline {\left( \zeta / e_{3f} \right)}^{\,j} \; 
151      \overline{\overline {\left( e_{2v}\,e_{3v}\,v \right)}}^{\,i+1/2,j}  \;
152   \biggr\} 
153      &&  \\ 
154\end{flalign*}
155
156\begin{flalign*}
157\equiv \frac{1} {2} \sum\limits_{i,j,k} 
158   \biggl\{ \quad
159   \delta_i
160      &\Bigl[
161         \left( \zeta / e_{3f} \right)^2
162      \Bigr]\;
163   \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/2} 
164   &&
165   \biggr. \\ 
166   \biggl.
167   + \delta_j
168      &\Bigl[
169         \left( \zeta / e_{3f} \right)^2
170      \Bigr]\; 
171      \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j} 
172   \biggr\} 
173   &&  \\ 
174\end{flalign*}
175
176\begin{flalign*}
177\equiv - \frac{1} {2} \sum\limits_{i,j,k}    \left( \zeta / e_{3f} \right)^2\;
178   \biggl\{    \quad
179   \delta_{i+1/2} 
180      &\left[
181      \overline{\overline {\left( e_{2u}\,e_{3u}\,u \right)}}^{\,i,j+1/2} 
182      \right
183      &&
184   \biggr. \\ 
185   \biggl.
186   + \delta_{j+1/2}
187      &\left[
188      \overline{\overline {\left( e_{1v}\,e_{3v}\,v \right)}}^{\,i+1/2,j} 
189      \right
190   \biggr\} 
191   && \\ 
192\end{flalign*}
193
194
195Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2}
196\left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$,
197and introducing the horizontal divergence $\chi $, it becomes:
198\begin{equation*}
199\equiv \sum\limits_{i,j,k} - \frac{1} {2} \left( \zeta / e_{3f} \right)^2 \; \overline{\overline{ e_1T\,e_2T\,e_3T\, \chi}}^{\,i+1/2,j+1/2} \equiv 0
200\end{equation*}
201
202Note that the demonstration is done here for the relative potential
203vorticity but it still hold for the planetary ($f/e_3$ ) and the total
204potential vorticity $((\zeta +f) /e_3 )$. Another formulation of
205the two components of the vorticity term is optionally offered :
206\begin{equation*}
207\frac{1} {e_3 }\nabla \times 
208   \left(
209   \zeta \;{\textbf{k}}\times {\textbf {U}}_h
210   \right)
211\equiv 
212   \left( {{
213   \begin{array} {*{20}c}
214      + \frac{1} {e_{1u}} \; 
215      \overline {\left( \zeta / e_{3f}      \right)   
216      \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j} 
217      \hfill \\
218      - \frac{1} {e_{2v}} \; 
219      \overline {\left( \zeta / e_{3f}      \right)
220      \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i} 
221      \hfill \\
222   \end{array}} } 
223   \right)
224\end{equation*}
225
226This formulation does not conserve the enstrophy but the total kinetic
227energy. It is also possible to mix the two formulations in order to conserve
228enstrophy on the relative vorticity term and energy on the Coriolis term.
229\begin{flalign*}
230\int\limits_D \textbf{U}_h \times 
231   \left(
232   \zeta \;\textbf{k} \times \textbf{U}_h
233   \right)\;
234   dv
235   &&& \\
236\end{flalign*}
237
238\begin{flalign*}
239\equiv \sum\limits_{i,j,k} 
240   \biggl\{    \quad
241   &   \overline {\left( \zeta / e_{3f}      \right)
242        \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j} \; e_{2u}\,e_{3u}\,u
243   &&
244   \biggr. \\
245   \biggl.
246   -& \overline {\left( \zeta / e_{3f}       \right)
247       \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i} \; e_{1v}\,e_{3v}\,v \;
248   \biggr\} 
249   && \\
250\end{flalign*}
251
252\begin{flalign*}
253\equiv \sum\limits_{i,j,k}
254\Bigl(
255\zeta / e_{3f} 
256\Bigr)\;
257   \biggl\{ \quad
258   &  \overline {\left( e_{1v}\,e_{3v} \,v \right)}^{\,i+1/2}\;\;
259       \overline {\left( e_{2u}\,e_{3u} \,u \right)}^{\,j+1/2} 
260   &&
261   \biggr. \\ 
262   \biggl.
263   -& \overline {\left( e_{2u}\,e_{3u} \,u \right)}^{\,j+1/2}\;\;
264        \overline {\left( e_{1v}\,e_{3v} \,v \right)}^{\,i+1/2}\; 
265   \biggr\} \; 
266   \equiv 0
267   && \\ 
268\end{flalign*}
269
270% -------------------------------------------------------------------------------------------------------------
271%       Gradient of Kinetic Energy / Vertical Advection
272% -------------------------------------------------------------------------------------------------------------
273\subsubsection{Gradient of Kinetic Energy / Vertical Advection}
274\label{Apdx_C.1.2.2} 
275
276The change of Kinetic Energy (KE) due to the vertical advection is exactly
277balanced by the change of KE due to the horizontal gradient of KE~:
278\begin{equation*}
279      \int_D \textbf{U}_h \cdot \nabla_h \left( 1/2\;\textbf{U}_h^2 \right)\;dv
280 = - \int_D \textbf{U}_h \cdot w \frac{\partial \textbf{U}_h} {\partial k}\;dv
281\end{equation*}
282Indeed, using successively (II.1.10) and the continuity of mass (II.2.5),
283(II.1.10), and the commutativity of operators $\overline {\,\cdot \,} $ and
284$\delta$, and finally (II.1.11) successively in the horizontal and in the vertical
285direction, it becomes:
286\begin{flalign*}
287\int_D \textbf{U}_h \cdot \nabla_h \left( 1/2\; \textbf{U}_h^2 \right)\;dv &&&\\
288\end{flalign*}
289
290\begin{flalign*}
291\equiv \frac{1} {2} \sum\limits_{i,j,k} 
292   \biggl\{ \quad
293   &\frac{1} {e_{1u}}  \delta_{i+1/2} 
294      \left[
295         \overline {u^2}^{\,i} 
296      + \overline {v^2}^{\,j} 
297      \right]
298      \;u\;e_{1u}\,e_{2u}\,e_{3u} 
299      &&
300   \biggr. \\ 
301   \biggl.
302   & + \frac{1} {e_{2v}}  \delta_{j+1/2} 
303      \left[
304         \overline {u^2}^{\,i} 
305      + \overline {v^2}^{\,j} 
306      \right]
307      \;v\;e_{1v}\,e_{2v}\,e_{3v}  \;
308   \biggr\} 
309   && \\ 
310\end{flalign*}
311
312\begin{flalign*}
313\equiv  &\frac{1} {2}\quad \sum\limits_{i,j,k} 
314   \left(
315      \overline {u^2}^{\,i}
316   + \overline {v^2}^{\,j} 
317   \right)\;
318\delta_k
319   \left[
320    e_{1T}\,e_{2T} \,w
321    \right]
322    && \\
323\end{flalign*}
324\begin{flalign*}
325\equiv &\frac{1} {2} - \sum\limits_{i,j,k}  \delta_{k+1/2} 
326   \left[
327      \overline{ u^2}^{\,i} 
328   + \overline{ v^2}^{\,j} 
329   \right] \;
330   e_{1v}\,e_{2v}\,w
331   && \\
332\end{flalign*}
333\begin{flalign*}
334\equiv &\frac{1} {2} \quad \sum\limits_{i,j,k} 
335   \left(
336      \overline {\delta_{k+1/2} \left[ u^2 \right]}^{\,i} 
337   + \overline {\delta_{k+1/2} \left[ v^2 \right]}^{\,j} 
338   \right)\;
339   e_{1T}\,e_{2T} \,w
340   && \\
341\end{flalign*}
342\begin{flalign*}
343\equiv \frac{1} {2} \quad \sum\limits_{i,j,k} 
344   \biggl\{ \quad
345   & \overline {e_{1T}\,e_{2T} \,w}^{\,i+1/2}\;2   \overline {u}^{\,k+1/2}\; \delta_{k+1/2} 
346      \left[ u \right] 
347   &&
348   \biggr. \\ 
349   \biggl.
350   & + \overline {e_{1T}\,e_{2T} \,w}^{\,j+1/2}\;2    \overline {v}^{\,k+1/2}\; \delta_{k+1/2}        \left[ v \right]  \;
351   \biggr\} 
352   &&\\ 
353\end{flalign*}
354\begin{flalign*}
355\equiv \quad -\sum\limits_{i,j,k} 
356   \biggl\{ \quad
357   &\frac{1} {b_u } \;
358   \overline {\Bigl\{ \overline {e_{1T}\,e_{2T} \,w}^{\,i+1/2}\,\delta_{k+1/2}
359      \left[ u \right] 
360             \Bigr\} }^{\,k} \;u\;e_{1u}\,e_{2u}\,e_{3u} 
361   &&
362   \biggr. \\ 
363   \biggl
364   & + \frac{1} {b_v } \;
365   \overline {\Bigl\{ \overline {e_{1T}\,e_{2T} \,w}^{\,j+1/2} \delta_{k+1/2}
366       \left[ v \right] 
367         \Bigr\} }^{\,k} \;v\;e_{1v}\,e_{2v}\,e_{3v}  \;
368   \biggr\} 
369   && \\ 
370\end{flalign*}
371\begin{flalign*}
372\equiv -\int\limits_D \textbf{U}_h \cdot w \frac{\partial \textbf{U}_h} {\partial k}\;dv  &&&\\
373\end{flalign*}
374
375The main point here is that the respect of this property links the choice of the discrete formulation of vertical advection and of horizontal gradient of KE. Choosing one imposes the other. For example KE can also be defined as $1/2(\overline u^{\,i} + \overline v^{\,j})$, but this leads to the following expression for the vertical advection~:
376\begin{equation*}
377\frac{1} {e_3 }\; w\; \frac{\partial \textbf{U}_h } {\partial k}
378\equiv \left( {{\begin{array} {*{20}c}
379\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \;
380\overline{\overline {e_{1T}\,e_{2T} \,w\;\delta_{k+1/2} 
381\left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k}  \hfill \\
382\frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \;
383\overline{\overline {e_{1T}\,e_{2T} \,w\;\delta_{k+1/2}
384\left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill \\
385\end{array}} } \right)
386\end{equation*}
387
388This formulation requires one more horizontal mean, and thus the use of 9 velocity points instead of 3. This is the reason why it has not been retained in the model.
389% -------------------------------------------------------------------------------------------------------------
390%       Coriolis and advection terms: flux form
391% -------------------------------------------------------------------------------------------------------------
392\subsection{Coriolis and advection terms: flux form}
393\label{Apdx_C.1.3}
394
395% -------------------------------------------------------------------------------------------------------------
396%       Coriolis plus ``metric'' Term
397% -------------------------------------------------------------------------------------------------------------
398\subsubsection{Coriolis plus ``metric'' Term}
399\label{Apdx_C.1.3.1} 
400
401In flux from the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the ``metric'' term. This altered Coriolis parameter is thus discretised at F-point. It is given by:
402\begin{equation*}
403f+\frac{1} {e_1 e_2 } 
404\left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\;
405\equiv \;
406f+\frac{1} {e_{1f}\,e_{2f}} 
407\left( \overline v^{\,i+1/2} \delta_{i+1/2} \left[ e_{2u} \right] 
408-\overline u^{\,j+1/2} \delta_{j+1/2} \left[ e_{1u}  \right] \right)
409\end{equation*}
410
411Then any of the scheme presented above for the vorticity term in the vector invariant formulation can be used, except of course the mixed scheme. However, the energy conserving scheme has exclusively been used to date.
412
413% -------------------------------------------------------------------------------------------------------------
414%       Flux form advection
415% -------------------------------------------------------------------------------------------------------------
416\subsubsection{Flux form advection}
417\label{Apdx_C.1.3.2} 
418
419The flux form operator of the momentum advection is evaluated using a second order finite difference scheme. Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum. Moreover, it conserves the horizontal kinetic energy, that is :
420
421\begin{equation} \label{Apdx_C_I.3.10}
422\int_D \textbf{U}_h \cdot 
423\left( {{\begin{array} {*{20}c}
424\nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
425\nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
426\end{array}} } \right)\;dv =\;0
427\end{equation}
428
429Let 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):
430\begin{flalign*}
431\int_D u \cdot \nabla \cdot \left( \textbf{U}\,u \right)\;dv   &&&\\
432\end{flalign*}
433
434\begin{flalign*}
435\equiv \sum\limits_{i,j,k} 
436   \biggl\{ 
437   \frac{1} {e_{1u}\, e_{2u}\,e_{3u}} 
438      \biggl\quad \biggr.
439      &    \delta_{i+1/2} 
440         \left[
441         \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;\overline u^{\,i} 
442         \right]
443      && \\
444      & + \delta_j
445         \left[
446         \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;\overline u^{\,j+1/2} 
447         \right]
448      &&
449   \biggr.\\ 
450   \biggl.
451      & + \delta_k      \biggl.
452         \left[
453         \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}\;\overline u^{\,k+1/2} 
454         \right]\; 
455      \biggr)\; 
456   \biggr\} \, 
457   e_{1u}\,e_{2u}\,e_{3u} \;u
458   && \\ 
459\end{flalign*}
460
461\begin{flalign*}
462\equiv \sum\limits_{i,j,k} 
463   \biggl\{ 
464   \delta_{i+1/2} 
465      \left[
466      \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;    \overline u^{\,i} 
467      \right]
468   & + \delta_j
469      \left[
470      \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;\overline u^{\,j+1/2} 
471      \right]
472   &&
473   \biggr.\\
474   \biggl.
475   & + \delta_k
476      \left[
477      \overline {e_{1w}\,e_{2w}\,w}^{\,i+12}\;\overline u^{\,k+1/2} 
478      \right]\; 
479   \biggr\}
480   && \\
481\end{flalign*}
482
483\begin{flalign*}
484\equiv \sum\limits_{i,j,k}
485   \biggl\{ 
486      \overline {e_{2u}\,e_{3u}\,u}^{\,i}\;        \overline u^{\,i}       \delta_i
487      \left[ u \right] 
488   & + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}\;   \overline u^{\,j+1/2}   \delta_{j+1/2} 
489      \left[ u \right] 
490   &&
491   \biggr. \\
492   \biggl.
493   & + \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}\;   \overline u^{\,k+1/2}   \delta_{k+1/2} 
494      \left[ u \right] 
495   \biggr\} 
496   && \\
497\end{flalign*}
498
499\begin{flalign*}
500\equiv \sum\limits_{i,j,k}
501   \biggl\{ 
502        \overline {e_{2u}\,e_{3u}\,u}^{\,i}        \delta_i       \left[ u^2 \right] 
503   & + \overline {e_{1u}\,e_{3u}\,v}^{\,i+1/2}     \delta_{j+/2}  \left[ u^2 \right]
504   && 
505   \biggr. \\
506   \biggl.
507   & + \overline {e_{1w}\,e_{2w}\,w}^{\,i+1/2}  \delta_{k+1/2}    \left[ u^2 \right] 
508   \biggr\} 
509   && \\
510\end{flalign*}
511
512\begin{flalign*}
513\equiv \sum\limits_{i,j,k}
514   \bigg\{ 
515      e_{2u}\,e_{3u}\,u\;     \delta_{i+1/2}       \left[ \overline {u^2}^{\,i} \right]
516   & + e_{1u}\,e_{3u}\,v\; \delta_{j+1/2}    \; \left[ \overline {u^2}^{\,i} \right]
517   &&
518   \biggr.\\
519   \biggl.
520   & + e_{1w}\,e_{2w}\,w\; \delta_{k+1/2}       \left[ \overline {u^2}^{\,i} \right] 
521   \biggr\} 
522   && \\
523\end{flalign*}
524
525\begin{flalign*}
526\equiv \sum\limits_{i,j,k}
527\overline {u^2}^{\,i} 
528   \biggl\{ 
529      \delta_{i+1/2}    \left[ e_{2u}\,e_{3u}\,u  \right]
530   + \delta_{j+1/2}  \left[ e_{1u}\,e_{3u}\,v  \right]
531   + \delta_{k+1/2}  \left[ e_{1w}\,e_{2w}\,w \right] 
532   \biggr\} 
533   &&& \\
534\end{flalign*}
535
536\begin{flalign*}
537\equiv 0    &&&\\
538\end{flalign*}
539
540% -------------------------------------------------------------------------------------------------------------
541%       Hydrostatic Pressure Gradient Term
542% -------------------------------------------------------------------------------------------------------------
543\subsection{Hydrostatic Pressure Gradient Term}
544\label{Apdx_C.1.4}
545
546
547A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. In $z-$coordinates, this properties is satisfied locally with the choice of discretization we have made (property (II.1.9)~). When the equation of state is linear (i.e. when a advective-diffusive equation for density can be derived from those of temperature and salinity) the change of KE due to the work of pressure forces is balanced by the change of potential energy due to buoyancy forces.
548\begin{equation*}
549\int_D - \frac{1} {\rho_o} \left. \nabla p^h \right|_z \cdot \textbf{U}_h \;dv
550= \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
551\end{equation*}
552
553This property is satisfied in both $z- $and $s-$coordinates. Indeed, defining the depth of a $T$-point, $z_T$ defined as the sum of the vertical scale factors at $w$-points starting from the surface, it can be written as:
554\begin{flalign*}
555\int_D - \frac{1} {\rho_o} \left. \nabla p^h \right|_z \cdot \textbf{U}_h \;dv   &&& \\
556\end{flalign*}
557\begin{flalign*}
558\equiv \sum\limits_{i,j,k} 
559   \biggl\{ \;   
560   & - \frac{1} {\rho_o e_{1u}} 
561      \Bigl(
562      \delta_{i+1/2} \left[ p^h \right] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} 
563         \left[ z_T \right] 
564      \Bigr)\;
565      u\;e_{1u}\,e_{2u}\,e_{3u} 
566   &&
567   \biggr. \\ 
568   \biggl.
569   & - \frac{1} {\rho_o e_{2v}}   
570      \Bigl(
571      \delta_{j+1/2} \left[ p^h \right] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2} 
572         \left[ z_T \right] 
573      \Bigr)\;
574      v\;e_{1v}\,e_{2v}\,e_{3v} \;
575   \biggr\} 
576   && \\ 
577\end{flalign*}
578
579Using (II.1.10), the continuity equation (II.2.5), and the hydrostatic
580equation (II.2.4), it turns out to be:
581\begin{multline*} 
582\equiv \frac{1} {\rho_o} \sum\limits_{i,j,k}   
583   \biggl\{ 
584      e_{2u}\,e_{3u} \;u\;g\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2}[ z_T]   
585   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2}\;\delta_{j+1/2}[ z_T] 
586    \biggr. \\ 
587\shoveright {
588   +\biggl.
589      \Bigl(
590       \delta_i[ e_{2u}\,e_{3u}\,u] + \delta_j [ e_{1v}\,e_{3v}\,v]
591       \Bigr)\;p^h
592   \biggr\} } \\
593\end{multline*}
594
595\begin{multline*}
596\equiv \frac{1} {\rho_o } \sum\limits_{i,j,k}
597   \biggl\{ 
598       e_{2u}\,e_{3u} \;u\;g\;   \overline \rho^{\,i+1/2} \delta_{i+1/2} \left[ z_T \right]
599   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2} \delta_{j+1/2} \left[ z_T \right] 
600   \biggr. \\ 
601\shoveright {
602   \biggl.
603    - \delta_k
604      \left[ e_{1w} e_{2w}\,w \right]\;p^h
605   \biggr\} } \\ 
606\end{multline*}
607
608\begin{multline*}
609\equiv \frac{1} {\rho_o } \sum\limits_{i,j,k}
610   \biggl\{ 
611      e_{2u}\,e_{3u} \;u\;g\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]
612   +  e_{1v}\,e_{3v} \;v\;g\; \overline \rho^{\,j+1/2} \;\delta_{j+1/2} \left[ z_T \right]   \biggr. \\ 
613\shoveright{
614   \biggl.
615   +   e_{1w} e_{2w} \;w\;\delta_{k+1/2} \left[ p_h \right] 
616   \biggr\} }  \\ 
617\end{multline*}
618
619\begin{multline*}
620\equiv \frac{g} {\rho_o}  \sum\limits_{i,j,k}
621   \biggl\{ 
622      e_{2u}\,e_{3u} \;u\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]
623   +  e_{1v}\,e_{3v} \;v\; \overline \rho^{\,j+1/2}\;\delta_{j+1/2} \left[ z_T \right]       \biggr. \\
624\shoveright{ 
625   \biggl.
626   -  e_{1w} e_{2w} \;w\;e_{3w} \overline \rho^{\,k+1/2} 
627   \biggr\} }  \\ 
628\end{multline*}
629noting that by definition of $z_T$, $\delta_{k+1/2} \left[ z_T \right] \equiv - e_{3w} $, thus:
630\begin{multline*}
631\equiv \frac{g} {\rho_o}  \sum\limits_{i,j,k}
632   \biggl\{ 
633      e_{2u}\,e_{3u} \;u\; \overline \rho^{\,i+1/2}\;\delta_{i+1/2} \left[ z_T \right]
634   +  e_{1v}\,e_{3v} \;v\; \overline \rho^{\,j+1/2} \delta_{j+1/2} \left[ z_T \right]
635   \biggr. \\ 
636\shoveright{
637   \biggl.
638   +  e_{1w} e_{2w} \;w\;  \overline \rho^{\,k+1/2}\;\delta_{k+1/2} \left[ z_T \right] 
639   \biggr\} } \\ 
640\end{multline*}
641Using (II.1.10), it becomes~:
642\begin{flalign*}
643\equiv - \frac{g} {\rho_o} \sum\limits_{i,j,k} z_T
644   \biggl\{ 
645      \delta_i    \left[ e_{2u}\,e_{3u}\,u\; \overline \rho^{\,i+1/2}   \right]
646   +  \delta_j    \left[ e_{1v}\,e_{3v}\,v\; \overline \rho^{\,j+1/2}   \right]
647   +  \delta_k    \left[ e_{1w} e_{2w}\,w\;  \overline \rho^{\,k+1/2}   \right] 
648   \biggr\} 
649   &&& \\
650\end{flalign*}
651\begin{flalign*}
652\equiv -\int_D \nabla \cdot \left( \rho \, \textbf{U} \right)\;g\;z\;\;dv  &&& \\
653\end{flalign*}
654
655Note that this property strongly constraints the discrete expression of both
656the depth of $T-$points and of the term added to the pressure gradient in
657$s-$coordinates.
658
659% -------------------------------------------------------------------------------------------------------------
660%       Surface Pressure Gradient Term
661% -------------------------------------------------------------------------------------------------------------
662\subsection{Surface Pressure Gradient Term}
663\label{Apdx_C.1.5}
664
665
666The 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
667property is only satisfied at the precision required on the solver used.
668
669With 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:
670\begin{flalign*}
671\int\limits_D  - \frac{1} {\rho_o} \nabla_h \left( p_s \right) \cdot \textbf{U}_h \;dv &&& \\
672\end{flalign*}
673
674\begin{flalign*}
675\equiv \sum\limits_{i,j,k} 
676   \biggl\{    \quad
677      & \left(
678       - M_u - \frac{1} {H_u \,e_{2u}}  \delta_j   \left[ \partial_t \psi  \right] 
679        \right)\;
680        u\;e_{1u}\,e_{2u}\,e_{3u} 
681   &&
682   \biggr. \\
683   \biggl.
684      + & \left(
685         - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi \right] 
686          \right)\;
687          v\;e_{1v}\,e_{2v}\,e_{3v}    \;
688   \biggr\} 
689   &&  \\
690\end{flalign*}
691
692\begin{flalign*}
693\equiv \sum\limits_{i,j} 
694   \Biggl\{    \quad
695      &\biggl(
696      - M_u - \frac{1} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi  \right] 
697      \biggr)
698      \biggl(
699      \sum\limits_k  u\;e_{3u} 
700      \biggr)\;
701      e_{1u}\,e_{2u} 
702   &&
703   \Biggr\\
704   \Biggl.
705   + & \biggl(
706      - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi  \right]
707         \biggr)
708         \biggl(
709         \sum\limits_k   v\;e_{3v}
710          \biggr)\;
711          e_{1v}\,e_{2v} \;
712   \Biggr\} 
713   && \\ 
714\end{flalign*}
715using the relation between \textit{$\psi $} and the vertically sum of the velocity, it becomes~:
716
717\begin{flalign*}
718\equiv \sum\limits_{i,j} 
719   \biggl\{    \quad
720      &\left(
721      M_u + \frac{1} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi \right] 
722      \right)\;
723      e_{1u} \,\delta_j
724         \left[ \partial_t \psi  \right] 
725   &&
726   \biggr. \\ 
727   \biggl.
728      +& \left(
729      - M_v + \frac{1} {H_v \,e_{1v}}  \delta_i \left[ \partial_t \psi \right] 
730      \right)\;
731      e_{2v} \,\delta_i \left[ \partial_t \psi \right]   \;
732   \biggr\} 
733   && \\ 
734\end{flalign*}
735applying the adjoint of the $\delta$ operator, it is now:
736
737\begin{flalign*}
738\equiv \sum\limits_{i,j}  - \partial_t \psi \;
739   \biggl\{    \quad
740   &  \delta_{j+1/2} \left[ e_{1u} M_u \right] 
741     - \delta_{i+1/2} \left[ e_{1v} M_v \right] 
742   &&
743   \biggr\\ 
744   \biggl.
745   +& \delta_{i+1/2} 
746      \left[ \frac{e_{2v}} {H_v \,e_{2v}}  \delta_i \left[ \partial_t \psi \right] 
747      \right]
748   + \delta_{j+1/2} 
749       \left[ \frac{e_{1u}} {H_u \,e_{2u}}  \delta_j \left[ \partial_t \psi \right] 
750       \right
751   \biggr\} 
752   \equiv 0
753   && \\ 
754\end{flalign*}
755
756The last equality is obtained using (II.2.3), the discrete barotropic streamfunction time evolution equation. By the way, this shows that (II.2.3) is the only way do compute the streamfunction, otherwise the surface pressure forces will work. Nevertheless, since the elliptic equation verified by $\psi $ is solved numerically by an iterative solver, the property is only satisfied at the precision required on the solver.
757
758% ================================================================
759% Conservation Properties on Tracers
760% ================================================================
761\section{Conservation Properties on Tracers}
762\label{Apdx_C.2}
763
764
765The numerical schemes are written such that the heat and salt contents are conserved by the internal dynamics (equations in flux form, second order centered finite differences). As a form flux is used to compute the temperature and salinity, the quadratic form of these quantities (i.e. their variance) is globally conserved, too. There is generally no strict conservation of mass, as the equation of state is non linear with respect to $T$ and $S$. In practice, the mass is conserved with a very good accuracy.
766
767% -------------------------------------------------------------------------------------------------------------
768%       Advection Term
769% -------------------------------------------------------------------------------------------------------------
770\subsection{Advection Term}
771\label{Apdx_C.2.1}
772
773Conservation of the tracer
774
775The flux form
776\begin{flalign*}
777\int_D \nabla \cdot \left( T \textbf{U} \right)\;dv &&&
778\end{flalign*}
779\begin{flalign*}
780 \equiv  \sum\limits_{i,j,k}     \left\{
781    \frac{1} {e_{1T}\,e_{2T}\,e_{3T}} 
782    \left(
783     \delta_i
784      \left[
785      e_{2u}\,e_{3u} \,\overline T^{\,i+1/2}\,u
786      \right]
787    \right. \right.
788& + \left. \delta_j \left[ e_{1v}\,e_{3v} \,\overline T^{\,j+1/2}\,v \right] \right) && \\ 
789 & + \left. \frac{1} {e_{3T}} \delta_k \left[ \overline T^{\,k+1/2}\,w \right] \ \ \right\} 
790   \ \ e_{1T}\,e_{2T}\,e_{3T} &&
791\end{flalign*}
792
793\begin{flalign*}
794 \equiv&  \sum\limits_{i,j,k}     \left\{
795      \delta_\left[ e_{2u}\,e_{3u}  \,\overline T^{\,i+1/2}\,u \right]
796         + \delta_\left[ e_{1v}\,e_{3v}  \,\overline T^{\,j+1/2}\,v \right] 
797   + \delta_k \left[ e_{1T}\,e_{2T} \,\overline T^{\,k+1/2}\,w \right] \right\} 
798    && 
799\end{flalign*}
800\begin{flalign*}
801 \equiv 0 &&&
802\end{flalign*}
803
804Conservation of the variance of tracer
805\begin{flalign*}
806\int\limits_D T\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\
807\end{flalign*}
808\begin{flalign*}
809\equiv& \sum\limits_{i,j,k} T\;
810   \left\{
811      \delta_\left[ e_{2u}\,e_{3u} \overline T^{\,i+1/2}\,u \right]
812   + \delta_\left[ e_{1v}\,e_{3v} \overline T^{\,j+1/2}\,v \right]
813   + \delta_k \left[ e_{1T}\,e_{2T} \overline T^{\,k+1/2}w \right]
814   \right\} 
815   && \\
816\end{flalign*}
817\begin{flalign*}
818\equiv \sum\limits_{i,j,k} 
819   \left\{
820   -           e_{2u}\,e_{3u} \overline T^{\,i+1/2}\,u\,\delta_{i+1/2}  \left[ T \right] \right.
821   -&        e_{1v}\,e_{3v}  \overline T^{\,j+1/2}\,v\;\delta_{j+1/2}  \left[ T \right]
822    &&\\
823   -& \left. e_{1T}\,e_{2T} \overline T^{\,k+1/2}w\;\delta_{k+1/2} \left[ T \right]
824   \right\} 
825   &&\\
826\end{flalign*}
827\begin{flalign*}
828\equiv&  -\frac{1} {2}  \sum\limits_{i,j,k}
829   \Bigl\{
830      e_{2u}\,e_{3u} \;  u\;\delta_{i+1/2} \left[ T^2 \right]
831   + e_{1v}\,e_{3v} \;  v\;\delta_{j+1/2}  \left[ T^2 \right]
832   + e_{1T}\,e_{2T} \;w\;\delta_{k+1/2} \left[ T^2 \right]
833   \Bigr\} 
834   && \\ 
835\end{flalign*}
836\begin{flalign*}
837\equiv& \frac{1} {2}  \sum\limits_{i,j,k} T^2
838   \Bigl\{
839      \delta_\left[ e_{2u}\,e_{3u}\,u \right]
840   + \delta_\left[ e_{1v}\,e_{3v}\,v \right]
841   + \delta_k \left[ e_{1T}\,e_{2T}\,w \right]
842   \Bigr\} 
843   &&\\
844\end{flalign*}
845\begin{flalign*}
846\equiv 0 &&&
847\end{flalign*}
848
849
850% ================================================================
851% Conservation Properties on Lateral Momentum Physics
852% ================================================================
853\section{Conservation Properties on Lateral Momentum Physics}
854\label{Apdx_C.3}
855
856
857The discrete formulation of the horizontal diffusion of momentum ensures the
858conservation of potential vorticity and horizontal divergence and the
859dissipation of the square of these quantities (i.e. enstrophy and the
860variance of the horizontal divergence) as well as the dissipation of the
861horizontal kinetic energy. In particular, when the eddy coefficients are
862horizontally uniform, it ensures a complete separation of vorticity and
863horizontal divergence fields, so that diffusion (dissipation) of vorticity
864(enstrophy) does not generate horizontal divergence (variance of the
865horizontal divergence) and \textit{vice versa}.
866
867These properties of the horizontal diffusive operator are a direct
868consequence of properties (II.1.8) and (II.1.9). When the vertical curl of
869the horizontal diffusion of momentum (discrete sense) is taken, the term
870associated to the horizontal gradient of the divergence is zero locally.
871
872% -------------------------------------------------------------------------------------------------------------
873%       Conservation of Potential Vorticity
874% -------------------------------------------------------------------------------------------------------------
875\subsection{Conservation of Potential Vorticity}
876\label{Apdx_C.3.1}
877
878The lateral momentum diffusion term conserves the potential vorticity :
879\begin{flalign*}
880\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 
881   \Bigl[ \nabla_h
882      \left( A^{\,lm}\;\chi  \right)
883   - \nabla_h \times
884      \left( A^{\,lm}\;\zeta \; \textbf{k} \right)
885   \Bigr]\;dv &&& \\
886\end{flalign*}
887\begin{flalign*}
888= \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times 
889   \Bigl[ \nabla_h \times 
890      \left( A^{\,lm}\;\zeta \; \textbf{k} \right)
891   \Bigr]\;dv &&& \\ 
892\end{flalign*}
893
894\begin{flalign*}
895\equiv& \sum\limits_{i,j}
896   \left\{
897   \delta_{i+1/2} 
898   \left[
899   \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i
900      \left[ A_f^{\,lm} e_{3f} \zeta  \right]
901    \right]
902   + \delta_{j+1/2} 
903   \left[
904   \frac {e_{1u}} {e_{2u}\,e_{3u}} \delta_j
905      \left[ A_f^{\,lm} e_{3f} \zeta  \right]
906   \right]
907   \right\} 
908   && \\ 
909\end{flalign*}
910Using (II.1.10), it follows:
911
912\begin{flalign*}
913\equiv& \sum\limits_{i,j,k} 
914   -\,\left\{
915      \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i
916      \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right]
917   + \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j
918      \left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right]
919   \right\} \quad \equiv 0
920   && \\ 
921\end{flalign*}
922
923% -------------------------------------------------------------------------------------------------------------
924%       Dissipation of Horizontal Kinetic Energy
925% -------------------------------------------------------------------------------------------------------------
926\subsection{Dissipation of Horizontal Kinetic Energy}
927\label{Apdx_C.3.2}
928
929
930The lateral momentum diffusion term dissipates the horizontal kinetic
931energy:
932\begin{flalign*}
933\int_D \textbf{U}_h \cdot 
934   \left[ \nabla_h
935      \left( A^{\,lm}\;\chi \right)
936   - \nabla_h \times 
937      \left( A^{\,lm}\;\zeta \;\textbf{k} \right)
938   \right]\;dv &&& \\
939\end{flalign*}
940\begin{flalign*}
941\equiv \sum\limits_{i,j,k} \quad
942   &\left\{
943   \frac{1} {e_{1u}}            \delta_{i+1/2}
944      \left[ A_T^{\,lm} \chi  \right]
945   - \frac{1} {e_{2u}\,e_{3u}}  \delta_j
946      \left[ A_f^{\,lm} e_{3f} \zeta   \right]
947   \right\}\; 
948   e_{1u}\,e_{2u}\,e_{3u} \;u
949    &&\\
950   & + \left\{
951   \frac{1} {e_{2u}}             \delta_{j+1/2}
952      \left[ A_T^{\,lm} \chi  \right] 
953   + \frac{1} {e_{1v}\,e_{3v}} \delta_i
954   \left[ A_f^{\,lm} e_{3f} \zeta  \right] 
955   \right\}\; 
956   e_{1v}\,e_{2u}\,e_{3v} \;
957   && \\ 
958\end{flalign*}
959\begin{flalign*} 
960\equiv \sum\limits_{i,j,k} \quad
961   &\left\{
962     e_{2u}\,e_{3u} \;u\;\delta_{i+1/2} 
963      \left[ A_T^{\,lm} \chi  \right]
964   - e_{1u} \;u\;\delta_j
965      \left[ A_f^{\,lm} e_{3f} \zeta  \right]
966    \right\} 
967    &&\\ 
968   & + \left\{
969      e_{1v}\,e_{3v} \;v\;\delta_{j+1/2} 
970      \left[ A_T^{\,lm} \chi  \right]
971   + e_{2v} \;v\;\delta_i
972      \left[ A_f^{\,lm} e_{3f} \zeta  \right]
973   \right\} 
974   &&\\ 
975\end{flalign*}
976\begin{flalign*}
977\equiv \sum\limits_{i,j,k} \quad
978   -& \Bigl(
979     \delta_i
980      \left[ e_{2u}\,e_{3u} \;u \right]
981   + \delta_j
982      \left[ e_{1v}\,e_{3v} \;v \right] 
983        \Bigr)\;
984   A_T^{\,lm} \chi 
985   && \\ 
986   -& \Bigl(
987     \delta_{i+1/2} 
988      \left[ e_{2v} \;v \right]
989   - \delta_{j+1/2} 
990      \left[ e_{1u} \;u \right] 
991        \Bigr)\;
992   A_f^{\,lm} e_{3f} \zeta 
993   &&\\ 
994\end{flalign*}
995\begin{flalign*}
996\equiv \sum\limits_{i,j,k} 
997   - A_T^{\,lm} \,\chi^2   \;e_{1T}\,e_{2T}\,e_{3T}
998   - A_f^{\,lm}  \,\zeta^2 \;e_{1f}\,e_{2f}\,e_{3f} 
999   \quad \leq 0
1000   &&&\\
1001\end{flalign*}
1002
1003% -------------------------------------------------------------------------------------------------------------
1004%       Dissipation of Enstrophy
1005% -------------------------------------------------------------------------------------------------------------
1006\subsection{Dissipation of Enstrophy}
1007\label{Apdx_C.3.3}
1008
1009
1010The lateral momentum diffusion term dissipates the enstrophy when the eddy
1011coefficients are horizontally uniform:
1012\begin{flalign*}
1013\int\limits_\zeta \; \textbf{k} \cdot \nabla \times 
1014   \left[
1015     \nabla_h
1016      \left( A^{\,lm}\;\chi  \right)
1017   -\nabla_h \times 
1018      \left( A^{\,lm}\;\zeta \; \textbf{k} \right)
1019   \right]\;dv &&&\\
1020\end{flalign*}
1021\begin{flalign*}
1022 = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times 
1023   \left[
1024   \nabla_h \times 
1025      \left( \zeta \; \textbf{k} \right)
1026   \right]\;dv &&&\\
1027\end{flalign*}
1028\begin{flalign*}
1029\equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f} 
1030   \left\{
1031     \delta_{i+1/2} 
1032   \left[
1033   \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i
1034      \left[ e_{3f} \zeta  \right]
1035   \right]
1036   + \delta_{j+1/2} 
1037   \left[
1038   \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j
1039      \left[ e_{3f} \zeta  \right]
1040   \right]
1041   \right\} 
1042   &&&\\ 
1043\end{flalign*}
1044Using (II.1.10), it becomes~:
1045
1046\begin{flalign*}
1047\equiv  - A^{\,lm} \sum\limits_{i,j,k} 
1048   \left\{
1049     \left(
1050     \frac{1} {e_{1v}\,e_{3v}}  \delta_i
1051      \left[ e_{3f} \zeta  \right] 
1052     \right)^2   e_{1v}\,e_{2v}\,e_{3v}
1053   + \left(
1054     \frac{1} {e_{2u}\,e_{3u}}  \delta_j
1055      \left[ e_{3f} \zeta  \right]
1056     \right)^2   e_{1u}\,e_{2u}\,e_{3u}
1057     \right\} 
1058     \; \leq \;0
1059     &&&\\ 
1060\end{flalign*}
1061
1062% -------------------------------------------------------------------------------------------------------------
1063%       Conservation of Horizontal Divergence
1064% -------------------------------------------------------------------------------------------------------------
1065\subsection{Conservation of Horizontal Divergence}
1066\label{Apdx_C.3.4}
1067
1068When the horizontal divergence of the horizontal diffusion of momentum
1069(discrete sense) is taken, the term associated to the vertical curl of the
1070vorticity is zero locally, due to (II.1.8). The resulting term conserves the
1071$\chi$ and dissipates $\chi^2$ when the eddy coefficients are
1072horizontally uniform.
1073\begin{flalign*}
1074  \int\limits_\nabla_h \cdot 
1075   \Bigl[
1076     \nabla_h
1077      \left( A^{\,lm}\;\chi \right)
1078   - \nabla_h \times 
1079      \left( A^{\,lm}\;\zeta \;\textbf{k} \right)
1080   \Bigr]
1081   dv
1082= \int\limits_\nabla_h \cdot \nabla_h
1083   \left( A^{\,lm}\;\chi  \right)
1084   dv
1085&&&\\
1086\end{flalign*}
1087\begin{flalign*}
1088\equiv \sum\limits_{i,j,k} 
1089   \left\{ 
1090     \delta_i
1091      \left[
1092      A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} 
1093         \left[ \chi \right] 
1094      \right]
1095   + \delta_j
1096      \left[
1097      A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} 
1098         \left[ \chi \right] 
1099      \right]
1100   \right\}
1101   &&&\\ 
1102\end{flalign*}
1103Using (II.1.10), it follows:
1104
1105\begin{flalign*}
1106\equiv \sum\limits_{i,j,k} 
1107   - \left\{
1108   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2} 
1109      \left[ \chi \right]
1110   \delta_{i+1/2} 
1111      \left[ 1 \right] 
1112   + \frac{e_{1v}\,e_{3v}} {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} 
1113      \left[ \chi \right]
1114   \delta_{j+1/2} 
1115      \left[ 1 \right]
1116   \right\} \;
1117   \equiv 0
1118   &&& \\ 
1119\end{flalign*}
1120
1121% -------------------------------------------------------------------------------------------------------------
1122%       Dissipation of Horizontal Divergence Variance
1123% -------------------------------------------------------------------------------------------------------------
1124\subsection{Dissipation of Horizontal Divergence Variance}
1125\label{Apdx_C.3.5}
1126
1127\begin{flalign*}
1128      \int\limits_D \chi \;\nabla_h \cdot 
1129   \left[
1130     \nabla_h
1131      \left( A^{\,lm}\;\chi  \right)
1132   - \nabla_h \times 
1133      \left( A^{\,lm}\;\zeta \;\textbf{k} \right)
1134   \right]\;
1135   dv
1136 = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h
1137   \left( \chi \right)\;
1138   dv
1139&&&\\ 
1140\end{flalign*}
1141
1142\begin{flalign*}
1143\equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1T}\,e_{2T}\,e_{3T}}  \chi 
1144   \left\{
1145   \delta_i
1146   \left[
1147   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} 
1148      \left[ \chi \right] 
1149   \right]
1150   + \delta_j
1151   \left[
1152   \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} 
1153      \left[ \chi \right]
1154   \right]
1155   \right\} \;
1156   e_{1T}\,e_{2T}\,e_{3T} 
1157   &&&\\ 
1158\end{flalign*}
1159Using (II.1.10), it turns out to be:
1160
1161\begin{flalign*}
1162\equiv - A^{\,lm} \sum\limits_{i,j,k}
1163   \left\{ 
1164   \left(
1165   \frac{1} {e_{1u}}  \delta_{i+1/2} 
1166      \left[ \chi \right]
1167   \right)^2   
1168   e_{1u}\,e_{2u}\,e_{3u}
1169   + \left(
1170   \frac{1} {e_{2v}}  \delta_{j+1/2} 
1171      \left[ \chi \right]
1172   \right)^2
1173   e_{1v}\,e_{2v}\,e_{3v}
1174   \right\} \; 
1175   \leq 0
1176   &&&\\
1177\end{flalign*}
1178
1179% ================================================================
1180% Conservation Properties on Vertical Momentum Physics
1181% ================================================================
1182\section{Conservation Properties on Vertical Momentum Physics}
1183\label{Apdx_C_4}
1184
1185
1186As for the lateral momentum physics, the continuous form of the vertical diffusion of momentum satisfies the several integral constraints. The first two are associated to the conservation of momentum and the dissipation of horizontal kinetic energy:
1187\begin{flalign*}
1188 \int\limits_
1189    \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1190   \left(
1191   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}
1192   \right)\;
1193   dv \quad  = \vec{\textbf{0}}
1194   &&&\\
1195\end{flalign*}
1196and
1197\begin{flalign*}
1198\int\limits_D
1199   \textbf{U}_h \cdot 
1200   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1201   \left(
1202   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}
1203   \right)\;
1204   dv \quad \leq 0
1205   &&&\\
1206\end{flalign*}
1207The first property is obvious. The second results from:
1208
1209\begin{flalign*}
1210\int\limits_D
1211   \textbf{U}_h \cdot 
1212   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1213   \left(
1214   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1215   \right)\;dv
1216   &&&\\
1217\end{flalign*}
1218\begin{flalign*}
1219\equiv \sum\limits_{i,j,k} 
1220   \left(
1221     u\; \delta_k
1222      \left[
1223      \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1224         \left[ u \right] 
1225      \right]\;
1226      e_{1u}\,e_{2u} 
1227   + v\;\delta_k
1228      \left[
1229      \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1230         \left[ v \right] 
1231      \right]\;
1232      e_{1v}\,e_{2v} 
1233   \right)
1234   &&&\\ 
1235\end{flalign*}
1236as the horizontal scale factor do not depend on $k$, it follows:
1237
1238\begin{flalign*}
1239\equiv - \sum\limits_{i,j,k} 
1240   \left(
1241      \frac{A_u^{\,vm}} {e_{3uw}}
1242      \left(
1243      \delta_{k+1/2} 
1244         \left[ u \right] 
1245      \right)^2\;
1246      e_{1u}\,e_{2u} 
1247   + \frac{A_v^{\,vm}} {e_{3vw}} 
1248      \left( \delta_{k+1/2} 
1249         \left[ v \right] 
1250      \right)^2\;
1251      e_{1v}\,e_{2v}
1252   \right)
1253    \quad \leq 0
1254    &&&\\
1255\end{flalign*}
1256The vorticity is also conserved. Indeed:
1257\begin{flalign*}
1258\int \limits_D
1259   \frac{1} {e_3 } \textbf{k} \cdot \nabla \times 
1260      \left(
1261      \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1262         \left(
1263         \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k} 
1264         \right)
1265      \right)\;
1266      dv
1267      &&&\\ 
1268\end{flalign*}
1269\begin{flalign*}
1270\equiv \sum\limits_{i,j,k}  \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}}
1271   \bigg\{    \biggr.   \quad
1272   \delta_{i+1/2} 
1273      &\left(
1274      \frac{e_{2v}} {e_{3v}} \delta_k
1275         \left[
1276         \frac{1} {e_{3vw}} \delta_{k+1/2} 
1277            \left[ v \right] 
1278         \right]
1279      \right)
1280    &&\\
1281   \biggl.
1282   - \delta_{j+1/2} 
1283      &\left(
1284      \frac{e_{1u}} {e_{3u}} \delta_k
1285         \left[
1286         \frac{1} {e_{3uw}}\delta_{k+1/2} 
1287            \left[ u \right]
1288         \right]
1289      \right)
1290   \biggr\} \;
1291   e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0
1292   && \\
1293\end{flalign*}
1294If the vertical diffusion coefficient is uniform over the whole domain, the
1295enstrophy is dissipated, i.e.
1296\begin{flalign*}
1297\int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 
1298   \left(
1299   \frac{1} {e_3}\; \frac{\partial } {\partial k}
1300      \left(
1301      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1302      \right)
1303   \right)\;
1304   dv = 0
1305   &&&\\
1306\end{flalign*}
1307This property is only satisfied in $z$-coordinates:
1308
1309\begin{flalign*}
1310\int\limits_D \zeta \, \textbf{k} \cdot \nabla \times 
1311   \left(
1312   \frac{1} {e_3}\; \frac{\partial } {\partial k}
1313      \left(
1314      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1315      \right)
1316   \right)\;
1317   dv
1318   &&& \\ 
1319\end{flalign*}
1320\begin{flalign*}
1321\equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \;
1322   \biggl\{    \biggr\quad
1323   \delta_{i+1/2} 
1324      &\left(
1325         \frac{e_{2v}} {e_{3v}} \delta_k
1326         \left[
1327         \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1328            \left[ v \right] 
1329         \right]
1330         \right)
1331         &&\\
1332   - \delta_{j+1/2} 
1333      &\biggl.
1334      \left(   
1335         \frac{e_{1u}} {e_{3u}} \delta_k
1336         \left[
1337         \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1338            \left[ u \right]
1339          \right]
1340         \right)
1341   \biggr\} 
1342   &&\\ 
1343\end{flalign*}
1344\begin{flalign*}
1345\equiv \sum\limits_{i,j,k} \zeta \;e_{3f} 
1346   \biggl\{    \biggr\quad
1347   \frac{1} {e_{3v}} \delta_k
1348      &\left[
1349      \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1350         \left[ \delta_{i+1/2} 
1351            \left[ e_{2v}\,v \right]
1352          \right]
1353      \right]
1354      &&\\ 
1355    \biggl.
1356   - \frac{1} {e_{3u}} \delta_k
1357      &\left[
1358      \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1359         \left[ \delta_{j+1/2} 
1360            \left[ e_{1u}\,u \right]
1361          \right]
1362      \right]
1363   \biggr\} 
1364   &&\\ 
1365\end{flalign*}
1366Using 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:
1367\begin{flalign*}
1368\equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k
1369   \left[
1370   \frac{1} {e_{3w}} \delta_{k+1/2} 
1371      \Bigl[
1372      \delta_{i+1/2} 
1373         \left[ e_{2v}\,v \right]
1374      - \delta_{j+1/ 2} 
1375         \left[ e_{1u}\,u \right]
1376       \Bigr]
1377   \right]
1378   &&&\\
1379\end{flalign*}
1380\begin{flalign*}
1381\equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}}
1382   \left(
1383   \delta_{k+1/2} 
1384      \left[ \zeta  \right]
1385    \right)^2 \;
1386    e_{1f}\,e_{2f} 
1387    \; \leq 0
1388    &&&\\
1389\end{flalign*}
1390Similarly, the horizontal divergence is obviously conserved:
1391
1392\begin{flalign*}
1393\int\limits_D \nabla \cdot 
1394   \left(
1395   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1396      \left(
1397      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1398      \right)
1399   \right)\;
1400   dv = 0
1401   &&&\\
1402\end{flalign*}
1403and the square of the horizontal divergence decreases (i.e. the horizontal divergence is dissipated) if vertical diffusion coefficient is uniform over the whole domain:
1404
1405\begin{flalign*}
1406\int\limits_D \chi \;\nabla \cdot 
1407   \left(
1408   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1409      \left(
1410      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1411      \right)
1412   \right)\;
1413   dv = 0
1414   &&&\\
1415\end{flalign*}
1416This property is only satisfied in $z$-coordinates:
1417
1418\begin{flalign*}
1419\int\limits_D \chi \;\nabla \cdot 
1420   \left(
1421   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
1422      \left(
1423      \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} 
1424      \right)
1425   \right)\;
1426   dv
1427   &&&\\
1428\end{flalign*}
1429\begin{flalign*}
1430\equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1T}\,e_{2T}}
1431   \biggl\{    \Biggr\quad
1432   \delta_{i+1/2} 
1433      &\left(
1434         \frac{e_{2u}} {e_{3u}} \delta_k
1435            \left[
1436         \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} 
1437            \left[ u \right] 
1438         \right]
1439       \right)
1440       &&\\ 
1441   \Biggl.
1442   + \delta_{j+1/2} 
1443      &\left(
1444      \frac{e_{1v}} {e_{3v}} \delta_k
1445         \left[
1446         \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} 
1447            \left[ v \right]
1448          \right]
1449      \right)
1450   \Biggr\} \;
1451   e_{1T}\,e_{2T}\,e_{3T} 
1452   &&\\ 
1453\end{flalign*}
1454
1455\begin{flalign*}
1456\equiv A^{\,vm} \sum\limits_{i,j,k}  \chi \,
1457   \biggl\{ \biggr\quad
1458   \delta_{i+1/2}
1459      &\left(
1460         \delta_k
1461         \left[
1462         \frac{1} {e_{3uw}} \delta_{k+1/2} 
1463            \left[ e_{2u}\,u \right]
1464          \right]
1465         \right)
1466         && \\ 
1467   \biggl.
1468   + \delta_{j+1/2} 
1469      &\left(
1470         \delta_k
1471         \left[
1472         \frac{1} {e_{3vw}} \delta_{k+1/2} 
1473            \left[ e_{1v}\,v \right]
1474          \right]
1475         \right)
1476   \biggr\} 
1477   && \\ 
1478\end{flalign*}
1479
1480\begin{flalign*}
1481\equiv -A^{\,vm} \sum\limits_{i,j,k} 
1482\frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\;
1483   \biggl\{ 
1484   \delta_{k+1/2} 
1485      \Bigl[
1486         \delta_{i+1/2} 
1487         \left[ e_{2u}\,u \right]
1488      + \delta_{j+1/2} 
1489         \left[ e_{1v}\,v \right]
1490      \Bigr]
1491   \biggr\} 
1492   &&&\\
1493\end{flalign*}
1494
1495\begin{flalign*}
1496\equiv -A^{\,vm} \sum\limits_{i,j,k}
1497 \frac{1} {e_{3w}} 
1498\delta_{k+1/2} 
1499   \left[ \chi \right]\;
1500\delta_{k+1/2} 
1501   \left[ e_{1T}\,e_{2T} \;\chi \right]
1502&&&\\
1503\end{flalign*}
1504
1505\begin{flalign*}
1506\equiv -A^{\,vm} \sum\limits_{i,j,k} 
1507\frac{e_{1T}\,e_{2T}} {e_{3w}}\;
1508   \left(
1509   \delta_{k+1/2} 
1510      \left[ \chi \right]
1511   \right)^2
1512   \quad  \equiv 0
1513&&&\\
1514\end{flalign*}
1515
1516% ================================================================
1517% Conservation Properties on Tracer Physics
1518% ================================================================
1519\section{Conservation Properties on Tracer Physics}
1520\label{Apdx_C.5}
1521
1522
1523
1524The 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.
1525
1526% -------------------------------------------------------------------------------------------------------------
1527%       Conservation of Tracers
1528% -------------------------------------------------------------------------------------------------------------
1529\subsection{Conservation of Tracers}
1530\label{Apdx_C.5.1}
1531
1532constraint of conservation of tracers:
1533\begin{flalign*}
1534\int\limits_D  T\;\nabla  \cdot \left( A\;\nabla T \right)\;dv  &&&\\ 
1535\end{flalign*}
1536\begin{flalign*}
1537\equiv \sum\limits_{i,j,k} 
1538   \biggl\{    \biggr.
1539   \delta_i
1540      \left[
1541      A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} 
1542         \left[ T \right]
1543      \right]
1544   + \delta_j
1545      &\left[
1546      A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} 
1547         \left[ T \right] 
1548      \right]
1549   &&\\ 
1550   \biggl.
1551   + \delta_k
1552      &\left[
1553      A_w^{\,vT} \frac{e_{1T}\,e_{2T}} {e_{3T}} \delta_{k+1/2} 
1554         \left[ T \right] 
1555      \right]
1556   \biggr\} 
1557   &&\\ 
1558\end{flalign*}
1559\begin{flalign*}
1560\equiv 0 &&&\\
1561\end{flalign*}
1562
1563
1564% -------------------------------------------------------------------------------------------------------------
1565%       Dissipation of Tracer Variance
1566% -------------------------------------------------------------------------------------------------------------
1567\subsection{Dissipation of Tracer Variance}
1568\label{Apdx_C.5.2}
1569
1570constraint of dissipation of tracer variance:
1571\begin{flalign*}
1572\int\limits_D T\;\nabla \cdot \left( A\;\nabla T \right)\;dv   &&&\\ 
1573\end{flalign*}
1574
1575\begin{flalign*}
1576\equiv \sum\limits_{i,j,k} T
1577   \biggl\{    \biggr.
1578   \delta_i
1579      \left[
1580      A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} 
1581         \left[ T \right] 
1582      \right]
1583   + \delta_j
1584      &\left[
1585      A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2} 
1586         \left[ T \right] 
1587      \right]
1588      && \\ 
1589    \biggl.
1590    + \delta_k
1591      &\left[
1592      A_w^{\,vT} \frac{e_{1T}\,e_{2T}} {e_{3T}} \delta_{k+1/2} 
1593         \left[ T \right] 
1594      \right]
1595   \biggr\} 
1596   &&\\ 
1597\end{flalign*}
1598
1599\begin{flalign*}
1600\equiv - \sum\limits_{i,j,k} 
1601   \biggl\{    \biggr\quad
1602   & A_u^{\,lT} 
1603      \left(
1604      \frac{1} {e_{1u}} \delta_{i+1/2} 
1605         \left[ T \right]
1606      \right)^2
1607      e_{1u}\,e_{2u}\,e_{3u}
1608   && \\
1609   & + A_v^{\,lT} 
1610      \left(
1611      \frac{1} {e_{2v}} \delta_{j+1/2} 
1612         \left[ T \right] 
1613      \right)^2
1614      e_{1v}\,e_{2v}\,e_{3v}
1615   && \\ 
1616   \biggl.
1617   & + A_w^{\,vT} 
1618      \left(
1619      \frac{1} {e_{3w}} \delta_{k+1/2} 
1620         \left[ T \right] 
1621      \right)^2
1622      e_{1w}\,e_{2w}\,e_{3w} 
1623   \biggr\} 
1624   \quad \leq 0
1625   && \\ 
1626\end{flalign*}
1627
Note: See TracBrowser for help on using the repository browser.