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 branches/DEV_r1826_DOC/DOC/TexFiles/Chapters – NEMO

source: branches/DEV_r1826_DOC/DOC/TexFiles/Chapters/Chap_DYN.tex @ 1831

Last change on this file since 1831 was 1831, checked in by gm, 14 years ago

cover, namelist, rigid-lid, e3t, appendices, see ticket: #658

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