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.
Changeset 11544 for NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex – NEMO

Ignore:
Timestamp:
2019-09-13T16:37:38+02:00 (5 years ago)
Author:
nicolasmartin
Message:

Missing modifications from previous commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex

    r11543 r11544  
    1818% ------------------------------------------------------------------------------------------------------------- 
    1919\section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 
    20 \label{sec:TRA_adv_ubs} 
     20\label{sec:ALGOS_tra_adv_ubs} 
    2121 
    2222The UBS advection scheme is an upstream biased third order scheme based on 
     
    2525For example, in the $i$-direction: 
    2626\begin{equation} 
    27   \label{eq:tra_adv_ubs2} 
     27  \label{eq:ALGOS_tra_adv_ubs2} 
    2828  \tau_u^{ubs} = \left\{ 
    2929    \begin{aligned} 
     
    3535or equivalently, the advective flux is 
    3636\begin{equation} 
    37   \label{eq:tra_adv_ubs2} 
     37  \label{eq:ALGOS_tra_adv_ubs2} 
    3838  U_{i+1/2} \ \tau_u^{ubs} 
    3939  =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2} 
     
    8585NB 3: It is straight forward to rewrite \autoref{eq:TRA_adv_ubs} as follows: 
    8686\begin{equation} 
    87   \label{eq:tra_adv_ubs2} 
     87  \label{eq:ALGOS_tra_adv_ubs2} 
    8888  \tau_u^{ubs} = \left\{ 
    8989    \begin{aligned} 
     
    9595or equivalently 
    9696\begin{equation} 
    97   \label{eq:tra_adv_ubs2} 
     97  \label{eq:ALGOS_tra_adv_ubs2} 
    9898  \begin{split} 
    9999    e_{2u} e_{3u}\,u_{i+1/2} \ \tau_u^{ubs} 
     
    112112laplacian diffusion: 
    113113\begin{equation} 
    114   \label{eq:tra_ldf_lap} 
     114  \label{eq:ALGOS_tra_ldf_lap} 
    115115  \begin{split} 
    116116    D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\;  e_{3T} } &\left[ {\quad \delta_i 
     
    125125bilaplacian: 
    126126\begin{equation} 
    127   \label{eq:tra_ldf_lap} 
     127  \label{eq:ALGOS_tra_ldf_lap} 
    128128  \begin{split} 
    129129    D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\ 
     
    138138it comes: 
    139139\begin{equation} 
    140   \label{eq:tra_ldf_lap} 
     140  \label{eq:ALGOS_tra_ldf_lap} 
    141141  \begin{split} 
    142142    D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\ 
     
    149149if the velocity is uniform (\ie\ $|u|=cst$) then the diffusive flux is 
    150150\begin{equation} 
    151   \label{eq:tra_ldf_lap} 
     151  \label{eq:ALGOS_tra_ldf_lap} 
    152152  \begin{split} 
    153153    F_u^{lT} = - \frac{1}{12} 
     
    161161 
    162162\begin{equation} 
    163   \label{eq:tra_adv_ubs2} 
     163  \label{eq:ALGOS_tra_adv_ubs2} 
    164164  \begin{split} 
    165165    F_u^{lT} &= - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 
     
    171171sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$): 
    172172\begin{equation} 
    173   \label{eq:tra_adv_ubs2} 
     173  \label{eq:ALGOS_tra_adv_ubs2} 
    174174  \begin{split} 
    175175    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] 
     
    180180sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$ 
    181181\begin{equation} 
    182   \label{eq:tra_adv_ubs2} 
     182  \label{eq:ALGOS_tra_adv_ubs2} 
    183183  \begin{split} 
    184184    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] \\ 
     
    192192% ------------------------------------------------------------------------------------------------------------- 
    193193\section{Leapfrog energetic} 
    194 \label{sec:LF} 
     194\label{sec:ALGOS_LF} 
    195195 
    196196We adopt the following semi-discrete notation for time derivative. 
     
    198198the time derivation and averaging operators at the mid time step are: 
    199199\[ 
    200   % \label{eq:dt_mt} 
     200  % \label{eq:ALGOS_dt_mt} 
    201201  \begin{split} 
    202202    \delta_{t+\rdt/2} [q]     &=  \  \ \,   q^{t+\rdt}  - q^{t}      \\ 
     
    210210The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as: 
    211211\[ 
    212   % \label{eq:LF} 
     212  % \label{eq:ALGOS_LF} 
    213213  \frac{\partial q}{\partial t} 
    214214  \equiv \frac{1}{\rdt} \overline{ \delta_{t+\rdt/2}[q]}^{\,t} 
     
    220220As such it respects the quadratic invariant in integral forms, \ie\ the following continuous property, 
    221221\[ 
    222   % \label{eq:Energy} 
     222  % \label{eq:ALGOS_Energy} 
    223223  \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt} 
    224224  =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt} 
     
    278278For example in the (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows: 
    279279\begin{equation} 
    280   \label{eq:Gf_triads} 
     280  \label{eq:ALGOS_Gf_triads} 
    281281  _i^k \mathbb{T}_{i_p}^{k_p} (T) 
    282282  = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k     \left( 
     
    291291and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad: 
    292292\begin{equation} 
    293   \label{eq:Gf_slopes} 
     293  \label{eq:ALGOS_Gf_slopes} 
    294294  _i^k \mathbb{R}_{i_p}^{k_p} 
    295295  =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac 
     
    297297  {\left(\alpha / \beta \right)_i^k  \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] } 
    298298\end{equation} 
    299 Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of 
     299Note that in \autoref{eq:ALGOS_Gf_slopes} we use the ratio $\alpha / \beta$ instead of 
    300300multiplying the temperature derivative by $\alpha$ and the salinity derivative by $\beta$. 
    301301This is more efficient as the ratio $\alpha / \beta$ can to be evaluated directly. 
    302302 
    303 Note that in \autoref{eq:Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$. 
     303Note 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}$. 
    304304This choice has been motivated by the decrease of tracer variance and 
    305 the presence of partial cell at the ocean bottom (see \autoref{apdx:Gf_operator}). 
     305the presence of partial cell at the ocean bottom (see \autoref{subsec:ALGOS_Gf_operator}). 
    306306 
    307307%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    310310    \includegraphics[width=\textwidth]{Fig_ISO_triad} 
    311311    \caption{ 
    312       \protect\label{fig:ISO_triad} 
     312      \protect\label{fig:ALGOS_ISO_triad} 
    313313      Triads used in the Griffies's like iso-neutral diffision scheme for 
    314314      $u$-component (upper panel) and $w$-component (lower panel). 
     
    321321They take the following expression: 
    322322\begin{flalign*} 
    323   % \label{eq:Gf_fluxes} 
     323  % \label{eq:ALGOS_Gf_fluxes} 
    324324  \begin{split} 
    325325    {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) 
     
    334334the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:TRIADS_ISO_triad}): 
    335335\begin{flalign} 
    336   \label{eq:iso_flux} 
     336  \label{eq:ALGOS_iso_flux} 
    337337  \textbf{F}_{iso}(T) 
    338338  &\equiv  \sum_{\substack{i_p,\,k_p}} 
     
    364364the divergence of the sum of all the four triad fluxes: 
    365365\begin{equation} 
    366   \label{eq:Gf_operator} 
     366  \label{eq:ALGOS_Gf_operator} 
    367367  D_l^T = \frac{1}{b_T}  \sum_{\substack{i_p,\,k_p}} \left\{ 
    368368    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right] 
     
    377377  the limit of flat iso-neutral direction: 
    378378  \[ 
    379     % \label{eq:Gf_property1a} 
     379    % \label{eq:ALGOS_Gf_property1a} 
    380380    D_l^T = \frac{1}{b_T}  \ \delta_{i} 
    381381    \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right] 
     
    401401  The iso-neutral flux of locally referenced potential density is zero, \ie 
    402402  \begin{align*} 
    403     % \label{eq:Gf_property2} 
     403    % \label{eq:ALGOS_Gf_property2} 
    404404    \begin{matrix} 
    405405      &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)} 
     
    411411    \end{matrix} 
    412412  \end{align*} 
    413   This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ and 
    414   the definition of the triads' slopes \autoref{eq:Gf_slopes}. 
     413  This result is trivially obtained using the \autoref{eq:ALGOS_Gf_triads} applied to $T$ and $S$ and 
     414  the definition of the triads' slopes \autoref{eq:ALGOS_Gf_slopes}. 
    415415 
    416416\item[$\bullet$ conservation of tracer] 
    417417  The iso-neutral diffusion term conserve the total tracer content, \ie 
    418418  \[ 
    419     % \label{eq:Gf_property1} 
     419    % \label{eq:ALGOS_Gf_property1} 
    420420    \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 
    421421  \] 
     
    425425  The iso-neutral diffusion term does not increase the total tracer variance, \ie 
    426426  \[ 
    427     % \label{eq:Gf_property1} 
     427    % \label{eq:ALGOS_Gf_property1} 
    428428    \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 
    429429  \] 
    430 The property is demonstrated in the \autoref{apdx:Gf_operator}. 
     430The property is demonstrated in the \autoref{subsec:ALGOS_Gf_operator}. 
    431431It is a key property for a diffusion term. 
    432432It means that the operator is also a dissipation term, 
     
    438438  The iso-neutral diffusion operator is self-adjoint, \ie 
    439439  \[ 
    440     % \label{eq:Gf_property1} 
     440    % \label{eq:ALGOS_Gf_property1} 
    441441    \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 
    442442  \] 
     
    444444We just have to apply the same routine. 
    445445This properties can be demonstrated quite easily in a similar way the "non increase of tracer variance" property 
    446 has been proved (see \autoref{apdx:Gf_operator}). 
     446has been proved (see \autoref{apdx:ALGOS_Gf_operator}). 
    447447\end{description} 
    448448 
     
    462462The eddy induced velocity is given by: 
    463463\begin{equation} 
    464   \label{eq:eiv_v} 
     464  \label{eq:ALGOS_eiv_v} 
    465465  \begin{split} 
    466466    u^* & = - \frac{1}{e_2\,e_{3}}          \;\partial_k \left( e_2 \, A_e \; r_i  \right) 
     
    487487% give here the expression using the triads. It is different from the one given in \autoref{eq:LDF_eiv} 
    488488% see just below a copy of this equation: 
    489 %\begin{equation} \label{eq:ldfeiv} 
     489%\begin{equation} \label{eq:ALGOS_ldfeiv} 
    490490%\begin{split} 
    491491% u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ 
     
    495495%\end{equation} 
    496496\[ 
    497   % \label{eq:eiv_vd} 
     497  % \label{eq:ALGOS_eiv_vd} 
    498498  \textbf{F}_{eiv}^T   \equiv   \left( 
    499499    \begin{aligned} 
     
    540540we end up with the skew form of the eddy induced advective fluxes: 
    541541\begin{equation} 
    542   \label{eq:eiv_skew_continuous} 
     542  \label{eq:ALGOS_eiv_skew_continuous} 
    543543  \textbf{F}_{eiv}^T = 
    544544  \begin{pmatrix} 
     
    548548\end{equation} 
    549549The tendency associated with eddy induced velocity is then simply the divergence of 
    550 the \autoref{eq:eiv_skew_continuous} fluxes. 
     550the \autoref{eq:ALGOS_eiv_skew_continuous} fluxes. 
    551551It naturally conserves the tracer content, as it is expressed in flux form and, 
    552552as the advective form, it preserves the tracer variance. 
    553 Another interesting property of \autoref{eq:eiv_skew_continuous} form is that when $A=A_e$, 
     553Another interesting property of \autoref{eq:ALGOS_eiv_skew_continuous} form is that when $A=A_e$, 
    554554a simplification occurs in the sum of the iso-neutral diffusion and eddy induced velocity terms: 
    555555\begin{flalign*} 
    556   % \label{eq:eiv_skew+eiv_continuous} 
     556  % \label{eq:ALGOS_eiv_skew+eiv_continuous} 
    557557  \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &= 
    558558  \begin{pmatrix} 
     
    576576This property has been used to reduce the computational time \citep{griffies_JPO98}, 
    577577but it is not of practical use as usually $A \neq A_e$. 
    578 Nevertheless this property can be used to choose a discret form of \autoref{eq:eiv_skew_continuous} which 
    579 is consistent with the iso-neutral operator \autoref{eq:Gf_operator}. 
    580 Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie\ as $A$, 
     578Nevertheless this property can be used to choose a discret form of \autoref{eq:ALGOS_eiv_skew_continuous} which 
     579is consistent with the iso-neutral operator \autoref{eq:ALGOS_Gf_operator}. 
     580Using the slopes \autoref{eq:ALGOS_Gf_slopes} and defining $A_e$ at $T$-point(\ie\ as $A$, 
    581581the eddy diffusivity coefficient), the resulting discret form is given by: 
    582582\begin{equation} 
    583   \label{eq:eiv_skew} 
     583  \label{eq:ALGOS_eiv_skew} 
    584584  \textbf{F}_{eiv}^T   \equiv   \frac{1}{4} \left( 
    585585    \begin{aligned} 
     
    593593  \right) 
    594594\end{equation} 
    595 Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. 
     595Note that \autoref{eq:ALGOS_eiv_skew} is valid in $z$-coordinate with or without partial cells. 
    596596In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces must be added to 
    597597$\mathbb{R}$ for the discret form to be exact. 
     
    599599Such a choice of discretisation is consistent with the iso-neutral operator as 
    600600it uses the same definition for the slopes. 
    601 It also ensures the conservation of the tracer variance (see Appendix \autoref{apdx:eiv_skew}), 
     601It also ensures the conservation of the tracer variance (see \autoref{subsec:ALGOS_eiv_skew}), 
    602602\ie\ it does not include a diffusive component but is a "pure" advection term. 
    603603 
     
    607607% ================================================================ 
    608608\subsection{Discrete invariants of the iso-neutral diffrusion} 
    609 \label{subsec:Gf_operator} 
     609\label{subsec:ALGOS_Gf_operator} 
    610610 
    611611Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane. 
     
    702702  \intertext{ 
    703703  Then outing in factor the triad in each of the four terms of the summation and 
    704   substituting the triads by their expression given in \autoref{eq:Gf_triads}. 
     704  substituting the triads by their expression given in \autoref{eq:ALGOS_Gf_triads}. 
    705705  It becomes: 
    706706  } 
     
    774774% ================================================================ 
    775775\subsection{Discrete invariants of the skew flux formulation} 
    776 \label{subsec:eiv_skew} 
     776\label{subsec:ALGOS_eiv_skew} 
    777777 
    778778Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane. 
     
    784784  \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv  \equiv 0 
    785785\end{align*} 
    786 The discrete form of its left hand side is obtained using \autoref{eq:eiv_skew} 
     786The discrete form of its left hand side is obtained using \autoref{eq:ALGOS_eiv_skew} 
    787787\begin{align*} 
    788788  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\; 
Note: See TracChangeset for help on using the changeset viewer.