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 @ 11582

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

New LaTeX commands \nam and \np to mention namelist content (step 2)
Finally convert \forcode{...} following \np{}{} into optional arg of the new command \np[]{}{}

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