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

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
apdx_algos.tex in NEMO/trunk/doc/latex/NEMO/subfiles – NEMO

source: NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex @ 11596

Last change on this file since 11596 was 11596, checked in by nicolasmartin, 5 years ago

Application of some coding rules

  • Replace comments before sectioning cmds by a single line of 100 characters long to display when every line should break
  • Replace multi blank lines by one single blank line
  • For list environment, put \item, label and content on the same line
  • Remove \newpage and comments line around figure envs
File size: 39.3 KB
Line 
1\documentclass[../main/NEMO_manual]{subfiles}
2
3\begin{document}
4\chapter{Note on some algorithms}
5\label{apdx:ALGOS}
6
7\chaptertoc
8
9This appendix some on going consideration on algorithms used or planned to be used in \NEMO.
10
11\section{Upstream Biased Scheme (UBS) (\protect\np[=.true.]{ln_traadv_ubs}{ln\_traadv\_ubs})}
12\label{sec:ALGOS_tra_adv_ubs}
13
14The UBS advection scheme is an upstream biased third order scheme based on
15an upstream-biased parabolic interpolation.
16It is also known as Cell Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective Kinematics).
17For example, in the $i$-direction:
18\begin{equation}
19  \label{eq:ALGOS_tra_adv_ubs2}
20  \tau_u^{ubs} = \left\{
21    \begin{aligned}
22      & \tau_u^{cen4} + \frac{1}{12} \,\tau"_i     & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\
23      & \tau_u^{cen4} - \frac{1}{12} \,\tau"_{i+1} & \quad \text{if }\ u_{i+1/2}       <       0
24    \end{aligned}
25  \right.
26\end{equation}
27or equivalently, the advective flux is
28\begin{equation}
29  \label{eq:ALGOS_tra_adv_ubs2}
30  U_{i+1/2} \ \tau_u^{ubs}
31  =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2}
32  - \frac{1}{2}\, |U|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
33\end{equation}
34where $U_{i+1/2} = e_{1u}\,e_{3u}\,u_{i+1/2}$ and
35$\tau "_i =\delta_i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$.
36By choosing this expression for $\tau "$ we consider a fourth order approximation of $\partial_i^2$ with
37a constant i-grid spacing ($\Delta i=1$).
38
39Alternative choice: introduce the scale factors:
40$\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} }\delta_{i+1/2}[\tau] \right]$.
41
42This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error
43\citep{shchepetkin.mcwilliams_OM05}.
44The overall performance of the advection scheme is similar to that reported in \cite{farrow.stevens_JPO95}.
45It is a relatively good compromise between accuracy and smoothness.
46It is not a \emph{positive} scheme meaning false extrema are permitted but
47the amplitude of such are significantly reduced over the centred second order method.
48Nevertheless it is not recommended to apply it to a passive tracer that requires positivity.
49
50The intrinsic diffusion of UBS makes its use risky in the vertical direction where
51the control of artificial diapycnal fluxes is of paramount importance.
52It has therefore been preferred to evaluate the vertical flux using the TVD scheme when
53\np[=.true.]{ln_traadv_ubs}{ln\_traadv\_ubs}.
54
55For stability reasons, in \autoref{eq:TRA_adv_ubs}, the first term which corresponds to
56a second order centred scheme is evaluated using the \textit{now} velocity (centred in time) while
57the second term which is the diffusive part of the scheme, is evaluated using the \textit{before} velocity
58(forward in time).
59This is discussed by \citet{webb.de-cuevas.ea_JAOT98} in the context of the Quick advection scheme.
60UBS and QUICK schemes only differ by one coefficient.
61Substituting 1/6 with 1/8 in (\autoref{eq:TRA_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}.
62This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded.
63Nevertheless it is quite easy to make the substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme.
64
65NB 1: When a high vertical resolution $O(1m)$ is used, the model stability can be controlled by vertical advection
66(not vertical diffusion which is usually solved using an implicit scheme).
67Computer time can be saved by using a time-splitting technique on vertical advection.
68This possibility have been implemented and validated in ORCA05-L301.
69It is not currently offered in the current reference version.
70
71NB 2: In a forthcoming release four options will be proposed for the vertical component used in the UBS scheme.
72$\tau_w^{ubs}$ will be evaluated using either \textit{(a)} a centered $2^{nd}$ order scheme,
73or \textit{(b)} a TVD scheme, or \textit{(c)} an interpolation based on conservative parabolic splines following
74\citet{shchepetkin.mcwilliams_OM05} implementation of UBS in ROMS, or \textit{(d)} an UBS.
75The $3^{rd}$ case has dispersion properties similar to an eight-order accurate conventional scheme.
76
77NB 3: It is straight forward to rewrite \autoref{eq:TRA_adv_ubs} as follows:
78\begin{equation}
79  \label{eq:ALGOS_tra_adv_ubs2}
80  \tau_u^{ubs} = \left\{
81    \begin{aligned}
82      & \tau_u^{cen4} + \frac{1}{12} \tau"_i    & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\
83      & \tau_u^{cen4} - \frac{1}{12} \tau"_{i+1}   & \quad \text{if }\ u_{i+1/2}       <       0
84    \end{aligned}
85  \right.
86\end{equation}
87or equivalently
88\begin{equation}
89  \label{eq:ALGOS_tra_adv_ubs2}
90  \begin{split}
91    e_{2u} e_{3u}\,u_{i+1/2} \ \tau_u^{ubs}
92    &= e_{2u} e_{3u}\,u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\tau"_i }^{\,i+1/2} \\
93    & - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
94  \end{split}
95\end{equation}
96\autoref{eq:TRA_adv_ubs2} has several advantages.
97First it clearly evidences that the UBS scheme is based on the fourth order scheme to which
98is added an upstream biased diffusive term.
99Second, this emphasises that the $4^{th}$ order part have to be evaluated at \emph{now} time step,
100not only the $2^{th}$ order part as stated above using \autoref{eq:TRA_adv_ubs}.
101Third, the diffusive term is in fact a biharmonic operator with a eddy coefficient which
102is simply proportional to the velocity.
103
104laplacian diffusion:
105\begin{equation}
106  \label{eq:ALGOS_tra_ldf_lap}
107  \begin{split}
108    D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\;  e_{3T} } &\left[ {\quad \delta_i
109        \left[ {A_u^{lT} \frac{e_{2u} e_{3u} }{e_{1u} }\;\delta_{i+1/2}
110            \left[ T \right]} \right]} \right. \\
111    &\ \left. {+\; \delta_j \left[
112          {A_v^{lT} \left( {\frac{e_{1v} e_{3v} }{e_{2v} }\;\delta_{j+1/2} \left[ T
113                \right]} \right)} \right]\quad } \right]
114  \end{split}
115\end{equation}
116
117bilaplacian:
118\begin{equation}
119  \label{eq:ALGOS_tra_ldf_lap}
120  \begin{split}
121    D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
122    & \delta_i \left\sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2}
123      \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
124        \delta_i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2}
125          [T] \right] \right] \right]
126  \end{split}
127\end{equation}
128with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$,
129\ie\ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$
130it comes:
131\begin{equation}
132  \label{eq:ALGOS_tra_ldf_lap}
133  \begin{split}
134    D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
135    & \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2}
136      \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
137        \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2}
138          [T] \right] \right] \right]
139  \end{split}
140\end{equation}
141if the velocity is uniform (\ie\ $|u|=cst$) then the diffusive flux is
142\begin{equation}
143  \label{eq:ALGOS_tra_ldf_lap}
144  \begin{split}
145    F_u^{lT} = - \frac{1}{12}
146    e_{2u}\,e_{3u}\,|u| \;\sqrt{ e_{1u}}\,\delta_{i+1/2}
147    \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
148      \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}}\:\delta_{i+1/2}
149        [T] \right] \right]
150  \end{split}
151\end{equation}
152beurk....  reverte the logic: starting from the diffusive part of the advective flux it comes:
153
154\begin{equation}
155  \label{eq:ALGOS_tra_adv_ubs2}
156  \begin{split}
157    F_u^{lT} &= - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
158  \end{split}
159\end{equation}
160if the velocity is uniform (\ie\ $|u|=cst$) and
161choosing $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right]$
162
163sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$):
164\begin{equation}
165  \label{eq:ALGOS_tra_adv_ubs2}
166  \begin{split}
167    F_u^{lT} &= - \frac{1}{12} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{e_{1T}^3\,|u|}{e_{1T}e_{2T}\,e_{3T}}\,\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right]
168  \end{split}
169\end{equation}
170which leads to ${A_T^{lT}}^2 = \frac{1}{12} {e_{1T}}^3\ \overline{|u|}^{\,i+1/2}$
171
172sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$
173\begin{equation}
174  \label{eq:ALGOS_tra_adv_ubs2}
175  \begin{split}
176    F_u^{lT} &= - \frac{1}{12} {e_{1u}}^1 \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{2T}\,e_{3T}}\,\delta_i \left[ \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right] \\
177    &= - \frac{1}{12} e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{1T}\,e_{2T}\,e_{3T}}\,\delta_i \left[ e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u} }{e_{1u}} \delta_{i+1/2}[\tau] \right] \right]
178  \end{split}
179\end{equation}
180which leads to ${A_u^{lT}} = \frac{1}{12} {e_{1u}}^3\ |u|$
181
182\section{Leapfrog energetic}
183\label{sec:ALGOS_LF}
184
185We adopt the following semi-discrete notation for time derivative.
186Given the values of a variable $q$ at successive time step,
187the time derivation and averaging operators at the mid time step are:
188\[
189  % \label{eq:ALGOS_dt_mt}
190  \begin{split}
191    \delta_{t+\rdt/2} [q]     &=  \  \ \,   q^{t+\rdt- q^{t}      \\
192    \overline q^{\,t+\rdt/2} &= \left\{ q^{t+\rdt} + q^{t} \right\} \; / \; 2
193  \end{split}
194\]
195As for space operator,
196the adjoint of the derivation and averaging time operators are $\delta_t^*=\delta_{t+\rdt/2}$ and
197$\overline{\cdot}^{\,t\,*}= \overline{\cdot}^{\,t+\Delta/2}$, respectively.
198
199The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as:
200\[
201  % \label{eq:ALGOS_LF}
202  \frac{\partial q}{\partial t}
203  \equiv \frac{1}{\rdt} \overline{ \delta_{t+\rdt/2}[q]}^{\,t}
204  =         \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt}
205\]
206Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$,
207not $2\rdt$ as it can be found sometimes in literature.
208The leap-Frog time stepping is a second order centered scheme.
209As such it respects the quadratic invariant in integral forms, \ie\ the following continuous property,
210\[
211  % \label{eq:ALGOS_Energy}
212  \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}
213  =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt}
214  =  \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) ,
215\]
216is satisfied in discrete form.
217Indeed,
218\[
219  \begin{split}
220    \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}
221    &\equiv \sum\limits_{0}^{N}
222    {\frac{1}{\rdt} q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} \ \rdt}
223    \equiv \sum\limits_{0}^{N}  { q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} } \\
224    &\equiv \sum\limits_{0}^{N}  { \overline{q}^{\,t+\Delta/2}{ \delta_{t+\rdt/2}[q]}}
225    \equiv \sum\limits_{0}^{N}  { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }\\
226    &\equiv \sum\limits_{0}^{N}  { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }
227    \equiv \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right)
228  \end{split}
229\]
230NB here pb of boundary condition when applying the adjoint!
231In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition
232(equivalently of the boundary value of the integration by part).
233In time this boundary condition is not physical and \textbf{add something here!!!}
234
235\section{Lateral diffusion operator}
236
237\subsection{Griffies iso-neutral diffusion operator}
238
239Let try to define a scheme that get its inspiration from the \citet{griffies.gnanadesikan.ea_JPO98} scheme,
240but is formulated within the \NEMO\ framework
241(\ie\ using scale factors rather than grid-size and having a position of $T$-points that
242is not necessary in the middle of vertical velocity points, see \autoref{fig:DOM_zgr_e3}).
243
244In the formulation \autoref{eq:TRA_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO,
245the off-diagonal terms of the small angle diffusion tensor contain several double spatial averages of a gradient,
246for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$.
247It is apparent that the combination of a $k$ average and a $k$ derivative of the tracer allows for
248the presence of grid point oscillation structures that will be invisible to the operator.
249These structures are \textit{computational modes}.
250They will not be damped by the iso-neutral operator, and even possibly amplified by it.
251In other word, the operator applied to a tracer does not warranties the decrease of its global average variance.
252To circumvent this, we have introduced a smoothing of the slopes of the iso-neutral surfaces
253(see \autoref{chap:LDF}).
254Nevertheless, this technique works fine for $T$ and $S$ as they are active tracers
255(\ie\ they enter the computation of density), but it does not work for a passive tracer.
256\citep{griffies.gnanadesikan.ea_JPO98} introduce a different way to discretise the off-diagonal terms that
257nicely solve the problem.
258The idea is to get rid of combinations of an averaged in one direction combined with
259a derivative in the same direction by considering triads.
260For example in the (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows:
261\begin{equation}
262  \label{eq:ALGOS_Gf_triads}
263  _i^k \mathbb{T}_{i_p}^{k_p} (T)
264  = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k     \left(
265    \frac{ \delta_{i + i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
266    -\ {_i^k \mathbb{R}_{i_p}^{k_p}} \ \frac{ \delta_{k+k_p} [T^i] }{ {e_{3w}}_{\,i}^{\,k+k_p} }
267  \right)
268\end{equation}
269where the indices $i_p$ and $k_p$ define the four triads and take the following value:
270$i_p = -1/2$ or $1/2$ and $k_p = -1/2$ or $1/2$,
271$b_u= e_{1u}\,e_{2u}\,e_{3u}$ is the volume of $u$-cells,
272$A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point,
273and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad:
274\begin{equation}
275  \label{eq:ALGOS_Gf_slopes}
276  _i^k \mathbb{R}_{i_p}^{k_p}
277  =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac
278  {\left(\alpha / \beta \right)_i^\ \delta_{i + i_p}[T^k] - \delta_{i + i_p}[S^k] }
279  {\left(\alpha / \beta \right)_i^\ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] }
280\end{equation}
281Note that in \autoref{eq:ALGOS_Gf_slopes} we use the ratio $\alpha / \beta$ instead of
282multiplying the temperature derivative by $\alpha$ and the salinity derivative by $\beta$.
283This is more efficient as the ratio $\alpha / \beta$ can to be evaluated directly.
284
285Note that in \autoref{eq:ALGOS_Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$.
286This choice has been motivated by the decrease of tracer variance and
287the presence of partial cell at the ocean bottom (see \autoref{subsec:ALGOS_Gf_operator}).
288
289\begin{figure}[!ht]
290  \centering
291  \includegraphics[width=0.66\textwidth]{Fig_ISO_triad}
292  \caption[Triads used in the Griffies's like iso-neutral diffision scheme for
293    $u$- and $w$-components)]{
294    Triads used in the Griffies's like iso-neutral diffision scheme for
295    $u$-component (upper panel) and $w$-component (lower panel).}
296  \label{fig:ALGOS_ISO_triad}
297\end{figure}
298
299The four iso-neutral fluxes associated with the triads are defined at $T$-point.
300They take the following expression:
301\begin{flalign*}
302  % \label{eq:ALGOS_Gf_fluxes}
303  \begin{split}
304    {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)
305    &= \ \; \qquad  \quad    { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+i_p}^{\,k}}    \\
306    {_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T)
307    &=  -\; { _i^k \mathbb{R}_{i_p}^{k_p} }
308    \ \; { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+k_p}}
309  \end{split}
310\end{flalign*}
311
312The resulting iso-neutral fluxes at $u$- and $w$-points are then given by
313the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:TRIADS_ISO_triad}):
314\begin{flalign}
315  \label{eq:ALGOS_iso_flux}
316  \textbf{F}_{iso}(T)
317  &\equiv  \sum_{\substack{i_p,\,k_p}}
318  \begin{pmatrix}
319    {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
320    {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T)
321  \end{pmatrix}
322  \notag \\
323  &  \notag \\
324  &\equiv  \sum_{\substack{i_p,\,k_p}}
325  \begin{pmatrix}
326    && { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+1/2}^{\,k} } \\ \\
327    & -\; { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }
328    & {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+1/2} }
329  \end{pmatrix}      % \\
330  % &\\
331  % &\equiv  \sum_{\substack{i_p,\,k_p}}
332  % \begin{pmatrix}
333  %   \qquad  \qquad  \qquad
334  %   \frac{1}{ {e_{1u}}_{\,i+1/2}^{\,k} }  \ \;
335  %   { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T)\\
336  %   \\
337  %   -\frac{1}{ {e_{3w}}_{\,i}^{\,k+1/2} }  \ \;
338  %   { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \;
339  %   {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T)\\
340  % \end{pmatrix}
341\end{flalign}
342resulting in a iso-neutral diffusion tendency on temperature given by
343the divergence of the sum of all the four triad fluxes:
344\begin{equation}
345  \label{eq:ALGOS_Gf_operator}
346  D_l^T = \frac{1}{b_T}  \sum_{\substack{i_p,\,k_p}} \left\{
347    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
348    + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]   \right\}
349\end{equation}
350where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells.
351
352This expression of the iso-neutral diffusion has been chosen in order to satisfy the following six properties:
353\begin{description}
354\item [$\bullet$ horizontal diffusion]
355  The discretization of the diffusion operator recovers the traditional five-point Laplacian in
356  the limit of flat iso-neutral direction:
357  \[
358    % \label{eq:ALGOS_Gf_property1a}
359    D_l^T = \frac{1}{b_T}  \ \delta_{i}
360    \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right]
361    \qquad  \text{when} \quad
362    { _i^k \mathbb{R}_{i_p}^{k_p} }=0
363  \]
364
365\item [$\bullet$ implicit treatment in the vertical]
366  In the diagonal term associated with the vertical divergence of the iso-neutral fluxes
367  \ie\ the term associated with a second order vertical derivative)
368  appears only tracer values associated with a single water column.
369  This is of paramount importance since it means that
370  the implicit in time algorithm for solving the vertical diffusion equation can be used to evaluate this term.
371  It is a necessity since the vertical eddy diffusivity associated with this term,
372  \[
373    \sum_{\substack{i_p, \,k_p}} \left\{
374      A_i^k \; \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
375    \right\}
376  \]
377  can be quite large.
378
379\item [$\bullet$ pure iso-neutral operator]
380  The iso-neutral flux of locally referenced potential density is zero, \ie
381  \begin{align*}
382    % \label{eq:ALGOS_Gf_property2}
383    \begin{matrix}
384      &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)}
385      &=    &\alpha_i^k   &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)
386      &- \ \;  \beta _i^k    &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (S) & = \ 0   \\
387      &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)}
388      &=    &\alpha_i^k   &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T)
389      &- \  \; \beta _i^k    &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (S)  &= \ 0
390    \end{matrix}
391  \end{align*}
392  This result is trivially obtained using the \autoref{eq:ALGOS_Gf_triads} applied to $T$ and $S$ and
393  the definition of the triads' slopes \autoref{eq:ALGOS_Gf_slopes}.
394
395\item [$\bullet$ conservation of tracer]
396  The iso-neutral diffusion term conserve the total tracer content, \ie
397  \[
398    % \label{eq:ALGOS_Gf_property1}
399    \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0
400  \]
401This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form.
402
403\item [$\bullet$ decrease of tracer variance]
404  The iso-neutral diffusion term does not increase the total tracer variance, \ie
405  \[
406    % \label{eq:ALGOS_Gf_property1}
407    \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0
408  \]
409The property is demonstrated in the \autoref{subsec:ALGOS_Gf_operator}.
410It is a key property for a diffusion term.
411It means that the operator is also a dissipation term,
412\ie\ it is a sink term for the square of the quantity on which it is applied.
413It therfore ensures that, when the diffusivity coefficient is large enough,
414the field on which it is applied become free of grid-point noise.
415
416\item [$\bullet$ self-adjoint operator]
417  The iso-neutral diffusion operator is self-adjoint, \ie
418  \[
419    % \label{eq:ALGOS_Gf_property1}
420    \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\}
421  \]
422In other word, there is no needs to develop a specific routine from the adjoint of this operator.
423We just have to apply the same routine.
424This properties can be demonstrated quite easily in a similar way the "non increase of tracer variance" property
425has been proved (see \autoref{apdx:ALGOS_Gf_operator}).
426\end{description}
427
428\subsection{Eddy induced velocity and skew flux formulation}
429
430When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),
431an additional advection term is added.
432The associated velocity is the so called eddy induced velocity,
433the formulation of which depends on the slopes of iso-neutral surfaces.
434Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces,
435\ie\ \autoref{eq:LDF_slp_geo} is used in $z$-coordinate,
436and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $z^*$ or $s$-coordinates.
437
438The eddy induced velocity is given by:
439\begin{equation}
440  \label{eq:ALGOS_eiv_v}
441  \begin{split}
442    u^* & = - \frac{1}{e_2\,e_{3}}          \;\partial_k \left( e_2 \, A_e \; r_\right)
443    = - \frac{1}{e_3}                     \;\partial_k \left(           A_e \; r_\right)            \\
444    v^* & = - \frac{1}{e_1\,e_3}\;             \partial_k \left( e_1 \, A_e \; r_\right)
445    = - \frac{1}{e_3}                     \;\partial_k \left(           A_e \; r_\right)             \\
446    w^* & =    \frac{1}{e_1\,e_2}\; \left\{   \partial_\left( e_2 \, A_e \; r_\right)
447      + \partial_\left( e_1 \, A_e \;r_j   \right) \right\}
448  \end{split}
449\end{equation}
450where $A_{e}$ is the eddy induced velocity coefficient,
451and $r_i$ and $r_j$ the slopes between the iso-neutral and the geopotential surfaces.
452%%gm wrong: to be modified with 2 2D streamfunctions
453In other words, the eddy induced velocity can be derived from a vector streamfuntion, $\phi$,
454which is given by $\phi = A_e\,\textbf{r}$ as $\textbf{U}^*  = \textbf{k} \times \nabla \phi$.
455%%end gm
456
457A traditional way to implement this additional advection is to add it to the eulerian velocity prior to
458compute the tracer advection.
459This allows us to take advantage of all the advection schemes offered for the tracers
460(see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme.
461This is particularly useful for passive tracers where
462\emph{positivity} of the advection scheme is of paramount importance.
463% give here the expression using the triads. It is different from the one given in \autoref{eq:LDF_eiv}
464% see just below a copy of this equation:
465%\begin{equation} \label{eq:ALGOS_ldfeiv}
466%\begin{split}
467% u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\
468% v^* & = \frac{1}{e_{1u}e_{3v}}\; \delta_k \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right]\\
469%w^* & = \frac{1}{e_{1w}e_{2w}}\; \left\{ \delta_i \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right] + %\delta_j \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right] \right\} \\
470%\end{split}
471%\end{equation}
472\[
473  % \label{eq:ALGOS_eiv_vd}
474  \textbf{F}_{eiv}^T   \equiv   \left(
475    \begin{aligned}
476      \sum_{\substack{i_p,\,k_p}} &
477      +{e_{2u}}_{i+1/2-i_p}^{k}                                  \ \ {A_{e}}_{i+1/2-i_p}^{k}
478      \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} }    \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\
479      \sum_{\substack{i_p,\,k_p}} &
480      - {e_{2u}}_i^{k+1/2-k_p}                                      \ {A_{e}}_i^{k+1/2-k_p}
481      \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }    \ \delta_{i+i_p}[T^{k+1/2-k_p}]
482    \end{aligned}
483  \right)
484\]
485
486\citep{griffies_JPO98} introduces another way to implement the eddy induced advection, the so-called skew form.
487It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity.
488For example in the (\textbf{i},\textbf{k}) plane, the tracer advective fluxes can be transformed as follows:
489\begin{flalign*}
490  \begin{split}
491    \textbf{F}_{eiv}^T =
492    \begin{pmatrix}
493      {e_{2}\,e_{3}\;  u^*}      \\
494      {e_{1}\,e_{2}\; w^*}
495    \end{pmatrix}
496    \;   T
497    &=
498    \begin{pmatrix}
499      { - \partial_k \left( e_{2} \, A_{e} \; r_i \right) \; T \;}      \\
500      {+ \partial_\left( e_{2} \, A_{e} \; r_i \right) \; T \;}
501    \end{pmatrix}
502    \\
503    &=
504    \begin{pmatrix}
505      { - \partial_k \left( e_{2} \, A_{e} \; r_\; T \right) \;}  \\
506      {+ \partial_\left( e_{2} \, A_{e} \; r_\; T \right) \;}
507    \end{pmatrix}
508    +
509    \begin{pmatrix}
510      {+ e_{2} \, A_{e} \; r_\; \partial_k T}  \\
511      { - e_{2} \, A_{e} \; r_\; \partial_i  T}
512    \end{pmatrix}
513  \end{split}
514\end{flalign*}
515and since the eddy induces velocity field is no-divergent,
516we end up with the skew form of the eddy induced advective fluxes:
517\begin{equation}
518  \label{eq:ALGOS_eiv_skew_continuous}
519  \textbf{F}_{eiv}^T =
520  \begin{pmatrix}
521    {+ e_{2} \, A_{e} \; r_\; \partial_k T}   \\
522    { - e_{2} \, A_{e} \; r_\; \partial_i  T}
523  \end{pmatrix}
524\end{equation}
525The tendency associated with eddy induced velocity is then simply the divergence of
526the \autoref{eq:ALGOS_eiv_skew_continuous} fluxes.
527It naturally conserves the tracer content, as it is expressed in flux form and,
528as the advective form, it preserves the tracer variance.
529Another interesting property of \autoref{eq:ALGOS_eiv_skew_continuous} form is that when $A=A_e$,
530a simplification occurs in the sum of the iso-neutral diffusion and eddy induced velocity terms:
531\begin{flalign*}
532  % \label{eq:ALGOS_eiv_skew+eiv_continuous}
533  \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &=
534  \begin{pmatrix}
535    + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T -  e_2 \, A \; r_i                              \;\partial_k T   \\
536    -  e_2 \, A_{e} \; r_i           \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T
537  \end{pmatrix}
538  +
539  \begin{pmatrix}
540    {+ e_{2} \, A_{e} \; r_\; \partial_k T}   \\
541    { - e_{2} \, A_{e} \; r_\; \partial_i  T}
542  \end{pmatrix}
543  \\
544  &=
545  \begin{pmatrix}
546    + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T    \\
547    -  2\; e_2 \, A_{e} \; r_i      \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T
548  \end{pmatrix}
549\end{flalign*}
550The horizontal component reduces to the one use for an horizontal laplacian operator and
551the vertical one keeps the same complexity, but not more.
552This property has been used to reduce the computational time \citep{griffies_JPO98},
553but it is not of practical use as usually $A \neq A_e$.
554Nevertheless this property can be used to choose a discret form of \autoref{eq:ALGOS_eiv_skew_continuous} which
555is consistent with the iso-neutral operator \autoref{eq:ALGOS_Gf_operator}.
556Using the slopes \autoref{eq:ALGOS_Gf_slopes} and defining $A_e$ at $T$-point(\ie\ as $A$,
557the eddy diffusivity coefficient), the resulting discret form is given by:
558\begin{equation}
559  \label{eq:ALGOS_eiv_skew}
560  \textbf{F}_{eiv}^T   \equiv   \frac{1}{4} \left(
561    \begin{aligned}
562      \sum_{\substack{i_p,\,k_p}} &
563      +{e_{2u}}_{i+1/2-i_p}^{k}                                  \ \ {A_{e}}_{i+1/2-i_p}^{k}
564      \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} }    \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\
565      \sum_{\substack{i_p,\,k_p}} &
566      - {e_{2u}}_i^{k+1/2-k_p}                                      \ {A_{e}}_i^{k+1/2-k_p}
567      \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }    \ \delta_{i+i_p}[T^{k+1/2-k_p}]
568    \end{aligned}
569  \right)
570\end{equation}
571Note that \autoref{eq:ALGOS_eiv_skew} is valid in $z$-coordinate with or without partial cells.
572In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces must be added to
573$\mathbb{R}$ for the discret form to be exact.
574
575Such a choice of discretisation is consistent with the iso-neutral operator as
576it uses the same definition for the slopes.
577It also ensures the conservation of the tracer variance (see \autoref{subsec:ALGOS_eiv_skew}),
578\ie\ it does not include a diffusive component but is a "pure" advection term.
579
580$\ $\newpage      %force an empty line
581\subsection{Discrete invariants of the iso-neutral diffrusion}
582\label{subsec:ALGOS_Gf_operator}
583
584Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane.
585
586This part will be moved in an Appendix.
587
588The continuous property to be demonstrated is:
589\[
590  \int_D  D_l^T \; T \;dv   \leq 0
591\]
592The discrete form of its left hand side is obtained using \autoref{eq:TRIADS_iso_flux}
593
594\begin{align*}
595  &\int_D  D_l^T \; T \;dv \equiv  \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\}    \\
596  &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
597    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
598    + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]  \ T \right\}    \\
599  &\equiv  - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
600    {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T]
601    + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}}  \ \delta_{k+1/2} [T]   \right\}      \\
602  &\equiv -\sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
603    \frac{ _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{1u}}_{\,i+1/2}^{\,k} }  \ \delta_{i+1/2} [T]
604    - { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \;
605    \frac{ _i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{3w}}_{\,i}^{\,k+1/2}  } \ \delta_{k+1/2} [T]
606    \right\}      \\
607    %
608  \allowdisplaybreaks
609  \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:}
610  %
611  &\equiv -\sum_{i,k}
612    \begin{Bmatrix}
613      &\ \ \Bigl{ _{i+1}^{k} \mathbb{T}_{-1/2}^{-1/2} (T) }
614      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
615      & -\ \ {_{i}^{k+1} \mathbb{R}_{-1/2}^{-1/2}}
616      &      {_{i}^{k+1} \mathbb{T}_{-1/2}^{-1/2} (T) }
617      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
618      & \\
619      &+\Bigl( \ \;\; { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
620      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
621      & -\ \ {_i^{k+1} \mathbb{R}_{+1/2}^{-1/2}}
622      & { _i^{k+1} \mathbb{T}_{+1/2}^{-1/2} (T) }
623      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}      \Bigr)
624      & \\
625      &+\Bigl{ _{i+1}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) }
626      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
627      & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{-1/2}^{+1/2}}
628      &      \ \;\;{_{i}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) }
629      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
630      & \\
631      &+\Bigl( \ \;\; { _{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) }
632      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
633      & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{+1/2}^{+1/2}}
634      &      \ \;\;{_{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) }
635      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)   \\
636    \end{Bmatrix}
637    %
638  \allowdisplaybreaks
639  \intertext{
640  The summation is done over all $i$ and $k$ indices,
641  it is therefore possible to introduce a shift of $-1$ either in $i$ or $k$ direction in order to
642  regroup all the terms of the summation by triad at a ($i$,$k$) point.
643  In other words, we regroup all the terms in the neighbourhood that contain a triad at the same ($i$,$k$) indices.
644  It becomes:
645  }
646  %
647  &\equiv -\sum_{i,k}
648    \begin{Bmatrix}
649      &\ \ \Bigl{_i^k \mathbb{T}_{-1/2}^{-1/2} (T) }
650      &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
651      & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}}
652      &      {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) }
653      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}     \Bigr)
654      & \\
655      &+\Bigl{ _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
656      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
657      & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}}
658      &      { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
659      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}      \Bigr)
660      & \\
661      &+\Bigl{_i^k \mathbb{T}_{-1/2}^{+1/2} (T) }
662      &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
663      & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}}
664      &      {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) }
665      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
666      & \\
667      &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{+1/2} (T) }
668      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
669      & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}}
670      &      {_i^k \mathbb{T}_{+1/2}^{+1/2} (T) }
671      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)   \\
672    \end{Bmatrix}   \\
673    %
674  \allowdisplaybreaks
675  \intertext{
676  Then outing in factor the triad in each of the four terms of the summation and
677  substituting the triads by their expression given in \autoref{eq:ALGOS_Gf_triads}.
678  It becomes:
679  }
680  %
681  &\equiv -\sum_{i,k}
682    \begin{Bmatrix}
683      &\ \ \Bigl\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
684      & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}}
685      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}     \Bigr)^2
686      & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k}  \  A_i^k
687      & \\
688      &+\Bigl\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
689      & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}}
690      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}      \Bigr)^2
691      & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k}  \  A_i^k
692      & \\
693      &+\Bigl\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
694      & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}}
695      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)^2
696      & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k}  \  A_i^k
697      & \\
698      &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
699      & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}}
700      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)^2
701      & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k}  \  A_i^k      \\
702    \end{Bmatrix}
703  \\
704  & \\
705  %
706  &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
707    \begin{matrix}
708      &\Bigl( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}}
709      & -\ \ {_i^k \mathbb{R}_{i_p}^{k_p}}
710      &\frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \Bigr)^2
711      & \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k   \ \
712    \end{matrix}
713        \right\}
714        \quad   \leq 0
715\end{align*}
716The last inequality is obviously obtained as we succeed in obtaining a negative summation of square quantities.
717
718Note that, if instead of multiplying $D_l^T$ by $T$, we were using another tracer field, let say $S$,
719then the previous demonstration would have let to:
720\begin{align*}
721  \int_D  S \; D_l^\;dv &\equiv  \sum_{i,k} \left\{ S \ D_l^T \ b_T \right\}    \\
722                           &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
723                             \left( \frac{ \delta_{i +i_p} [S] }{{e_{1u} }_{\,i+i_p}^{\,k}}
724                             - {_i^k \mathbb{R}_{i_p}^{k_p}}
725                             \frac{ \delta_{k+k_p} [S] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \right\right. \\
726                           & \qquad \qquad \qquad \ \left.
727                             \left( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}}
728                             - {_i^k \mathbb{R}_{i_p}^{k_p}}
729                             \frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \right)
730                             \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k   \
731                             \right\}
732                             %
733                             \allowdisplaybreaks
734                             \intertext{
735                             which, by applying the same operation as before but in reverse order, leads to:
736                             }
737                             %
738                           &\equiv  \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\}
739\end{align*}
740This means that the iso-neutral operator is self-adjoint.
741There is no need to develop a specific to obtain it.
742
743\subsection{Discrete invariants of the skew flux formulation}
744\label{subsec:ALGOS_eiv_skew}
745
746Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane.
747
748This have to be moved in an Appendix.
749
750The continuous property to be demonstrated is:
751\begin{align*}
752  \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv  \equiv 0
753\end{align*}
754The discrete form of its left hand side is obtained using \autoref{eq:ALGOS_eiv_skew}
755\begin{align*}
756  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\;
757  \delta_&\left[
758              {e_{2u}}_{i+i_p+1/2}^{k}                                  \;\ \ {A_{e}}_{i+i_p+1/2}^{k}
759              \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} }   \quad \delta_{k+k_p}[T_{i+i_p+1/2}]
760              \right] \; T_i^k      \\
761  - \delta_k &\left[
762               {e_{2u}}_i^{k+k_p+1/2}                                     \ \ {A_{e}}_i^{k+k_p+1/2}
763               \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} }   \ \ \delta_{i+i_p}[T^{k+k_p+1/2}]
764               \right] \; T_i^k      \         \Biggr\}
765\end{align*}
766apply the adjoint of delta operator, it becomes
767\begin{align*}
768  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\;
769  &\left(
770    {e_{2u}}_{i+i_p+1/2}^{k}                                  \;\ \ {A_{e}}_{i+i_p+1/2}^{k}
771    \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} }   \quad \delta_{k+k_p}[T_{i+i_p+1/2}]
772    \right) \; \delta_{i+1/2}[T^{k}]      \\
773  - &\left(
774      {e_{2u}}_i^{k+k_p+1/2}                                     \ \ {A_{e}}_i^{k+k_p+1/2}
775      \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} }   \ \ \delta_{i+i_p}[T^{k+k_p+1/2}]
776      \right) \; \delta_{k+1/2}[T_{i}]       \         \Biggr\}
777\end{align*}
778Expending the summation on $i_p$ and $k_p$, it becomes:
779\begin{align*}
780  \begin{matrix}
781    &\sum\limits_{i,k}   \Bigl\{
782    &+{e_{2u}}_{i+1}^{k}                             &{A_{e}}_{i+1    }^{k}
783    &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{-1/2}} &\delta_{k-1/2}[T_{i+1}]    &\delta_{i+1/2}[T^{k}]   &\\
784    &&+{e_{2u}}_i^{k\ \ \ \:}                            &{A_{e}}_{i}^{k\ \ \ \:}
785    &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{-1/2}}  &\delta_{k-1/2}[T_{i\ \ \ \;}&\delta_{i+1/2}[T^{k}] &\\
786    &&+{e_{2u}}_{i+1}^{k}                             &{A_{e}}_{i+1    }^{k}
787    &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{+1/2}} &\delta_{k+1/2}[T_{i+1}]     &\delta_{i+1/2}[T^{k}] &\\
788    &&+{e_{2u}}_i^{k\ \ \ \:}                            &{A_{e}}_{i}^{k\ \ \ \:}
789    &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{+1/2}} &\delta_{k+1/2}[T_{i\ \ \ \;}] &\delta_{i+1/2}[T^{k}] &\\
790    %
791    &&-{e_{2u}}_i^{k+1}                                &{A_{e}}_i^{k+1}
792    &{_i^{k+1} \mathbb{R}_{-1/2}^{- 1/2}}   &\delta_{i-1/2}[T^{k+1}]      &\delta_{k+1/2}[T_{i}] &\\
793    &&-{e_{2u}}_i^{k\ \ \ \:}                             &{A_{e}}_i^{k\ \ \ \:}
794    &{\ \ \;_i^\mathbb{R}_{-1/2}^{+1/2}}   &\delta_{i-1/2}[T^{k\ \ \ \:}&\delta_{k+1/2}[T_{i}] &\\
795    &&-{e_{2u}}_i^{k+1    }                             &{A_{e}}_i^{k+1}
796    &{_i^{k+1} \mathbb{R}_{+1/2}^{- 1/2}}   &\delta_{i+1/2}[T^{k+1}]      &\delta_{k+1/2}[T_{i}] &\\
797    &&-{e_{2u}}_i^{k\ \ \ \:}                             &{A_{e}}_i^{k\ \ \ \:}
798    &{\ \ \;_i^\mathbb{R}_{+1/2}^{+1/2}}   &\delta_{i+1/2}[T^{k\ \ \ \:}&\delta_{k+1/2}[T_{i}]
799    &\Bigr\}  \\
800  \end{matrix}
801\end{align*}
802The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the same but of opposite signs,
803they cancel out.
804Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{-1/2}}$.
805The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{-1/2}}$ are the same but both of opposite signs and
806shifted by 1 in $k$ direction.
807When summing over $k$ they cancel out with the neighbouring grid points.
808Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{+1/2}}$ in the $i$ direction.
809Therefore the sum over the domain is zero,
810\ie\ the variance of the tracer is preserved by the discretisation of the skew fluxes.
811
812\onlyinsubfile{\input{../../global/epilogue}}
813
814\end{document}
Note: See TracBrowser for help on using the repository browser.