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 10414 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex – NEMO

Ignore:
Timestamp:
2018-12-19T00:02:00+01:00 (5 years ago)
Author:
nicolasmartin
Message:
  • Comment \label commands on maths environments for unreferenced equations and adapt the unnumbered math container accordingly (mainly switch to shortanded LateX syntax with \[ ... \])
  • Add a code trick to build subfile with its own bibliography
  • Fix right path for main LaTeX document in first line of subfiles (\documentclass[...]{subfiles})
  • Rename abstract_foreword.tex to foreword.tex
  • Fix some non-ASCII codes inserted here or there in LaTeX (\[0-9]*)
  • Made a first iteration on the indentation and alignement within math, figure and table environments to improve source code readability
File:
1 edited

Legend:

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

    r10406 r10414  
    1 \documentclass[../tex_main/NEMO_manual]{subfiles} 
     1\documentclass[../main/NEMO_manual]{subfiles} 
     2 
    23\begin{document} 
    34% ================================================================ 
     
    67\chapter{Ocean Dynamics (DYN)} 
    78\label{chap:DYN} 
     9 
    810\minitoc 
    9  
    10 %\vspace{2.cm} 
    11 $\ $\newline      %force an empty line 
    1211 
    1312Using the representation described in \autoref{chap:DOM}, 
     
    2019The prognostic ocean dynamics equation can be summarized as follows: 
    2120\[ 
    22 \text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} } 
    23                   {\text{COR} + \text{ADV}                       } 
    24          + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF} 
     21  \text{NXT} = \dbinom  {\text{VOR} + \text{KEG} + \text {ZAD} } 
     22  {\text{COR} + \text{ADV}                       } 
     23  + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF} 
    2524\] 
    2625NXT stands for next, referring to the time-stepping. 
     
    5756MISC correspond to "extracting tendency terms" or "vorticity balance"?} 
    5857 
    59 $\ $\newline    % force a new ligne 
    60  
    6158% ================================================================ 
    6259% Sea Surface Height evolution & Diagnostics variables 
     
    7269 
    7370The vorticity is defined at an $f$-point ($i.e.$ corner point) as follows: 
    74 \begin{equation} \label{eq:divcur_cur} 
    75 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] 
    76                           -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 
     71\begin{equation} 
     72  \label{eq:divcur_cur} 
     73  \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] 
     74      -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 
    7775\end{equation}  
    7876 
    7977The horizontal divergence is defined at a $T$-point. 
    8078It is given by: 
    81 \begin{equation} \label{eq:divcur_div} 
    82 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 
    83       \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u} \right] 
    84              +\delta_j \left[ {e_{1v}\,e_{3v}\,v} \right]} \right) 
    85 \end{equation}  
     79\[ 
     80  % \label{eq:divcur_div} 
     81  \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 
     82  \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u} \right] 
     83      +\delta_j \left[ {e_{1v}\,e_{3v}\,v} \right]} \right) 
     84\] 
    8685 
    8786Note that although the vorticity has the same discrete expression in $z$- and $s$-coordinates, 
     
    106105 
    107106The sea surface height is given by: 
    108 \begin{equation} \label{eq:dynspg_ssh} 
    109 \begin{aligned} 
    110 \frac{\partial \eta }{\partial t} 
    111 &\equiv    \frac{1}{e_{1t} e_{2t} }\sum\limits_k { \left\{  \delta_i \left[ {e_{2u}\,e_{3u}\;u} \right] 
    112                                                                                   +\delta_j \left[ {e_{1v}\,e_{3v}\;v} \right]  \right\} }  
    113            -    \frac{\textit{emp}}{\rho_w }   \\ 
    114 &\equiv    \sum\limits_k {\chi \ e_{3t}}  -  \frac{\textit{emp}}{\rho_w } 
    115 \end{aligned} 
     107\begin{equation} 
     108  \label{eq:dynspg_ssh} 
     109  \begin{aligned} 
     110    \frac{\partial \eta }{\partial t} 
     111    &\equiv    \frac{1}{e_{1t} e_{2t} }\sum\limits_k { \left\{  \delta_i \left[ {e_{2u}\,e_{3u}\;u} \right] 
     112        +\delta_j \left[ {e_{1v}\,e_{3v}\;v} \right]  \right\} } 
     113    -    \frac{\textit{emp}}{\rho_w }   \\ 
     114    &\equiv    \sum\limits_k {\chi \ e_{3t}}  -  \frac{\textit{emp}}{\rho_w } 
     115  \end{aligned} 
    116116\end{equation} 
    117117where \textit{emp} is the surface freshwater budget (evaporation minus precipitation),  
     
    131131The vertical velocity is computed by an upward integration of the horizontal divergence starting at the bottom, 
    132132taking into account the change of the thickness of the levels: 
    133 \begin{equation} \label{eq:wzv} 
    134 \left\{   \begin{aligned} 
    135 &\left. w \right|_{k_b-1/2} \quad= 0    \qquad \text{where } k_b \text{ is the level just above the sea floor }   \\ 
    136 &\left. w \right|_{k+1/2}     = \left. w \right|_{k-1/2}  +  \left. e_{3t} \right|_{k}\;  \left. \chi \right|_k   
    137                                          - \frac{1} {2 \rdt} \left(  \left. e_{3t}^{t+1}\right|_{k} - \left. e_{3t}^{t-1}\right|_{k}\right) 
    138 \end{aligned}   \right. 
     133\begin{equation} 
     134  \label{eq:wzv} 
     135  \left\{ 
     136    \begin{aligned} 
     137      &\left. w \right|_{k_b-1/2} \quad= 0    \qquad \text{where } k_b \text{ is the level just above the sea floor }   \\ 
     138      &\left. w \right|_{k+1/2}     = \left. w \right|_{k-1/2}  +  \left. e_{3t} \right|_{k}\;  \left. \chi \right|_k 
     139      - \frac{1} {2 \rdt} \left(  \left. e_{3t}^{t+1}\right|_{k} - \left. e_{3t}^{t-1}\right|_{k}\right) 
     140    \end{aligned} 
     141  \right. 
    139142\end{equation} 
    140143 
     
    208211but does not conserve the total kinetic energy. 
    209212It is given by: 
    210 \begin{equation} \label{eq:dynvor_ens} 
    211 \left\{  
    212 \begin{aligned} 
    213 {+\frac{1}{e_{1u} } } & {\overline {\left( { \frac{\zeta +f}{e_{3f} }} \right)} }^{\,i}  
    214                                 & {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i, j+1/2}    \\ 
    215 {- \frac{1}{e_{2v} } } & {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)} }^{\,j}   
    216                                 & {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2, j}   
    217 \end{aligned}  
    218  \right. 
     213\begin{equation} 
     214  \label{eq:dynvor_ens} 
     215  \left\{ 
     216    \begin{aligned} 
     217      {+\frac{1}{e_{1u} } } & {\overline {\left( { \frac{\zeta +f}{e_{3f} }} \right)} }^{\,i} 
     218      & {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i, j+1/2}    \\ 
     219      {- \frac{1}{e_{2v} } } & {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)} }^{\,j} 
     220      & {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2, j} 
     221    \end{aligned} 
     222  \right. 
    219223\end{equation}  
    220224 
     
    227231The kinetic energy conserving scheme (ENE scheme) conserves the global kinetic energy but not the global enstrophy. 
    228232It is given by: 
    229 \begin{equation} \label{eq:dynvor_ene} 
    230 \left\{   \begin{aligned} 
    231 {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 
    232                             \;  \overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} }    \\ 
    233 {- \frac{1}{e_{2v}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 
    234                             \;  \overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } 
    235 \end{aligned}    \right. 
     233\begin{equation} 
     234  \label{eq:dynvor_ene} 
     235  \left\{ 
     236    \begin{aligned} 
     237      {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 
     238            \;  \overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} }    \\ 
     239      {- \frac{1}{e_{2v}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 
     240            \;  \overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } 
     241    \end{aligned} 
     242  \right. 
    236243\end{equation}  
    237244 
     
    245252It consists of the ENS scheme (\autoref{eq:dynvor_ens}) for the relative vorticity term, 
    246253and of the ENE scheme (\autoref{eq:dynvor_ene}) applied to the planetary vorticity term. 
    247 \begin{equation} \label{eq:dynvor_mix} 
    248 \left\{ {     \begin{aligned} 
    249  {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i}  
    250  \; {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i,j+1/2} -\frac{1}{e_{1u} } 
    251  \; {\overline {\left( {\frac{f}{e_{3f} }} \right)  
    252  \;\overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ 
    253 {-\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^j 
    254  \; {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2,j} +\frac{1}{e_{2v} } 
    255  \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 
    256  \;\overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } \hfill 
    257 \end{aligned}     } \right. 
    258 \end{equation}  
     254\[ 
     255  % \label{eq:dynvor_mix} 
     256  \left\{ { 
     257      \begin{aligned} 
     258        {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} 
     259          \; {\overline{\overline {\left( {e_{1v}\,e_{3v}\;v} \right)}} }^{\,i,j+1/2} -\frac{1}{e_{1u} } 
     260          \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 
     261              \;\overline {\left( {e_{1v}\,e_{3v}\;v} \right)} ^{\,i+1/2}} }^{\,j} } \\ 
     262        {-\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^j 
     263          \; {\overline{\overline {\left( {e_{2u}\,e_{3u}\;u} \right)}} }^{\,i+1/2,j} +\frac{1}{e_{2v} } 
     264          \; {\overline {\left( {\frac{f}{e_{3f} }} \right) 
     265              \;\overline {\left( {e_{2u}\,e_{3u}\;u} \right)} ^{\,j+1/2}} }^{\,i} } \hfill 
     266      \end{aligned} 
     267    } \right. 
     268\] 
    259269 
    260270%------------------------------------------------------------- 
     
    285295for spherical coordinates as described by \citet{Arakawa_Lamb_MWR81} to obtain the EEN scheme.  
    286296First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point:  
    287 \begin{equation} \label{eq:pot_vor} 
    288 q  = \frac{\zeta +f} {e_{3f} } 
    289 \end{equation} 
     297\[ 
     298  % \label{eq:pot_vor} 
     299  q  = \frac{\zeta +f} {e_{3f} } 
     300\] 
    290301where the relative vorticity is defined by (\autoref{eq:divcur_cur}), 
    291302the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:  
    292 \begin{equation} \label{eq:een_e3f} 
    293 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 
     303\begin{equation} 
     304  \label{eq:een_e3f} 
     305  e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 
    294306\end{equation} 
    295307 
    296308%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    297 \begin{figure}[!ht]    \begin{center} 
    298 \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 
    299 \caption{ \protect\label{fig:DYN_een_triad} 
    300   Triads used in the energy and enstrophy conserving scheme (een) for 
    301   $u$-component (upper panel) and $v$-component (lower panel).} 
    302 \end{center}   \end{figure} 
    303 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     309\begin{figure}[!ht] 
     310  \begin{center} 
     311    \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 
     312    \caption{ 
     313      \protect\label{fig:DYN_een_triad} 
     314      Triads used in the energy and enstrophy conserving scheme (een) for 
     315      $u$-component (upper panel) and $v$-component (lower panel). 
     316    } 
     317  \end{center} 
     318\end{figure} 
     319% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    304320 
    305321A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
     
    316332the following triad combinations of the neighbouring potential vorticities defined at f-points 
    317333(\autoref{fig:DYN_een_triad}):  
    318 \begin{equation} \label{eq:Q_triads} 
    319 _i^j \mathbb{Q}^{i_p}_{j_p} 
    320 = \frac{1}{12} \ \left(   q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p}  \right) 
     334\begin{equation} 
     335  \label{eq:Q_triads} 
     336  _i^j \mathbb{Q}^{i_p}_{j_p} 
     337  = \frac{1}{12} \ \left(   q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p}  \right) 
    321338\end{equation} 
    322339where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$.  
    323340 
    324341Finally, the vorticity terms are represented as:  
    325 \begin{equation} \label{eq:dynvor_een} 
    326 \left\{ { 
    327 \begin{aligned} 
    328  +q\,e_3 \, v  &\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}  
    329                          {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v}\,e_{3v} \;v  \right)^{i+1/2-i_p}_{j+j_p}   \\ 
    330  - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}  
    331                          {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u}\,e_{3u} \;u  \right)^{i+i_p}_{j+1/2-j_p}   \\ 
    332 \end{aligned}  
    333 } \right. 
     342\begin{equation} 
     343  \label{eq:dynvor_een} 
     344  \left\{ { 
     345      \begin{aligned} 
     346        +q\,e_3 \, v    &\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}} 
     347        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v}\,e_{3v} \;v  \right)^{i+1/2-i_p}_{j+j_p}   \\ 
     348        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}} 
     349        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u}\,e_{3u} \;u  \right)^{i+i_p}_{j+1/2-j_p}   \\ 
     350      \end{aligned} 
     351    } \right. 
    334352\end{equation}  
    335353 
     
    353371together with the formulation chosen for the vertical advection (see below), 
    354372conserves the total kinetic energy: 
    355 \begin{equation} \label{eq:dynkeg} 
    356 \left\{ \begin{aligned} 
    357  -\frac{1}{2 \; e_{1u} }  & \ \delta_{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]   \\ 
    358  -\frac{1}{2 \; e_{2v} }  & \ \delta_{j+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]     
    359 \end{aligned} \right. 
    360 \end{equation}  
     373\[ 
     374  % \label{eq:dynkeg} 
     375  \left\{ 
     376    \begin{aligned} 
     377      -\frac{1}{2 \; e_{1u} }  & \ \delta_{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]   \\ 
     378      -\frac{1}{2 \; e_{2v} }  & \ \delta_{j+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right] 
     379    \end{aligned} 
     380  \right. 
     381\] 
    361382 
    362383%-------------------------------------------------------------------------------------------------------------- 
     
    371392Indeed, the change of KE due to the vertical advection is exactly balanced by 
    372393the change of KE due to the gradient of KE (see \autoref{apdx:C}). 
    373 \begin{equation} \label{eq:dynzad} 
    374 \left\{     \begin{aligned} 
    375 -\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,i+1/2}  \;\delta_{k+1/2} \left[ u \right]\  }^{\,k}  \\ 
    376 -\frac{1} {e_{1v}\,e_{2v}\,e_{3v}}  &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,j+1/2}  \;\delta_{k+1/2} \left[ u \right]\  }^{\,k}  
    377 \end{aligned}         \right. 
    378 \end{equation}  
     394\[ 
     395  % \label{eq:dynzad} 
     396  \left\{ 
     397    \begin{aligned} 
     398      -\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,i+1/2}  \;\delta_{k+1/2} \left[ u \right]\  }^{\,k}  \\ 
     399      -\frac{1} {e_{1v}\,e_{2v}\,e_{3v}}  &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,j+1/2}  \;\delta_{k+1/2} \left[ u \right]\  }^{\,k} 
     400    \end{aligned} 
     401  \right. 
     402\] 
    379403When \np{ln\_dynzad\_zts}\forcode{ = .true.}, 
    380404a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. 
     
    412436This altered Coriolis parameter is thus discretised at $f$-points. 
    413437It is given by:  
    414 \begin{multline} \label{eq:dyncor_metric} 
    415 f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i}  -  u\frac{\partial e_1 }{\partial j}} \right)  \\ 
    416    \equiv   f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right]   
    417                                                                  -  \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right]  }  \ \right) 
    418 \end{multline}  
     438\begin{multline*} 
     439  % \label{eq:dyncor_metric} 
     440  f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i}  -  u\frac{\partial e_1 }{\partial j}} \right)  \\ 
     441  \equiv   f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right] 
     442      -  \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right]  }  \ \right) 
     443\end{multline*}  
    419444 
    420445Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to 
     
    430455 
    431456The discrete expression of the advection term is given by: 
    432 \begin{equation} \label{eq:dynadv} 
    433 \left\{  
    434 \begin{aligned} 
    435 \frac{1}{e_{1u}\,e_{2u}\,e_{3u}}  
    436 \left(      \delta_{i+1/2} \left[ \overline{e_{2u}\,e_{3u}\;u }^{i       }  \ u_t      \right]     
    437           + \delta_{j       } \left[ \overline{e_{1u}\,e_{3u}\;v }^{i+1/2}  \ u_f      \right] \right.  \ \;   \\ 
    438 \left.   + \delta_{k      } \left[ \overline{e_{1w}\,e_{2w}\;w}^{i+1/2}  \ u_{uw} \right] \right)   \\ 
    439 \\ 
    440 \frac{1}{e_{1v}\,e_{2v}\,e_{3v}}  
    441 \left(     \delta_{i       } \left[ \overline{e_{2u}\,e_{3u }\;u }^{j+1/2} \ v_f       \right]  
    442          + \delta_{j+1/2} \left[ \overline{e_{1u}\,e_{3u }\;v }^{i       } \ v_t       \right] \right.  \ \, \, \\ 
    443 \left.  + \delta_{k      } \left[ \overline{e_{1w}\,e_{2w}\;w}^{j+1/2} \ v_{vw}  \right] \right) \\ 
    444 \end{aligned} 
    445 \right. 
    446 \end{equation} 
     457\[ 
     458  % \label{eq:dynadv} 
     459  \left\{ 
     460    \begin{aligned} 
     461      \frac{1}{e_{1u}\,e_{2u}\,e_{3u}} 
     462      \left(      \delta_{i+1/2} \left[ \overline{e_{2u}\,e_{3u}\;u }^{i       }  \ u_t      \right] 
     463        + \delta_{j       } \left[ \overline{e_{1u}\,e_{3u}\;v }^{i+1/2}  \ u_f      \right] \right.  \ \;   \\ 
     464      \left.   + \delta_{k      } \left[ \overline{e_{1w}\,e_{2w}\;w}^{i+1/2}  \ u_{uw} \right] \right)   \\ 
     465      \\ 
     466      \frac{1}{e_{1v}\,e_{2v}\,e_{3v}} 
     467      \left(     \delta_{i       } \left[ \overline{e_{2u}\,e_{3u }\;u }^{j+1/2} \ v_f       \right] 
     468        + \delta_{j+1/2} \left[ \overline{e_{1u}\,e_{3u }\;v }^{i       } \ v_t       \right] \right.  \ \, \, \\ 
     469      \left.  + \delta_{k      } \left[ \overline{e_{1w}\,e_{2w}\;w}^{j+1/2} \ v_{vw}  \right] \right) \\ 
     470    \end{aligned} 
     471  \right. 
     472\] 
    447473 
    448474Two advection schemes are available: 
     
    462488 
    463489In the centered $2^{nd}$ order formulation, the velocity is evaluated as the mean of the two neighbouring points: 
    464 \begin{equation} \label{eq:dynadv_cen2} 
    465 \left\{     \begin{aligned} 
    466  u_T^{cen2} &=\overline u^{i }       \quad &  u_F^{cen2} &=\overline u^{j+1/2}  \quad &  u_{uw}^{cen2} &=\overline u^{k+1/2}   \\ 
    467  v_F^{cen2} &=\overline v ^{i+1/2} \quad & v_F^{cen2} &=\overline v^j      \quad &  v_{vw}^{cen2} &=\overline v ^{k+1/2}  \\ 
    468 \end{aligned}      \right. 
     490\begin{equation} 
     491  \label{eq:dynadv_cen2} 
     492  \left\{ 
     493    \begin{aligned} 
     494      u_T^{cen2} &=\overline u^{i }       \quad &  u_F^{cen2} &=\overline u^{j+1/2}  \quad &  u_{uw}^{cen2} &=\overline u^{k+1/2}   \\ 
     495      v_F^{cen2} &=\overline v ^{i+1/2} \quad & v_F^{cen2} &=\overline v^j    \quad &  v_{vw}^{cen2} &=\overline v ^{k+1/2}  \\ 
     496    \end{aligned} 
     497  \right. 
    469498\end{equation}  
    470499 
     
    484513an upstream-biased parabolic interpolation. 
    485514For example, the evaluation of $u_T^{ubs} $ is done as follows: 
    486 \begin{equation} \label{eq:dynadv_ubs} 
    487 u_T^{ubs} =\overline u ^i-\;\frac{1}{6}   \begin{cases} 
    488       u"_{i-1/2}&    \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  \geqslant 0$ }    \\ 
    489       u"_{i+1/2}&    \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  < 0$ } 
    490 \end{cases} 
     515\begin{equation} 
     516  \label{eq:dynadv_ubs} 
     517  u_T^{ubs} =\overline u ^i-\;\frac{1}{6} 
     518  \begin{cases} 
     519    u"_{i-1/2}&   \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  \geqslant 0$ }    \\ 
     520    u"_{i+1/2}&   \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  < 0$ } 
     521  \end{cases} 
    491522\end{equation} 
    492523where $u"_{i+1/2} =\delta_{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$. 
     
    560591 
    561592for $k=km$ (surface layer, $jk=1$ in the code) 
    562 \begin{equation} \label{eq:dynhpg_zco_surf} 
    563 \left\{ \begin{aligned} 
    564                \left. \delta_{i+1/2} \left[  p^h          \right] \right|_{k=km}  
    565 &= \frac{1}{2} g \   \left. \delta_{i+1/2} \left[  e_{3w} \ \rho \right] \right|_{k=km}   \\ 
    566                   \left. \delta_{j+1/2} \left[  p^h          \right] \right|_{k=km}  
    567 &= \frac{1}{2} g \   \left. \delta_{j+1/2} \left[  e_{3w} \ \rho \right] \right|_{k=km}   \\ 
    568 \end{aligned} \right. 
     593\begin{equation} 
     594  \label{eq:dynhpg_zco_surf} 
     595  \left\{ 
     596    \begin{aligned} 
     597      \left. \delta_{i+1/2} \left[  p^h          \right] \right|_{k=km} 
     598      &= \frac{1}{2} g \   \left. \delta_{i+1/2} \left[  e_{3w} \ \rho \right] \right|_{k=km}   \\ 
     599      \left. \delta_{j+1/2} \left[  p^h          \right] \right|_{k=km} 
     600      &= \frac{1}{2} g \   \left. \delta_{j+1/2} \left[  e_{3w} \ \rho \right] \right|_{k=km}   \\ 
     601    \end{aligned} 
     602  \right. 
    569603\end{equation}  
    570604 
    571605for $1<k<km$ (interior layer) 
    572 \begin{equation} \label{eq:dynhpg_zco} 
    573 \left\{ \begin{aligned} 
    574                \left. \delta_{i+1/2} \left[  p^h          \right] \right|_{k}  
    575 &=             \left. \delta_{i+1/2} \left[  p^h          \right] \right|_{k-1}  
    576 +    \frac{1}{2}\;g\;   \left. \delta_{i+1/2} \left[  e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k}   \\ 
    577                   \left. \delta_{j+1/2} \left[  p^h          \right] \right|_{k}  
    578 &=                \left. \delta_{j+1/2} \left[  p^h          \right] \right|_{k-1}  
    579 +    \frac{1}{2}\;g\;   \left. \delta_{j+1/2} \left[  e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k}   \\ 
    580 \end{aligned} \right. 
     606\begin{equation} 
     607  \label{eq:dynhpg_zco} 
     608  \left\{ 
     609    \begin{aligned} 
     610      \left. \delta_{i+1/2} \left[  p^h          \right] \right|_{k} 
     611      &=             \left. \delta_{i+1/2} \left[  p^h          \right] \right|_{k-1} 
     612      +    \frac{1}{2}\;g\;   \left. \delta_{i+1/2} \left[  e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k}   \\ 
     613      \left. \delta_{j+1/2} \left[  p^h          \right] \right|_{k} 
     614      &=                \left. \delta_{j+1/2} \left[  p^h          \right] \right|_{k-1} 
     615      +    \frac{1}{2}\;g\;   \left. \delta_{j+1/2} \left[  e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k}   \\ 
     616    \end{aligned} 
     617  \right. 
    581618\end{equation}  
    582619 
     
    620657 
    621658$\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.}) 
    622 \begin{equation} \label{eq:dynhpg_sco} 
    623 \left\{ \begin{aligned} 
    624  - \frac{1}                   {\rho_o \, e_{1u}} \;   \delta_{i+1/2} \left[  p^h  \right]  
    625 + \frac{g\; \overline {\rho}^{i+1/2}}  {\rho_o \, e_{1u}} \;   \delta_{i+1/2} \left[  z_t   \right]    \\ 
    626  - \frac{1}                   {\rho_o \, e_{2v}} \;   \delta_{j+1/2} \left[  p^h  \right]   
    627 + \frac{g\; \overline {\rho}^{j+1/2}}  {\rho_o \, e_{2v}} \;   \delta_{j+1/2} \left[  z_t   \right]    \\ 
    628 \end{aligned} \right. 
     659\begin{equation} 
     660  \label{eq:dynhpg_sco} 
     661  \left\{ 
     662    \begin{aligned} 
     663      - \frac{1}                 {\rho_o \, e_{1u}} \;   \delta_{i+1/2} \left[  p^h  \right] 
     664      + \frac{g\; \overline {\rho}^{i+1/2}}  {\rho_o \, e_{1u}} \;   \delta_{i+1/2} \left[  z_t   \right]    \\ 
     665      - \frac{1}                 {\rho_o \, e_{2v}} \;   \delta_{j+1/2} \left[  p^h  \right] 
     666      + \frac{g\; \overline {\rho}^{j+1/2}}  {\rho_o \, e_{2v}} \;   \delta_{j+1/2} \left[  z_t   \right]    \\ 
     667    \end{aligned} 
     668  \right. 
    629669\end{equation}  
    630670 
     
    693733$\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
    694734 
    695 \begin{equation} \label{eq:dynhpg_lf} 
    696 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
    697    -\frac{1}{\rho_o \,e_{1u} }\delta_{i+1/2} \left[ {p_h^t } \right] 
     735\begin{equation} 
     736  \label{eq:dynhpg_lf} 
     737  \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
     738  -\frac{1}{\rho_o \,e_{1u} }\delta_{i+1/2} \left[ {p_h^t } \right] 
    698739\end{equation} 
    699740 
    700741$\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
    701 \begin{equation} \label{eq:dynhpg_imp} 
    702 \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
    703    -\frac{1}{4\,\rho_o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt}  \right] 
     742\begin{equation} 
     743  \label{eq:dynhpg_imp} 
     744  \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
     745  -\frac{1}{4\,\rho_o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt}  \right] 
    704746\end{equation} 
    705747 
     
    720762so that no additional storage array has to be defined. 
    721763The density used to compute the hydrostatic pressure gradient (whatever the formulation) is evaluated as follows: 
    722 \begin{equation} \label{eq:rho_flt} 
    723    \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 
    724  \quad     \text{with}  \quad  
    725    \widetilde{X} = 1 / 4 \left(  X^{t+\rdt} +2 \,X^t + X^{t-\rdt}  \right) 
    726 \end{equation} 
     764\[ 
     765  % \label{eq:rho_flt} 
     766  \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 
     767  \quad    \text{with}  \quad 
     768  \widetilde{X} = 1 / 4 \left(  X^{t+\rdt} +2 \,X^t + X^{t-\rdt}  \right) 
     769\] 
    727770 
    728771Note that in the semi-implicit case, it is necessary to save the filtered density, 
     
    739782\nlst{namdyn_spg}  
    740783%------------------------------------------------------------------------------------------------------------ 
    741  
    742 $\ $\newline      %force an empty line 
    743784 
    744785Options are defined through the \ngn{namdyn\_spg} namelist variables. 
     
    781822The surface pressure gradient, evaluated using a leap-frog scheme ($i.e.$ centered in time), 
    782823is thus simply given by : 
    783 \begin{equation} \label{eq:dynspg_exp} 
    784 \left\{ \begin{aligned} 
    785  - \frac{1}{e_{1u}\,\rho_o} \;   \delta_{i+1/2} \left[  \,\rho \,\eta\,  \right]    \\ 
    786  - \frac{1}{e_{2v}\,\rho_o} \;   \delta_{j+1/2} \left[  \,\rho \,\eta\,  \right]   
    787 \end{aligned} \right. 
     824\begin{equation} 
     825  \label{eq:dynspg_exp} 
     826  \left\{ 
     827    \begin{aligned} 
     828      - \frac{1}{e_{1u}\,\rho_o} \; \delta_{i+1/2} \left[  \,\rho \,\eta\,  \right]    \\ 
     829      - \frac{1}{e_{2v}\,\rho_o} \; \delta_{j+1/2} \left[  \,\rho \,\eta\,  \right] 
     830    \end{aligned} 
     831  \right. 
    788832\end{equation}  
    789833 
     
    817861%%% 
    818862The barotropic mode solves the following equations: 
    819 \begin{subequations} \label{eq:BT} 
    820   \begin{equation}     \label{eq:BT_dyn} 
    821 \frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}= 
    822  -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h}  
    823 -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \rm {\overline{{\bf U}}_h} + \rm {\overline{\bf G}} 
    824   \end{equation} 
    825  
    826   \begin{equation} \label{eq:BT_ssh} 
    827 \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E 
    828   \end{equation} 
    829 \end{subequations} 
     863% \begin{subequations} 
     864%  \label{eq:BT} 
     865\begin{equation} 
     866  \label{eq:BT_dyn} 
     867  \frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}= 
     868  -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h} 
     869  -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \rm {\overline{{\bf U}}_h} + \rm {\overline{\bf G}} 
     870\end{equation} 
     871\[ 
     872  % \label{eq:BT_ssh} 
     873  \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E 
     874\] 
     875% \end{subequations} 
    830876where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes, 
    831877surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency. 
     
    839885 
    840886%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    841 \begin{figure}[!t]    \begin{center} 
    842 \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 
    843 \caption{  \protect\label{fig:DYN_dynspg_ts} 
    844   Schematic of the split-explicit time stepping scheme for the external and internal modes. 
    845   Time increases to the right. In this particular exemple, 
    846   a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 
    847   Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$. 
    848   Variables with $k$ superscript refer to instantaneous barotropic variables, 
    849   $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and 
    850   secondary weights (blue vertical bars). 
    851   The former are used to obtain time filtered quantities at $t+\rdt$ while 
    852   the latter are used to obtain time averaged transports to advect tracers. 
    853   a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, 
    854   \protect\np{ln\_bt\_av}\forcode{ = .true.}. 
    855   b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, 
    856   \protect\np{ln\_bt\_av}\forcode{ = .true.}. 
    857   c) Forward time integration with no time filtering (POM-like scheme): 
    858   \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. } 
    859 \end{center}    \end{figure} 
     887\begin{figure}[!t] 
     888  \begin{center} 
     889    \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 
     890    \caption{ 
     891      \protect\label{fig:DYN_dynspg_ts} 
     892      Schematic of the split-explicit time stepping scheme for the external and internal modes. 
     893      Time increases to the right. In this particular exemple, 
     894      a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$. 
     895      Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$. 
     896      Variables with $k$ superscript refer to instantaneous barotropic variables, 
     897      $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and 
     898      secondary weights (blue vertical bars). 
     899      The former are used to obtain time filtered quantities at $t+\rdt$ while 
     900      the latter are used to obtain time averaged transports to advect tracers. 
     901      a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.}, 
     902      \protect\np{ln\_bt\_av}\forcode{ = .true.}. 
     903      b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, 
     904      \protect\np{ln\_bt\_av}\forcode{ = .true.}. 
     905      c) Forward time integration with no time filtering (POM-like scheme): 
     906      \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. 
     907    } 
     908  \end{center} 
     909\end{figure} 
    860910%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    861911 
     
    918968We have  
    919969 
    920 \begin{equation} \label{eq:DYN_spg_ts_eta} 
    921 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 
    922    = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right]  
    923 \end{equation} 
    924 \begin{multline} \label{eq:DYN_spg_ts_u} 
    925 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1})  \\ 
    926    = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n})  
    927    - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] 
    928 \end{multline} 
     970\[ 
     971  % \label{eq:DYN_spg_ts_eta} 
     972  \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 
     973  = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 
     974\] 
     975\begin{multline*} 
     976  % \label{eq:DYN_spg_ts_u} 
     977  \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1})  \\ 
     978  = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) 
     979    - H(\tau) \nabla p_s^{(b)}(\tau,t_{n}) +\textbf{M}(\tau) \right] 
     980\end{multline*} 
    929981\ 
    930982 
     
    938990a single cycle. 
    939991This is also the time that sets the barotropic time steps via  
    940 \begin{equation} \label{eq:DYN_spg_ts_t} 
    941 t_n=\tau+n\rdt    
    942 \end{equation} 
     992\[ 
     993  % \label{eq:DYN_spg_ts_t} 
     994  t_n=\tau+n\rdt 
     995\] 
    943996with $n$ an integer. 
    944997The density scaled surface pressure is evaluated via  
    945 \begin{equation} \label{eq:DYN_spg_ts_ps} 
    946 p_s^{(b)}(\tau,t_{n}) = \begin{cases} 
    947    g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o  &      \text{non-linear case} \\ 
    948    g \;\eta_s^{(b)}(\tau,t_{n})  &      \text{linear case}  
    949    \end{cases} 
    950 \end{equation} 
     998\[ 
     999  % \label{eq:DYN_spg_ts_ps} 
     1000  p_s^{(b)}(\tau,t_{n}) = 
     1001  \begin{cases} 
     1002    g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o  &      \text{non-linear case} \\ 
     1003    g \;\eta_s^{(b)}(\tau,t_{n})  &      \text{linear case} 
     1004  \end{cases} 
     1005\] 
    9511006To get started, we assume the following initial conditions  
    952 \begin{equation} \label{eq:DYN_spg_ts_eta} 
    953 \begin{split} 
    954 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} 
    955 \\ 
    956 \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0}  
    957 \end{split} 
    958 \end{equation} 
     1007\[ 
     1008  % \label{eq:DYN_spg_ts_eta} 
     1009  \begin{split} 
     1010    \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)}    \\ 
     1011    \eta^{(b)}(\tau,t_{n=1}) &= \eta^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 
     1012  \end{split} 
     1013\] 
    9591014with  
    960 \begin{equation} \label{eq:DYN_spg_ts_etaF} 
    961  \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 
    962 \end{equation} 
     1015\[ 
     1016  % \label{eq:DYN_spg_ts_etaF} 
     1017  \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 
     1018\] 
    9631019the time averaged surface height taken from the previous barotropic cycle. 
    9641020Likewise,  
    965 \begin{equation} \label{eq:DYN_spg_ts_u} 
    966 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)}   \\ 
    967 \\ 
    968 \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0}     
    969 \end{equation} 
     1021\[ 
     1022  % \label{eq:DYN_spg_ts_u} 
     1023  \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)} \\ \\ 
     1024  \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 
     1025\] 
    9701026with  
    971 \begin{equation} \label{eq:DYN_spg_ts_u} 
    972  \overline{\textbf{U}^{(b)}(\tau)}  
    973    = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) 
    974 \end{equation} 
     1027\[ 
     1028  % \label{eq:DYN_spg_ts_u} 
     1029  \overline{\textbf{U}^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) 
     1030\] 
    9751031the time averaged vertically integrated transport. 
    9761032Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration.  
     
    9791035the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at 
    9801036baroclinic time $\tau + \rdt \tau$  
    981 \begin{equation} \label{eq:DYN_spg_ts_u} 
    982 \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)}  
    983    = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 
    984 \end{equation} 
     1037\[ 
     1038  % \label{eq:DYN_spg_ts_u} 
     1039  \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 
     1040\] 
    9851041The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using 
    9861042the following form  
    9871043 
    988 \begin{equation} \label{eq:DYN_spg_ts_ssh} 
    989 \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]   
     1044\begin{equation} 
     1045  \label{eq:DYN_spg_ts_ssh} 
     1046  \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]   
    9901047\end{equation} 
    9911048 
     
    10001057its stability and reasonably good maintenance of tracer conservation properties (see ??). 
    10011058 
    1002 \begin{equation} \label{eq:DYN_spg_ts_sshf} 
    1003 \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}  
     1059\begin{equation} 
     1060  \label{eq:DYN_spg_ts_sshf} 
     1061  \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)} 
    10041062\end{equation} 
    10051063Another approach tried was  
    10061064 
    1007 \begin{equation} \label{eq:DYN_spg_ts_sshf2} 
    1008 \eta^{F}(\tau-\Delta) = \eta(\tau)  
    1009    + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) 
    1010                 + \overline{\eta^{(b)}}(\tau-\rdt) -2 \;\eta(\tau) \right] 
    1011 \end{equation} 
     1065\[ 
     1066  % \label{eq:DYN_spg_ts_sshf2} 
     1067  \eta^{F}(\tau-\Delta) = \eta(\tau) 
     1068  + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) 
     1069    + \overline{\eta^{(b)}}(\tau-\rdt) -2 \;\eta(\tau) \right] 
     1070\] 
    10121071 
    10131072which is useful since it isolates all the time filtering aspects into the term multiplied by $\alpha$. 
     
    10341093%% gm %%======>>>>   given here the discrete eqs provided to the solver 
    10351094\gmcomment{               %%% copy from chap-model basics  
    1036 \begin{equation} \label{eq:spg_flt} 
    1037 \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 
    1038 - g \nabla \left( \tilde{\rho} \ \eta \right)  
    1039 - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right)  
    1040 \end{equation} 
    1041 where $T_c$, is a parameter with dimensions of time which characterizes the force,  
    1042 $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, 
    1043 and $\rm {\bf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient,  
    1044 non-linear and viscous terms in \autoref{eq:PE_dyn}. 
     1095  \[ 
     1096    % \label{eq:spg_flt} 
     1097    \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 
     1098    - g \nabla \left( \tilde{\rho} \ \eta \right) 
     1099    - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right) 
     1100  \] 
     1101  where $T_c$, is a parameter with dimensions of time which characterizes the force, 
     1102  $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, 
     1103  and $\rm {\bf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient, 
     1104  non-linear and viscous terms in \autoref{eq:PE_dyn}. 
    10451105}   %end gmcomment 
    10461106 
     
    10911151 
    10921152For lateral iso-level diffusion, the discrete operator is:  
    1093 \begin{equation} \label{eq:dynldf_lap} 
    1094 \left\{ \begin{aligned} 
    1095  D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm}  
    1096 \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[  
    1097 {A_f^{lm} \;e_{3f} \zeta } \right] \\  
    1098 \\ 
    1099  D_v^{l{\rm {\bf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm}  
    1100 \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[  
    1101 {A_f^{lm} \;e_{3f} \zeta } \right] \\  
    1102 \end{aligned} \right. 
     1153\begin{equation} 
     1154  \label{eq:dynldf_lap} 
     1155  \left\{ 
     1156    \begin{aligned} 
     1157      D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm} 
     1158          \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[  
     1159        {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\ 
     1160      D_v^{l{\rm {\bf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm} 
     1161          \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[  
     1162        {A_f^{lm} \;e_{3f} \zeta } \right] 
     1163    \end{aligned} 
     1164  \right. 
    11031165\end{equation}  
    11041166 
     
    11241186It must be emphasized that this formulation ignores constraints on the stress tensor such as symmetry. 
    11251187The resulting discrete representation is: 
    1126 \begin{equation} \label{eq:dyn_ldf_iso} 
    1127 \begin{split} 
    1128  D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ 
    1129 &  \left\{\quad  {\delta_{i+1/2} \left[ {A_T^{lm}  \left(  
    1130     {\frac{e_{2t} \; e_{3t} }{e_{1t} } \,\delta_{i}[u] 
    1131    -e_{2t} \; r_{1t} \,\overline{\overline {\delta_{k+1/2}[u]}}^{\,i,\,k}} 
    1132  \right)} \right]}   \right. 
    1133 \\  
    1134 & \qquad +\ \delta_j \left[ {A_f^{lm} \left( {\frac{e_{1f}\,e_{3f} }{e_{2f}  
    1135 }\,\delta_{j+1/2} [u] - e_{1f}\, r_{2f}  
    1136 \,\overline{\overline {\delta_{k+1/2} [u]}} ^{\,j+1/2,\,k}}  
    1137 \right)} \right]  
    1138 \\  
    1139 &\qquad +\ \delta_k \left[ {A_{uw}^{lm} \left( {-e_{2u} \, r_{1uw} \,\overline{\overline  
    1140 {\delta_{i+1/2} [u]}}^{\,i+1/2,\,k+1/2} }  
    1141 \right.} \right.  
    1142 \\  
    1143 &  \ \qquad \qquad \qquad \quad\  
    1144 - e_{1u} \, r_{2uw} \,\overline{\overline {\delta_{j+1/2} [u]}} ^{\,j,\,k+1/2} 
    1145 \\  
    1146 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\  
    1147 +\frac{e_{1u}\, e_{2u} }{e_{3uw} }\,\left( {r_{1uw}^2+r_{2uw}^2}  
    1148 \right)\,\delta_{k+1/2} [u]} \right)} \right]\;\;\;} \right\}  
    1149 \\ 
    1150 \\ 
    1151  D_v^{l\textbf{V}} &= \frac{1}{e_{1v} \, e_{2v} \, e_{3v} }    \\ 
    1152 &  \left\{\quad  {\delta_{i+1/2} \left[ {A_f^{lm}  \left(  
    1153     {\frac{e_{2f} \; e_{3f} }{e_{1f} } \,\delta_{i+1/2}[v] 
    1154    -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}} 
    1155  \right)} \right]}   \right. 
    1156 \\  
    1157 & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t}  
    1158 }\,\delta_{j} [v] - e_{1t}\, r_{2t}  
    1159 \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}}  
    1160 \right)} \right]  
    1161 \\  
    1162 & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline  
    1163 {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right.  
    1164 \\ 
    1165 &  \ \qquad \qquad \qquad \quad\  
    1166 - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} 
    1167 \\  
    1168 & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\  
    1169 +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2}  
    1170 \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\}  
    1171  \end{split} 
     1188\begin{equation} 
     1189  \label{eq:dyn_ldf_iso} 
     1190  \begin{split} 
     1191    D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ 
     1192    &  \left\{\quad  {\delta_{i+1/2} \left[ {A_T^{lm}  \left( 
     1193              {\frac{e_{2t} \; e_{3t} }{e_{1t} } \,\delta_{i}[u] 
     1194                -e_{2t} \; r_{1t} \,\overline{\overline {\delta_{k+1/2}[u]}}^{\,i,\,k}} 
     1195            \right)} \right]}    \right. \\ 
     1196    & \qquad +\ \delta_j \left[ {A_f^{lm} \left( {\frac{e_{1f}\,e_{3f} }{e_{2f} 
     1197            }\,\delta_{j+1/2} [u] - e_{1f}\, r_{2f} 
     1198            \,\overline{\overline {\delta_{k+1/2} [u]}} ^{\,j+1/2,\,k}} 
     1199        \right)} \right] \\ 
     1200    &\qquad +\ \delta_k \left[ {A_{uw}^{lm} \left( {-e_{2u} \, r_{1uw} \,\overline{\overline 
     1201              {\delta_{i+1/2} [u]}}^{\,i+1/2,\,k+1/2} } 
     1202        \right.} \right. \\ 
     1203    &  \ \qquad \qquad \qquad \quad\ 
     1204    - e_{1u} \, r_{2uw} \,\overline{\overline {\delta_{j+1/2} [u]}} ^{\,j,\,k+1/2} \\ 
     1205    & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 
     1206                +\frac{e_{1u}\, e_{2u} }{e_{3uw} }\,\left( {r_{1uw}^2+r_{2uw}^2} 
     1207                \right)\,\delta_{k+1/2} [u]} \right)} \right]\;\;\;} \right\} \\ \\ 
     1208    D_v^{l\textbf{V}} &= \frac{1}{e_{1v} \, e_{2v} \, e_{3v} } \\ 
     1209    &  \left\{\quad  {\delta_{i+1/2} \left[ {A_f^{lm}  \left( 
     1210              {\frac{e_{2f} \; e_{3f} }{e_{1f} } \,\delta_{i+1/2}[v] 
     1211                -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}} 
     1212            \right)} \right]}    \right. \\ 
     1213    & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t}  
     1214            }\,\delta_{j} [v] - e_{1t}\, r_{2t} 
     1215            \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}} 
     1216        \right)} \right] \\ 
     1217    & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline  
     1218              {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. \\ 
     1219    &  \ \qquad \qquad \qquad \quad\ 
     1220    - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} \\ 
     1221    & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\  
     1222                +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} 
     1223                \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\}  
     1224  \end{split} 
    11721225\end{equation} 
    11731226where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and 
     
    12111264The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. 
    12121265The vertical diffusion operators given by \autoref{eq:PE_zdf} take the following semi-discrete space form: 
    1213 \begin{equation} \label{eq:dynzdf} 
    1214 \left\{   \begin{aligned} 
    1215 D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta_k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } 
    1216                               \ \delta_{k+1/2} [\,u\,]         \right]     \\ 
    1217 \\ 
    1218 D_v^{vm} &\equiv \frac{1}{e_{3v}} \ \delta_k \left[ \frac{A_{vw}^{vm} }{e_{3vw} } 
    1219                               \ \delta_{k+1/2} [\,v\,]         \right] 
    1220 \end{aligned}   \right. 
    1221 \end{equation}  
     1266\[ 
     1267  % \label{eq:dynzdf} 
     1268  \left\{ 
     1269    \begin{aligned} 
     1270      D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta_k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } 
     1271        \ \delta_{k+1/2} [\,u\,]         \right]     \\ 
     1272      \\ 
     1273      D_v^{vm} &\equiv \frac{1}{e_{3v}} \ \delta_k \left[ \frac{A_{vw}^{vm} }{e_{3vw} } 
     1274        \ \delta_{k+1/2} [\,v\,]         \right] 
     1275    \end{aligned} 
     1276  \right. 
     1277\] 
    12221278where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and diffusivity coefficients. 
    12231279The way these coefficients are evaluated depends on the vertical physics used (see \autoref{chap:ZDF}). 
     
    12261282At the surface, the momentum fluxes are prescribed as the boundary condition on 
    12271283the vertical turbulent momentum fluxes, 
    1228 \begin{equation} \label{eq:dynzdf_sbc} 
    1229 \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 
    1230     = \frac{1}{\rho_o} \binom{\tau_u}{\tau_v } 
     1284\begin{equation} 
     1285  \label{eq:dynzdf_sbc} 
     1286  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 
     1287  = \frac{1}{\rho_o} \binom{\tau_u}{\tau_v } 
    12311288\end{equation} 
    12321289where $\left( \tau_u ,\tau_v \right)$ are the two components of the wind stress vector in 
     
    12861343$\bullet$ vector invariant form or linear free surface 
    12871344(\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 
    1288 \begin{equation} \label{eq:dynnxt_vec} 
    1289 \left\{   \begin{aligned} 
    1290 &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt  \ \text{RHS}_u^t     \\ 
    1291 &u_f^t \;\quad = u^t+\gamma \,\left[ {u_f^{t-\rdt} -2u^t+u^{t+\rdt}} \right] 
    1292 \end{aligned}   \right. 
    1293 \end{equation}  
     1345\[ 
     1346  % \label{eq:dynnxt_vec} 
     1347  \left\{ 
     1348    \begin{aligned} 
     1349      &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt  \ \text{RHS}_u^t     \\ 
     1350      &u_f^t \;\quad = u^t+\gamma \,\left[ {u_f^{t-\rdt} -2u^t+u^{t+\rdt}} \right] 
     1351    \end{aligned} 
     1352  \right. 
     1353\] 
    12941354 
    12951355$\bullet$ flux form and nonlinear free surface 
    12961356(\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 
    1297 \begin{equation} \label{eq:dynnxt_flux} 
    1298 \left\{   \begin{aligned} 
    1299 &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t     \\ 
    1300 &\left(e_{3u}\,u\right)_f^t \;\quad = \left(e_{3u}\,u\right)^t 
    1301   +\gamma \,\left[ {\left(e_{3u}\,u\right)_f^{t-\rdt} -2\left(e_{3u}\,u\right)^t+\left(e_{3u}\,u\right)^{t+\rdt}} \right] 
    1302 \end{aligned}   \right. 
    1303 \end{equation}  
     1357\[ 
     1358  % \label{eq:dynnxt_flux} 
     1359  \left\{ 
     1360    \begin{aligned} 
     1361      &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t     \\ 
     1362      &\left(e_{3u}\,u\right)_f^t \;\quad = \left(e_{3u}\,u\right)^t 
     1363      +\gamma \,\left[ {\left(e_{3u}\,u\right)_f^{t-\rdt} -2\left(e_{3u}\,u\right)^t+\left(e_{3u}\,u\right)^{t+\rdt}} \right] 
     1364    \end{aligned} 
     1365  \right. 
     1366\] 
    13041367where RHS is the right hand side of the momentum equation, 
    13051368the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient. 
     
    13141377 
    13151378% ================================================================ 
     1379\biblio 
     1380 
    13161381\end{document} 
Note: See TracChangeset for help on using the changeset viewer.