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.
Chap_DYN.tex in trunk/DOC/BETA/Chapters – NEMO

source: trunk/DOC/BETA/Chapters/Chap_DYN.tex @ 817

Last change on this file since 817 was 817, checked in by gm, 16 years ago

trunk - update including Steven correction of the first 5 chapters (until DYN) and activation of Appendix A & B

  • Property svn:executable set to *
File size: 58.0 KB
Line 
1% ================================================================
2% Chapter Ñ Ocean Dynamics (DYN)
3% ================================================================
4\chapter{Ocean Dynamics (DYN)}
5\label{DYN}
6\minitoc
7
8% add a figure for  dynvor ens, ene latices
9
10
11$\ $\newline      %force an empty line
12
13Using the representation described in Chap.\ref{DOM}, several semi-discrete
14space forms of the dynamical equations are available depending on the vertical
15coordinate used and on the conservation properties of the vorticity term. In all
16the equations presented here, the masking has been omitted for simplicity.
17One must be aware that all the quantities are masked fields and that each time a
18average or difference operator is used, the resulting field is multiplied by a mask.
19
20The prognostic ocean dynamics equation can be summarized as follows:
21\begin{equation*}
22\text{NXT} = \dbinom {\text{VOR} + \text{KEG} + \text {ZAD} }
23                  {\text{COR} + \text{ADV}                       }
24         + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF}
25\end{equation*}
26
27NXT stands for next, referring to the time-stepping. The first group of terms on
28the rhs of the momentum equations corresponds to the Coriolis and advection
29terms that are decomposed into a vorticity part (VOR), a kinetic energy part (KEG)
30and, a vertical advection part (ZAD) in the vector invariant formulation or a Coriolis
31and advection part(COR+ADV) in the flux formulation. The terms following these
32are the pressure gradient contributions (HPG, Hydrostatic Pressure Gradient,
33and SPG, Surface Pressure Gradient); and contributions from lateral diffusion
34(LDF) and vertical diffusion (ZDF), which are added to the rhs in the \mdl{dynldf} 
35and \mdl{dynzdf} modules. The vertical diffusion term includes the surface and
36bottom stresses. The external forcings and parameterisations require complex
37inputs (surface wind stress calculation using bulk formulae, estimation of mixing
38coefficients) that are carried out in modules SBC, LDF and ZDF and are described
39in Chapters \ref{SBC}, \ref{LDF} and \ref{ZDF}, respectively.
40
41In the present chapter we also describe the diagnostic equations used to compute
42the horizontal divergence and curl of the velocities (\emph{divcur} module) as well
43as the vertical velocity (\emph{wzvmod} module).
44
45The different options available to the user are managed by namelist variables.
46For equation term \textit{ttt}, the logical namelist variables are \textit{ln\_dynttt\_xxx},
47where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme.
48If a CPP key is used for this term its name is \textbf{key\_ttt}. The corresponding
49code can be found in the \textit{dynttt\_xxx} module in the DYN directory, and it is
50usually computed in the \textit{dyn\_ttt\_xxx} subroutine.
51
52The user has the option of extracting each tendency term of both the rhs of the
533D momentum equation (\key{trddyn} defined) for output, as described in
54Chap.\ref{MISC}.  Furthermore, the tendency terms associated to the 2D
55barotropic vorticity balance (\key{trdvor} defined) can be derived on-line from the
563D terms.
57%%%
58\gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does MISC correspond to "extracting tendency terms" or "vorticity balance"?}
59
60% ================================================================
61% Coriolis and Advection terms: vector invariant form
62% ================================================================
63\section{Coriolis and Advection: vector invariant form}
64\label{DYN_adv_cor_vect}
65%-----------------------------------------nam_dynadv----------------------------------------------------
66\namdisplay{nam_dynadv} 
67%-------------------------------------------------------------------------------------------------------------
68
69The vector invariant form of the momentum equations is the one most
70often used in applications of \NEMO ocean model. The flux form option
71(see next section) has been recently introduced in version $2$.
72Coriolis and momentum
73advection terms are evaluated using a leapfrog scheme, $i.e.$ the velocity
74appearing in these expressions is centred in time (\textit{now} velocity).
75At the lateral boundaries either free slip, no slip or partial slip boundary
76conditions are applied following Chap.\ref{LBC}.
77
78% -------------------------------------------------------------------------------------------------------------
79%        Vorticity term
80% -------------------------------------------------------------------------------------------------------------
81\subsection   [Vorticity term (\textit{dynvor}) ]
82         {Vorticity term (\mdl{dynvor})}
83\label{DYN_vor}
84%------------------------------------------nam_dynvor----------------------------------------------------
85\namdisplay{nam_dynvor} 
86%-------------------------------------------------------------------------------------------------------------
87
88Different discretisations of the vorticity term (\textit{ln\_dynvor\_xxx}=.true.) are
89available: conserving potential enstrophy of horizontally non-divergent flow;
90conserving horizontal kinetic energy; or conserving potential enstrophy for the
91relative vorticity term and horizontal kinetic energy for the planetary vorticity term
92(see  Appendix~\ref{Apdx_C}). The vorticity terms are given below for the general
93case, but note that in the full step $z$-coordinate (\key{zco} is defined),
94$e_{3u} =e_{3v} =e_{3f}$ so that the vertical scale factors disappear.
95
96%-------------------------------------------------------------
97%                 enstrophy conserving scheme
98%-------------------------------------------------------------
99\subsubsection{Enstrophy conserving scheme (\np{ln\_dynvor\_ens}=.true.)}
100\label{DYN_vor_ens}
101
102In the enstrophy conserving case (ENS scheme), the discrete formulation of the
103vorticity term provides a global conservation of the enstrophy
104($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent
105flow ($i.e.$ $\chi=0$), but does not conserve the total kinetic energy. It is given by:
106\begin{equation} \label{Eq_dynvor_ens}
107\left\{ 
108\begin{aligned}
109{-\frac{1}{e_{1u} } } & {\overline {\left( { \frac{\zeta +f}{e_{3f} }} \right)} }^{\,i} & {\overline{\overline {\left( {e_{1v} e_{3v} v} \right)}} }^{\,i, j+1/2}    \\
110{+\frac{1}{e_{2v} } } & {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)} }^{\,j}  & {\overline{\overline {\left( {e_{2u} e_{3u} u} \right)}} }^{\,i+1/2, j} 
111\end{aligned} 
112 \right.
113\end{equation} 
114
115%-------------------------------------------------------------
116%                 energy conserving scheme
117%-------------------------------------------------------------
118\subsubsection{Energy conserving scheme (\np{ln\_dynvor\_ene}=.true.)}
119\label{DYN_vor_ene}
120
121The kinetic energy conserving scheme (ENE scheme) conserves the global
122kinetic energy but not the global enstrophy. It is given by:
123\begin{equation} \label{Eq_dynvor_ene}
124\left\{ {
125\begin{aligned}
126{-\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)
127\;\overline {\left( {e_{1v} e_{3v} v} \right)} ^{\,i+1/2}} }^{\,j} }    \\
128{+\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)
129\;\overline {\left( {e_{2u} e_{3u} u} \right)} ^{\,j+1/2}} }^{\,i} }
130\end{aligned} 
131} \right.
132\end{equation} 
133
134%-------------------------------------------------------------
135%                 mix energy/enstrophy conserving scheme
136%-------------------------------------------------------------
137\subsubsection{Mixed energy/enstrophy conserving scheme (\np{ln\_dynvor\_mix}=.true.) }
138\label{DYN_vor_mix}
139
140The mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the
141two previous schemes is used. It consists of the ENS scheme (\ref{Eq_dynvor_ens})
142to the relative vorticity term, and of the ENE scheme (\ref{Eq_dynvor_ene}) applied
143to the planetary vorticity term.
144\begin{equation} \label{Eq_dynvor_mix}
145\left\{ {
146\begin{aligned}
147 {-\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} 
148 \; {\overline{\overline {\left( {e_{1v} \; e_{3v} \ v} \right)}} }^{\,i,j+1/2} -\frac{1}{e_{1u} }
149 \; {\overline {\left( {\frac{f}{e_{3f} }} \right)
150 \;\overline {\left( {e_{1v} \; e_{3v} \ v} \right)} ^{\,i+1/2}} }^{\,j} } \\
151{+\frac{1}{e_{2v} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^j
152 \; {\overline{\overline {\left( {e_{2u} \; e_{3u} \ u} \right)}} }^{\,i+1/2,j} +\frac{1}{e_{2v} }
153 \; {\overline {\left( {\frac{f}{e_{3f} }} \right)
154 \;\overline {\left( {e_{2u}\; e_{3u} \ u} \right)} ^{\,j+1/2}} }^{\,i} } \hfill
155\end{aligned} 
156} \right.
157\end{equation} 
158
159%-------------------------------------------------------------
160%                 energy and enstrophy conserving scheme
161%-------------------------------------------------------------
162\subsubsection{Energy and enstrophy conserving scheme (\np{ln\_dynvor\_een}=.true.) }
163\label{DYN_vor_een}
164
165In the energy and enstrophy conserving scheme (EEN scheme), the vorticity term
166is  evaluated using the vorticity advection scheme of \citet{Arakawa1990}.
167This scheme conserves both total energy and potential enstrophy in the limit of
168horizontally nondivergent flow ($i.e. \ \chi=0$). While EEN is more complicated
169than ENS or ENE and does not conserve potential enstrophy and total energy in
170general flow, it tolerates arbitrarily thin layers. This feature is essential for
171$z$-coordinate with partial step.
172%%%
173\gmcomment{gm :   it actually conserve kinetic energy  !   show that in appendix C }
174%%%
175
176The \citet{Arakawa1990} vorticity advection scheme for a single layer is modified
177for spherical coordinates as described by \citet{Arakawa1981} to obtain the EEN
178scheme. The potential vorticity, defined at an $f$-point, is:
179\begin{equation} \label{Eq_pot_vor}
180q_f  = \frac{\zeta +f} {e_{3f} }
181\end{equation}
182where the relative vorticity is defined by (\ref{Eq_divcur_cur}), the Coriolis parameter
183is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:
184\begin{equation} \label{Eq_een_e3f}
185e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2}
186\end{equation}
187
188%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
189\begin{figure}[!ht] \label{Fig_DYN_een_triad}
190\begin{center}
191\includegraphics[width=0.70\textwidth]{./Figures/Fig_DYN_een_triad.pdf}
192\caption{Triads used in the energy and enstrophy conserving scheme (een) for
193$u$-component (upper panel) and $v$-component (lower panel).}
194\end{center}
195\end{figure}
196%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
197
198Note that a key point in \eqref{Eq_een_e3f} is that the averaging in \textbf{i}- and
199\textbf{j}- directions uses the masked vertical scale factor but is always divided by
200$4$, not by the sum of the mask at $T$-point. This preserves the continuity of
201$e_{3f}$ when one or more of the neighbouring $e_{3T}$ tends to zero and
202extends by continuity the value of $e_{3f}$ in the land areas.
203%%%
204\gmcomment{this has to be further investigate in case of several step topography}
205%%%
206
207The vorticity terms are represented as:
208\begin{equation} \label{Eq_dynvor_een}
209\left\{ {
210\begin{aligned}
211 +q\,e_3 \, v  &\equiv +\frac{1}{e_{1u} }  \left[
212{{\begin{array}{*{20}c}
213      {\,\ \ a_{j+1/2}^{i   } \left( {e_{1v} e_{3v} \ v} \right)_{j+1}^{i+1/2} } 
214   {\,+\,b_{j+1/2}^{i   } \left( {e_{1v} e_{3v} \ v} \right)_{j+1}^{i-1/2}  } \\
215 \\
216     {  +\,c_{j-1/2}^{i   }  \left( {e_{1v} e_{3v} \ v} \right)_{j    }^{i+1/2}         } 
217   {\,+\,d_{j+1/2}^{i   } \left( {e_{1v} e_{3v} \ v} \right)_{j+1}^{i+1/2} } \\
218\end{array} }} \right] \\ 
219\\
220-q\,e_3 \,u       &\equiv -\frac{1}{e_{2v} }  \left[
221{{\begin{array}{*{20}c}
222   {\,\ \ a_{j-1/2}^{i   }  \left( {e_{2u} e_{3v} \ u} \right)_{j+1}^{i+1/2} } 
223   {\,+\,b_{j-1/2}^{i+1}  \left( {e_{2u} e_{3v} \ u} \right)_{j+1/2}^{i+1} } \\
224 \\
225      {  +\,c_{j+1/2}^{i+1} \left( {e_{2u} e_{3v} \ u} \right)_{j+1/2}^{i+1} } 
226   {\,+\,d_{j+1/2}^{i   }  \left( {e_{2u} e_{3v} \ u} \right)_{j+1/2}^{i   } } \\
227\end{array} }} \right]
228\end{aligned} 
229} \right.
230\end{equation} 
231where $a$, $b$, $c$ and $d$ are triad combinations of the neighbouring
232potential vorticities (Fig. \ref{Fig_DYN_een_triad}):
233\begin{equation} \label{Eq_een_triads}
234\left\{ 
235\begin{aligned}
236 a_{\,j+1/2}^i & = \frac{1}  {12} \left( q_{j+1/2}^{i+1} + q_{j+1 /2}^i + q_{j-1/2}^\right)    \\ 
237 \\
238 b_{\,j+1/2}^i & = \frac{1}  {12} \left( q_{j+1/2}^{i-1} +q_{j+1/2}^i +q_{j-1/2}^i   \right)     \\ 
239\\
240 c_{\,j+1/2}^i & = \frac{1}  {12} \left( q_{j-1/2}^{i-1} +q_{j+1/2}^i +q_{j-1/2}^i   \right)     \\ 
241\\
242 d_{\,j+1/2}^i & = \frac{1}  {12} \left( q_{j-1/2}^{i+1} +q_{j+1/2}^i +q_{j-1/2}^\right)     \\ 
243\end{aligned} 
244\right.
245\end{equation}
246
247%--------------------------------------------------------------------------------------------------------------
248%           Kinetic Energy Gradient term
249%--------------------------------------------------------------------------------------------------------------
250\subsection   [Kinetic Energy Gradient term (\textit{dynkeg})]
251         {Kinetic Energy Gradient term (\mdl{dynkeg})}
252\label{DYN_keg}
253
254As demonstarted in Appendix~\ref{Apdx_C}, there is a single discrete formulation
255of the kinetic energy gradient term that, together with the formulation chosen for
256the vertical advection (see below), conserves the total kinetic energy:
257\begin{equation} \label{Eq_dynkeg}
258\left\{ \begin{aligned}
259 -\frac{1}{2 \; e_{1u} } 
260 & \ \delta _{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]   \\
261 -\frac{1}{2 \; e_{2v} } 
262 & \ \delta _{j+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]   
263\end{aligned} \right.
264\end{equation} 
265
266%--------------------------------------------------------------------------------------------------------------
267%           Vertical advection term
268%--------------------------------------------------------------------------------------------------------------
269\subsection   [Vertical advection term (\textit{dynzad}) ]
270         {Vertical advection term (\mdl{dynzad}) }
271\label{DYN_zad}
272
273The discrete formulation of the vertical advection, together with the formulation
274chosen for the gradient of kinetic energy (KE) term, conserves the total kinetic
275energy. Indeed, the change of KE due to the vertical advection is exactly
276balanced by the change of KE due to the gradient of KE (see Appendix~\ref{Apdx_C}).
277\begin{equation} \label{Eq_dynzad}
278\left\{     \begin{aligned}
279 -\frac{1}  { e_{1u}\,e_{2u}\,e_{3u} }  & 
280  \ {\overline {\overline{ e_{1T}\,e_{2T}\,w } ^{\,i+1/2}  \;\delta _{k+1/2} \left[ u \right]  }^{\,k}   } \\
281 -\frac{1}  { e_{1v}\,e_{2v}\,e_{3v} }  &
282  \ {\overline {\overline{ e_{1T}\,e_{2T}\,w } ^{\,j+1/2}  \;\delta _{k+1/2} \left[ u \right]  }^{\,k}   }
283\end{aligned} \right.
284\end{equation} 
285
286% ================================================================
287% Coriolis and Advection : flux form
288% ================================================================
289\section{Coriolis and Advection: flux form}
290\label{DYN_adv_cor_flux}
291%------------------------------------------nam_dynadv----------------------------------------------------
292\namdisplay{nam_dynadv} 
293%-------------------------------------------------------------------------------------------------------------
294
295In the flux form (as in the vector invariant form), the Coriolis and momentum
296advection terms are evaluated using a leapfrog scheme, $i.e.$ the velocity
297appearing in their expressions is centred in time (\textit{now} velocity). At the
298lateral boundaries either free slip, no slip or partial slip boundary conditions
299are applied following Chap.\ref{LBC}.
300
301
302%--------------------------------------------------------------------------------------------------------------
303%           Coriolis plus curvature metric terms
304%--------------------------------------------------------------------------------------------------------------
305\subsection   [Coriolis plus curvature metric terms (\textit{dynvor}) ]
306         {Coriolis plus curvature metric terms (\mdl{dynvor}) }
307\label{DYN_cor_flux}
308
309In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis
310parameter has been modified to account for the "metric" term. This altered
311Coriolis parameter is thus discretised at $f$-points. It is given by:
312\begin{multline} \label{Eq_dyncor_metric}
313f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i}  -  u\frac{\partial e_1 }{\partial j}} \right\\
314   \equiv   f + \frac{1}{e_{1f} e_{2f} } 
315   \left( { \ \overline v ^{i+1/2}\delta _{i+1/2} \left[ {e_{2u} } \right] 
316            -  \overline u ^{j+1/2}\delta _{j+1/2} \left[ {e_{1u} } \right]  }  \ \right)
317\end{multline} 
318
319Any of the (\ref{Eq_dynvor_ens}), (\ref{Eq_dynvor_ene}) and (\ref{Eq_dynvor_een})
320schemes can be used to compute the product of the Coriolis parameter and the
321vorticity. However, the energy-conserving scheme  (\ref{Eq_dynvor_een}) has
322exclusively been used to date. This term is evaluated using a leapfrog scheme,
323$i.e.$ the velocity is centred in time (\textit{now} velocity).
324
325%--------------------------------------------------------------------------------------------------------------
326%           Flux form Advection term
327%--------------------------------------------------------------------------------------------------------------
328\subsection   [Flux form Advection term (\textit{dynadv}) ]
329         {Flux form Advection term (\mdl{dynadv}) }
330\label{DYN_adv_flux}
331
332The discrete expression of the advection term is given by :
333\begin{equation} \label{Eq_dynadv}
334\left\{ 
335\begin{aligned}
336\frac{1}{e_{1u}\,e_{2u}\,e_{3u}} 
337\left(      \delta _{i+1/2} \left[ \overline{e_{2u}\,e_{3u}\ u }^{i       }  \ u_T      \right]   
338          + \delta _{j       } \left[ \overline{e_{1u}\,e_{3u}\ v }^{i+1/2}  \ u_F      \right] \right\ \;   \\
339\left.   + \delta _{k      } \left[ \overline{e_{1w}\,e_{2w} w}^{i+1/2}  \ u_{uw} \right] \right)   \\
340\\
341\frac{1}{e_{1v}\,e_{2v}\,e_{3v}} 
342\left(   \delta _{i      } \left[  \overline{e_{2u}\,e_{3u } \ u }^{j+1/2} \ v_F       \right] 
343         + \delta _{j+1/2} \left[ \overline{e_{1u}\,e_{3u } \ v }^{i       } \ v_T       \right] \right\ \, \\
344\left.  + \delta _{k     } \left[  \overline{e_{1w}\,e_{2w} \ w}^{j+1/2} \ v_{vw}  \right] \right) \\
345\end{aligned}
346\right.
347\end{equation}
348
349Two advection schemes are available: a $2^{nd}$ order centered finite
350difference scheme, CEN2, or a $3^{rd}$ order upstream biased scheme, UBS.
351The latter is described in \citet{Sacha2005}. The schemes are selected using
352the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. In flux
353form, the schemes differ by the choice of a space and time interpolation to
354define the value of $u$ and $v$ at the centre of each face of $u$- and $v$-cells,
355$i.e.$ at the $T$-, $f$-, and $uw$-points for $u$ and at the $f$-, $T$- and
356$vw$-points for $v$.
357
358%-------------------------------------------------------------
359%                 2nd order centred scheme
360%-------------------------------------------------------------
361\subsubsection{$2^{nd}$ order centred scheme (cen2) (\np{ln\_dynadv\_cen2}=.true.)}
362\label{DYN_adv_cen2}
363
364In the centered $2^{nd}$ order formulation, the velocity is evaluated as the
365mean of the two neighbouring points :
366\begin{equation} \label{Eq_dynadv_cen2}
367\left\{     \begin{aligned}
368 u_T^{cen2} &=\overline u^{i }      \quad & 
369  u_F^{cen2} &=\overline u^{j+1/2}     \quad &
370 u_{uw}^{cen2} &=\overline u^{k+1/2}      \\
371 v_F^{cen2} &=\overline v ^{i+1/2}     \quad &
372 v_F^{cen2} &=\overline v^j      \quad &
373 v_{vw}^{cen2} &=\overline v ^{k+1/2}      \\
374\end{aligned} \right.
375\end{equation} 
376
377The scheme is non diffusive (i.e. conserves the kinetic energy) but dispersive
378($i.e.$ it may create false extrema). It is therefore notoriously noisy and must
379be used in conjunction with an explicit diffusion operator to produce a sensible
380solution. The associated time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter, so $u$ and $v$ are the \emph{now} 
381velocities.
382
383%-------------------------------------------------------------
384%                 UBS scheme
385%-------------------------------------------------------------
386\subsubsection{Upstream Biased Scheme (UBS) (\np{ln\_dynadv\_ubs}=.true.)}
387\label{DYN_adv_ubs}
388
389The UBS advection scheme is an upstream biased third order scheme based on
390an upstream-biased parabolic interpolation. For example, the evaluation of
391$u_T^{ubs} $ is done as follows:
392\begin{equation} \label{Eq_dynadv_ubs}
393u_T^{ubs} =\overline u ^i-\;\frac{1}{6}   \begin{cases}
394      u"_{i-1/2}&    \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  \geqslant 0$ }    \\
395      u"_{i+1/2}&    \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  < 0$ }
396\end{cases}
397\end{equation}
398where $u"_{i+1/2} =\delta _{i+1/2} \left[ {\delta _i \left[ u \right]} \right]$. This results
399in a dissipatively dominant ($i.e.$ hyper-diffusive) truncation error \citep{Sacha2005}.
400The overall performance of the advection scheme is similar to that reported in
401\citet{Farrow1995}. It is a relatively good compromise between accuracy and
402smoothness. It is not a \emph{positive} scheme, meaning that false extrema are
403permitted. But the amplitudes of the false extrema are significantly reduced over
404those in the centred second order method.
405
406The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$ 
407order evaluation of the advection is preferred, $i.e.$ $u_{uw}^{ubs}$ and
408$u_{vw}^{ubs}$ in \eqref{Eq_dynadv_cen2} are used. UBS is diffusive and is
409associated with vertical mixing of momentum. \gmcomment{ gm  pursue the
410sentence:Since vertical mixing of momentum is a source term of the TKE equation...  }
411
412For stability reasons,  the first term in (\ref{Eq_dynadv_ubs}), which corresponds
413to a second order centred scheme, is evaluated using the \textit{now} velocity
414(centred in time), while the second term, which is the diffusive part of the scheme,
415is evaluated using the \textit{before} velocity (forward in time). This is discussed
416by \citet{Webb1998} in the context of the Quick advection scheme.
417
418Note that the UBS and Quadratic Upstream Interpolation for Convective Kinematics
419(QUICK) schemes only differ by one coefficient. Substituting $1/6$ with $1/8$ in
420(\ref{Eq_dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb1998}.
421This option is not available through a namelist parameter, since the $1/6$ coefficient
422is hard coded. Nevertheless it is quite easy to make the substitution in
423\mdl{dynadv\_ubs} module and obtain a QUICK scheme.
424
425Note also that in the current version of \mdl{dynadv\_ubs}, there is also the
426possibility of using a $4^{th}$ order evaluation of the advective velocity as in
427ROMS. This is an error and should be suppressed soon.
428%%%
429\gmcomment{action :  this have to be done}
430%%%
431
432% ================================================================
433%           Hydrostatic pressure gradient term
434% ================================================================
435\section  [Hydrostatic pressure gradient (\textit{dynhpg})]
436      {Hydrostatic pressure gradient (\mdl{dynhpg})}
437\label{DYN_hpg}
438%------------------------------------------nam_dynhpg---------------------------------------------------
439\namdisplay{nam_dynhpg} 
440\namdisplay{namflg} 
441%-------------------------------------------------------------------------------------------------------------
442%%%
443\gmcomment{Suppress the namflg namelist and incorporate it in the namhpg namelist}
444%%%
445
446The key distinction between the different algorithms used for the hydrostatic
447pressure gradient is the vertical coordinate used, since HPG is a \emph{horizontal} 
448pressure gradient, $i.e.$ computed along geopotential surfaces. As a result, any
449tilt of the surface of the computational levels will require a specific treatment to
450compute the hydrostatic pressure gradient.
451
452The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme,
453$i.e.$ the density appearing in its expression is centred in time (\emph{now} rho), or
454a semi-implcit scheme. At the lateral boundaries either free slip, no slip or partial slip
455boundary conditions are applied.
456
457%--------------------------------------------------------------------------------------------------------------
458%           z-coordinate with full step
459%--------------------------------------------------------------------------------------------------------------
460\subsection   [$z$-coordinate with full step (\np{ln\_dynhpg\_zco}) ]
461         {$z$-coordinate with full step (\np{ln\_dynhpg\_zco}=.true.)}
462\label{DYN_hpg_zco}
463
464The hydrostatic pressure can be obtained by integrating the hydrostatic equation
465vertically from the surface. However, the pressure is large at great depth while its
466horizontal gradient is several orders of magnitude smaller. This may lead to large
467truncation errors in the pressure gradient terms. Thus, the two horizontal components
468of the hydrostatic pressure gradient are computed directly as follows:
469
470for $k=km$ (surface layer, $jk=1$ in the code)
471\begin{equation} \label{Eq_dynhpg_zco_surf}
472\left\{ \begin{aligned}
473               \left. \delta _{i+1/2} \left[  p^h         \right] \right|_{k=km} 
474&= \frac{1}{2} g \   \left. \delta _{i+1/2} \left[  e_{3w} \ \rho \right] \right|_{k=km}   \\
475                  \left. \delta _{j+1/2} \left[  p^h            \right] \right|_{k=km} 
476&= \frac{1}{2} g \   \left. \delta _{j+1/2} \left[  e_{3w} \ \rho \right] \right|_{k=km}   \\
477\end{aligned} \right.
478\end{equation} 
479
480for $1<k<km$ (interior layer)
481\begin{equation} \label{Eq_dynhpg_zco}
482\left\{ \begin{aligned}
483               \left. \delta _{i+1/2} \left[  p^h         \right] \right|_{k} 
484&=             \left. \delta _{i+1/2} \left[  p^h         \right] \right|_{k-1} 
485+    \frac{1}{2}\;g\;   \left. \delta _{i+1/2} \left[  e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k}   \\
486                  \left. \delta _{j+1/2} \left[  p^h            \right] \right|_{k} 
487&=                \left. \delta _{j+1/2} \left[  p^h            \right] \right|_{k-1} 
488+    \frac{1}{2}\;g\;   \left. \delta _{j+1/2} \left[  e_{3w} \ \overline {\rho}^{k+1/2} \right] \right|_{k}   \\
489\end{aligned} \right.
490\end{equation} 
491
492Note that the $1/2$ factor in (\ref{Eq_dynhpg_zco_surf}) is adequate because of
493the definition of $e_{3w}$ as the vertical derivative of the scale factor at the surface
494level ($z=0)$.
495
496%--------------------------------------------------------------------------------------------------------------
497%           z-coordinate with partial step
498%--------------------------------------------------------------------------------------------------------------
499\subsection   [$z$-coordinate with partial step (\np{ln\_dynhpg\_zps})]
500         {$z$-coordinate with partial step (\np{ln\_dynhpg\_zps}=.true.)}
501\label{DYN_hpg_zps}
502
503With partial bottom cells, tracers in horizontally adjacent cells generally live at
504different depths. Before taking horizontal gradients between these tracer points,
505a linear interpolation is used to approximate the deeper tracer as if it actually lived
506at the depth of the shallower tracer point.
507
508Apart from this modification, the horizontal hydrostatic pressure gradient evaluated
509in the $z$-coordinate with partial step is exactly as in the pure $z$-coordinate case.
510As explained in detail in section \S\ref{TRA_zpshde}, the nonlinearity of pressure
511effects in the equation of state is such that it is better to interpolate temperature and
512salinity vertically before computing the density. Horizontal gradients of temperature
513and salinity are needed for the TRA modules, which is the reason why the horizontal
514gradients of density at the deepest model level are computed in module \mdl{zpsdhe} 
515located in the TRA directory and described in \S\ref{TRA_zpshde}.
516
517%--------------------------------------------------------------------------------------------------------------
518%           s- and s-z-coordinates
519%--------------------------------------------------------------------------------------------------------------
520\subsection{$s$- and $z$-$s$-coordinates}
521\label{DYN_hpg_sco}
522
523Pressure gradient formulations in $s$-coordinate have been the subject of a vast
524literature ($e.g.$, \citet{Song1998, Sacha2003}). A number of different pressure
525gradient options are coded, but they are not yet fully documented or tested.
526
527$\bullet$ Traditional coding (see for example \citet{Madec1996}: (\np{ln\_dynhpg\_sco}=.true.,
528\np{ln\_dynhpg\_hel}=.true.)
529\begin{equation} \label{Eq_dynhpg_sco}
530\left\{ \begin{aligned}
531 - \frac{1}                   {\rho_o \, e_{1u}} \;   \delta _{i+1/2} \left[  p^h  \right] 
532+ \frac{g\; \overline {\rho}^{i+1/2}}  {\rho_o \, e_{1u}} \;   \delta _{i+1/2} \left[  z_T  \right]    \\
533 - \frac{1}                   {\rho_o \, e_{2v}} \;   \delta _{j+1/2} \left[  p^h  \right] 
534+ \frac{g\; \overline {\rho}^{j+1/2}}  {\rho_o \, e_{2v}} \;   \delta _{j+1/2} \left[  z_T  \right]    \\
535\end{aligned} \right.
536\end{equation} 
537
538Where the first term is the pressure gradient along coordinates, computed as in
539\eqref{Eq_dynhpg_zco_surf} - \eqref{Eq_dynhpg_zco}, and $z_T$ is the depth of
540the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point
541($e_{3w}$). The version \np{ln\_dynhpg\_hel}=.true. has been added by Aike
542Beckmann and involves a redefinition of the relative position of $T$-points relative
543to $w$-points.
544
545$\bullet$ Weighted density Jacobian (WDJ) \citep{Song1998} (\np{ln\_dynhpg\_wdj}=.true.)
546
547$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{Sacha2003} 
548(\np{ln\_dynhpg\_djc}=.true.)
549
550$\bullet$ Rotated axes scheme (rot) \citep{Thiem2006} (\np{ln\_dynhpg\_rot}=.true.)
551
552Note that expression \eqref{Eq_dynhpg_sco} is used when the variable volume
553formulation is activated (\key{vvl}) because in that case, even with a flat bottom,
554the coordinate surfaces are not horizontal but follow the free surface
555\citep{Levier2007}. The other pressure gradient options are not yet available.
556
557%--------------------------------------------------------------------------------------------------------------
558%           Time-scheme
559%--------------------------------------------------------------------------------------------------------------
560\subsection   [Time-scheme (\np{ln\_dynhpg\_imp}) ]
561         {Time-scheme (\np{ln\_dynhpg\_imp}=.true./.false.)}
562\label{DYN_hpg_imp}
563
564The default time differencing scheme used for the horizontal pressure gradient is
565a leapfrog scheme and therefore the density used in all discrete expressions given
566above is the  \textit{now} density, computed from the \textit{now} temperature and
567salinity. In some specific cases (usually high resolution simulations over an ocean
568domain which includes weakly stratified regions) the physical phenomenum that
569controls the time-step is internal gravity waves (IGWs). A semi-implicit scheme for
570doubling the stability limit associated with IGWs can be used \citep{Brown1978,
571Maltrud1998}. It involves the evaluation of the hydrostatic pressure gradient as an
572average over the three time levels $t-\Delta t$, $t$, and $t+\Delta t$ ($i.e.$ 
573\textit{before}\textit{now} and  \textit{after} time-steps), rather than at central
574time level $t$ only, as in the standard leapfrog scheme.
575
576$\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}=.true.):
577
578\begin{equation} \label{Eq_dynhpg_lf}
579\frac{u^{t+\Delta t}-u^{t-\Delta t}}{2\Delta t}
580=\;\cdots \;-\frac{1}{\rho _o \,e_{1u} }\delta _{i+1/2} \left[ {p_h^t } \right]
581\end{equation}
582
583$\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}=.true.):
584\begin{equation} \label{Eq_dynhpg_imp}
585\frac{u^{t+\Delta t}-u^{t-\Delta t}}{2\Delta t}
586=\;\cdots \;-\frac{1}{\rho _o \,e_{1u} } \delta _{i+1/2} \left[ \frac{ p_h^{t+\Delta t} +2p_h^t
587+p_h^{t-\Delta t} } { 4 }  \right]
588\end{equation}
589
590The semi-implicit time scheme \eqref{Eq_dynhpg_imp} is made possible without
591significant additional computation since the density can be updated to time level
592$t+\Delta t$ before computing the horizontal hydrostatic pressure gradient. It can
593be easily shown that the stability limit associated with the hydrostatic pressure
594gradient doubles using \eqref{Eq_dynhpg_imp} compared to that using the
595standard leapfrog scheme \eqref{Eq_dynhpg_lf}. Note that \eqref{Eq_dynhpg_imp} 
596is equivalent to applying a time filter to the pressure gradient to eliminate high
597frequency IGWs. Obviously, when using \eqref{Eq_dynhpg_imp}, the doubling of
598the time-step is achievable only if no other factors control the time-step, such as
599the stability limits associated with advection or diffusion.
600
601In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}=.true..
602In this case, we choose to apply the time filter to temperature and salinity used in
603the equation of state, instead of applying it to the hydrostatic pressure or to the
604density, so that no additional storage array has to be defined. The density used to
605compute the hydrostatic pressure gradient (whatever the formulation) is evaluated
606as follows:
607\begin{equation} \label{Eq_rho_flt}
608   \rho^t = \rho( \widetilde{T},\widetilde {S},z_T)
609 \quad     \text{with}  \quad 
610   \widetilde{\,\cdot\,} = \frac{  \,\cdot\,^{t+\Delta t} +2 \,\,\cdot\,^t + \,\cdot\,^{t-\Delta t}  } {4}
611\end{equation}
612\gmcomment{STEVEN: bullets look odd in this, could use X}
613
614Note that in the semi-implicit case, it is necessary to save the filtered density, an
615extra three-dimensional field, in the restart file to restart the model with exact
616reproducibility. This option is controlled by the namelist parameter
617\np{nn\_dynhpg\_rst}=.true..
618
619% ================================================================
620% Surface Pressure Gradient
621% ================================================================
622\section  [Surface pressure gradient (\textit{dynspg}) ]
623      {Surface pressure gradient (\mdl{dynspg})}
624\label{DYN_hpg_spg}
625%-----------------------------------------nam_dynspg----------------------------------------------------
626\namdisplay{nam_dynspg} 
627%------------------------------------------------------------------------------------------------------------
628
629The form of the surface pressure gradient term is dependent on the representation
630of the free surface (\S\ref{PE_hor_pg}). The main distinction is between the fixed
631volume case (linear free surface or rigid lid) and the variable volume case
632(nonlinear free surface, \key{vvl} is defined). In the linear free surface case
633(\S\ref{PE_free_surface}) and the rigid lid case (\S\ref{PE_rigid_lid}), the vertical
634scale factors $e_{3}$ are fixed in time, whilst in the nonlinear case
635(\S\ref{PE_free_surface}) they are time-dependent. With both linear and nonlinear
636free surface, external gravity waves are allowed in the equations, which imposes
637a very small time step when an explicit time stepping is used. Two methods are
638proposed to allow a longer time step for the three-dimensional equations: the
639filtered free surface method, which involves a modification of the continuous
640equations (see \eqref{Eq_PE_flt}), and the split-explicit free surface method
641described below. The extra term introduced in the filtered method is calculated
642implicitly, so that the update of the $next$ velocities is done in module
643\mdl{dynspg\_flt} and not in \mdl{dynnxt}.
644
645%--------------------------------------------------------------------------------------------------------------
646% Linear free surface formulation
647%--------------------------------------------------------------------------------------------------------------
648\subsection{Linear free surface formulation (\key{exp} or \textbf{\_ts} or \textbf{\_flt})}
649\label{DYN_spg_linear}
650
651In the linear free surface formulation, the sea surface height is assumed to be
652small compared to the thickness of the ocean levels, so that $(a)$ the time
653evolution of the sea surface height becomes a linear equation, and $(b)$ the
654thickness of the ocean levels is assumed to be constant with time.
655As mentioned in (\S\ref{PE_free_surface}) the linearization affects the
656conservation of tracers.
657
658%-------------------------------------------------------------
659% Explicit
660%-------------------------------------------------------------
661\subsubsection{Explicit (\key{dynspg\_exp})}
662\label{DYN_spg_exp}
663
664In the explicit free surface formulation, the model time step is chosen to be
665small enough to describe the external gravity waves (typically a few tens of
666seconds). The sea surface height is given by :
667\begin{equation} \label{Eq_dynspg_ssh}
668\frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho _w }+\frac{1}{e_{1T} 
669e_{2T} }\sum\limits_k {\left( {\delta _i \left[ {e_{2u} e_{3u} u} 
670\right]+\delta _j \left[ {e_{1v} e_{3v} v} \right]} \right)} 
671\end{equation}
672
673where EMP is the surface freshwater budget, expressed in $Kg.m^{-2}.s^{-1}$,
674and $\rho _w =1,000\,Kg.m^{-3}$ is the volumic mass of pure water. If river
675runoff is expressed as a surface freshwater flux, see \S\ref{SBC}, then EMP
676can be written as the evaporation minus precipitation, minus the river runoff.
677The sea-surface height is evaluated using a leapfrog scheme in combination
678with an Asselin time filter, $i.e.$ the velocity appearing in
679\eqref{Eq_dynspg_ssh} is centred in time (\textit{now} velocity).
680
681The surface pressure gradient, also evaluated using a leap-frog scheme, is
682then simply given by :
683\begin{equation} \label{Eq_dynspg_exp}
684\left\{ \begin{aligned}
685 - \frac{1}                      {e_{1u}} \; \delta _{i+1/2} \left[  \,\eta\,  \right]    \\
686 \\
687 - \frac{1}                      {e_{2v}} \; \delta _{j+1/2} \left[  \,\eta\,  \right] 
688\end{aligned} \right.
689\end{equation} 
690
691Consistent with the linearization, a factor of $\left. \rho \right|_{k=1} / \rho _o$ 
692is omitted in \eqref{Eq_dynspg_exp}.
693
694%-------------------------------------------------------------
695% Split-explicit time-stepping
696%-------------------------------------------------------------
697\subsubsection{Split-explicit time-stepping (\key{dynspg\_ts})}
698\label{DYN_spg_ts}
699%--------------------------------------------namdom----------------------------------------------------
700\namdisplay{namdom} 
701%--------------------------------------------------------------------------------------------------------------
702
703The split-explicit free surface formulation used in \NEMO follows the one
704proposed by \citet{Griffies2004}. The general idea is to solve the free surface
705equation with a small time step \np{rdtbt}, while the three dimensional
706prognostic variables are solved with a longer time step that is a multiple of \np{rdtbt} 
707(Fig.\ref {Fig_DYN_dynspg_ts}).
708
709%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
710\begin{figure}[!t] \label{Fig_DYN_dynspg_ts}
711\begin{center}
712\includegraphics[width=0.90\textwidth]{./Figures/Fig_DYN_dynspg_ts.pdf}
713\caption{Schematic of the split-explicit time stepping scheme for the barotropic
714and baroclinic modes, after \citet{Griffies2004}. Time increases to the right.
715Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$.
716The curved line represents a leap-frog time step, and the smaller barotropic time
717steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line. The vertically
718integrated forcing \textbf{M}(t) computed at the baroclinic time step $t$ 
719represents the interaction between the barotropic and baroclinic motions.
720While keeping the total depth, tracer, and freshwater forcing fields fixed, a
721leap-frog integration carries the surface height and vertically integrated velocity
722from $t$ to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$.
723Time averaging the barotropic fields over the N+1 time steps (endpoints
724included) centers the vertically integrated velocity at the baroclinic timestep
725$t+\Delta t$. A baroclinic leap-frog time step carries the surface height to
726$t+\Delta t$ using the convergence of the time averaged vertically integrated
727velocity taken from baroclinic time step t. }
728%%%
729\gmcomment{STEVEN: what does convergence mean in this context?}
730%%%
731\end{center}
732\end{figure}
733%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
734
735The split-explicit formulation has a damping effect on external gravity waves,
736which is weaker damping than for the filtered free surface but still significant as
737shown by \citet{Levier2007} in the case of an analytical barotropic Kelvin wave.
738
739%-------------------------------------------------------------
740% Filtered formulation
741%-------------------------------------------------------------
742\subsubsection{Filtered formulation (\key{dynspg\_flt})}
743\label{DYN_spg_flt}
744
745The filtered formulation follows the \citet{Roullet2000} implementation. The extra
746term introduced in the equations (see {\S}I.2.2) is solved implicitly. The elliptic
747solvers available in the code are documented in \S\ref{MISC}. The amplitude of
748the extra term is given by the namelist variable \np{rnu}. The default value is 1,
749as recommended by \citet{Roullet2000}
750
751\gmcomment{\np{rnu}=1 to be suppressed from namelist !}
752
753%-------------------------------------------------------------
754% Non-linear free surface formulation
755%-------------------------------------------------------------
756\subsection{Non-linear free surface formulation (\key{vvl})}
757\label{DYN_spg_vvl}
758
759In the non-linear free surface formulation, the variations of volume are fully
760taken into account. This option is presented in a report \citep{Levier2007} 
761available on the \NEMO web site. The three time-stepping methods (explicit,
762split-explicit and filtered) are the same as in \S\ref{DYN_spg_linear} except
763that the ocean depth is now time-dependent. In particular, this means that
764in the filtered case, the matrix to be inverted has to be recomputed at each
765time-step.
766
767%--------------------------------------------------------------------------------------------------------------
768%           Rigid-lid formulation
769%--------------------------------------------------------------------------------------------------------------
770\subsection{Rigid-lid formulation (\key{dynspg\_rl})}
771\label{DYN_spg_rl}
772
773With the rigid lid formulation, an elliptic equation has to be solved for
774the barotropic streamfunction. For consistency this equation is obtained by
775taking the discrete curl of the discrete vertical sum of the discrete
776momentum equation:
777\begin{equation}\label{Eq_dynspg_rl}
778\frac{1}{\rho _o }\nabla _h p_s \equiv \left( {{\begin{array}{*{20}c}
779 {\overline M_u +\frac{1}{H\;e_2 } \delta_ j \left[ \partial_t \psi \right]}      \\
780 \\
781 {\overline M_v -\frac{1}{H\;e_1 }  \delta_\left[ \partial_t \psi \right]}        \\
782\end{array} }} \right)
783\end{equation}
784
785Here ${\rm {\bf M}}= \left( M_u,M_v \right)$ represents the collected
786contributions of nonlinear, viscous and hydrostatic pressure gradient terms in
787\eqref{Eq_PE_dyn} and the overbar indicates a vertical average over the
788whole water column (i.e. from $z=-H$, the ocean bottom, to $z=0$, the rigid-lid).
789The time derivative of $\psi$ is the solution of an elliptic equation:
790\begin{multline} \label{Eq_bsf}
791   \delta_{i+1/2} \left[ \frac{e_{2v}}{H_v\;e_{1v}} \delta_{i} \left[  \partial_t \psi \right] \right]
792+ \delta_{j+1/2} \left[ \frac{e_{1u}}{H_u\;e_{2u}} \delta_{j} \left[  \partial_t \psi \right] \right]
793\\ =
794  \delta_{i+1/2} \left[ e_{2v} M_v  \right]
795- \delta_{j+1/2} \left[ e_{1u} M_u  \right]
796\end{multline}
797
798The elliptic solvers available in the code are documented in \S\ref{MISC}).
799The boundary conditions must be given on all separate landmasses (islands),
800which is done by integrating the vorticity equation around each island. This
801requires identifying each island in the bathymetry file, a cumbersome task.
802This explains why the rigid lid option is not recommended with complex
803domains such as the global ocean. Parameters jpisl (number of islands) and
804jpnisl (maximum number of points per island) of the \hf{par\_oce} file are
805related to this option.
806
807
808% ================================================================
809% Lateral diffusion term
810% ================================================================
811\section  [Lateral diffusion term (\textit{dynldf})]
812      {Lateral diffusion term (\mdl{dynldf})}
813\label{DYN_ldf}
814%------------------------------------------nam_dynldf----------------------------------------------------
815\namdisplay{nam_dynldf} 
816%-------------------------------------------------------------------------------------------------------------
817
818The options available for lateral diffusion are for the choice of  laplacian
819(rotated or not) or biharmonic operators. The coefficients may be constant
820or spatially variable; the description of the coefficients is found in the chapter
821on lateralphysics (Chap.\ref{LDF}). The lateral diffusion of momentum is
822evaluated using a forward scheme, i.e. the velocity appearing in its expression
823is the \textit{before} velocity in time, except for the pure vertical component
824that appears when a tensor of rotation is used. This latter term is solved
825implicitly together with the vertical diffusion term (see \S\ref{DOM_nxt})
826
827At the lateral boundaries either free slip, no slip or partial slip boundary
828conditions are applied according to the user's choice (see Chap.\ref{LBC}).
829
830% ================================================================
831\subsection   [Iso-level laplacian operator (\np{ln\_dynldf\_lap}) ]
832         {Iso-level laplacian operator (\np{ln\_dynldf\_lap}=.true.)}
833\label{DYN_ldf_lap}
834
835For lateral iso-level diffusion, the discrete operator is:
836\begin{equation} \label{Eq_dynldf_lap}
837\left\{ \begin{aligned}
838 D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta _{i+1/2} \left[ {A_T^{lm} 
839\;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta _j \left[
840{A_f^{lm} \;e_{3f} \zeta } \right] \\ 
841\\
842 D_v^{l{\rm {\bf U}}} =\frac{1}{e_{2v} }\delta _{j+1/2} \left[ {A_T^{lm} 
843\;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta _i \left[
844{A_f^{lm} \;e_{3f} \zeta } \right] \\ 
845\end{aligned} \right.
846\end{equation} 
847
848As explained in \S\ref{PE_ldf}, this formulation (as the gradient of a divergence
849and curl of the vorticity) preserves symmetry and ensures a complete
850separation between the vorticity and divergence parts. Note that in the full step
851$z$-coordinate (\key{zco} is defined), $e_{3u} =e_{3v} =e_{3f}$ so that they
852cancel in the rotational part of \eqref{Eq_dynldf_lap}.
853
854%--------------------------------------------------------------------------------------------------------------
855%           Rotated laplacian operator
856%--------------------------------------------------------------------------------------------------------------
857\subsection   [Rotated laplacian operator (\np{ln\_dynldf\_iso}) ]
858         {Rotated laplacian operator (\np{ln\_dynldf\_iso}=.true.)}
859\label{DYN_ldf_iso}
860
861A rotation of the lateral momentum diffusive operator is needed in several cases:
862for iso-neutral diffusion in $z$-coordinate (\np{ln\_dynldf\_iso}=.true.) and for
863either iso-neutral (\np{ln\_dynldf\_iso}=.true.) or geopotential
864(\np{ln\_dynldf\_hor}=.true.) diffusion in $s$-coordinate. In the partial step
865case, coordinates are horizontal excepted at the deepest level and no
866rotation is performed when \np{ln\_dynldf\_hor}=.true.. The diffusive operator
867is defined simply as the divergence of down gradient momentum fluxes on each
868momentum component. It must be emphasized that this formulation ignores
869constraints on the stress tensor such as symmetry. The resulting discrete
870representation is:
871\begin{equation} \label{Eq_dyn_ldf_iso}
872\begin{split}
873 D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\
874&  \left\{\quad  {\delta _{i+1/2} \left[ {A_T^{lm}  \left(
875    {\frac{e_{2T} \; e_{3T} }{e_{1T} } \,\delta _{i}[u]
876   -e_{2T} \; r_{1T} \,\overline{\overline {\delta _{k+1/2}[u]}}^{\,i,\,k}}
877 \right)} \right]}   \right.
878\\ 
879& \qquad +\ \delta_j \left[ {A_f^{lm} \left( {\frac{e_{1f}\,e_{3f} }{e_{2f} 
880}\,\delta _{j+1/2} [u] - e_{1f}\, r_{2f} 
881\,\overline{\overline {\delta _{k+1/2} [u]}} ^{\,j+1/2,\,k}} 
882\right)} \right]
883\\ 
884&\qquad +\ \delta_k \left[ {A_{uw}^{lm} \left( {-e_{2u} \, r_{1uw} \,\overline{\overline 
885{\delta_{i+1/2} [u]}}^{\,i+1/2,\,k+1/2} } 
886\right.} \right.
887\\ 
888&  \ \qquad \qquad \qquad \quad\
889- e_{1u} \, r_{2uw} \,\overline{\overline {\delta_{j+1/2} [u]}} ^{\,j,\,k+1/2}
890\\ 
891& \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\
892+\frac{e_{1u}\, e_{2u} }{e_{3uw} }\,\left( {r_{1uw}^2+r_{2uw}^2} 
893\right)\,\delta_{k+1/2} [u]} \right)} \right]\;\;\;} \right\} 
894\\
895\\
896 D_v^{l\textbf{V}} &= \frac{1}{e_{1v} \, e_{2v} \, e_{3v} }    \\
897&  \left\{\quad  {\delta _{i+1/2} \left[ {A_f^{lm}  \left(
898    {\frac{e_{2f} \; e_{3f} }{e_{1f} } \,\delta _{i+1/2}[v]
899   -e_{2f} \; r_{1f} \,\overline{\overline {\delta _{k+1/2}[v]}}^{\,i+1/2,\,k}}
900 \right)} \right]}   \right.
901\\ 
902& \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1T}\,e_{3T} }{e_{2T} 
903}\,\delta _{j} [v] - e_{1T}\, r_{2T} 
904\,\overline{\overline {\delta _{k+1/2} [v]}} ^{\,j,\,k}} 
905\right)} \right]
906\\ 
907& \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 
908{\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right.
909\\
910&  \ \qquad \qquad \qquad \quad\
911- e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2}
912\\ 
913& \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\
914+\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} 
915\right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 
916 \end{split}
917\end{equation}
918where $r_1$ and $r_2$ are the slopes between the surface along which the
919diffusive operator acts and the surface of computation ($z$- or $s$-surfaces).
920The way these slopes are evaluated is given in the lateral physics chapter
921(Chap.\ref{LDF}).
922
923%--------------------------------------------------------------------------------------------------------------
924%           Iso-level bilaplacian operator
925%--------------------------------------------------------------------------------------------------------------
926\subsection   [Iso-level bilaplacian operator (\np{ln\_dynldf\_bilap})]
927         {Iso-level bilaplacian operator (\np{ln\_dynldf\_bilap}=.true.)}
928\label{DYN_ldf_bilap}
929
930The lateral fourth order operator formulation on momentum is obtained by
931applying \eqref{Eq_dynldf_lap} twice. It requires an additional assumption on
932boundary conditions: the first derivative term normal to the coast depends on
933the free or no-slip lateral boundary conditions chosen, while the third
934derivative terms normal to the coast are set to zero (see Chap.\ref{LBC}).
935%%%
936\gmcomment{add a remark on the the change in the position of the coefficient}
937%%%
938
939% ================================================================
940%           Vertical diffusion term
941% ================================================================
942\section  [Vertical diffusion term (\mdl{dynzdf})]
943      {Vertical diffusion term (\mdl{dynzdf})}
944\label{DYN_zdf}
945%----------------------------------------------namzdf------------------------------------------------------
946\namdisplay{namzdf} 
947%-------------------------------------------------------------------------------------------------------------
948
949The large vertical diffusion coefficient found in the surface mixed layer together
950with high vertical resolution implies that in the case of explicit time stepping there
951would be too restrictive a constraint on the time step. Two time stepping schemes
952can be used for the vertical diffusion term : $(a)$ a forward time differencing
953scheme (\np{ln\_zdfexp}=.true.) using a time splitting technique
954(\np{n\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme
955(\np{ln\_zdfexp}=.false.) (see \S\ref{DOM_nxt}). Note that namelist variables
956\np{ln\_zdfexp} and \np{n\_zdfexp} apply to both tracers and dynamics.
957
958The formulation of the vertical subgrid scale physics is the same whatever
959the vertical coordinate is. The vertical diffusion operators given by
960\eqref{Eq_PE_zdf} take the following semi-discrete space form:
961\begin{equation} \label{Eq_dynzdf}
962\left\{   \begin{aligned}
963D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta _k \left[ \frac{A_{uw}^{vm} }{e_{3uw} }
964                              \ \delta _{k+1/2} [\,u\,]         \right]     \\
965\\
966D_v^{vm} &\equiv \frac{1}{e_{3v}} \ \delta _k \left[ \frac{A_{vw}^{vm} }{e_{3vw} }
967                              \ \delta _{k+1/2} [\,v\,]         \right]
968\end{aligned}   \right.
969\end{equation} 
970where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and
971diffusivity coefficients. The way these coefficients are evaluated
972depends on the vertical physics used (see \S\ref{ZDF}).
973
974The surface boundary condition on momentum is given by the stress exerted by
975the wind. At the surface, the momentum fluxes are prescribed as the boundary
976condition on the vertical turbulent momentum fluxes,
977\begin{equation} \label{Eq_dynzdf_sbc}
978\left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1}
979    = \frac{1}{\rho _o} \binom{\tau _u}{\tau _v }
980\end{equation}
981where $\left( \tau _u ,\tau _v \right)$ are the two components of the wind stress
982vector in the (\textbf{i},\textbf{j}) coordinate system. The high mixing coefficients
983in the surface mixed layer ensure that the surface wind stress is distributed in
984the vertical over the mixed layer depth. If the vertical mixing coefficient
985is small (when no mixed layer scheme is used) the surface stress enters only
986the top model level, as a body force. The surface wind stress is calculated
987in the surface module routines (SBC, see Chap.\ref{SBC})
988
989The turbulent flux of momentum at the bottom of the ocean is specified through
990a bottom friction parameterization (see \S\ref{ZDF_bfr})
991
992% ================================================================
993% External Forcing
994% ================================================================
995\section{External Forcings}
996\label{DYN_forcing}
997
998Besides the surface and bottom stresses (see the above section) which are
999introduced as boundary conditions on the vertical mixing, two other forcings
1000enter the dynamical equations.
1001
1002One is the effect of atmospheric pressure on the ocean dynamics (to be
1003introduced later).
1004
1005Another forcing term is the tidal potential, which will be introduced in the
1006reference version soon.
1007
1008% ================================================================
1009% Time evolution term
1010% ================================================================
1011\section  [Time evolution term (\textit{dynnxt})]
1012      {Time evolution term (\mdl{dynnxt})}
1013\label{DYN_nxt}
1014
1015%----------------------------------------------namdom----------------------------------------------------
1016\namdisplay{namdom} 
1017%-------------------------------------------------------------------------------------------------------------
1018
1019The general framework for dynamics time stepping is a leap-frog scheme,
1020$i.e.$ a three level centred time scheme associated with an Asselin time filter
1021(cf. \S\ref{DOM_nxt})
1022\begin{equation} \label{Eq_dynnxt}
1023\begin{split}
1024&u^{t+\Delta t} = u^{t-\Delta t} + 2 \, \Delta t  \ \text{RHS}_u^t   \\
1025\\
1026&u_f^t \;\quad = u^t+\gamma \,\left[ {u_f^{t-\Delta t} -2u^t+u^{t+\Delta t}} \right]
1027\end{split}
1028\end{equation} 
1029where RHS is the right hand side of the momentum equation, the subscript $f$ 
1030denotes filtered values and $\gamma$ is the Asselin coefficient. $\gamma$ is
1031initialized as \np{atfp} (namelist parameter). Its default value is \np{atfp} = 0.1.
1032
1033Note that whith the filtered free surface, the update of the \textit{next} velocities
1034is done in the \mdl{dynsp\_flt} module, and only the swap of arrays
1035and Asselin filtering is done in \mdl{dynnxt.}
1036
1037% ================================================================
1038% Diagnostic variables
1039% ================================================================
1040\section{Diagnostic variables ($\zeta$, $\chi$, $w$)}
1041\label{DYN_divcur_wzv}
1042
1043%--------------------------------------------------------------------------------------------------------------
1044%           Horizontal divergence and relative vorticity
1045%--------------------------------------------------------------------------------------------------------------
1046\subsection   [Horizontal divergence and relative vorticity (\textit{divcur})]
1047         {Horizontal divergence and relative vorticity (\mdl{divcur})}
1048\label{DYN_divcur}
1049
1050The vorticity is defined at an $f$-point ($i.e.$ corner point) as follows:
1051\begin{equation} \label{Eq_divcur_cur}
1052\zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta _{i+1/2} \left[ {e_{2v}\;v} \right]
1053                          -\delta _{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right)
1054\end{equation} 
1055
1056The horizontal divergence is defined at a $T$-point. It is given by:
1057\begin{equation} \label{Eq_divcur_div}
1058\chi =\frac{1}{e_{1T}\,e_{2T}\,e_{3T} }
1059      \left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u} \right]
1060           +\delta _j \left[ {e_{1v}\,e_{3v}\,v} \right]} \right)
1061\end{equation} 
1062
1063Note that in the $z$-coordinate with full step (\key{zco} is defined), $e_{3u} =e_{3v} =e_{3f}$ so that they cancel in \eqref{Eq_divcur_div}.
1064
1065Note also that whereas the vorticity have the same discrete expression in $z$-
1066and $s$-coordinate, its physical meaning is not identical. $\zeta$ is a pseudo
1067vorticity along $s$-surfaces (only pseudo because $(u,v)$ are still defined along
1068geopotential surfaces, but are no more necessary defined at the same depth).
1069
1070The vorticity and divergence at the \textit{before} step are used in the computation
1071of the horizontal diffusion of momentum. Note that because they have been
1072calculated prior to the Asselin filtering of the \textit{before} velocities, the
1073\textit{before} vorticity and divergence arrays must be included in the restart file
1074to ensure perfect restartability. The vorticity and divergence at the \textit{now} 
1075time step are used for the computation of the nonlinear advection and of the
1076vertical velocity respectively.
1077
1078%--------------------------------------------------------------------------------------------------------------
1079%           Vertical Velocity
1080%--------------------------------------------------------------------------------------------------------------
1081\subsection   [Vertical velocity (\textit{wzvmod})]
1082         {Vertical velocity (\mdl{wzvmod})}
1083\label{DYN_wzv}
1084
1085The vertical velocity is computed by an upward integration of the horizontal
1086divergence from the bottom :
1087
1088\begin{equation} \label{Eq_wzv}
1089\left\{   \begin{aligned}
1090&\left. w \right|_{3/2} \quad= 0    \\
1091\\
1092&\left. w \right|_{k+1/2}     = \left. w \right|_{k+1/2}  + e_{3t}\;  \left. \chi \right|_
1093\end{aligned}   \right.
1094\end{equation} 
1095
1096With a free surface, the top vertical velocity is non-zero, due to the
1097freshwater forcing and the variations of the free surface elevation. With a
1098linear free surface or with a rigid lid, the upper boundary condition
1099applies at a fixed level $z=0$. Note that in the rigid-lid case (\key{dynspg\_rl} 
1100is defined), the surface boundary condition ($\left. w \right|_\text{surface}=0)$ is
1101automatically achieved at least at computer accuracy, due to the the way the
1102surface pressure gradient is expressed in discrete form (Appendix~\ref{Apdx_C}).
1103
1104Note also that whereas the vertical velocity has the same discrete
1105expression in $z$- and $s$-coordinate, its physical meaning is not the same:
1106in the second case, $w$ is the velocity normal to the $s$-surfaces.
1107
1108With the variable volume option, the calculation of the vertical velocity is
1109modified (see \citet{Levier2007}, report available on the \NEMO web site).
1110
1111% ================================================================
Note: See TracBrowser for help on using the repository browser.