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_ZDF.tex in NEMO/trunk/doc/latex/NEMO/subfiles – NEMO

source: NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex @ 11179

Last change on this file since 11179 was 11179, checked in by nicolasmartin, 5 years ago

Add alternate section titles to avoid useless index links in ToC

File size: 80.2 KB
Line 
1\documentclass[../main/NEMO_manual]{subfiles}
2
3\begin{document}
4% ================================================================
5% Chapter  Vertical Ocean Physics (ZDF)
6% ================================================================
7\chapter{Vertical Ocean Physics (ZDF)}
8\label{chap:ZDF}
9
10\minitoc
11
12%gm% Add here a small introduction to ZDF and naming of the different physics (similar to what have been written for TRA and DYN.
13
14\newpage
15
16% ================================================================
17% Vertical Mixing
18% ================================================================
19\section{Vertical mixing}
20\label{sec:ZDF_zdf}
21
22The discrete form of the ocean subgrid scale physics has been presented in
23\autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}.
24At the surface and bottom boundaries, the turbulent fluxes of momentum, heat and salt have to be defined.
25At the surface they are prescribed from the surface forcing (see \autoref{chap:SBC}),
26while at the bottom they are set to zero for heat and salt,
27unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie \key{trabbl} defined,
28see \autoref{subsec:TRA_bbc}), and specified through a bottom friction parameterisation for momentum
29(see \autoref{sec:ZDF_bfr}).
30
31In this section we briefly discuss the various choices offered to compute the vertical eddy viscosity and
32diffusivity coefficients, $A_u^{vm}$ , $A_v^{vm}$ and $A^{vT}$ ($A^{vS}$), defined at $uw$-, $vw$- and $w$- points,
33respectively (see \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}).
34These coefficients can be assumed to be either constant, or a function of the local Richardson number,
35or computed from a turbulent closure model (either TKE or GLS formulation).
36The computation of these coefficients is initialized in the \mdl{zdfini} module and performed in
37the \mdl{zdfric}, \mdl{zdftke} or \mdl{zdfgls} modules.
38The trends due to the vertical momentum and tracer diffusion, including the surface forcing,
39are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively.
40These trends can be computed using either a forward time stepping scheme
41(namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping scheme
42(\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing coefficients,
43and thus of the formulation used (see \autoref{chap:STP}).
44
45% -------------------------------------------------------------------------------------------------------------
46%        Constant
47% -------------------------------------------------------------------------------------------------------------
48\subsection[Constant (\texttt{\textbf{key\_zdfcst}})]
49{Constant (\protect\key{zdfcst})}
50\label{subsec:ZDF_cst}
51%--------------------------------------------namzdf---------------------------------------------------------
52
53\nlst{namzdf}
54%--------------------------------------------------------------------------------------------------------------
55
56Options are defined through the \ngn{namzdf} namelist variables.
57When \key{zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to
58constant values over the whole ocean.
59This is the crudest way to define the vertical ocean physics.
60It is recommended that this option is only used in process studies, not in basin scale simulations.
61Typical values used in this case are:
62\begin{align*}
63  A_u^{vm} = A_v^{vm} &= 1.2\ 10^{-4}~m^2.s^{-1}   \\
64  A^{vT} = A^{vS} &= 1.2\ 10^{-5}~m^2.s^{-1}
65\end{align*}
66
67These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters.
68In all cases, do not use values smaller that those associated with the molecular viscosity and diffusivity,
69that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, $\sim10^{-7}~m^2.s^{-1}$ for temperature and
70$\sim10^{-9}~m^2.s^{-1}$ for salinity.
71
72% -------------------------------------------------------------------------------------------------------------
73%        Richardson Number Dependent
74% -------------------------------------------------------------------------------------------------------------
75\subsection[Richardson number dependent (\texttt{\textbf{key\_zdfric}})]
76{Richardson number dependent (\protect\key{zdfric})}
77\label{subsec:ZDF_ric}
78
79%--------------------------------------------namric---------------------------------------------------------
80
81\nlst{namzdf_ric}
82%--------------------------------------------------------------------------------------------------------------
83
84When \key{zdfric} is defined, a local Richardson number dependent formulation for the vertical momentum and
85tracer eddy coefficients is set through the \ngn{namzdf\_ric} namelist variables.
86The vertical mixing coefficients are diagnosed from the large scale variables computed by the model.
87\textit{In situ} measurements have been used to link vertical turbulent activity to large scale ocean structures.
88The hypothesis of a mixing mainly maintained by the growth of Kelvin-Helmholtz like instabilities leads to
89a dependency between the vertical eddy coefficients and the local Richardson number
90(\ie the ratio of stratification to vertical shear).
91Following \citet{pacanowski.philander_JPO81}, the following formulation has been implemented:
92\[
93  % \label{eq:zdfric}
94  \left\{
95    \begin{aligned}
96      A^{vT} &= \frac {A_{ric}^{vT}}{\left( 1+a \; Ri \right)^n} + A_b^{vT}       \\
97      A^{vm} &= \frac{A^{vT}        }{\left( 1+ a \;Ri  \right)   } + A_b^{vm}
98    \end{aligned}
99  \right.
100\]
101where $Ri = N^2 / \left(\partial_z \textbf{U}_h \right)^2$ is the local Richardson number,
102$N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),
103$A_b^{vT} $ and $A_b^{vm}$ are the constant background values set as in the constant case
104(see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ is the maximum value that
105can be reached by the coefficient when $Ri\leq 0$, $a=5$ and $n=2$.
106The last three values can be modified by setting the \np{rn\_avmri}, \np{rn\_alp} and
107\np{nn\_ric} namelist parameters, respectively.
108
109A simple mixing-layer model to transfer and dissipate the atmospheric forcings
110(wind-stress and buoyancy fluxes) can be activated setting the \np{ln\_mldw}\forcode{ = .true.} in the namelist.
111
112In this case, the local depth of turbulent wind-mixing or "Ekman depth" $h_{e}(x,y,t)$ is evaluated and
113the vertical eddy coefficients prescribed within this layer.
114
115This depth is assumed proportional to the "depth of frictional influence" that is limited by rotation:
116\[
117  h_{e} = Ek \frac {u^{*}} {f_{0}}
118\]
119where, $Ek$ is an empirical parameter, $u^{*}$ is the friction velocity and $f_{0}$ is the Coriolis parameter.
120
121In this similarity height relationship, the turbulent friction velocity:
122\[
123  u^{*} = \sqrt \frac {|\tau|} {\rho_o}
124\]
125is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$.
126The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}.
127Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to
128the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{lermusiaux_JMS01}.
129
130% -------------------------------------------------------------------------------------------------------------
131%        TKE Turbulent Closure Scheme
132% -------------------------------------------------------------------------------------------------------------
133\subsection[TKE turbulent closure scheme (\texttt{\textbf{key\_zdftke}})]
134{TKE turbulent closure scheme (\protect\key{zdftke})}
135\label{subsec:ZDF_tke}
136
137%--------------------------------------------namzdf_tke--------------------------------------------------
138
139\nlst{namzdf_tke}
140%--------------------------------------------------------------------------------------------------------------
141
142The vertical eddy viscosity and diffusivity coefficients are computed from a TKE turbulent closure model based on
143a prognostic equation for $\bar{e}$, the turbulent kinetic energy,
144and a closure assumption for the turbulent length scales.
145This turbulent closure model has been developed by \citet{bougeault.lacarrere_MWR89} in the atmospheric case,
146adapted by \citet{gaspar.gregoris.ea_JGR90} for the oceanic case, and embedded in OPA, the ancestor of NEMO,
147by \citet{blanke.delecluse_JPO93} for equatorial Atlantic simulations.
148Since then, significant modifications have been introduced by \citet{madec.delecluse.ea_NPM98} in both the implementation and
149the formulation of the mixing length scale.
150The time evolution of $\bar{e}$ is the result of the production of $\bar{e}$ through vertical shear,
151its destruction through stratification, its vertical diffusion, and its dissipation of \citet{kolmogorov_IANS42} type:
152\begin{equation}
153  \label{eq:zdftke_e}
154  \frac{\partial \bar{e}}{\partial t} =
155  \frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2
156      +\left( {\frac{\partial v}{\partial k}} \right)^2} \right]
157  -K_\rho\,N^2
158  +\frac{1}{e_3}  \;\frac{\partial }{\partial k}\left[ {\frac{A^{vm}}{e_3 }
159      \;\frac{\partial \bar{e}}{\partial k}} \right]
160  - c_\epsilon \;\frac{\bar {e}^{3/2}}{l_\epsilon }
161\end{equation}
162\[
163  % \label{eq:zdftke_kz}
164  \begin{split}
165    K_m &= C_k\  l_k\  \sqrt {\bar{e}\; }    \\
166    K_\rho &= A^{vm} / P_{rt}
167  \end{split}
168\]
169where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),
170$l_{\epsilon }$ and $l_{\kappa }$ are the dissipation and mixing length scales,
171$P_{rt}$ is the Prandtl number, $K_m$ and $K_\rho$ are the vertical eddy viscosity and diffusivity coefficients.
172The constants $C_k =  0.1$ and $C_\epsilon = \sqrt {2} /2$ $\approx 0.7$ are designed to deal with
173vertical mixing at any depth \citep{gaspar.gregoris.ea_JGR90}.
174They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}.
175$P_{rt}$ can be set to unity or, following \citet{blanke.delecluse_JPO93}, be a function of the local Richardson number, $R_i$:
176\begin{align*}
177  % \label{eq:prt}
178  P_{rt} =
179  \begin{cases}
180    \ \ \ 1 &      \text{if $\ R_i \leq 0.2$}   \\
181    5\,R_i &      \text{if $\ 0.2 \leq R_i \leq 2$}   \\
182    \ \ 10 &      \text{if $\ 2 \leq R_i$}
183  \end{cases}
184\end{align*}
185Options are defined through the  \ngn{namzdfy\_tke} namelist variables.
186The choice of $P_{rt}$ is controlled by the \np{nn\_pdl} namelist variable.
187
188At the sea surface, the value of $\bar{e}$ is prescribed from the wind stress field as
189$\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb} namelist parameter.
190The default value of $e_{bb}$ is 3.75. \citep{gaspar.gregoris.ea_JGR90}), however a much larger value can be used when
191taking into account the surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}).
192The bottom value of TKE is assumed to be equal to the value of the level just above.
193The time integration of the $\bar{e}$ equation may formally lead to negative values because
194the numerical scheme does not ensure its positivity.
195To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin} namelist parameter).
196Following \citet{gaspar.gregoris.ea_JGR90}, the cut-off value is set to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$.
197This allows the subsequent formulations to match that of \citet{gargett_JMR84} for the diffusion in
198the thermocline and deep ocean :  $K_\rho = 10^{-3} / N$.
199In addition, a cut-off is applied on $K_m$ and $K_\rho$ to avoid numerical instabilities associated with
200too weak vertical diffusion.
201They must be specified at least larger than the molecular values, and are set through \np{rn\_avm0} and
202\np{rn\_avt0} (namzdf namelist, see \autoref{subsec:ZDF_cst}).
203
204\subsubsection{Turbulent length scale}
205
206For computational efficiency, the original formulation of the turbulent length scales proposed by
207\citet{gaspar.gregoris.ea_JGR90} has been simplified.
208Four formulations are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist parameter.
209The first two are based on the following first order approximation \citep{blanke.delecluse_JPO93}:
210\begin{equation}
211  \label{eq:tke_mxl0_1}
212  l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N
213\end{equation}
214which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency.
215The resulting length scale is bounded by the distance to the surface or to the bottom
216(\np{nn\_mxl}\forcode{ = 0}) or by the local vertical scale factor (\np{nn\_mxl}\forcode{ = 1}).
217\citet{blanke.delecluse_JPO93} notice that this simplification has two major drawbacks:
218it makes no sense for locally unstable stratification and the computation no longer uses all
219the information contained in the vertical density profile.
220To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np{nn\_mxl}\forcode{ = 2..3} cases,
221which add an extra assumption concerning the vertical gradient of the computed length scale.
222So, the length scales are first evaluated as in \autoref{eq:tke_mxl0_1} and then bounded such that:
223\begin{equation}
224  \label{eq:tke_mxl_constraint}
225  \frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1
226  \qquad \text{with }\  l =  l_k = l_\epsilon
227\end{equation}
228\autoref{eq:tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than
229the variations of depth.
230It provides a better approximation of the \citet{gaspar.gregoris.ea_JGR90} formulation while being much less
231time consuming.
232In particular, it allows the length scale to be limited not only by the distance to the surface or
233to the ocean bottom but also by the distance to a strongly stratified portion of the water column such as
234the thermocline (\autoref{fig:mixing_length}).
235In order to impose the \autoref{eq:tke_mxl_constraint} constraint, we introduce two additional length scales:
236$l_{up}$ and $l_{dwn}$, the upward and downward length scales, and
237evaluate the dissipation and mixing length scales as
238(and note that here we use numerical indexing):
239%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
240\begin{figure}[!t]
241  \begin{center}
242    \includegraphics[width=\textwidth]{Fig_mixing_length}
243    \caption{
244      \protect\label{fig:mixing_length}
245      Illustration of the mixing length computation.
246    }
247  \end{center}
248\end{figure}
249%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
250\[
251  % \label{eq:tke_mxl2}
252  \begin{aligned}
253    l_{up\ \ }^{(k)} &= \min \left(  l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \;  \right)
254    \quad &\text{ from $k=1$ to $jpk$ }\ \\
255    l_{dwn}^{(k)} &= \min \left(  l^{(k)} \ , \ l_{dwn}^{(k-1)} + e_{3t}^{(k-1)\right)
256    \quad &\text{ from $k=jpk$ to $1$ }\ \\
257  \end{aligned}
258\]
259where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, \ie $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$.
260
261In the \np{nn\_mxl}\forcode{ = 2} case, the dissipation and mixing length scales take the same value:
262$ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np{nn\_mxl}\forcode{ = 3} case,
263the dissipation and mixing turbulent length scales are give as in \citet{gaspar.gregoris.ea_JGR90}:
264\[
265  % \label{eq:tke_mxl_gaspar}
266  \begin{aligned}
267    & l_k          = \sqrt{\  l_{up} \ \ l_{dwn}\ }   \\
268    & l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)
269  \end{aligned}
270\]
271
272At the ocean surface, a non zero length scale is set through the  \np{rn\_mxl0} namelist parameter.
273Usually the surface scale is given by $l_o = \kappa \,z_o$ where $\kappa = 0.4$ is von Karman's constant and
274$z_o$ the roughness parameter of the surface.
275Assuming $z_o=0.1$~m \citep{craig.banner_JPO94} leads to a 0.04~m, the default value of \np{rn\_mxl0}.
276In the ocean interior a minimum length scale is set to recover the molecular viscosity when
277$\bar{e}$ reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ).
278
279\subsubsection{Surface wave breaking parameterization}
280%-----------------------------------------------------------------------%
281
282Following \citet{mellor.blumberg_JPO04}, the TKE turbulence closure model has been modified to
283include the effect of surface wave breaking energetics.
284This results in a reduction of summertime surface temperature when the mixed layer is relatively shallow.
285The \citet{mellor.blumberg_JPO04} modifications acts on surface length scale and TKE values and
286air-sea drag coefficient.
287The latter concerns the bulk formulea and is not discussed here.
288
289Following \citet{craig.banner_JPO94}, the boundary condition on surface TKE value is :
290\begin{equation}
291  \label{eq:ZDF_Esbc}
292  \bar{e}_o = \frac{1}{2}\,\left(  15.8\,\alpha_{CB} \right)^{2/3} \,\frac{|\tau|}{\rho_o}
293\end{equation}
294where $\alpha_{CB}$ is the \citet{craig.banner_JPO94} constant of proportionality which depends on the ''wave age'',
295ranging from 57 for mature waves to 146 for younger waves \citep{mellor.blumberg_JPO04}.
296The boundary condition on the turbulent length scale follows the Charnock's relation:
297\begin{equation}
298  \label{eq:ZDF_Lsbc}
299  l_o = \kappa \beta \,\frac{|\tau|}{g\,\rho_o}
300\end{equation}
301where $\kappa=0.40$ is the von Karman constant, and $\beta$ is the Charnock's constant.
302\citet{mellor.blumberg_JPO04} suggest $\beta = 2.10^{5}$ the value chosen by
303\citet{stacey_JPO99} citing observation evidence, and
304$\alpha_{CB} = 100$ the Craig and Banner's value.
305As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$,
306with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds
307to $\alpha_{CB} = 100$.
308Further setting  \np{ln\_mxl0} to true applies \autoref{eq:ZDF_Lsbc} as surface boundary condition on length scale,
309with $\beta$ hard coded to the Stacey's value.
310Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on
311surface $\bar{e}$ value.
312
313\subsubsection{Langmuir cells}
314%--------------------------------------%
315
316Langmuir circulations (LC) can be described as ordered large-scale vertical motions in
317the surface layer of the oceans.
318Although LC have nothing to do with convection, the circulation pattern is rather similar to
319so-called convective rolls in the atmospheric boundary layer.
320The detailed physics behind LC is described in, for example, \citet{craik.leibovich_JFM76}.
321The prevailing explanation is that LC arise from a nonlinear interaction between the Stokes drift and
322wind drift currents.
323
324Here we introduced in the TKE turbulent closure the simple parameterization of Langmuir circulations proposed by
325\citep{axell_JGR02} for a $k-\epsilon$ turbulent closure.
326The parameterization, tuned against large-eddy simulation, includes the whole effect of LC in
327an extra source terms of TKE, $P_{LC}$.
328The presence of $P_{LC}$ in \autoref{eq:zdftke_e}, the TKE equation, is controlled by setting \np{ln\_lc} to
329\forcode{.true.} in the namtke namelist.
330 
331By making an analogy with the characteristic convective velocity scale (\eg, \citet{dalessio.abdella.ea_JPO98}),
332$P_{LC}$ is assumed to be :
333\[
334P_{LC}(z) = \frac{w_{LC}^3(z)}{H_{LC}}
335\]
336where $w_{LC}(z)$ is the vertical velocity profile of LC, and $H_{LC}$ is the LC depth.
337With no information about the wave field, $w_{LC}$ is assumed to be proportional to
338the Stokes drift $u_s = 0.377\,\,|\tau|^{1/2}$, where $|\tau|$ is the surface wind stress module
339\footnote{Following \citet{li.garrett_JMR93}, the surface Stoke drift velocity may be expressed as
340  $u_s =  0.016 \,|U_{10m}|$.
341  Assuming an air density of $\rho_a=1.22 \,Kg/m^3$ and a drag coefficient of
342  $1.5~10^{-3}$ give the expression used of $u_s$ as a function of the module of surface stress
343}.
344For the vertical variation, $w_{LC}$ is assumed to be zero at the surface as well as at
345a finite depth $H_{LC}$ (which is often close to the mixed layer depth),
346and simply varies as a sine function in between (a first-order profile for the Langmuir cell structures).
347The resulting expression for $w_{LC}$ is :
348\[
349  w_{LC}  =
350  \begin{cases}
351    c_{LC} \,u_s \,\sin(- \pi\,z / H_{LC} )    &      \text{if $-z \leq H_{LC}$}    \\
352    0                             &      \text{otherwise}
353  \end{cases}
354\]
355where $c_{LC} = 0.15$ has been chosen by \citep{axell_JGR02} as a good compromise to fit LES data.
356The chosen value yields maximum vertical velocities $w_{LC}$ of the order of a few centimeters per second.
357The value of $c_{LC}$ is set through the \np{rn\_lc} namelist parameter,
358having in mind that it should stay between 0.15 and 0.54 \citep{axell_JGR02}.
359
360The $H_{LC}$ is estimated in a similar way as the turbulent length scale of TKE equations:
361$H_{LC}$ is depth to which a water parcel with kinetic energy due to Stoke drift can reach on its own by
362converting its kinetic energy to potential energy, according to
363\[
364- \int_{-H_{LC}}^0 { N^2\;\;dz} = \frac{1}{2} u_s^2
365\]
366
367\subsubsection{Mixing just below the mixed layer}
368%--------------------------------------------------------------%
369
370Vertical mixing parameterizations commonly used in ocean general circulation models tend to
371produce mixed-layer depths that are too shallow during summer months and windy conditions.
372This bias is particularly acute over the Southern Ocean.
373To overcome this systematic bias, an ad hoc parameterization is introduced into the TKE scheme \cite{rodgers.aumont.ea_B14}.
374The parameterization is an empirical one, \ie not derived from theoretical considerations,
375but rather is meant to account for observed processes that affect the density structure of
376the ocean’s planetary boundary layer that are not explicitly captured by default in the TKE scheme
377(\ie near-inertial oscillations and ocean swells and waves).
378
379When using this parameterization (\ie when \np{nn\_etau}\forcode{ = 1}),
380the TKE input to the ocean ($S$) imposed by the winds in the form of near-inertial oscillations,
381swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition,
382plus a depth depend one given by:
383\begin{equation}
384  \label{eq:ZDF_Ehtau}
385  S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau}
386\end{equation}
387where $z$ is the depth, $e_s$ is TKE surface boundary condition, $f_r$ is the fraction of the surface TKE that
388penetrate in the ocean, $h_\tau$ is a vertical mixing length scale that controls exponential shape of
389the penetration, and $f_i$ is the ice concentration
390(no penetration if $f_i=1$, that is if the ocean is entirely covered by sea-ice).
391The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter.
392The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}\forcode{ = 0}) or
393a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m at high latitudes
394(\np{nn\_etau}\forcode{ = 1}).
395
396Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}.
397They correspond to applying \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer,
398or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrate the ocean.
399Those two options are obsolescent features introduced for test purposes.
400They will be removed in the next release.
401
402% from Burchard et al OM 2008 :
403% the most critical process not reproduced by statistical turbulence models is the activity of
404% internal waves and their interaction with turbulence. After the Reynolds decomposition,
405% internal waves are in principle included in the RANS equations, but later partially
406% excluded by the hydrostatic assumption and the model resolution.
407% Thus far, the representation of internal wave mixing in ocean models has been relatively crude
408% (\eg Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002).
409
410% -------------------------------------------------------------------------------------------------------------
411%        TKE discretization considerations
412% -------------------------------------------------------------------------------------------------------------
413\subsection[TKE discretization considerations (\texttt{\textbf{key\_zdftke}})]
414{TKE discretization considerations (\protect\key{zdftke})}
415\label{subsec:ZDF_tke_ene}
416
417%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
418\begin{figure}[!t]
419  \begin{center}
420    \includegraphics[width=\textwidth]{Fig_ZDF_TKE_time_scheme}
421    \caption{
422      \protect\label{fig:TKE_time_scheme}
423      Illustration of the TKE time integration and its links to the momentum and tracer time integration.
424    }
425  \end{center} 
426\end{figure}
427%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
428
429The production of turbulence by vertical shear (the first term of the right hand side of
430\autoref{eq:zdftke_e}) should balance the loss of kinetic energy associated with the vertical momentum diffusion
431(first line in \autoref{eq:PE_zdf}).
432To do so a special care have to be taken for both the time and space discretization of
433the TKE equation \citep{burchard_OM02,marsaleix.auclair.ea_OM08}.
434
435Let us first address the time stepping issue. \autoref{fig:TKE_time_scheme} shows how
436the two-level Leap-Frog time stepping of the momentum and tracer equations interplays with
437the one-level forward time stepping of TKE equation.
438With this framework, the total loss of kinetic energy (in 1D for the demonstration) due to
439the vertical momentum diffusion is obtained by multiplying this quantity by $u^t$ and
440summing the result vertically:   
441\begin{equation}
442  \label{eq:energ1}
443  \begin{split}
444    \int_{-H}^{\eta}  u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt}  \right) \,dz   \\
445    &= \Bigl[  u^t \,{K_m}^t \,(\partial_z u)^{t+\rdt} \Bigr]_{-H}^{\eta}
446    - \int_{-H}^{\eta}{ {K_m}^t \,\partial_z{u^t} \,\partial_z u^{t+\rdt} \,dz }
447  \end{split}
448\end{equation}
449Here, the vertical diffusion of momentum is discretized backward in time with a coefficient, $K_m$,
450known at time $t$ (\autoref{fig:TKE_time_scheme}), as it is required when using the TKE scheme
451(see \autoref{sec:STP_forward_imp}).
452The first term of the right hand side of \autoref{eq:energ1} represents the kinetic energy transfer at
453the surface (atmospheric forcing) and at the bottom (friction effect).
454The second term is always negative.
455It is the dissipation rate of kinetic energy, and thus minus the shear production rate of $\bar{e}$.
456\autoref{eq:energ1} implies that, to be energetically consistent,
457the production rate of $\bar{e}$ used to compute $(\bar{e})^t$ (and thus ${K_m}^t$) should be expressed as
458${K_m}^{t-\rdt}\,(\partial_z u)^{t-\rdt} \,(\partial_z u)^t$
459(and not by the more straightforward $K_m \left( \partial_z u \right)^2$ expression taken at time $t$ or $t-\rdt$).
460
461A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification
462(second term of the right hand side of \autoref{eq:zdftke_e}).
463This term must balance the input of potential energy resulting from vertical mixing.
464The rate of change of potential energy (in 1D for the demonstration) due vertical mixing is obtained by
465multiplying vertical density diffusion tendency by $g\,z$ and and summing the result vertically:
466\begin{equation}
467  \label{eq:energ2}
468  \begin{split}
469    \int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt}   \right) \,dz    \\
470    &= \Bigl[  g\,z \,{K_\rho}^t \,(\partial_z \rho)^{t+\rdt} \Bigr]_{-H}^{\eta}
471    - \int_{-H}^{\eta}{ g \,{K_\rho}^t \,(\partial_k \rho)^{t+\rdt} } \,dz   \\
472    &= - \Bigl[  z\,{K_\rho}^t \,(N^2)^{t+\rdt} \Bigr]_{-H}^{\eta}
473    + \int_{-H}^{\eta}{  \rho^{t+\rdt} \, {K_\rho}^t \,(N^2)^{t+\rdt} \,dz  }
474  \end{split}
475\end{equation}
476where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$.
477The first term of the right hand side of \autoref{eq:energ2} is always zero because
478there is no diffusive flux through the ocean surface and bottom).
479The second term is minus the destruction rate of  $\bar{e}$ due to stratification.
480Therefore \autoref{eq:energ1} implies that, to be energetically consistent,
481the product ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:zdftke_e}, the TKE equation.
482
483Let us now address the space discretization issue.
484The vertical eddy coefficients are defined at $w$-point whereas the horizontal velocity components are in
485the centre of the side faces of a $t$-box in staggered C-grid (\autoref{fig:cell}).
486A space averaging is thus required to obtain the shear TKE production term.
487By redoing the \autoref{eq:energ1} in the 3D case, it can be shown that the product of eddy coefficient by
488the shear at $t$ and $t-\rdt$ must be performed prior to the averaging.
489Furthermore, the possible time variation of $e_3$ (\key{vvl} case) have to be taken into account.
490
491The above energetic considerations leads to the following final discrete form for the TKE equation:
492\begin{equation}
493  \label{eq:zdftke_ene}
494  \begin{split}
495    \frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt}  \equiv
496    \Biggl\{ \Biggr.
497    &\overline{ \left( \left(\overline{K_m}^{\,i+1/2}\right)^{t-\rdt} \,\frac{\delta_{k+1/2}[u^{t+\rdt}]}{{e_3u}^{t+\rdt} }
498        \ \frac{\delta_{k+1/2}[u^ t         ]}{{e_3u}^ t          }  \right) }^{\,i} \\
499    +&\overline{  \left( \left(\overline{K_m}^{\,j+1/2}\right)^{t-\rdt} \,\frac{\delta_{k+1/2}[v^{t+\rdt}]}{{e_3v}^{t+\rdt} }
500        \ \frac{\delta_{k+1/2}[v^ t         ]}{{e_3v}^ t          }  \right) }^{\,j}
501    \Biggr. \Biggr\}   \\
502    %
503    - &{K_\rho}^{t-\rdt}\,{(N^2)^t}    \\
504    %
505    +&\frac{1}{{e_3w}^{t+\rdt}}  \;\delta_{k+1/2} \left[   {K_m}^{t-\rdt} \,\frac{\delta_{k}[(\bar{e})^{t+\rdt}]} {{e_3w}^{t+\rdt}}   \right]   \\
506    %
507    - &c_\epsilon \; \left( \frac{\sqrt{\bar {e}}}{l_\epsilon}\right)^{t-\rdt}\,(\bar {e})^{t+\rdt}
508  \end{split}
509\end{equation}
510where the last two terms in \autoref{eq:zdftke_ene} (vertical diffusion and Kolmogorov dissipation)
511are time stepped using a backward scheme (see\autoref{sec:STP_forward_imp}).
512Note that the Kolmogorov term has been linearized in time in order to render the implicit computation possible.
513The restart of the TKE scheme requires the storage of $\bar {e}$, $K_m$, $K_\rho$ and $l_\epsilon$ as
514they all appear in the right hand side of \autoref{eq:zdftke_ene}.
515For the latter, it is in fact the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored.
516
517% -------------------------------------------------------------------------------------------------------------
518%        GLS Generic Length Scale Scheme
519% -------------------------------------------------------------------------------------------------------------
520\subsection[GLS: Generic Length Scale (\texttt{\textbf{key\_zdfgls}})]
521{GLS: Generic Length Scale (\protect\key{zdfgls})}
522\label{subsec:ZDF_gls}
523
524%--------------------------------------------namzdf_gls---------------------------------------------------------
525
526\nlst{namzdf_gls}
527%--------------------------------------------------------------------------------------------------------------
528
529The Generic Length Scale (GLS) scheme is a turbulent closure scheme based on two prognostic equations:
530one for the turbulent kinetic energy $\bar {e}$, and another for the generic length scale,
531$\psi$ \citep{umlauf.burchard_JMR03, umlauf.burchard_CSR05}.
532This later variable is defined as: $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$,
533where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:GLS} allows to recover a number of
534well-known turbulent closures ($k$-$kl$ \citep{mellor.yamada_RG82}, $k$-$\epsilon$ \citep{rodi_JGR87},
535$k$-$\omega$ \citep{wilcox_AJ88} among others \citep{umlauf.burchard_JMR03,kantha.carniel_JMR03}).
536The GLS scheme is given by the following set of equations:
537\begin{equation}
538  \label{eq:zdfgls_e}
539  \frac{\partial \bar{e}}{\partial t} =
540  \frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2
541      +\left( \frac{\partial v}{\partial k} \right)^2} \right]
542  -K_\rho \,N^2
543  +\frac{1}{e_3}\,\frac{\partial}{\partial k} \left[ \frac{K_m}{e_3}\,\frac{\partial \bar{e}}{\partial k} \right]
544  - \epsilon
545\end{equation}
546
547\[
548  % \label{eq:zdfgls_psi}
549  \begin{split}
550    \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{
551      \frac{C_1\,K_m}{\sigma_{\psi} {e_3}}\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2
552          +\left( \frac{\partial v}{\partial k} \right)^2} \right]
553      - C_3 \,K_\rho\,N^2   - C_2 \,\epsilon \,Fw   \right\}             \\
554    &+\frac{1}{e_3\;\frac{\partial }{\partial k}\left[ {\frac{K_m}{e_3 }
555        \;\frac{\partial \psi}{\partial k}} \right]\;
556  \end{split}
557\]
558
559\[
560  % \label{eq:zdfgls_kz}
561  \begin{split}
562    K_m    &= C_{\mu} \ \sqrt {\bar{e}} \ l         \\
563    K_\rho &= C_{\mu'}\ \sqrt {\bar{e}} \ l
564  \end{split}
565\]
566
567\[
568  % \label{eq:zdfgls_eps}
569  {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \;
570\]
571where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) and
572$\epsilon$ the dissipation rate.
573The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$) depends of
574the choice of the turbulence model.
575Four different turbulent models are pre-defined (Tab.\autoref{tab:GLS}).
576They are made available through the \np{nn\_clo} namelist parameter.
577
578%--------------------------------------------------TABLE--------------------------------------------------
579\begin{table}[htbp]
580  \begin{center}
581    % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c}
582    \begin{tabular}{ccccc}
583      &   $k-kl$   & $k-\epsilon$ & $k-\omega$ &   generic   \\
584      % & \citep{mellor.yamada_RG82} &  \citep{rodi_JGR87}       & \citep{wilcox_AJ88} &                 \\
585      \hline
586      \hline
587      \np{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\
588      \hline
589      $( p , n , m )$          &   ( 0 , 1 , 1 )   & ( 3 , 1.5 , -1 )   & ( -1 , 0.5 , -1 )    &  ( 2 , 1 , -0.67 )  \\
590      $\sigma_k$      &    2.44         &     1.              &      2.                &      0.8          \\
591      $\sigma_\psi$  &    2.44         &     1.3            &      2.                 &       1.07       \\
592      $C_1$              &      0.9         &     1.44          &      0.555          &       1.           \\
593      $C_2$              &      0.5         &     1.92          &      0.833          &       1.22       \\
594      $C_3$              &      1.           &     1.              &      1.                &       1.           \\
595      $F_{wall}$        &      Yes        &       --             &     --                  &      --          \\
596      \hline
597      \hline
598    \end{tabular}
599    \caption{
600      \protect\label{tab:GLS}
601      Set of predefined GLS parameters, or equivalently predefined turbulence models available with
602      \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}.
603    }
604  \end{center}
605\end{table}
606%--------------------------------------------------------------------------------------------------------------
607
608In the Mellor-Yamada model, the negativity of $n$ allows to use a wall function to force the convergence of
609the mixing length towards $K z_b$ ($K$: Kappa and $z_b$: rugosity length) value near physical boundaries
610(logarithmic boundary layer law).
611$C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{galperin.kantha.ea_JAS88},
612or by \citet{kantha.clayson_JGR94} or one of the two functions suggested by \citet{canuto.howard.ea_JPO01}
613(\np{nn\_stab\_func}\forcode{ = 0..3}, resp.).
614The value of $C_{0\mu}$ depends of the choice of the stability function.
615
616The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated thanks to Dirichlet or
617Neumann condition through \np{nn\_tkebc\_surf} and \np{nn\_tkebc\_bot}, resp.
618As for TKE closure, the wave effect on the mixing is considered when
619\np{ln\_crban}\forcode{ = .true.} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}.
620The \np{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and
621\np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}.
622
623The $\psi$ equation is known to fail in stably stratified flows, and for this reason
624almost all authors apply a clipping of the length scale as an \textit{ad hoc} remedy.
625With this clipping, the maximum permissible length scale is determined by $l_{max} = c_{lim} \sqrt{2\bar{e}}/ N$.
626A value of $c_{lim} = 0.53$ is often used \citep{galperin.kantha.ea_JAS88}.
627\cite{umlauf.burchard_CSR05} show that the value of the clipping factor is of crucial importance for
628the entrainment depth predicted in stably stratified situations,
629and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes.
630The clipping is only activated if \np{ln\_length\_lim}\forcode{ = .true.},
631and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value.
632
633The time and space discretization of the GLS equations follows the same energetic consideration as for
634the TKE case described in \autoref{subsec:ZDF_tke_ene} \citep{burchard_OM02}.
635Examples of performance of the 4 turbulent closure scheme can be found in \citet{warner.sherwood.ea_OM05}.
636
637% -------------------------------------------------------------------------------------------------------------
638%        OSM OSMOSIS BL Scheme
639% -------------------------------------------------------------------------------------------------------------
640\subsection[OSM: OSMosis boundary layer scheme (\texttt{\textbf{key\_zdfosm}})]
641{OSM: OSMosis boundary layer scheme (\protect\key{zdfosm})}
642\label{subsec:ZDF_osm}
643
644%--------------------------------------------namzdf_osm---------------------------------------------------------
645
646\nlst{namzdf_osm}
647%--------------------------------------------------------------------------------------------------------------
648
649The OSMOSIS turbulent closure scheme is based on......   TBC
650
651% ================================================================
652% Convection
653% ================================================================
654\section{Convection}
655\label{sec:ZDF_conv}
656
657%--------------------------------------------namzdf--------------------------------------------------------
658
659\nlst{namzdf}
660%--------------------------------------------------------------------------------------------------------------
661
662Static instabilities (\ie light potential densities under heavy ones) may occur at particular ocean grid points.
663In nature, convective processes quickly re-establish the static stability of the water column.
664These processes have been removed from the model via the hydrostatic assumption so they must be parameterized.
665Three parameterisations are available to deal with convective processes:
666a non-penetrative convective adjustment or an enhanced vertical diffusion,
667or/and the use of a turbulent closure scheme.
668
669% -------------------------------------------------------------------------------------------------------------
670%       Non-Penetrative Convective Adjustment
671% -------------------------------------------------------------------------------------------------------------
672\subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc = .true.})]
673{Non-penetrative convective adjustment (\protect\np{ln\_tranpc}\forcode{ = .true.})}
674\label{subsec:ZDF_npc}
675
676%--------------------------------------------namzdf--------------------------------------------------------
677
678\nlst{namzdf}
679%--------------------------------------------------------------------------------------------------------------
680
681%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
682\begin{figure}[!htb]
683  \begin{center}
684    \includegraphics[width=\textwidth]{Fig_npc}
685    \caption{
686      \protect\label{fig:npc}
687      Example of an unstable density profile treated by the non penetrative convective adjustment algorithm.
688      $1^{st}$ step: the initial profile is checked from the surface to the bottom.
689      It is found to be unstable between levels 3 and 4.
690      They are mixed.
691      The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed.
692      The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed.
693      The $1^{st}$ step ends since the density profile is then stable below the level 3.
694      $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step:
695      levels 2 to 5 are mixed.
696      The new density profile is checked.
697      It is found stable: end of algorithm.
698    }
699  \end{center}
700\end{figure}
701%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
702
703Options are defined through the \ngn{namzdf} namelist variables.
704The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{ = .true.}.
705It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of
706the water column, but only until the density structure becomes neutrally stable
707(\ie until the mixed portion of the water column has \textit{exactly} the density of the water just below)
708\citep{madec.delecluse.ea_JPO91}.
709The associated algorithm is an iterative process used in the following way (\autoref{fig:npc}):
710starting from the top of the ocean, the first instability is found.
711Assume in the following that the instability is located between levels $k$ and $k+1$.
712The temperature and salinity in the two levels are vertically mixed, conserving the heat and salt contents of
713the water column.
714The new density is then computed by a linear approximation.
715If the new density profile is still unstable between levels $k+1$ and $k+2$,
716levels $k$, $k+1$ and $k+2$ are then mixed.
717This process is repeated until stability is established below the level $k$
718(the mixing process can go down to the ocean bottom).
719The algorithm is repeated to check if the density profile between level $k-1$ and $k$ is unstable and/or
720if there is no deeper instability.
721
722This algorithm is significantly different from mixing statically unstable levels two by two.
723The latter procedure cannot converge with a finite number of iterations for some vertical profiles while
724the algorithm used in \NEMO converges for any profile in a number of iterations which is less than
725the number of vertical levels.
726This property is of paramount importance as pointed out by \citet{killworth_iprc89}:
727it avoids the existence of permanent and unrealistic static instabilities at the sea surface.
728This non-penetrative convective algorithm has been proved successful in studies of the deep water formation in
729the north-western Mediterranean Sea \citep{madec.delecluse.ea_JPO91, madec.chartier.ea_DAO91, madec.crepon_iprc91}.
730
731The current implementation has been modified in order to deal with any non linear equation of seawater
732(L. Brodeau, personnal communication).
733Two main differences have been introduced compared to the original algorithm:
734$(i)$ the stability is now checked using the Brunt-V\"{a}is\"{a}l\"{a} frequency
735(not the the difference in potential density);
736$(ii)$ when two levels are found unstable, their thermal and haline expansion coefficients are vertically mixed in
737the same way their temperature and salinity has been mixed.
738These two modifications allow the algorithm to perform properly and accurately with TEOS10 or EOS-80 without
739having to recompute the expansion coefficients at each mixing iteration.
740
741% -------------------------------------------------------------------------------------------------------------
742%       Enhanced Vertical Diffusion
743% -------------------------------------------------------------------------------------------------------------
744\subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd = .true.})]
745{Enhanced vertical diffusion (\protect\np{ln\_zdfevd}\forcode{ = .true.})}
746\label{subsec:ZDF_evd}
747
748%--------------------------------------------namzdf--------------------------------------------------------
749
750\nlst{namzdf}
751%--------------------------------------------------------------------------------------------------------------
752
753Options are defined through the  \ngn{namzdf} namelist variables.
754The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{ = .true.}.
755In this case, the vertical eddy mixing coefficients are assigned very large values
756(a typical value is $10\;m^2s^{-1})$ in regions where the stratification is unstable
757(\ie when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{lazar_phd97, lazar.madec.ea_JPO99}.
758This is done either on tracers only (\np{nn\_evdm}\forcode{ = 0}) or
759on both momentum and tracers (\np{nn\_evdm}\forcode{ = 1}).
760
761In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np{nn\_evdm}\forcode{ = 1},
762the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ values also, are set equal to
763the namelist parameter \np{rn\_avevd}.
764A typical value for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$.
765This parameterisation of convective processes is less time consuming than
766the convective adjustment algorithm presented above when mixing both tracers and
767momentum in the case of static instabilities.
768It requires the use of an implicit time stepping on vertical diffusion terms
769(\ie np{ln\_zdfexp}\forcode{ = .false.}).
770
771Note that the stability test is performed on both \textit{before} and \textit{now} values of $N^2$.
772This removes a potential source of divergence of odd and even time step in
773a leapfrog environment \citep{leclair_phd10} (see \autoref{sec:STP_mLF}).
774
775% -------------------------------------------------------------------------------------------------------------
776%       Turbulent Closure Scheme
777% -------------------------------------------------------------------------------------------------------------
778\subsection[Turbulent closure scheme (\texttt{\textbf{key\_zdf}}\texttt{\textbf{\{tke,gls,osm\}}})]
779{Turbulent Closure Scheme (\protect\key{zdftke}, \protect\key{zdfgls} or \protect\key{zdfosm})}
780\label{subsec:ZDF_tcs}
781
782The turbulent closure scheme presented in \autoref{subsec:ZDF_tke} and \autoref{subsec:ZDF_gls}
783(\key{zdftke} or \key{zdftke} is defined) in theory solves the problem of statically unstable density profiles.
784In such a case, the term corresponding to the destruction of turbulent kinetic energy through stratification in
785\autoref{eq:zdftke_e} or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative.
786It results in large values of $A_T^{vT}$ and  $A_T^{vT}$, and also the four neighbouring $A_u^{vm} {and}\;A_v^{vm}$
787(up to $1\;m^2s^{-1}$).
788These large values restore the static stability of the water column in a way similar to that of
789the enhanced vertical diffusion parameterisation (\autoref{subsec:ZDF_evd}).
790However, in the vicinity of the sea surface (first ocean layer), the eddy coefficients computed by
791the turbulent closure scheme do not usually exceed $10^{-2}m.s^{-1}$,
792because the mixing length scale is bounded by the distance to the sea surface.
793It can thus be useful to combine the enhanced vertical diffusion with the turbulent closure scheme,
794\ie setting the \np{ln\_zdfnpc} namelist parameter to true and
795defining the turbulent closure CPP key all together.
796
797The KPP turbulent closure scheme already includes enhanced vertical diffusion in the case of convection,
798as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp},
799therefore \np{ln\_zdfevd}\forcode{ = .false.} should be used with the KPP scheme.
800% gm%  + one word on non local flux with KPP scheme trakpp.F90 module...
801
802% ================================================================
803% Double Diffusion Mixing
804% ================================================================
805\section[Double diffusion mixing (\texttt{\textbf{key\_zdfddm}})]
806{Double diffusion mixing (\protect\key{zdfddm})}
807\label{sec:ZDF_ddm}
808
809%-------------------------------------------namzdf_ddm-------------------------------------------------
810%
811%\nlst{namzdf_ddm}
812%--------------------------------------------------------------------------------------------------------------
813
814Options are defined through the  \ngn{namzdf\_ddm} namelist variables.
815Double diffusion occurs when relatively warm, salty water overlies cooler, fresher water, or vice versa.
816The former condition leads to salt fingering and the latter to diffusive convection.
817Double-diffusive phenomena contribute to diapycnal mixing in extensive regions of the ocean.
818\citet{merryfield.holloway.ea_JPO99} include a parameterisation of such phenomena in a global ocean model and show that
819it leads to relatively minor changes in circulation but exerts significant regional influences on
820temperature and salinity.
821This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the \key{zdfddm} CPP key.
822
823Diapycnal mixing of S and T are described by diapycnal diffusion coefficients
824\begin{align*}
825  % \label{eq:zdfddm_Kz}
826  &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT} \\
827  &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS}
828\end{align*}
829where subscript $f$ represents mixing by salt fingering, $d$ by diffusive convection,
830and $o$ by processes other than double diffusion.
831The rates of double-diffusive mixing depend on the buoyancy ratio
832$R_\rho = \alpha \partial_z T / \beta \partial_z S$, where $\alpha$ and $\beta$ are coefficients of
833thermal expansion and saline contraction (see \autoref{subsec:TRA_eos}).
834To represent mixing of $S$ and $T$ by salt fingering, we adopt the diapycnal diffusivities suggested by Schmitt
835(1981):
836\begin{align}
837  \label{eq:zdfddm_f}
838  A_f^{vS} &=
839             \begin{cases}
840               \frac{A^{\ast v}}{1+(R_\rho / R_c)^n   } &\text{if  $R_\rho > 1$ and $N^2>0$ } \\
841               0                              &\text{otherwise}
842             \end{cases}
843  \\         \label{eq:zdfddm_f_T}
844  A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 
845\end{align}
846
847%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
848\begin{figure}[!t]
849  \begin{center}
850    \includegraphics[width=\textwidth]{Fig_zdfddm}
851    \caption{
852      \protect\label{fig:zdfddm}
853      From \citet{merryfield.holloway.ea_JPO99} :
854      (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in regions of salt fingering.
855      Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$;
856      (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in regions of
857      diffusive convection.
858      Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation.
859      The latter is not implemented in \NEMO.
860    }
861  \end{center}
862\end{figure}
863%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
864
865The factor 0.7 in \autoref{eq:zdfddm_f_T} reflects the measured ratio $\alpha F_T /\beta F_S \approx  0.7$ of
866buoyancy flux of heat to buoyancy flux of salt (\eg, \citet{mcdougall.taylor_JMR84}).
867Following  \citet{merryfield.holloway.ea_JPO99}, we adopt $R_c = 1.6$, $n = 6$, and $A^{\ast v} = 10^{-4}~m^2.s^{-1}$.
868
869To represent mixing of S and T by diffusive layering,  the diapycnal diffusivities suggested by
870Federov (1988) is used:
871\begin{align}
872  % \label{eq:zdfddm_d}
873  A_d^{vT} &=
874             \begin{cases}
875               1.3635 \, \exp{\left( 4.6\, \exp{ \left[  -0.54\,( R_{\rho}^{-1} - 1 )  \right] }    \right)}
876               &\text{if  $0<R_\rho < 1$ and $N^2>0$ } \\
877               0                       &\text{otherwise}
878             \end{cases}
879                                       \nonumber \\
880  \label{eq:zdfddm_d_S}
881  A_d^{vS} &=
882             \begin{cases}
883               A_d^{vT}\ \left( 1.85\,R_{\rho} - 0.85 \right) &\text{if  $0.5 \leq R_\rho<1$ and $N^2>0$ } \\
884               A_d^{vT} \ 0.15 \ R_\rho               &\text{if  $\ \ 0 < R_\rho<0.5$ and $N^2>0$ } \\
885               0                       &\text{otherwise}
886             \end{cases}
887\end{align}
888
889The dependencies of \autoref{eq:zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$ are illustrated in
890\autoref{fig:zdfddm}.
891Implementing this requires computing $R_\rho$ at each grid point on every time step.
892This is done in \mdl{eosbn2} at the same time as $N^2$ is computed.
893This avoids duplication in the computation of $\alpha$ and $\beta$ (which is usually quite expensive).
894
895% ================================================================
896% Bottom Friction
897% ================================================================
898\section[Bottom and top friction (\textit{zdfbfr.F90})]
899{Bottom and top friction (\protect\mdl{zdfbfr})}
900\label{sec:ZDF_bfr}
901
902%--------------------------------------------nambfr--------------------------------------------------------
903%
904%\nlst{nambfr}
905%--------------------------------------------------------------------------------------------------------------
906
907Options to define the top and bottom friction are defined through the \ngn{nambfr} namelist variables.
908The bottom friction represents the friction generated by the bathymetry.
909The top friction represents the friction generated by the ice shelf/ocean interface.
910As the friction processes at the top and bottom are treated in similar way,
911only the bottom friction is described in detail below.
912
913
914Both the surface momentum flux (wind stress) and the bottom momentum flux (bottom friction) enter the equations as
915a condition on the vertical diffusive flux.
916For the bottom boundary layer, one has:
917\[
918  % \label{eq:zdfbfr_flux}
919  A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U}
920\]
921where ${\cal F}_h^{\textbf U}$ is represents the downward flux of horizontal momentum outside
922the logarithmic turbulent boundary layer (thickness of the order of 1~m in the ocean).
923How ${\cal F}_h^{\textbf U}$ influences the interior depends on the vertical resolution of the model near
924the bottom relative to the Ekman layer depth.
925For example, in order to obtain an Ekman layer depth $d = \sqrt{2\;A^{vm}} / f = 50$~m,
926one needs a vertical diffusion coefficient $A^{vm} = 0.125$~m$^2$s$^{-1}$
927(for a Coriolis frequency $f = 10^{-4}$~m$^2$s$^{-1}$).
928With a background diffusion coefficient $A^{vm} = 10^{-4}$~m$^2$s$^{-1}$, the Ekman layer depth is only 1.4~m.
929When the vertical mixing coefficient is this small, using a flux condition is equivalent to
930entering the viscous forces (either wind stress or bottom friction) as a body force over the depth of the top or
931bottom model layer.
932To illustrate this, consider the equation for $u$ at $k$, the last ocean level:
933\begin{equation}
934  \label{eq:zdfbfr_flux2}
935  \frac{\partial u_k}{\partial t} = \frac{1}{e_{3u}} \left[ \frac{A_{uw}^{vm}}{e_{3uw}} \delta_{k+1/2}\;[u] - {\cal F}^u_h \right] \approx - \frac{{\cal F}^u_{h}}{e_{3u}}
936\end{equation}
937If the bottom layer thickness is 200~m, the Ekman transport will be distributed over that depth.
938On the other hand, if the vertical resolution is high (1~m or less) and a turbulent closure model is used,
939the turbulent Ekman layer will be represented explicitly by the model.
940However, the logarithmic layer is never represented in current primitive equation model applications:
941it is \emph{necessary} to parameterize the flux ${\cal F}^u_h $.
942Two choices are available in \NEMO: a linear and a quadratic bottom friction.
943Note that in both cases, the rotation between the interior velocity and the bottom friction is neglected in
944the present release of \NEMO.
945
946In the code, the bottom friction is imposed by adding the trend due to the bottom friction to
947the general momentum trend in \mdl{dynbfr}.
948For the time-split surface pressure gradient algorithm, the momentum trend due to
949the barotropic component needs to be handled separately.
950For this purpose it is convenient to compute and store coefficients which can be simply combined with
951bottom velocities and geometric values to provide the momentum trend due to bottom friction.
952These coefficients are computed in \mdl{zdfbfr} and generally take the form $c_b^{\textbf U}$ where:
953\begin{equation}
954  \label{eq:zdfbfr_bdef}
955  \frac{\partial {\textbf U_h}}{\partial t} =
956  - \frac{{\cal F}^{\textbf U}_{h}}{e_{3u}} = \frac{c_b^{\textbf U}}{e_{3u}} \;{\textbf U}_h^b
957\end{equation}
958where $\textbf{U}_h^b = (u_b\;,\;v_b)$ is the near-bottom, horizontal, ocean velocity.
959
960% -------------------------------------------------------------------------------------------------------------
961%       Linear Bottom Friction
962% -------------------------------------------------------------------------------------------------------------
963\subsection[Linear bottom friction (\forcode{nn_botfr = [01]})]
964{Linear bottom friction (\protect\np{nn\_botfr}\forcode{ = [01])}}
965\label{subsec:ZDF_bfr_linear}
966
967The linear bottom friction parameterisation (including the special case of a free-slip condition) assumes that
968the bottom friction is proportional to the interior velocity (\ie the velocity of the last model level):
969\[
970  % \label{eq:zdfbfr_linear}
971  {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b
972\]
973where $r$ is a friction coefficient expressed in ms$^{-1}$.
974This coefficient is generally estimated by setting a typical decay time $\tau$ in the deep ocean,
975and setting $r = H / \tau$, where $H$ is the ocean depth.
976Commonly accepted values of $\tau$ are of the order of 100 to 200 days \citep{weatherly_JMR84}.
977A value $\tau^{-1} = 10^{-7}$~s$^{-1}$ equivalent to 115 days, is usually used in quasi-geostrophic models.
978One may consider the linear friction as an approximation of quadratic friction, $r \approx 2\;C_D\;U_{av}$
979(\citet{gill_bk82}, Eq. 9.6.6).
980For example, with a drag coefficient $C_D = 0.002$, a typical speed of tidal currents of $U_{av} =0.1$~m\;s$^{-1}$,
981and assuming an ocean depth $H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$.
982This is the default value used in \NEMO. It corresponds to a decay time scale of 115~days.
983It can be changed by specifying \np{rn\_bfri1} (namelist parameter).
984
985For the linear friction case the coefficients defined in the general expression \autoref{eq:zdfbfr_bdef} are:
986\[
987  % \label{eq:zdfbfr_linbfr_b}
988  \begin{split}
989    c_b^u &= - r\\
990    c_b^v &= - r\\
991  \end{split}
992\]
993When \np{nn\_botfr}\forcode{ = 1}, the value of $r$ used is \np{rn\_bfri1}.
994Setting \np{nn\_botfr}\forcode{ = 0} is equivalent to setting $r=0$ and
995leads to a free-slip bottom boundary condition.
996These values are assigned in \mdl{zdfbfr}.
997From v3.2 onwards there is support for local enhancement of these values via an externally defined 2D mask array
998(\np{ln\_bfr2d}\forcode{ = .true.}) given in the \ifile{bfr\_coef} input NetCDF file.
999The mask values should vary from 0 to 1.
1000Locations with a non-zero mask value will have the friction coefficient increased by
1001$mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}.
1002
1003% -------------------------------------------------------------------------------------------------------------
1004%       Non-Linear Bottom Friction
1005% -------------------------------------------------------------------------------------------------------------
1006\subsection[Non-linear bottom friction (\forcode{nn_botfr = 2})]
1007{Non-linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 2})}
1008\label{subsec:ZDF_bfr_nonlinear}
1009
1010The non-linear bottom friction parameterisation assumes that the bottom friction is quadratic:
1011\[
1012  % \label{eq:zdfbfr_nonlinear}
1013  {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h
1014  }{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b
1015\]
1016where $C_D$ is a drag coefficient, and $e_b $ a bottom turbulent kinetic energy due to tides,
1017internal waves breaking and other short time scale currents.
1018A typical value of the drag coefficient is $C_D = 10^{-3} $.
1019As an example, the CME experiment \citep{treguier_JGR92} uses $C_D = 10^{-3}$ and
1020$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{killworth_JPO92} uses $C_D = 1.4\;10^{-3}$ and
1021$e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$.
1022The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2} namelist parameters).
1023
1024As for the linear case, the bottom friction is imposed in the code by adding the trend due to
1025the bottom friction to the general momentum trend in \mdl{dynbfr}.
1026For the non-linear friction case the terms computed in \mdl{zdfbfr} are:
1027\[
1028  % \label{eq:zdfbfr_nonlinbfr}
1029  \begin{split}
1030    c_b^u &= - \; C_D\;\left[ u^2 + \left(\bar{\bar{v}}^{i+1,j}\right)^2 + e_b \right]^{1/2}\\
1031    c_b^v &= - \; C_D\;\left[  \left(\bar{\bar{u}}^{i,j+1}\right)^2 + v^2 + e_b \right]^{1/2}\\
1032  \end{split}
1033\]
1034
1035The coefficients that control the strength of the non-linear bottom friction are initialised as namelist parameters:
1036$C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}.
1037Note for applications which treat tides explicitly a low or even zero value of \np{rn\_bfeb2} is recommended.
1038From v3.2 onwards a local enhancement of $C_D$ is possible via an externally defined 2D mask array
1039(\np{ln\_bfr2d}\forcode{ = .true.}).
1040This works in the same way as for the linear bottom friction case with non-zero masked locations increased by
1041$mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri2}.
1042
1043% -------------------------------------------------------------------------------------------------------------
1044%       Bottom Friction Log-layer
1045% -------------------------------------------------------------------------------------------------------------
1046\subsection[Log-layer bottom friction enhancement (\forcode{nn_botfr = 2}, \forcode{ln_loglayer = .true.})]
1047{Log-layer bottom friction enhancement (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})}
1048\label{subsec:ZDF_bfr_loglayer}
1049
1050In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally enhanced using
1051a "law of the wall" scaling.
1052If  \np{ln\_loglayer} = .true., $C_D$ is no longer constant but is related to the thickness of
1053the last wet layer in each column by:
1054\[
1055  C_D = \left ( {\kappa \over {\mathrm log}\left ( 0.5e_{3t}/rn\_bfrz0 \right ) } \right )^2
1056\]
1057
1058\noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness length provided via
1059the namelist.
1060
1061For stability, the drag coefficient is bounded such that it is kept greater or equal to
1062the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional namelist parameter:
1063\np{rn\_bfri2\_max}, \ie
1064\[
1065  rn\_bfri2 \leq C_D \leq rn\_bfri2\_max
1066\]
1067
1068\noindent Note also that a log-layer enhancement can also be applied to the top boundary friction if
1069under ice-shelf cavities are in use (\np{ln\_isfcav}\forcode{ = .true.}).
1070In this case, the relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} and \np{rn\_tfri2\_max}.
1071
1072% -------------------------------------------------------------------------------------------------------------
1073%       Bottom Friction stability
1074% -------------------------------------------------------------------------------------------------------------
1075\subsection{Bottom friction stability considerations}
1076\label{subsec:ZDF_bfr_stability}
1077
1078Some care needs to exercised over the choice of parameters to ensure that the implementation of
1079bottom friction does not induce numerical instability.
1080For the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2} is:
1081\begin{equation}
1082  \label{eq:Eqn_bfrstab}
1083  \begin{split}
1084    \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt    \\
1085    &= -\frac{ru}{e_{3u}}\;2\rdt\\
1086  \end{split}
1087\end{equation}
1088\noindent where linear bottom friction and a leapfrog timestep have been assumed.
1089To ensure that the bottom friction cannot reverse the direction of flow it is necessary to have:
1090\[
1091  |\Delta u| < \;|u|
1092\]
1093\noindent which, using \autoref{eq:Eqn_bfrstab}, gives:
1094\[
1095  r\frac{2\rdt}{e_{3u}} < 1 \qquad  \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\
1096\]
1097This same inequality can also be derived in the non-linear bottom friction case if
1098a velocity of 1 m.s$^{-1}$ is assumed.
1099Alternatively, this criterion can be rearranged to suggest a minimum bottom box thickness to ensure stability:
1100\[
1101  e_{3u} > 2\;r\;\rdt
1102\]
1103\noindent which it may be necessary to impose if partial steps are being used.
1104For example, if $|u| = 1$ m.s$^{-1}$, $rdt = 1800$ s, $r = 10^{-3}$ then $e_{3u}$ should be greater than 3.6 m.
1105For most applications, with physically sensible parameters these restrictions should not be of concern.
1106But caution may be necessary if attempts are made to locally enhance the bottom friction parameters.
1107To ensure stability limits are imposed on the bottom friction coefficients both
1108during initialisation and at each time step.
1109Checks at initialisation are made in \mdl{zdfbfr} (assuming a 1 m.s$^{-1}$ velocity in the non-linear case).
1110The number of breaches of the stability criterion are reported as well as
1111the minimum and maximum values that have been set.
1112The criterion is also checked at each time step, using the actual velocity, in \mdl{dynbfr}.
1113Values of the bottom friction coefficient are reduced as necessary to ensure stability;
1114these changes are not reported.
1115
1116Limits on the bottom friction coefficient are not imposed if the user has elected to
1117handle the bottom friction implicitly (see \autoref{subsec:ZDF_bfr_imp}).
1118The number of potential breaches of the explicit stability criterion are still reported for information purposes.
1119
1120% -------------------------------------------------------------------------------------------------------------
1121%       Implicit Bottom Friction
1122% -------------------------------------------------------------------------------------------------------------
1123\subsection[Implicit bottom friction (\forcode{ln_bfrimp = .true.})]
1124{Implicit bottom friction (\protect\np{ln\_bfrimp}\forcode{ = .true.})}
1125\label{subsec:ZDF_bfr_imp}
1126
1127An optional implicit form of bottom friction has been implemented to improve model stability.
1128We recommend this option for shelf sea and coastal ocean applications, especially for split-explicit time splitting.
1129This option can be invoked by setting \np{ln\_bfrimp} to \forcode{.true.} in the \textit{nambfr} namelist.
1130This option requires \np{ln\_zdfexp} to be \forcode{.false.} in the \textit{namzdf} namelist.
1131
1132This implementation is realised in \mdl{dynzdf\_imp} and \mdl{dynspg\_ts}. In \mdl{dynzdf\_imp},
1133the bottom boundary condition is implemented implicitly.
1134
1135\[
1136  % \label{eq:dynzdf_bfr}
1137  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{mbk}
1138  = \binom{c_{b}^{u}u^{n+1}_{mbk}}{c_{b}^{v}v^{n+1}_{mbk}}
1139\]
1140
1141where $mbk$ is the layer number of the bottom wet layer.
1142Superscript $n+1$ means the velocity used in the friction formula is to be calculated, so, it is implicit.
1143
1144If split-explicit time splitting is used, care must be taken to avoid the double counting of the bottom friction in
1145the 2-D barotropic momentum equations.
1146As NEMO only updates the barotropic pressure gradient and Coriolis' forcing terms in the 2-D barotropic calculation,
1147we need to remove the bottom friction induced by these two terms which has been included in the 3-D momentum trend
1148and update it with the latest value.
1149On the other hand, the bottom friction contributed by the other terms
1150(\eg the advection term, viscosity term) has been included in the 3-D momentum equations and
1151should not be added in the 2-D barotropic mode.
1152
1153The implementation of the implicit bottom friction in \mdl{dynspg\_ts} is done in two steps as the following:
1154
1155\[
1156  % \label{eq:dynspg_ts_bfr1}
1157  \frac{\textbf{U}_{med}-\textbf{U}^{m-1}}{2\Delta t}=-g\nabla\eta-f\textbf{k}\times\textbf{U}^{m}+c_{b}
1158  \left(\textbf{U}_{med}-\textbf{U}^{m-1}\right)
1159\]
1160\[
1161  \frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+
1162  \left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)-
1163  2\Delta t_{bc}c_{b}\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{u}_{b}\right)
1164\]
1165
1166where $\textbf{T}$ is the vertical integrated 3-D momentum trend.
1167We assume the leap-frog time-stepping is used here.
1168$\Delta t$ is the barotropic mode time step and $\Delta t_{bc}$ is the baroclinic mode time step.
1169$c_{b}$ is the friction coefficient.
1170$\eta$ is the sea surface level calculated in the barotropic loops while $\eta^{'}$ is the sea surface level used in
1171the 3-D baroclinic mode.
1172$\textbf{u}_{b}$ is the bottom layer horizontal velocity.
1173
1174% -------------------------------------------------------------------------------------------------------------
1175%       Bottom Friction with split-explicit time splitting
1176% -------------------------------------------------------------------------------------------------------------
1177\subsection[Bottom friction with split-explicit time splitting (\texttt{ln\_bfrimp})]
1178{Bottom friction with split-explicit time splitting (\protect\np{ln\_bfrimp})}
1179\label{subsec:ZDF_bfr_ts}
1180
1181When calculating the momentum trend due to bottom friction in \mdl{dynbfr},
1182the bottom velocity at the before time step is used.
1183This velocity includes both the baroclinic and barotropic components which is appropriate when
1184using either the explicit or filtered surface pressure gradient algorithms
1185(\key{dynspg\_exp} or \key{dynspg\_flt}).
1186Extra attention is required, however, when using split-explicit time stepping (\key{dynspg\_ts}).
1187In this case the free surface equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro},
1188while the three dimensional prognostic variables are solved with the longer time step of \np{rn\_rdt} seconds.
1189The trend in the barotropic momentum due to bottom friction appropriate to this method is that given by
1190the selected parameterisation (\ie linear or non-linear bottom friction) computed with
1191the evolving velocities at each barotropic timestep.
1192
1193In the case of non-linear bottom friction, we have elected to partially linearise the problem by
1194keeping the coefficients fixed throughout the barotropic time-stepping to those computed in
1195\mdl{zdfbfr} using the now timestep.
1196This decision allows an efficient use of the $c_b^{\vect{U}}$ coefficients to:
1197
1198\begin{enumerate}
1199\item On entry to \rou{dyn\_spg\_ts}, remove the contribution of the before barotropic velocity to
1200  the bottom friction component of the vertically integrated momentum trend.
1201  Note the same stability check that is carried out on the bottom friction coefficient in \mdl{dynbfr} has to
1202  be applied here to ensure that the trend removed matches that which was added in \mdl{dynbfr}.
1203\item At each barotropic step, compute the contribution of the current barotropic velocity to
1204  the trend due to bottom friction.
1205  Add this contribution to the vertically integrated momentum trend.
1206  This contribution is handled implicitly which eliminates the need to impose a stability criteria on
1207  the values of the bottom friction coefficient within the barotropic loop.
1208\end{enumerate}
1209
1210Note that the use of an implicit formulation within the barotropic loop for the bottom friction trend means that
1211any limiting of the bottom friction coefficient in \mdl{dynbfr} does not adversely affect the solution when
1212using split-explicit time splitting.
1213This is because the major contribution to bottom friction is likely to come from the barotropic component which
1214uses the unrestricted value of the coefficient.
1215However, if the limiting is thought to be having a major effect
1216(a more likely prospect in coastal and shelf seas applications) then
1217the fully implicit form of the bottom friction should be used (see \autoref{subsec:ZDF_bfr_imp})
1218which can be selected by setting \np{ln\_bfrimp} $=$ \forcode{.true.}.
1219
1220Otherwise, the implicit formulation takes the form:
1221\[
1222  % \label{eq:zdfbfr_implicitts}
1223  \bar{U}^{t+ \rdt} = \; \left [ \bar{U}^{t-\rdt}\; + 2 \rdt\;RHS \right ] / \left [ 1 - 2 \rdt \;c_b^{u} / H_e \right ]
1224\]
1225where $\bar U$ is the barotropic velocity, $H_e$ is the full depth (including sea surface height),
1226$c_b^u$ is the bottom friction coefficient as calculated in \rou{zdf\_bfr} and
1227$RHS$ represents all the components to the vertically integrated momentum trend except for
1228that due to bottom friction.
1229
1230% ================================================================
1231% Tidal Mixing
1232% ================================================================
1233\section[Tidal mixing (\texttt{\textbf{key\_zdftmx}})]
1234{Tidal mixing (\protect\key{zdftmx})}
1235\label{sec:ZDF_tmx}
1236
1237%--------------------------------------------namzdf_tmx--------------------------------------------------
1238%
1239%\nlst{namzdf_tmx}
1240%--------------------------------------------------------------------------------------------------------------
1241
1242
1243% -------------------------------------------------------------------------------------------------------------
1244%        Bottom intensified tidal mixing
1245% -------------------------------------------------------------------------------------------------------------
1246\subsection{Bottom intensified tidal mixing}
1247\label{subsec:ZDF_tmx_bottom}
1248
1249Options are defined through the  \ngn{namzdf\_tmx} namelist variables.
1250The parameterization of tidal mixing follows the general formulation for the vertical eddy diffusivity proposed by
1251\citet{st-laurent.simmons.ea_GRL02} and first introduced in an OGCM by \citep{simmons.jayne.ea_OM04}.
1252In this formulation an additional vertical diffusivity resulting from internal tide breaking,
1253$A^{vT}_{tides}$ is expressed as a function of $E(x,y)$,
1254the energy transfer from barotropic tides to baroclinic tides:
1255\begin{equation}
1256  \label{eq:Ktides}
1257  A^{vT}_{tides} =  q \,\Gamma \,\frac{ E(x,y) \, F(z) }{ \rho \, N^2 }
1258\end{equation}
1259where $\Gamma$ is the mixing efficiency, $N$ the Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),
1260$\rho$ the density, $q$ the tidal dissipation efficiency, and $F(z)$ the vertical structure function.
1261
1262The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn\_me} namelist parameter) and
1263is usually taken to be the canonical value of $\Gamma = 0.2$ (Osborn 1980).
1264The tidal dissipation efficiency is given by the parameter $q$ (\np{rn\_tfe} namelist parameter)
1265represents the part of the internal wave energy flux $E(x, y)$ that is dissipated locally,
1266with the remaining $1-q$ radiating away as low mode internal waves and
1267contributing to the background internal wave field.
1268A value of $q=1/3$ is typically used \citet{st-laurent.simmons.ea_GRL02}.
1269The vertical structure function $F(z)$ models the distribution of the turbulent mixing in the vertical.
1270It is implemented as a simple exponential decaying upward away from the bottom,
1271with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter,
1272with a typical value of $500\,m$) \citep{st-laurent.nash_DSR04},
1273\[
1274  % \label{eq:Fz}
1275  F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) }
1276\]
1277and is normalized so that vertical integral over the water column is unity.
1278
1279The associated vertical viscosity is calculated from the vertical diffusivity assuming a Prandtl number of 1,
1280\ie $A^{vm}_{tides}=A^{vT}_{tides}$.
1281In the limit of $N \rightarrow 0$ (or becoming negative), the vertical diffusivity is capped at $300\,cm^2/s$ and
1282impose a lower limit on $N^2$ of \np{rn\_n2min} usually set to $10^{-8} s^{-2}$.
1283These bounds are usually rarely encountered.
1284
1285The internal wave energy map, $E(x, y)$ in \autoref{eq:Ktides}, is derived from a barotropic model of
1286the tides utilizing a parameterization of the conversion of barotropic tidal energy into internal waves.
1287The essential goal of the parameterization is to represent the momentum exchange between the barotropic tides and
1288the unrepresented internal waves induced by the tidal flow over rough topography in a stratified ocean.
1289In the current version of \NEMO, the map is built from the output of
1290the barotropic global ocean tide model MOG2D-G \citep{carrere.lyard_GRL03}.
1291This model provides the dissipation associated with internal wave energy for the M2 and K1 tides component
1292(\autoref{fig:ZDF_M2_K1_tmx}).
1293The S2 dissipation is simply approximated as being $1/4$ of the M2 one.
1294The internal wave energy is thus : $E(x, y) = 1.25 E_{M2} + E_{K1}$.
1295Its global mean value is $1.1$ TW,
1296in agreement with independent estimates \citep{egbert.ray_N00, egbert.ray_JGR01}.
1297
1298%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1299\begin{figure}[!t]
1300  \begin{center}
1301    \includegraphics[width=\textwidth]{Fig_ZDF_M2_K1_tmx}
1302    \caption{
1303      \protect\label{fig:ZDF_M2_K1_tmx}
1304      (a) M2 and (b) K1 internal wave drag energy from \citet{carrere.lyard_GRL03} ($W/m^2$).
1305    }
1306  \end{center}
1307\end{figure}
1308%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1309 
1310% -------------------------------------------------------------------------------------------------------------
1311%        Indonesian area specific treatment
1312% -------------------------------------------------------------------------------------------------------------
1313\subsection[Indonesian area specific treatment (\texttt{ln\_zdftmx\_itf})]
1314{Indonesian area specific treatment (\protect\np{ln\_zdftmx\_itf})}
1315\label{subsec:ZDF_tmx_itf}
1316
1317When the Indonesian Through Flow (ITF) area is included in the model domain,
1318a specific treatment of tidal induced mixing in this area can be used.
1319It is activated through the namelist logical \np{ln\_tmx\_itf}, and the user must provide an input NetCDF file,
1320\ifile{mask\_itf}, which contains a mask array defining the ITF area where the specific treatment is applied.
1321
1322When \np{ln\_tmx\_itf}\forcode{ = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following
1323the parameterisation developed by \citet{koch-larrouy.madec.ea_GRL07}:
1324
1325First, the Indonesian archipelago is a complex geographic region with a series of
1326large, deep, semi-enclosed basins connected via numerous narrow straits.
1327Once generated, internal tides remain confined within this semi-enclosed area and hardly radiate away.
1328Therefore all the internal tides energy is consumed within this area.
1329So it is assumed that $q = 1$, \ie all the energy generated is available for mixing.
1330Note that for test purposed, the ITF tidal dissipation efficiency is a namelist parameter (\np{rn\_tfe\_itf}).
1331A value of $1$ or close to is this recommended for this parameter.
1332
1333Second, the vertical structure function, $F(z)$, is no more associated with a bottom intensification of the mixing,
1334but with a maximum of energy available within the thermocline.
1335\citet{koch-larrouy.madec.ea_GRL07} have suggested that the vertical distribution of
1336the energy dissipation proportional to $N^2$ below the core of the thermocline and to $N$ above.
1337The resulting $F(z)$ is:
1338\[
1339  % \label{eq:Fz_itf}
1340  F(i,j,k) \sim     \left\{
1341    \begin{aligned}
1342      \frac{q\,\Gamma E(i,j) } {\rho N \, \int N     dz}    \qquad \text{when $\partial_z N < 0$} \\
1343      \frac{q\,\Gamma E(i,j) } {\rho     \, \int N^2 dz}    \qquad \text{when $\partial_z N > 0$}
1344    \end{aligned}
1345  \right.
1346\]
1347
1348Averaged over the ITF area, the resulting tidal mixing coefficient is $1.5\,cm^2/s$,
1349which agrees with the independent estimates inferred from observations.
1350Introduced in a regional OGCM, the parameterization improves the water mass characteristics in
1351the different Indonesian seas, suggesting that the horizontal and vertical distributions of
1352the mixing are adequately prescribed \citep{koch-larrouy.madec.ea_GRL07, koch-larrouy.madec.ea_OD08*a, koch-larrouy.madec.ea_OD08*b}.
1353Note also that such a parameterisation has a significant impact on the behaviour of
1354global coupled GCMs \citep{koch-larrouy.lengaigne.ea_CD10}.
1355
1356% ================================================================
1357% Internal wave-driven mixing
1358% ================================================================
1359\section[Internal wave-driven mixing (\texttt{\textbf{key\_zdftmx\_new}})]
1360{Internal wave-driven mixing (\protect\key{zdftmx\_new})}
1361\label{sec:ZDF_tmx_new}
1362
1363%--------------------------------------------namzdf_tmx_new------------------------------------------
1364%
1365%\nlst{namzdf_tmx_new}
1366%--------------------------------------------------------------------------------------------------------------
1367
1368The parameterization of mixing induced by breaking internal waves is a generalization of
1369the approach originally proposed by \citet{st-laurent.simmons.ea_GRL02}.
1370A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed,
1371and the resulting diffusivity is obtained as
1372\[
1373  % \label{eq:Kwave}
1374  A^{vT}_{wave} =  R_f \,\frac{ \epsilon }{ \rho \, N^2 }
1375\]
1376where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution of
1377the energy available for mixing.
1378If the \np{ln\_mevar} namelist parameter is set to false, the mixing efficiency is taken as constant and
1379equal to 1/6 \citep{osborn_JPO80}.
1380In the opposite (recommended) case, $R_f$ is instead a function of
1381the turbulence intensity parameter $Re_b = \frac{ \epsilon}{\nu \, N^2}$,
1382with $\nu$ the molecular viscosity of seawater, following the model of \cite{bouffard.boegman_DAO13} and
1383the implementation of \cite{de-lavergne.madec.ea_JPO16}.
1384Note that $A^{vT}_{wave}$ is bounded by $10^{-2}\,m^2/s$, a limit that is often reached when
1385the mixing efficiency is constant.
1386
1387In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary
1388as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to true, a recommended choice.
1389This parameterization of differential mixing, due to \cite{jackson.rehmann_JPO14},
1390is implemented as in \cite{de-lavergne.madec.ea_JPO16}.
1391
1392The three-dimensional distribution of the energy available for mixing, $\epsilon(i,j,k)$,
1393is constructed from three static maps of column-integrated internal wave energy dissipation,
1394$E_{cri}(i,j)$, $E_{pyc}(i,j)$, and $E_{bot}(i,j)$, combined to three corresponding vertical structures
1395(de Lavergne et al., in prep):
1396\begin{align*}
1397  F_{cri}(i,j,k) &\propto e^{-h_{ab} / h_{cri} }\\
1398  F_{pyc}(i,j,k) &\propto N^{n\_p}\\
1399  F_{bot}(i,j,k) &\propto N^2 \, e^{- h_{wkb} / h_{bot} }
1400\end{align*} 
1401In the above formula, $h_{ab}$ denotes the height above bottom,
1402$h_{wkb}$ denotes the WKB-stretched height above bottom, defined by
1403\[
1404  h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz'  } \; ,
1405\]
1406The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist)
1407controls the stratification-dependence of the pycnocline-intensified dissipation.
1408It can take values of 1 (recommended) or 2.
1409Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of
1410the decay scales $h_{cri}(i,j)$ and $h_{bot}(i,j)$, which are defined by two additional input maps.
1411$h_{cri}$ is related to the large-scale topography of the ocean (etopo2) and
1412$h_{bot}$ is a function of the energy flux $E_{bot}$, the characteristic horizontal scale of
1413the abyssal hill topography \citep{goff_JGR10} and the latitude.
1414
1415% ================================================================
1416
1417\biblio
1418
1419\pindex
1420
1421\end{document}
Note: See TracBrowser for help on using the repository browser.