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 tags/nemo_v3_2/nemo_v3_2/DOC/TexFiles/Chapters – NEMO

source: tags/nemo_v3_2/nemo_v3_2/DOC/TexFiles/Chapters/Chap_DYN.tex @ 1878

Last change on this file since 1878 was 1878, checked in by flavoni, 14 years ago

initial test for nemogcm

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