New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Chap_DYN.tex in trunk/NEMO/DOC/BETA/Chapters – NEMO

source: trunk/NEMO/DOC/BETA/Chapters/Chap_DYN.tex @ 707

Last change on this file since 707 was 707, checked in by smasson, 17 years ago

error during changeset:705... related to ticket:1

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