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.
Changeset 817 for trunk/DOC/BETA/Chapters/Chap_TRA.tex – NEMO

Ignore:
Timestamp:
2008-02-09T15:13:48+01:00 (16 years ago)
Author:
gm
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DOC/BETA/Chapters/Chap_TRA.tex

    r781 r817  
    1212%        ==> addfigure on bbl 
    1313 
    14  
     14%STEVEN :  is the use of the word "positive" to describe a scheme enough, or should it be "positive definite"? I added a comment to this effect on some instances of this below 
     15 
     16\newpage 
    1517$\ $\newline    % force a new ligne 
    1618 
    17 Using the representation described in Chap.~\ref{DOM}, several semi-discrete space  
    18 forms of the tracer equations are available depending on the vertical  
     19Using the representation described in Chap.~\ref{DOM}, several semi-discrete  
     20space forms of the tracer equations are available depending on the vertical  
    1921coordinate used and on the physics used. In all the equations presented  
    2022here, the masking has been omitted for simplicity. One must be aware that  
     
    2224operator is used, the resulting field is multiplied by a mask. 
    2325 
    24 The two active tracers are potential temperature and salinity. Their prognostic equation can be summarized as follows: 
     26The two active tracers are potential temperature and salinity. Their prognostic  
     27equations can be summarized as follows: 
    2528\begin{equation*} 
    2629\text{NXT} = \text{ADV}+\text{LDF}+\text{ZDF}+\text{SBC} 
     
    2831\end{equation*} 
    2932 
    30 NXT stands for next, referring to the time-stepping. From left to right, the terms on the rhs of the tracer equations are the advection (ADV), the lateral diffusion (LDF), the vertical diffusion (ZDF), the contributions from the external forcings (SBC: Surface Boundary Condition, QSR: Solar Radiation penetration, and BBC: Bottom Boundary Condition), the contribution from the bottom boundary Layer (BBL) parametrisation, and an internal damping (DMP) term. The last four have been put inside brackets as they are optional. The external forcings and parameterizations require complex inputs and calculations (bulk formulae, estimation of mixing coefficients) that are carried out in modules of the SBC, LDF and ZDF categories and described in chapters \S\ref{SBC}, \S\ref{LDF} and  \S\ref{ZDF}, respectively. Note that \mdl{tranpc}, the non-penetrative convection module,  although (temporarily) located in the NEMO/OPA//TRA directory, is described with the model vertical physics (ZDF). 
    31  
    32 In the present chapter we also describe the diagnostic equations used to compute the sea-water properties (density, Brunt-Vais\"{a}l\"{a} frequency, specific heat and freezing point) although the associated modules ($i.e.$ \mdl{eosbn2}, \mdl{ocfzpt} and \mdl{phycst}) are (temporarily) located in the NEMO/OPA directory. 
    33  
    34 The different options available to the user are managed by namelist logical or CPP keys. For each equation term ttt, the namelist logicals are \textit{ln\_trattt\_xxx}, where \textit{xxx} is a 3 or 4 letter acronym accounting for each optional scheme. The CPP key (when it exists) is \textbf{key\_trattt}. The corresponding code can be found in the \textit{trattt} or \textit{trattt\_xxx} module, in the NEMO/OPA/TRA directory. 
    35  
    36 The user has the option of extracting each tendency term on the rhs of the tracer equation (\key {trdtra} defined), as described in Chap.~\ref{MISC}. 
     33NXT stands for next, referring to the time-stepping. From left to right, the terms  
     34on the rhs of the tracer equations are the advection (ADV), the lateral diffusion  
     35(LDF), the vertical diffusion (ZDF), the contributions from the external forcings  
     36(SBC: Surface Boundary Condition, QSR: penetrative Solar Radiation, and BBC:  
     37Bottom Boundary Condition), the contribution from the bottom boundary Layer  
     38(BBL) parametrisation, and an internal damping (DMP) term. The terms QSR,  
     39BBC, BBL and DMP are optional. The external forcings and parameterizations  
     40require complex inputs and complex calculations (e.g. bulk formulae, estimation  
     41of mixing coefficients) that are carried out in the SBC, LDF and ZDF modules and  
     42described in chapters \S\ref{SBC}, \S\ref{LDF} and  \S\ref{ZDF}, respectively.  
     43Note that \mdl{tranpc}, the non-penetrative convection module,  although  
     44(temporarily) located in the NEMO/OPA/TRA directory, is described with the  
     45model vertical physics (ZDF). 
     46%%% 
     47\gmcomment{change the position of eosbn2 in the reference code} 
     48%%% 
     49 
     50In the present chapter we also describe the diagnostic equations used to compute  
     51the sea-water properties (density, Brunt-Vais\"{a}l\"{a} frequency, specific heat and  
     52freezing point) although the associated modules ($i.e.$ \mdl{eosbn2}, \mdl{ocfzpt}  
     53and \mdl{phycst}) are (temporarily) located in the NEMO/OPA directory. 
     54 
     55The different options available to the user are managed by namelist logical or  
     56CPP keys. For each equation term ttt, the namelist logicals are \textit{ln\_trattt\_xxx},  
     57where \textit{xxx} is a 3 or 4 letter acronym accounting for each optional scheme.  
     58The CPP key (when it exists) is \textbf{key\_trattt}. The corresponding code can be  
     59found in the \textit{trattt} or \textit{trattt\_xxx} module, in the NEMO/OPA/TRA directory. 
     60 
     61The user has the option of extracting each tendency term on the rhs of the tracer  
     62equation for output (\key{trdtra} is defined), as described in Chap.~\ref{MISC}. 
    3763 
    3864% ================================================================ 
    3965% Tracer Advection 
    4066% ================================================================ 
    41 \section{Tracer Advection (\mdl{traadv})} 
     67\section  [Tracer Advection (\textit{traadv})] 
     68      {Tracer Advection (\mdl{traadv})} 
    4269\label{TRA_adv} 
    4370%------------------------------------------nam_traadv----------------------------------------------------- 
     
    4572%------------------------------------------------------------------------------------------------------------- 
    4673 
    47 The advection tendency in flux form is the divergence of the advective  
     74The advection tendency of a tracer in flux form is the divergence of the advective  
    4875fluxes. Its discrete expression is given by : 
    4976\begin{equation} \label{Eq_tra_adv} 
     
    5481{w\;\tau _w } \right] 
    5582\end{equation} 
    56 which, in pure z-coordinate (\key{zco} defined), reduces to : 
     83where $\tau$ is either T or S. In pure $z$-coordinate (\key{zco} is defined),  
     84it reduces to : 
    5785\begin{equation} \label{Eq_tra_adv_zco} 
    5886ADV_\tau =-\frac{1}{e_{1T} {\kern 1pt}e_{2T} {\kern 1pt}}\left( {\;\delta _i  
     
    6189e\nolimits_{3T} }\delta _k \left[ {w\;\tau _w } \right] 
    6290\end{equation} 
    63 as the vertical scale factors are function of $k$ only, and thus $e_{3u}  
     91since the vertical scale factors are functions of $k$ only, and thus $e_{3u}  
    6492=e_{3v} =e_{3T} $. 
    6593 
    66 The flux form requires implicitly the use of the continuity equation:  
     94The flux form in \eqref{Eq_tra_adv} requires implicitly the use of the continuity equation:  
    6795$\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$  
    68 using $\nabla \cdot \vect{U}=0)$ or $\partial _t e_3 +\nabla \cdot \vect{U}=0$ in variable volume case ($i.e.$ \key{vvl} defined). Therefore it is of  
     96(using $\nabla \cdot \vect{U}=0)$ or $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$ 
     97 in variable volume case ($i.e.$ \key{vvl} defined). Therefore it is of  
    6998paramount importance to design the discrete analogue of the advection  
    7099tendency so that it is consistent with the continuity equation in order to  
    71 enforce conservation properties of the continuous equations. In other words,  
    72 by substituting $\tau$ by 1 in (\ref{Eq_tra_adv}) we recover discrete form of the  
    73 continuity equation which is used to calculate the vertical velocity. 
     100enforce the conservation properties of the continuous equations. In other words,  
     101by substituting $\tau$ by 1 in (\ref{Eq_tra_adv}) we recover the discrete form of  
     102the continuity equation which is used to calculate the vertical velocity. 
    74103%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    75104\begin{figure}[!t] \label{Fig_adv_scheme}  \begin{center} 
    76105\includegraphics[width=0.9\textwidth]{./Figures/Fig_adv_scheme.pdf} 
    77 \caption{Schematic representation of some ways used to evaluate the tracer value at $u$-point and the amount of tracer exchanged between two neighbouring grid points. Upsteam biased scheme (ups): the upstream value is used and the black area is exchanged. Piecewise parabolic method (ppm): a parabolic interpolation is used and black + dark grey areas is exchanged. Monotonic upstream scheme for conservative laws (muscl):  a parabolic interpolation is used and black + dark grey + grey areas are exchanged. Second order scheme (cen2): the mean value is used and black + dark grey + grey + light grey areas are exchanged. Note that this illustration does not include the flux limiter used in ppm and muscl schemes.} 
     106\caption{Schematic representation of some ways used to evaluate the tracer value  
     107at $u$-point and the amount of tracer exchanged between two neighbouring grid  
     108points. Upsteam biased scheme (ups): the upstream value is used and the black  
     109area is exchanged. Piecewise parabolic method (ppm): a parabolic interpolation  
     110is used and the black and dark grey areas are exchanged. Monotonic upstream  
     111scheme for conservative laws (muscl):  a parabolic interpolation is used and black,  
     112dark grey and grey areas are exchanged. Second order scheme (cen2): the mean  
     113value is used and black, dark grey, grey and light grey areas are exchanged. Note  
     114that this illustration does not include the flux limiter used in ppm and muscl schemes.} 
    78115\end{center}   \end{figure} 
    79116%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    80 The advection schemes used in OPA differ by the choice made in space and  
    81 time interpolation to define the value of the tracer at the velocity points (\ref{Fig_adv_scheme}).  
     117 
     118The key difference between the advection schemes used in \NEMO is the choice  
     119made in space and time interpolation to define the value of the tracer at the  
     120velocity points (Fig.~\ref{Fig_adv_scheme}).  
     121 
    82122Along solid lateral and bottom boundaries a zero tracer flux is naturally  
    83123specified, since the normal velocity is zero there. At the sea surface the  
    84 boundary condition depends on the type of sea surface chosen: (1) in  
    85 rigid-lid formulation, $w=0$ at the surface, so the advective fluxes through the  
    86 surface is zero ; (2) in non-linear free surface (variable volume case,  
    87 \key{vvl} defined), convergence/divergence in the first ocean level moves  
    88 up/down the free surface: there is no tracer advection through it so that  
    89 the advective fluxes through the surface is also zero ; (3) in the linear  
    90 free surface, the first level thickness is constant in time. The vertical  
    91 boundary condition is applied at the fixed surface $z=0$ rather than on the  
    92 moving surface $z=\eta$. There is a non-zero advective flux which is set for all  
    93 advection schemes as the product of surface velocity (at $z=0$) by the first level  
    94 tracer value: $\left. {\tau _w } \right|_{k=1 \mathord{\left/ {\vphantom {1  
    95 2}} \right. \kern-\nulldelimiterspace} 2} =T_{k=1} $. This boundary  
    96 condition retains local conservation of tracer. Strict global conservation  
    97 is not possible in linear free surface but is achieved to a good  
    98 approximation since the non-conservative term is the product of the time  
    99 derivative of the tracer and the free surface height, two quantities that are not correlated (see \S\ref{PE_free_surface}, and also \citet{Roullet2000,Griffies2001,Campin2004}). 
    100  
    101 The velocity field that appears in (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_zco}) is the centred (\textit{now}) \textit{eulerian} ocean velocity (see \S\ref{DYN}). Nevertheless, when advective bottom boundary layer (\textit{bbl}) and/or eddy induced velocity (\textit{eiv}) parameterisations are used it is the \textit{now} \textit{effective} velocity (i.e. the sum of the eulerian, the bbl and/or the eiv velocities) which is used. 
     124boundary condition depends on the type of sea surface chosen:  
     125\begin{description} 
     126\item  [rigid-lid formulation:] $w=0$ at the surface, so the advective  
     127fluxes through the surface are zero. 
     128\item [linear free surface:] the first level thickness is constant in time:  
     129the vertical boundary condition is applied at the fixed surface $z=0$  
     130rather than on the moving surface $z=\eta$. There is a non-zero advective  
     131flux which is set for all advection schemes as the product of surface  
     132velocity (at $z=0$) by the first level tracer value:  
     133$\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $.  
     134\item [non-linear free surface:] (\key{vvl} is defined)  
     135convergence/divergence in the first ocean level moves the free surface  
     136up/down. There is no tracer advection through it so that the advective  
     137fluxes through the surface are also zero  
     138\end{description} 
     139In all cases, this boundary condition retains local conservation of tracer.  
     140Global conservation is obtained in both rigid-lid and non-linear free surface  
     141cases, but not in the linear free surface case. Nevertheless, in the latter 
     142case, it is achieved to a good approximation since the non-conservative  
     143term is the product of the time derivative of the tracer and the free surface  
     144height, two quantities that are not correlated (see \S\ref{PE_free_surface},  
     145and also \citet{Roullet2000,Griffies2001,Campin2004}). 
     146 
     147The velocity field that appears in (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_zco})  
     148is the centred (\textit{now}) \textit{eulerian} ocean velocity (see Chap.~\ref{DYN}).  
     149When advective bottom boundary layer (\textit{bbl}) and/or eddy induced velocity  
     150(\textit{eiv}) parameterisations are used it is the \textit{now} \textit{effective}  
     151velocity ($i.e.$ the sum of the eulerian, the bbl and/or the eiv velocities) which is used. 
    102152 
    103153The choice of an advection scheme is made in the \np{nam\_traadv} namelist, by  
    104154setting to \textit{true} one and only one of the logicals \textit{ln\_traadv\_xxx}. The  
    105 corresponding code can be found in \textit{traadv\_xxx.F90} module, where  
    106 \textit{xxx} is a 3 or 4 letter acronym accounting for each scheme. Details  
     155corresponding code can be found in the \textit{traadv\_xxx.F90} module, where  
     156\textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme. Details  
    107157of the advection schemes are given below. The choice of an advection scheme  
    108158is a complex matter which depends on the model physics, model resolution,  
    109159type of tracer, as well as the issue of numerical cost.  
    110160 
    111 Note that (1) cen2, cen4 and TVD schemes require an explicit diffusion  
     161Note that  
     162(1) cen2, cen4 and TVD schemes require an explicit diffusion  
    112163operator while the other schemes are diffusive enough so that they do not  
    113 require additional diffusion ; (2) cen2, cen4, MUSCL2, and UBS are not  
    114 \textit{positive} schemes, meaning false extrema are permitted. It is not recommended to use  
    115 them on passive tracers ; (3) It is highly recommended to use the same  
    116 advection-diffusion scheme on both active and passive tracers. In  
    117 particular, if a source or sink of a passive tracer depends on a active one,  
    118 the difference of treatment of active and passive tracers can create very  
    119 nice-looking frontal structures that are pure numerical artefacts.  
    120  
     164require additional diffusion ;  
     165(2) cen2, cen4, MUSCL2, and UBS are not \textit{positive} schemes 
     166\footnote{negative values can appear in an initially strictly positive tracer field  
     167which is advected} 
     168, implying that false extrema are permitted. Their use is not recommended on passive tracers ;  
     169(3) It is highly recommended that the same advection-diffusion scheme is  
     170used on both active and passive tracers. Indeed, if a source or sink of a  
     171passive tracer depends on an active one, the difference of treatment of  
     172active and passive tracers can create very nice-looking frontal structures  
     173that are pure numerical artefacts.  
    121174 
    122175% ------------------------------------------------------------------------------------------------------------- 
    123176%        2nd order centred scheme   
    124177% ------------------------------------------------------------------------------------------------------------- 
    125 \subsection{$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2}=T)} 
     178\subsection   [$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2})] 
     179         {$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2}=.true.)} 
    126180\label{TRA_adv_cen2} 
    127181 
    128182In the centred second order formulation, the tracer at velocity points is  
    129 evaluated as the mean of the two neighbouring $T$-points. For example, in the  
    130 $i$-direction : 
     183evaluated as the mean of the two neighbouring $T$-point values.  
     184For example, in the $i$-direction : 
    131185\begin{equation} \label{Eq_tra_adv_cen2} 
    132186\tau _u^{cen2} =\overline T ^{i+1/2} 
    133187\end{equation} 
    134188 
    135 The scheme is non diffusive ($i.e.$ it conserves the tracer variance, $\tau^2)$ 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 $T$ in (\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value. 
    136  
    137 Note that using cen2 scheme, the overall tracer advection is of second order accuracy since both (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_cen2}) have this order of accuracy. 
     189The scheme is non diffusive ($i.e.$ it conserves the tracer variance, $\tau^2)$  
     190but dispersive ($i.e.$ it may create false extrema). It is therefore notoriously  
     191noisy and must be used in conjunction with an explicit diffusion operator to  
     192produce a sensible solution. The associated time-stepping is performed using  
     193a leapfrog scheme in conjunction with an Asselin time-filter, so $T$ in  
     194(\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value. 
     195 
     196Note that using the cen2 scheme, the overall tracer advection is of second  
     197order accuracy since both (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_cen2})  
     198have this order of accuracy. 
    138199 
    139200% ------------------------------------------------------------------------------------------------------------- 
    140201%        4nd order centred scheme   
    141202% ------------------------------------------------------------------------------------------------------------- 
    142 \subsection{$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4}=T)} 
     203\subsection   [$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4})] 
     204         {$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4}=.true.)} 
    143205\label{TRA_adv_cen4} 
    144206 
    145 In the $4^{th}$ order formulation (to be implemented), tracer is evaluated  
    146 at velocity points as the $4^{th}$ order interpolation of $T$, and thus use the  
    147 four neighbouring $T$-points. For example, in the $i$-direction: 
     207In the $4^{th}$ order formulation (to be implemented), tracer values are  
     208evaluated at velocity points as a $4^{th}$ order interpolation, and thus uses  
     209the four neighbouring $T$-points. For example, in the $i$-direction: 
    148210\begin{equation} \label{Eq_tra_adv_cen4} 
    149211\tau _u^{cen4}  
     
    152214 
    153215Strictly speaking, the cen4 scheme is not a $4^{th}$ order advection scheme  
    154 but a $4^{th}$ order evaluation of advective fluxes since the divergence of  
    155 advective fluxes, (\ref{Eq_tra_adv}), is kept at $2^{nd}$ order. The ``$4^{th}$ order  
    156 scheme'' denomination used in oceanographic literature is usually associated  
     216but a $4^{th}$ order evaluation of advective fluxes, since the divergence of  
     217advective fluxes \eqref{Eq_tra_adv} is kept at $2^{nd}$ order. The phrase ``$4^{th}$  
     218order scheme'' used in oceanographic literature is usually associated  
    157219with the scheme presented here. Introducing a \textit{true} $4^{th}$ order advection  
    158220scheme is feasible but, for consistency reasons, it requires changes in the  
    159221discretisation of the tracer advection together with changes in both the  
    160 continuity equation and the momentum advection.  
     222continuity equation and the momentum advection terms.  
    161223 
    162224A direct consequence of the pseudo-fourth order nature of the scheme is that  
    163225it is not non-diffusive, i.e. the global variance of a tracer is not  
    164 preserved through \textit{cen4}. Furthermore, it must be used in conjunction with an  
     226preserved using \textit{cen4}. Furthermore, it must be used in conjunction with an  
    165227explicit diffusion operator to produce a sensible solution. The  
    166228time-stepping is also performed using a leapfrog scheme in conjunction with  
    167229an Asselin time-filter, so $T$ in (\ref{Eq_tra_adv_cen4}) is the \textit{now} tracer. 
    168230 
    169 At $T$-grid cell abutted to a boundary (coastline, bottom and surface), an  
     231At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface), an  
    170232additional hypothesis must be made to evaluate $\tau _u^{cen4}$. This  
    171233hypothesis usually reduces the order of the scheme. Here we choose to set  
    172234the gradient of $T$ across the boundary to zero. Alternative conditions can be  
    173 specified such as the reduction to a second order scheme for near boundary  
    174 grid point. 
     235specified, such as a reduction to a second order scheme for these near boundary  
     236grid points. 
    175237 
    176238% ------------------------------------------------------------------------------------------------------------- 
    177239%        TVD scheme   
    178240% ------------------------------------------------------------------------------------------------------------- 
    179 \subsection{Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd}=T)} 
     241\subsection   [Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd})] 
     242         {Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd}=.true.)} 
    180243\label{TRA_adv_tvd} 
    181244 
    182245In the Total Variance Dissipation (TVD) formulation, the tracer at velocity  
    183 points is evaluated as a combination of upstream and centred scheme. For  
     246points is evaluated using a combination of an upstream and a centred scheme. For  
    184247example, in the $i$-direction : 
    185248\begin{equation} \label{Eq_tra_adv_tvd} 
     
    194257\end{equation} 
    195258where $c_u$ is a flux limiter function taking values between 0 and 1. There  
    196 exists many ways to define $c_u$., each correcponding to a different total  
    197 variance decreasing scheme. The one chosen in OPA is described in \citet{Zalesak1979}. $c_u$ only departs from $1$ when the advective term produces a local  
    198 extremum in the tracer field. The resulting scheme is quite expensive but  
    199 \emph{positive}. It can be used on both active and passive tracers. This scheme is tested  
    200 and compared with MUSCL and the MPDATA scheme in \citet{Levy2001}; note that  
    201 in this paper it is referred to as "FCT" (Flux corrected transport)  
    202 rather than TVD. 
    203  
    204 For stability reasons in (\ref{Eq_tra_adv_tvd}) $\tau _u^{cen2}$ is evaluated using the  
    205 \textit{now} velocity (leap-frog environment: centred in time) while $\tau _u^{ups}$ is  
    206 evaluated using the \textit{before} velocity (diffusive part: forward in time).  
     259exist many ways to define $c_u$, each correcponding to a different total  
     260variance decreasing scheme. The one chosen in \NEMO is described in \citet{Zalesak1979}. $c_u$ only departs from $1$ when the advective term  
     261produces a local extremum in the tracer field. The resulting scheme is quite  
     262expensive but \emph{positive}. It can be used on both active and passive tracers.  
     263This scheme is tested and compared with MUSCL and the MPDATA scheme in  
     264\citet{Levy2001}; note that in this paper it is referred to as "FCT" (Flux corrected  
     265transport) rather than TVD. 
     266 
     267For stability reasons (see \S\ref{DOM_nxt}), in (\ref{Eq_tra_adv_tvd})  
     268$\tau _u^{cen2}$ is evaluated using the \textit{now} tracer while $\tau _u^{ups}$  
     269is evaluated using the \textit{before} tracer. In other words, the advective part of  
     270the scheme is time stepped with a leap-frog scheme while a forward scheme is  
     271used for the diffusive part.  
    207272 
    208273% ------------------------------------------------------------------------------------------------------------- 
    209274%        MUSCL scheme   
    210275% ------------------------------------------------------------------------------------------------------------- 
    211 \subsection[MUSCL scheme  (\np{ln\_traadv\_muscl}=T)] 
     276\subsection[MUSCL scheme  (\np{ln\_traadv\_muscl})] 
    212277   {Monotone Upstream Scheme for Conservative Laws (MUSCL) (\np{ln\_traadv\_muscl}=T)} 
    213278\label{TRA_adv_muscl} 
    214279 
    215280The Monotone Upstream Scheme for Conservative Laws (MUSCL) has been  
    216 implemented by \citet{Levy2001}. In its formulation, the tracer at  
    217 velocity points is evaluated assuming a linear tracer variation between two  
    218 $T$-points (Fig.\ref{Fig_adv_scheme}). For example, in the $i$-direction : 
     281implemented by \citet{Levy2001}. In its formulation, the tracer at velocity points  
     282is evaluated assuming a linear tracer variation between two $T$-points  
     283(Fig.\ref{Fig_adv_scheme}). For example, in the $i$-direction : 
    219284\begin{equation} \label{Eq_tra_adv_muscl} 
    220285   \tau _u^{mus} = \left\{      \begin{aligned} 
     
    225290   \end{aligned}    \right. 
    226291\end{equation} 
    227 where $\widetilde{\partial _i \tau}$ is the slope of the tracer  
    228 on which a limitation is imposed to ensure the \textit{positive} character of the scheme. 
    229  
    230 The time stepping is performed using a forward scheme, that is the \textit{before} tracer  
    231 field is used to evaluate $\tau _u^{mus}$. 
    232  
    233 For an ocean grid point abutted to land and where the ocean velocity is  
    234 toward land, two choices are available: use of an upstream flux  
    235 (\np{ln\_traadv\_muscl}=T) or use of second order flux  
    236 (\np{ln\_traadv\_muscl2}=T). Note that the latter choice does not insure the  
    237 \textit{positive} character of the scheme. Only the former can be used on both active and  
    238 passive tracers. 
     292where $\widetilde{\partial _i \tau}$ is the slope of the tracer on which a limitation  
     293is imposed to ensure the \textit{positive} character of the scheme. 
     294 
     295The time stepping is performed using a forward scheme, that is the \textit{before}  
     296tracer field is used to evaluate $\tau _u^{mus}$. 
     297 
     298For an ocean grid point adjacent to land and where the ocean velocity is  
     299directed toward land, two choices are available: an upstream flux  
     300(\np{ln\_traadv\_muscl}=.true.) or a second order flux  
     301(\np{ln\_traadv\_muscl2}=.true.). Note that the latter choice does not ensure  
     302the \textit{positive} character of the scheme. Only the former can be used  
     303on both active and passive tracers. 
    239304 
    240305% ------------------------------------------------------------------------------------------------------------- 
    241306%        UBS scheme   
    242307% ------------------------------------------------------------------------------------------------------------- 
    243 \subsection{Upstream Biased Scheme (UBS) (\np{ln\_traadv\_ubs}=T)} 
     308\subsection   [Upstream-Biased Scheme (UBS) (\np{ln\_traadv\_ubs})] 
     309         {Upstream-Biased Scheme (UBS) (\np{ln\_traadv\_ubs}=.true.)} 
    244310\label{TRA_adv_ubs} 
    245311 
    246 The UBS advection scheme is an upstream biased third order scheme based on  
    247 an upstream-biased parabolic interpolation. It is also known as Cell  
     312The UBS advection scheme is an upstream-biased third order scheme based on  
     313an upstream-biased parabolic interpolation. It is also known as the Cell  
    248314Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective  
    249315Kinematics). For example, in the $i$-direction : 
     
    261327advection scheme is similar to that reported in \cite{Farrow1995}.  
    262328It is a relatively good compromise between accuracy and smoothness. It is  
    263 not a \emph{positive} scheme meaning false extrema are permitted but the  
     329not a \emph{positive} scheme, meaning that false extrema are permitted, but the  
    264330amplitude of such are significantly reduced over the centred second order  
    265 method. Nevertheless it is not recommended to apply it to a passive tracer  
    266 that requires positivity.  
     331method. Nevertheless it is not recommended that it should be applied to a passive  
     332tracer that requires positivity.  
    267333 
    268334The intrinsic diffusion of UBS makes its use risky in the vertical direction  
    269335where the control of artificial diapycnal fluxes is of paramount importance.  
    270 It has therefore been preferred to evaluate the vertical flux using the TVD  
    271 scheme when \np{ln\_traadv\_ubs}=T. 
    272  
    273 For stability reasons, in \eqref{Eq_tra_adv_ubs}, the first term which corresponds to a  
    274 second order centred scheme is evaluated using the \textit{now} velocity (centred in  
    275 time) while the second term which is the diffusive part of the scheme, is  
    276 evaluated using the \textit{before} velocity (forward in time. This is discussed by \citet{Webb1998} in the context of the Quick advection scheme. UBS and QUICK  
    277 schemes only differ by one coefficient. Substituting 1/6 with 1/8 in  
    278 (\ref{Eq_tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb1998}. This  
    279 option is not available through a namelist parameter, since the 1/6  
    280 coefficient is hard coded. Nevertheless it is quite easy to make the  
    281 substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme 
    282  
    283 NB 1: When a high vertical resolution $O(1m)$ is used, the model stability can  
     336Therefore the vertical flux is evaluated using the TVD  
     337scheme when \np{ln\_traadv\_ubs}=.true.. 
     338 
     339For stability reasons  (see \S\ref{DOM_nxt}), in \eqref{Eq_tra_adv_ubs},  
     340the first term (which corresponds to a second order centred scheme)  
     341is evaluated using the \textit{now} tracer (centred in time) while the  
     342second term (which is the diffusive part of the scheme), is  
     343evaluated using the \textit{before} tracer (forward in time).  
     344This is discussed by \citet{Webb1998} in the context of the Quick  
     345advection scheme. UBS and QUICK  
     346schemes only differ by one coefficient. Replacing 1/6 with 1/8 in  
     347\eqref{Eq_tra_adv_ubs} leads to the QUICK advection scheme  
     348\citep{Webb1998}. This option is not available through a namelist  
     349parameter, since the 1/6 coefficient is hard coded. Nevertheless  
     350it is quite easy to make the substitution in the \mdl{traadv\_ubs} module  
     351and obtain a QUICK scheme. 
     352 
     353Note that : 
     354 
     355(1): When a high vertical resolution $O(1m)$ is used, the model stability can  
    284356be controlled by vertical advection (not vertical diffusion which is usually  
    285357solved using an implicit scheme). Computer time can be saved by using a  
    286 time-splitting technique on vertical advection. This possibility have been  
    287 implemented and validated in ORCA05-L301. It is not currently offered in the  
     358time-splitting technique on vertical advection. This case has been  
     359implemented and validated in ORCA05 with 301 levels. It is not available in the  
    288360current reference version.  
    289361 
    290 NB 2 : In a forthcoming release four options will be proposed for the  
    291 vertical component used in the UBS scheme. $\tau _w^{ubs}$ will be  
    292 evaluated using either \textit{(a)} a centred $2^{nd}$ order scheme , or  \textit{(b)} a TVD  
    293 scheme, or  \textit{(c)} an interpolation based on conservative parabolic splines  
    294 following \citet{Sacha2005} implementation of UBS in ROMS,  
    295 or  \textit{(d)} an UBS. The $3^{rd}$ case has dispersion properties similar to an  
     362(2) : In a forthcoming release four options will be available for the vertical  
     363component used in the UBS scheme. $\tau _w^{ubs}$ will be evaluated  
     364using either \textit{(a)} a centred $2^{nd}$ order scheme , or  \textit{(b)}  
     365a TVD scheme, or  \textit{(c)} an interpolation based on conservative  
     366parabolic splines following the \citet{Sacha2005} implementation of UBS  
     367in ROMS, or  \textit{(d)} a UBS. The $3^{rd}$ case has dispersion properties  
     368similar to an eighth-order accurate conventional scheme. 
     369 
     370following \citet{Sacha2005} implementation of UBS in ROMS, or  \textit{(d)}  
     371an UBS. The $3^{rd}$ case has dispersion properties similar to an  
    296372eight-order accurate conventional scheme. 
    297373 
    298 NB 3 : It is straight forward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
     374(3) : It is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
    299375\begin{equation} \label{Eq_tra_adv_ubs2} 
    300376\tau _u^{ubs} = \left\{  \begin{aligned} 
     
    309385- \frac{1}{2} |u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i] 
    310386\end{equation} 
    311 \eqref{Eq_tra_adv_ubs2} has several advantages. First it clearly evidence that the UBS scheme is based on the fourth order scheme to which is added an upstream biased diffusive term. Second, this emphasises that the $4^{th}$ order part have to be evaluated at \emph{now} time step, not only the $2^{th}$ order part as stated above using \eqref{Eq_tra_adv_ubs} and also as it is coded in NEMO v2.3. Third, the diffusive term is in fact a biharmonic operator with a eddy coefficient with is simply proportional to the velocity: $A_u^{lm}= - \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note that the current version of NEMO uses \eqref{Eq_tra_adv_ubs}, not \eqref{Eq_tra_adv_ubs2}.  
    312  
     387\eqref{Eq_tra_adv_ubs2} has several advantages. Firstly, it clearly reveals  
     388that the UBS scheme is based on the fourth order scheme to which an  
     389upstream-biased diffusion term is added. Secondly, this emphasises that the  
     390$4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has  
     391to be evaluated at the \emph{now} time step using \eqref{Eq_tra_adv_ubs}.  
     392Thirdly, the diffusion term is in fact a biharmonic operator with an eddy  
     393coefficient which is simply proportional to the velocity: 
     394 $A_u^{lm}= - \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note that NEMO v2.3 still uses  
     395 \eqref{Eq_tra_adv_ubs}, not \eqref{Eq_tra_adv_ubs2}. This should be  
     396 changed in forthcoming release. 
     397 %%% 
     398 \gmcomment{the change in UBS scheme has to be done} 
     399 %%% 
    313400 
    314401% ------------------------------------------------------------------------------------------------------------- 
    315402%        QCK scheme   
    316403% ------------------------------------------------------------------------------------------------------------- 
    317 \subsection{QUICKEST scheme (QCK) (\np{ln\_traadv\_qck}=T)} 
     404\subsection   [QUICKEST scheme (QCK) (\np{ln\_traadv\_qck})] 
     405         {QUICKEST scheme (QCK) (\np{ln\_traadv\_qck}=.true.)} 
    318406\label{TRA_adv_qck} 
    319407 
    320408The Quadratic Upstream Interpolation for Convective Kinematics with  
    321 Estimated Streaming Terms (QUICKEST) scheme proposed by \citet{Leonard1979} is  
    322 the third order Godunov scheme. It is associated with ULTIMATE QUICKEST  
     409Estimated Streaming Terms (QUICKEST) scheme proposed by \citet{Leonard1979}  
     410is the third order Godunov scheme. It is associated with the ULTIMATE QUICKEST  
    323411limiter \citep{Leonard1991}. It has been implemented in NEMO by G. Reffray  
    324 (MERCATOR-ocean). 
    325  
    326 The resulting scheme is quite expensive but \emph{positive}. It can be used on both active  
    327 and passive tracers. 
     412(MERCATOR-ocean).  
     413The resulting scheme is quite expensive but \emph{positive}. It can be used on both active and passive tracers. Nevertheless, the intrinsic diffusion of QCK makes its use  
     414risky in the vertical direction where the control of artificial diapycnal fluxes is of  
     415paramount importance. Therefore the vertical flux is evaluated using the CEN2  
     416scheme. This no more ensure the positivity of the scheme. The use of TVD in the  
     417vertical direction as for the UBS case should be implemented to maintain the property. 
     418 
    328419 
    329420% ------------------------------------------------------------------------------------------------------------- 
    330421%        PPM scheme   
    331422% ------------------------------------------------------------------------------------------------------------- 
    332 \subsection{Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm}=T)} 
     423\subsection   [Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm})] 
     424         {Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm}=.true.)} 
    333425\label{TRA_adv_ppm} 
    334426 
    335427The Piecewise Parabolic Method (PPM) proposed by Colella and Woodward (1984)  
    336 is based on a quadradic piecewise rebuilding. As QCK scheme, it is associated with  
    337 ULTIMATE QUICKEST limiter \citep{Leonard1991}. It has been implemented in \NEMO by G. Reffray (MERCATOR-ocean) but is not yet offered in the current reference  
    338 version. 
     428is based on a quadradic piecewise rebuilding. Like the QCK scheme, it is associated  
     429with the ULTIMATE QUICKEST limiter \citep{Leonard1991}. It has been implemented  
     430in \NEMO by G. Reffray (MERCATOR-ocean) but is not yet offered in the reference  
     431version 2.3. 
    339432 
    340433% ================================================================ 
    341434% Tracer Lateral Diffusion 
    342435% ================================================================ 
    343 \section{Tracer Lateral Diffusion (\mdl{traldf})} 
     436\section  [Tracer Lateral Diffusion (\textit{traldf})] 
     437      {Tracer Lateral Diffusion (\mdl{traldf})} 
    344438\label{TRA_ldf} 
    345439%-----------------------------------------nam_traldf------------------------------------------------------ 
     
    347441%------------------------------------------------------------------------------------------------------------- 
    348442  
    349 The options available for lateral diffusion are laplacian (rotated or not)  
    350 or biharmonic operators, that latter being more scale-selective (more  
     443The options available for lateral diffusion are a laplacian (rotated or not)  
     444or a biharmonic operator, the latter being more scale-selective (more  
    351445diffusive at small scales). The specification of eddy diffusivity  
    352 coefficients (either constant, variable in space and time) as well as the  
    353 computation of the slope along which the operators act are performed in  
     446coefficients (either constant or variable in space and time) as well as the  
     447computation of the slope along which the operators act, are performed in the  
    354448\mdl{ldftra} and \mdl{ldfslp} modules, respectively. This is described in Chap.~\ref{LDF}. The lateral diffusion of tracers is evaluated using a forward scheme,  
    355 i.e. the tracers appearing in its expression are the \textit{before} tracers in time,  
    356 except for the pure vertical component that appears when a tensor of  
    357 rotation is used. This latter term is solved implicitly together with the  
    358 vertical diffusion term (see \S\ref{DOM_nxt})  
     449$i.e.$ the tracers appearing in its expression are the \textit{before} tracers in time,  
     450except for the pure vertical component that appears when a rotation tensor  
     451is used. This latter term is solved implicitly together with the  
     452vertical diffusion term (see \S\ref{DOM_nxt}). 
    359453 
    360454% ------------------------------------------------------------------------------------------------------------- 
    361455%        Iso-level laplacian operator 
    362456% ------------------------------------------------------------------------------------------------------------- 
    363 \subsection{Iso-level laplacian operator (\mdl{traldf\_lap}, \np{ln\_traldf\_lap}) } 
     457\subsection   [Iso-level laplacian operator (\textit{traldf\_lap} - \np{ln\_traldf\_lap})] 
     458         {Iso-level laplacian operator (\mdl{traldf\_lap} - \np{ln\_traldf\_lap}=.true.) } 
    364459\label{TRA_ldf_lap} 
    365460 
    366 A laplacian diffusive operator (i.e. a harmonic operator) acting along the model surfaces is given by:  
     461A laplacian diffusion operator (i.e. a harmonic operator) acting along the model  
     462surfaces is given by:  
    367463\begin{equation} \label{Eq_tra_ldf_lap} 
    368464\begin{split} 
     
    377473\end{equation} 
    378474 
    379 This lateral operator is a \emph{horizontal} one (i.e. acting along geopotential surfaces) in  
    380 $z$-coordinate with or without partial step, but it is simply an iso-level operator in $s$-coordinate.  
    381 It is thus used when, in addition to \np{ln\_traldf\_lap}=T, we have \np{ln\_traldf\_level}=T, or both \np{ln\_traldf\_hor}=T and \np{ln\_zco}=F. In both cases, it significantly contributes to diapycnal mixing. It is therefore not recommended to use it. 
    382  
    383 \textit{Notes} : In pure z-coordinate (\key{zco} defined), $e_{3u}=e_{3v}=e_{3T}$, so that the vertical scale factors disappear from (\ref{Eq_tra_ldf_lap}).  
    384  
    385 \textit{Notes} : In partial step $z$-coordinate (\np{ln\_zps}=T), tracers in horizontally adjacent cells are located at different depths in vicinity of the bottom. In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level require a specific treatment. They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     475This lateral operator is a \emph{horizontal} one ($i.e.$ acting along  
     476geopotential surfaces) in the $z$-coordinate with or without partial step,  
     477but is simply an iso-level operator in the $s$-coordinate.  
     478It is thus used when, in addition to \np{ln\_traldf\_lap}=.true., we have  
     479\np{ln\_traldf\_level}=.true., or both \np{ln\_traldf\_hor}=.true. and  
     480\np{ln\_zco}=.false.. In both cases, it significantly contributes to  
     481diapycnal mixing. It is therefore not recommended. 
     482 
     483Note that  
     484(1) In pure $z$-coordinate (\key{zco} is defined), $e_{3u}=e_{3v}=e_{3T}$, so  
     485that the vertical scale factors disappear from (\ref{Eq_tra_ldf_lap}).  
     486(2) In partial step $z$-coordinate (\np{ln\_zps}=.true.), tracers in horizontally  
     487adjacent cells are located at different depths in the vicinity of the bottom.  
     488In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level  
     489require a specific treatment. They are calculated in the \mdl{zpshde} module,  
     490described in \S\ref{TRA_zpshde}. 
    386491 
    387492% ------------------------------------------------------------------------------------------------------------- 
    388493%        Rotated laplacian operator 
    389494% ------------------------------------------------------------------------------------------------------------- 
    390 \subsection{Rotated laplacian operator (\mdl{traldf\_iso}, \np{ln\_traldf\_lap})} 
     495\subsection   [Rotated laplacian operator (\textit{traldf\_iso} - \np{ln\_traldf\_lap})] 
     496         {Rotated laplacian operator (\mdl{traldf\_iso} - \np{ln\_traldf\_lap}=.true.)} 
    391497\label{TRA_ldf_iso} 
    392498 
    393 The general form of the second order lateral tracer subgrid scale physics (\ref{Eq_PE_zdf}) takes the following semi-discrete space form in $z$- and $s$-coordinates: 
     499The general form of the second order lateral tracer subgrid scale physics  
     500(\ref{Eq_PE_zdf}) takes the following semi-discrete space form in $z$- and  
     501$s$-coordinates: 
    394502 
    395503\begin{equation} \label{Eq_tra_ldf_iso} 
     
    422530 \end{split} 
    423531 \end{equation} 
    424 where $r_1$ and $r_2$ are the slopes between the surface of computation ($z$- or $s$-surfaces) and the surface along which the diffusive operator acts ($i.e.$ horizontal or iso-neutral surfaces).  
    425  It is thus used when, in addition to \np{ln\_traldf\_lap}=T, we have \np{ln\_traldf\_iso}=T, or both \np{ln\_traldf\_hor}=T and \np{ln\_zco}=T. The way these slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom and lateral boundaries, the turbulent fluxes of heat and salt are set to zero using the mask technique (see \S\ref{LBC_coast}).  
    426  
    427 The operator in \eqref{Eq_tra_ldf_iso} involves both lateral and vertical derivatives. For numerical stability, the vertical second derivative must be solved using the same implicit time scheme as those used in the vertical physics (see \S\ref{TRA_zdf}). For computer efficiency reasons, this term is not computed in \mdl{traldf} module, but in \mdl{trazdf} module where, if iso-neutral mixing is used, the vertical mixing coefficient is simply increased by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$.  
    428  
    429 This formulation conserves the tracer but does not ensure the decrease of the tracer variance. Nevertheless the treatment performed on the slopes (see \S\ref{LDF}) allows to run safely without any additional background horizontal diffusion \citep{Guily2001}. An alternate scheme \citep{Griffies1998} which preserves both tracer and its variance is currently been tested in \NEMO. 
    430  
    431 Note that in partial step $z$-coordinate (\np{ln\_zps}=T), the horizontal derivatives in \eqref{Eq_tra_ldf_iso} at the bottom level require a specific treatment. They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     532where $r_1$ and $r_2$ are the slopes between the surface of computation  
     533($z$- or $s$-surfaces) and the surface along which the diffusion operator  
     534acts ($i.e.$ horizontal or iso-neutral surfaces).  It is thus used when,  
     535in addition to \np{ln\_traldf\_lap}=.true., we have \np{ln\_traldf\_iso}=.true.,  
     536or both \np{ln\_traldf\_hor}=.true. and \np{ln\_zco}=.true.. The way these  
     537slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom  
     538and lateral boundaries, the turbulent fluxes of heat and salt are set to zero  
     539using the mask technique (see \S\ref{LBC_coast}).  
     540 
     541The operator in \eqref{Eq_tra_ldf_iso} involves both lateral and vertical  
     542derivatives. For numerical stability, the vertical second derivative must  
     543be solved using the same implicit time scheme as that used in the vertical  
     544physics (see \S\ref{TRA_zdf}). For computer efficiency reasons, this term  
     545is not computed in the \mdl{traldf} module, but in the \mdl{trazdf} module  
     546where, if iso-neutral mixing is used, the vertical mixing coefficient is simply  
     547increased by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$.  
     548 
     549This formulation conserves the tracer but does not ensure the decrease  
     550of the tracer variance. Nevertheless the treatment performed on the slopes  
     551(see \S\ref{LDF}) allows the model to run safely without any additional  
     552background horizontal diffusion \citep{Guily2001}. An alternative scheme  
     553\citep{Griffies1998} which preserves both tracer and its variance is currently  
     554been tested in \NEMO.  
     555 
     556Note that in the partial step $z$-coordinate (\np{ln\_zps}=.true.), the horizontal  
     557derivatives at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific  
     558treatment. They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
    432559 
    433560% ------------------------------------------------------------------------------------------------------------- 
    434561%        Iso-level bilaplacian operator 
    435562% ------------------------------------------------------------------------------------------------------------- 
    436 \subsection{Iso-level bilaplacian operator (\mdl{traldf\_bilap}, \np{ln\_traldf\_bilap})} 
     563\subsection   [Iso-level bilaplacian operator (\textit{traldf\_bilap} - \np{ln\_traldf\_bilap})] 
     564         {Iso-level bilaplacian operator (\mdl{traldf\_bilap} - \np{ln\_traldf\_bilap}=.true.)} 
    437565\label{TRA_ldf_bilap} 
    438566 
    439 The lateral fourth order operator formulation on tracers is obtained by applying (\ref{Eq_tra_ldf_lap}) twice. It requires an additional assumption on boundary conditions: first and third derivative terms normal to the coast are set to zero. 
    440  
    441 It is used when, in addition to \np{ln\_traldf\_bilap}=T, we have \np{ln\_traldf\_level}=T, or both \np{ln\_traldf\_hor}=T and \np{ln\_zco}=F. In both cases, it can contributes to diapycnal mixing even if it should be less than in the laplacian case. It is therefore not recommended to use it. 
    442  
    443 \textit{Notes:} In the code, the bilaplacian routine does not call twice the laplacian  
    444 routine but is rather a specific routine. This is due to the fact that we  
     567The lateral fourth order bilaplacian operator on tracers is obtained by  
     568applying (\ref{Eq_tra_ldf_lap}) twice. It requires an additional assumption  
     569on boundary conditions: the first and third derivative terms normal to the  
     570coast are set to zero. 
     571 
     572It is used when, in addition to \np{ln\_traldf\_bilap}=.true., we have  
     573\np{ln\_traldf\_level}=.true., or both \np{ln\_traldf\_hor}=.true. and  
     574\np{ln\_zco}=.false.. In both cases, it can contribute diapycnal mixing,  
     575although less than in the laplacian case. It is therefore not recommended. 
     576 
     577Note that in the code, the bilaplacian routine does not call the laplacian  
     578routine twice but is rather a separate routine. This is due to the fact that we  
    445579introduce the eddy diffusivity coefficient, A, in the operator as: $\nabla  
    446 \cdot \nabla \left( {A\nabla \cdot \nabla T} \right)$ and instead of  
     580\cdot \nabla \left( {A\nabla \cdot \nabla T} \right)$, instead of  
    447581$-\nabla \cdot a\nabla \left( {\nabla \cdot a\nabla T} \right)$ where  
    448582$a=\sqrt{|A|}$ and $A<0$. This was a mistake: both formulations  
     
    453587%        Rotated bilaplacian operator 
    454588% ------------------------------------------------------------------------------------------------------------- 
    455 \subsection{Rotated bilaplacian operator (\mdl{traldf\_bilapg}, \np{ln\_traldf\_bilap})} 
     589\subsection   [Rotated bilaplacian operator (\textit{traldf\_bilapg} - \np{ln\_traldf\_bilap})] 
     590         {Rotated bilaplacian operator (\mdl{traldf\_bilapg} - \np{ln\_traldf\_bilap}=.true.)} 
    456591\label{TRA_ldf_bilapg} 
    457592 
    458 The lateral fourth order operator formulation on tracers is obtained by applying (\ref{Eq_tra_ldf_iso}) twice. It requires an additional assumption on boundary conditions: first and third derivative terms normal to the coast, the bottom and the surface are set to zero. 
    459  
    460  It is used when, in addition to \np{ln\_traldf\_bilap}=T, we have \np{ln\_traldf\_iso}=T, or both \np{ln\_traldf\_hor}=T and \np{ln\_zco}=T. Nevertheless, this rotated bilaplacian operator has never been seriously tested. No warranties that it is neither free of bugs or correctly formulated.  
    461 Moreover, the stability range of such an operator will be probably quite narrow, requiring a significantly smaller time-step than the one used on unrotated operator. 
     593The lateral fourth order operator formulation on tracers is obtained by  
     594applying (\ref{Eq_tra_ldf_iso}) twice. It requires an additional assumption  
     595on boundary conditions: first and third derivative terms normal to the  
     596coast, the bottom and the surface are set to zero. 
     597 
     598It is used when, in addition to \np{ln\_traldf\_bilap}=T, we have  
     599\np{ln\_traldf\_iso}=T, or both \np{ln\_traldf\_hor}=T and \np{ln\_zco}=T.  
     600Nevertheless, this rotated bilaplacian operator has never been seriously  
     601tested. No warranties that it is neither free of bugs or correctly formulated.  
     602Moreover, the stability range of such an operator will be probably quite  
     603narrow, requiring a significantly smaller time-step than the one used on  
     604unrotated operator. 
    462605 
    463606% ================================================================ 
    464607% Tracer Vertical Diffusion 
    465608% ================================================================ 
    466 \section{Tracer Vertical Diffusion (\mdl{trazdf})} 
     609\section  [Tracer Vertical Diffusion (\textit{trazdf})] 
     610      {Tracer Vertical Diffusion (\mdl{trazdf})} 
    467611\label{TRA_zdf} 
    468612%--------------------------------------------namzdf--------------------------------------------------------- 
     
    470614%-------------------------------------------------------------------------------------------------------------- 
    471615 
    472 The formulation of the vertical subgrid scale tracer physics is the same for all the vertical coordinates, based on a laplacian operator. The vertical diffusive operator given by (\ref{Eq_PE_zdf}) takes the following semi-discrete space form: 
     616The formulation of the vertical subgrid scale tracer physics is the same  
     617for all the vertical coordinates, and is based on a laplacian operator.  
     618The vertical diffusion operator given by (\ref{Eq_PE_zdf}) takes the  
     619following semi-discrete space form: 
     620(\ref{Eq_PE_zdf}) takes the following semi-discrete space form: 
    473621\begin{equation} \label{Eq_tra_zdf} 
    474622\begin{split} 
     
    482630 
    483631where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity  
    484 coefficients on Temperature and Salinity, respectively. Generally, $A_w^{vT}=A_w^{vS}$ ecept when double diffusion mixing is parameterised (\key{zdfddm} defined). The way these coefficients can be evaluated is given in \S\ref{ZDF} (ZDF). Furthermore, when iso-neutral mixing is used, the both mixing coefficient are increased by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$ to account for the vertical second derivative of \eqref{Eq_tra_ldf_iso}.  
    485  
    486 At the surface and bottom boundaries, the turbulent fluxes of momentum, heat and salt must be specified. At the surface they are prescribed from the surface forcing (see \S\ref{TRA_sbc}), while at the bottom they are set to zero for heat and salt, unless a geothermal flux forcing is prescribed as a bottom boundary condition (\S\ref{TRA_bbc}).  
     632coefficients on Temperature and Salinity, respectively. Generally,  
     633$A_w^{vT}=A_w^{vS}$ except when double diffusive mixing is  
     634parameterised (\key{zdfddm} is defined). The way these coefficients  
     635are evaluated is given in \S\ref{ZDF} (ZDF). Furthermore, when  
     636iso-neutral mixing is used, both mixing coefficients are increased  
     637by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$  
     638to account for the vertical second derivative of \eqref{Eq_tra_ldf_iso}.  
     639 
     640At the surface and bottom boundaries, the turbulent fluxes of  
     641momentum, heat and salt must be specified. At the surface they  
     642are prescribed from the surface forcing (see \S\ref{TRA_sbc}),  
     643whilst at the bottom they are set to zero for heat and salt unless  
     644a geothermal flux forcing is prescribed as a bottom boundary  
     645condition (\S\ref{TRA_bbc}).  
    487646 
    488647The large eddy coefficient found in the mixed layer together with high  
    489 vertical resolution implies a too restrictive constraint on the time step in  
    490 explicit time stepping case (\np{ln\_zdfexp}=True). Therefore, the default implicit time stepping is generally preferred for the vertical diffusion as it overcomes the stability  
    491 constraint. A forward time differencing scheme (\np{ln\_zdfexp}=T) using a time splitting technique (\np{n\_zdfexp} $> 1$) is provided as an alternative. Namelist variables  
    492 \np{ln\_zdfexp} and \np{n\_zdfexp} apply to both tracers and dynamics.  
     648vertical resolution implies that in the case of explicit time stepping  
     649(\np{ln\_zdfexp}=.true.) there would be too restrictive a constraint on  
     650the time step. Therefore, the default implicit time stepping is preferred  
     651for the vertical diffusion since it overcomes the stability constraint.  
     652A forward time differencing scheme (\np{ln\_zdfexp}=.true.) using a time  
     653splitting technique (\np{n\_zdfexp} $> 1$) is provided as an alternative.  
     654Namelist variables \np{ln\_zdfexp} and \np{n\_zdfexp} apply to both  
     655tracers and dynamics.  
    493656 
    494657% ================================================================ 
     
    501664%        surface boundary condition 
    502665% ------------------------------------------------------------------------------------------------------------- 
    503 \subsection{surface boundary condition (\mdl{trasbc})} 
     666\subsection   [Surface boundary condition (\textit{trasbc})] 
     667         {Surface boundary condition (\mdl{trasbc})} 
    504668\label{TRA_sbc} 
    505669 
     
    510674equivalent; the forcing terms in trasbc are the surface fluxes divided by  
    511675the thickness of the top model layer. Following \citet{Roullet2000} the  
    512 forcing on an ocean tracer, $c$, can be split into two parts: $F_{ext}^C $, the  
     676forcing on an ocean tracer, $c$, can be split into two parts: $F_{ext}$, the  
    513677flux of tracer crossing the sea surface and not linked with the water  
    514 exchange d at the surface with the atmosphere, and $F_{wf}^C$ the forcing  
    515 on the concentration associated with the water flux. The latter forcing has  
    516 also two components: a direct effect of change in concentration associated  
    517 with the tracer carried by the water flux, and an indirect concentration/dilution effect : 
     678exchange with the atmosphere, $F_{wf}^d$, and $F_{wf}^i$ the forcing  
     679on the tracer concentration associated with this water exchange.  
     680The latter forcing has two components: a direct effect of change  
     681in concentration associated with the tracer carried by the water flux,  
     682and an indirect concentration/dilution effect : 
    518683\begin{equation*} 
    519684\begin{split} 
    520685 F^C &= F_{ext} + F_{wf}^d                                          +F_{wf}^i    \\ 
    521 \\  
    522686        &= F_{ext} - \left( c_E \, E - c_p \,P - c_R \,R \right) +c\left( E-P-R \right) 
    523687\end{split} 
    524688\end{equation*}  
    525689 
    526 Two cases must be distinguished, the nonlinear free surface case (\key{vvl} defined) and the linear free surface case. The first case is simpler, because the indirect concentration/dilution effect is naturally taken into  
    527 account by letting the vertical scale factors vary in time. The salinity of  
    528 water exchanged at the surface is assumed to be zero, so there is no salt  
    529 flux at the free surface, excepted in the presence of sea ice. The heat flux  
    530 at the free surface is the sum of $F_{ext}$, the direct heating/cooling  
    531 (by the total non-penetrative heat flux) and $F_{wf}^e$ the heat carried by  
    532 the water exchanged through the surface (evaporation, precipitation,  
    533 runoff). The temperature of precipitations is not well known. In the model  
    534 we assume that this water has the same temperature as the sea surface  
    535 temperature, The resulting forcing terms for temperature T and salinity S  
    536 are:  
     690\gmcomment{add here a description of the variable names used in the above equation} 
     691 
     692Two cases must be distinguished, the nonlinear free surface case  
     693(\key{vvl} is defined) and the linear free surface case. The first case  
     694is simpler, because the indirect concentration/dilution effect is naturally  
     695taken into account by letting the vertical scale factors vary in time.  
     696The salinity of water exchanged at the surface is assumed to be zero,  
     697so there is no salt flux at the free surface, except in the presence of sea ice.  
     698The heat flux at the free surface is the sum of $F_{ext}$, the direct  
     699heating/cooling (by the total non-penetrative heat flux) and $F_{wf}^e$  
     700the heat carried by the water exchanged through the surface (evaporation,  
     701precipitation, runoff). The temperature of precipitation is not well known.  
     702In the model we assume that this water has the same temperature as  
     703the sea surface temperature. The resulting forcing terms for temperature  
     704T and salinity S are:  
    537705\begin{equation} \label{Eq_tra_forcing} 
    538706\begin{aligned} 
     
    544712\end{equation}  
    545713 
    546 where EMP is the freshwater budget (evaporation minus precipitation minus river runoff) which forces the ocean volume, $Q_{ns}$ is the non-penetrative part of the net surface heat flux (difference between the total surface heat flux and the fraction of the short wave flux that penetrates in the water column), the product EMP$_S\;.\left. S \right|_{k=1}$ is  the ice-ocean salt flux, and $\left. S\right|_{k=1}$ is the sea surface salinity (\textit{SSS}). The total salt content is conserved in this formulation (excepted for the effect of the Asselin filter). 
    547 %AMT note: the ice-ocean flux had been forgotten in the first release of the key_vvl option,  
    548 %AMT  has this been corrected in the code?  
    549  
    550 In the second case (linear free surface), the vertical scale factors are fixed in time so that the concentration/dilution effect must be added in trasbc. Because of the hypothesis made for the temperature of precipitation and runoffs, for temperature $F_{wf}^e +F_{wf}^i =0$. The resulting forcing term for temperature is:  
     714where EMP is the freshwater budget (evaporation minus precipitation  
     715minus river runoff) which forces the ocean volume, $Q_{ns}$ is the  
     716non-penetrative part of the net surface heat flux (difference between  
     717the total surface heat flux and the fraction of the short wave flux that  
     718penetrates into the water column), the product EMP$_S\;.\left. S \right|_{k=1}$  
     719is  the ice-ocean salt flux, and $\left. S\right|_{k=1}$ is the sea surface  
     720salinity (\textit{SSS}). The total salt content is conserved in this formulation  
     721(except for the effect of the Asselin filter). 
     722 
     723%AMT note: the ice-ocean flux had been forgotten in the first release of the key_vvl option, has this been corrected in the code?  
     724 
     725In the second case (linear free surface), the vertical scale factors are  
     726fixed in time so that the concentration/dilution effect must be added in  
     727the \mdl{trasbc} module. Because of the hypothesis made for the  
     728temperature of precipitation and runoffs, $F_{wf}^e +F_{wf}^i =0$  
     729for temperature. The resulting forcing term for temperature is:  
    551730 
    552731\begin{equation} \label{Eq_tra_forcing_q} 
     
    554733\end{equation}  
    555734 
    556 The salinity forcing is still given by \eqref{Eq_tra_forcing} but the definition of EMP$_S$ is  
    557 different: it is the total surface freshwater budget (evaporation minus  
    558 precipitation minus river runoff plus the rate of change of the sea ice  
    559 thickness). The total salt content is not exactly conserved (\citet{Roullet2000}, see also  
    560 \S\ref{PE_free_surface}). 
     735The salinity forcing is still given by \eqref{Eq_tra_forcing} but the  
     736definition of EMP$_S$ is different: it is the total surface freshwater  
     737budget (evaporation minus precipitation minus river runoff plus  
     738the rate of change of the sea ice thickness). The total salt content  
     739is not exactly conserved (\citet{Roullet2000}.  
     740See also \S\ref{PE_free_surface}). 
    561741 
    562742In the case of the rigid lid approximation, the surface salinity forcing $F^s$  
    563 is also expressed by \eqref{Eq_tra_forcing} but now the global integral of the product  
    564 EMP*S is not compensated by the advection of fluid through the top level: in  
    565 the rigid lid case (contrary to the linear free surface), because \textit{w(k=1) = 0}. As a  
    566 result, even if the budget of \textit{EMP} is zero in average over the whole ocean  
    567 domain, the associated salt flux is not, as sea-surface salinity and \textit{EMP} are  
    568 intrinsically correlated (high \textit{SSS} are found where evaporation is strong while  
    569 low \textit{SSS} is usually associated with high precipitation or river runoff input). 
    570  
    571 The $Q_{ns} $ and \textit{EMP} fields are defined and updated in \mdl{sbcmod} module (see  
    572 \S\ref{SBC}). 
     743is also expressed by \eqref{Eq_tra_forcing}, but now the global integral of  
     744the product of EMP and S, is not compensated by the advection of fluid  
     745through the top level: this is because in the rigid lid case \textit{w(k=1) = 0}  
     746(in contrast to the linear free surface case). As a result, even if the budget  
     747of \textit{EMP} is zero on average over the whole ocean domain, the  
     748associated salt flux is not, since sea-surface salinity and \textit{EMP} are  
     749intrinsically correlated (high \textit{SSS} are found where evaporation is  
     750strong whilst low \textit{SSS} is usually associated with high precipitation  
     751or river runoff). 
     752 
     753The $Q_{ns} $ and \textit{EMP} fields are defined and updated in the  
     754\mdl{sbcmod} module (see \S\ref{SBC}). 
    573755 
    574756% ------------------------------------------------------------------------------------------------------------- 
    575757%        Solar Radiation Penetration  
    576758% ------------------------------------------------------------------------------------------------------------- 
    577 \subsection{Solar Radiation Penetration (\mdl{traqsr})} 
     759\subsection   [Solar Radiation Penetration (\textit{traqsr})] 
     760         {Solar Radiation Penetration (\mdl{traqsr})} 
    578761\label{TRA_qsr} 
    579 %--------------------------------------------namqsr--------------------------------------------------------- 
     762%--------------------------------------------namqsr-------------------------------------------------------- 
    580763\namdisplay{namqsr} 
    581764%-------------------------------------------------------------------------------------------------------------- 
    582765 
    583 When the penetrative solar radiation option is used (\np{ln\_flxqsr}=T, the solar radiation penetrates the top few meters of the ocean, otherwise all the heat flux is absorbed in the first ocean level (\np{ln\_flxqsr}=F). A term is thus added to the time evolution equation of temperature \eqref{Eq_PE_tra_T} while the surface boundary condition is modified to take into account only the non-penetrative part of the surface heat flux: 
     766When the penetrative solar radiation option is used (\np{ln\_flxqsr}=.true.),  
     767the solar radiation penetrates the top few meters of the ocean, otherwise  
     768all the heat flux is absorbed in the first ocean level (\np{ln\_flxqsr}=.false.).  
     769Thus, in the former case a term is added to the time evolution equation of  
     770temperature \eqref{Eq_PE_tra_T} whilst the surface boundary condition is  
     771modified to take into account only the non-penetrative part of the surface  
     772heat flux: 
    584773\begin{equation} \label{Eq_PE_qsr} 
    585774\begin{split} 
     
    594783\end{equation} 
    595784 
    596 A formulation including extinction coefficients is assumed for the downward irradiance $I$  
    597 \citep{Paulson1977}: 
     785A formulation involving two extinction coefficients is assumed for the  
     786downward irradiance $I$ \citep{Paulson1977}: 
    598787\begin{equation} \label{Eq_traqsr_iradiance} 
    599788I(z) = Q_{sr} \left[Re^{-z / \xi_1} + \left( 1-R\right) e^{-z / \xi_2} \right] 
    600789\end{equation} 
    601790where $Q_{sr}$ is the penetrative part of the surface heat flux,  
    602 $\xi_1$ and $\xi_2$ are two extinction length scales and $R$ determines the relative  
    603 contribution of the two terms. The default values used correspond to a Type  
    604 I water in Jerlov's [1968] classification: $\xi_1 = 0.35m$, $\xi_2 = 0.23m$ and  
    605 $R = 0.58$ ((corresponding to \np{xsi1}, \np{xsi2} and \np{rabs} namelist parameters, respectively). $I$ is masked (no flux through the ocean bottom), so all the solar radiation that reaches the last ocean level is absorbed in that level. The trend in \eqref{Eq_tra_qsr} associated with the penetration of the solar radiation is added to the temperature trend and the surface heat flux modified in routine \mdl{traqsr}. Note that in $z$-coordinates, the depth of $T-$levels depends on the single variable $k$. A one dimensional array of the coefficients $gdsr(k) = Re^{-z_w (k)/\xi_1} + (1-R)e^{-z_w (k)/\xi_2}$ can then be computed once and saved in central memory. Moreover \textit{nksr}, the level at which $gdrs$ becomes negligible (less than the computer precision) is computed once and the trend associated with the penetration of the solar radiation is only added until that level. At last, note that when the ocean is shallow (< 200~m), the part of the solar radiation can reach the ocean floor. In this case, we have chosen that all the radiation is absorbed at the last ocean level ($i.e.$ $I_w$ is masked).  
    606  
    607 When coupling with a biology model (PISCES or LOBSTER), it is possible to calculate the light attenuation using information from the biology model. At the time of this writing, reading the light attenuation from a file is not implemented yet in the reference version. 
    608  
    609 \colorbox{yellow}{case 4 bands and bio-coupling to add !!!} 
     791$\xi_1$ and $\xi_2$ are two extinction length scales and $R$  
     792determines the relative contribution of the two terms.  
     793The default values used correspond to a Type I water in Jerlov's [1968]  
     794% 
     795\gmcomment : Jerlov reference to be added 
     796% 
     797classification: $\xi_1 = 0.35m$, $\xi_2 = 0.23m$ and $R = 0.58$  
     798(corresponding to \np{xsi1}, \np{xsi2} and \np{rabs} namelist parameters,  
     799respectively). $I$ is masked (no flux through the ocean bottom),  
     800so all the solar radiation that reaches the last ocean level is absorbed  
     801in that level. The trend in \eqref{Eq_tra_qsr} associated with the  
     802penetration of the solar radiation is added to the temperature trend,  
     803and the surface heat flux is modified in routine \mdl{traqsr}.  
     804Note that in the $z$-coordinate, the depth of $T-$levels depends  
     805on the single variable $k$. A one dimensional array of the coefficients  
     806$gdsr(k) = Re^{-z_w (k)/\xi_1} + (1-R)e^{-z_w (k)/\xi_2}$ can then  
     807be computed once and saved in memory. Moreover \textit{nksr},  
     808the level at which $gdrs$ becomes negligible (less than the  
     809computer precision) is computed once, and the trend associated  
     810with the penetration of the solar radiation is only added until that level.  
     811Finally, note that when the ocean is shallow (< 200~m), part of the  
     812solar radiation can reach the ocean floor. In this case, we have  
     813chosen that all remaining radiation is absorbed in the last ocean  
     814level ($i.e.$ $I_w$ is masked).  
     815 
     816When coupling with a biological model (for example PISCES or LOBSTER),  
     817it is possible to calculate the light attenuation using information from  
     818the biology model. Without biological model, it is still possible to introduce  
     819a horizontal variation of the light attenuation by using the observed ocean  
     820surface color. At the time of writing, the latter has not been implemented 
     821 in the reference version. 
     822% 
     823\gmcomment{  {yellow}{case 4 bands and bio-coupling to add !!!}  } 
     824% 
    610825 
    611826% ------------------------------------------------------------------------------------------------------------- 
    612827%        Bottom Boundary Condition 
    613828% ------------------------------------------------------------------------------------------------------------- 
    614 \subsection{Bottom Boundary Condition (\mdl{trabbc} + \key{bbc})} 
     829\subsection   [Bottom Boundary Condition (\textit{trabbc} - \key{bbc})] 
     830         {Bottom Boundary Condition (\mdl{trabbc} - \key{bbc})} 
    615831\label{TRA_bbc} 
    616832%--------------------------------------------nambbc-------------------------------------------------------- 
     
    620836\begin{figure}[!t] \label{Fig_geothermal}  \begin{center} 
    621837\includegraphics[width=1.0\textwidth]{./Figures/Fig_TRA_geoth.pdf} 
    622 \caption{Geothermal Heat flux (in $mW.m^{-2}$) as inferred from the age of the sea floor and the formulae of \citet{Stein1992}.} 
     838\caption{Geothermal Heat flux (in $mW.m^{-2}$) as inferred from the age  
     839of the sea floor and the formulae of \citet{Stein1992}.} 
    623840\end{center}   \end{figure} 
    624841%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    625842 
    626 Usually it is considered that there is no exchange of heat nor salt through  
    627 the ocean bottom, i.e. a no flux boundary condition is applied on active  
    628 tracers at the bottom. This is the default option in NEMO, and it is  
    629 implemented using the masking technique. Nevertheless, there exists a  
    630 non-zero heat flux across the seafloor that is associated with the solid  
    631 earth cooling. This flux is weak compared with surface fluxes --- a mean  
    632 global value of $\sim0.1\;W/m^2$ \citep{Stein1992} --- but it is  
    633 systematically positive and it acts only on the densest water masses. Taking  
    634 this flux into account in a global ocean model increases by a few Sverdrups  
     843Usually it is assumed that there is no exchange of heat or salt through  
     844the ocean bottom, $i.e.$ a no flux boundary condition is applied on active  
     845tracers at the bottom. This is the default option in \NEMO, and it is  
     846implemented using the masking technique. Hoever, there is a  
     847non-zero heat flux across the seafloor that is associated with solid  
     848earth cooling. This flux is weak compared to surface fluxes (a mean  
     849global value of $\sim0.1\;W/m^2$ \citep{Stein1992}), but it is  
     850systematically positive and acts on the densest water masses. Taking  
     851this flux into account in a global ocean model increases 
    635852the deepest overturning cell (i.e. the one associated with the Antarctic  
    636 Bottom Water).  
    637  
    638 The presence or not of a geothermal heating is controlled by the namelist  
    639 parameter  \np{ngeo\_flux}. Set to 1, a constant geothermal heatingis  
    640 introducted which value is given by the \np{ngeo\_flux\_const}, also a  
    641 namelist parameter. Set to 2, a spatially varying geothermal heat flux is  
    642 introducted which is provided in the geothermal\_heating.nc NetCDF  
    643 file (Fig.\ref{Fig_geothermal}). 
     853Bottom Water) by a few Sverdrups.  
     854 
     855The presence or not of geothermal heating is controlled by the namelist  
     856parameter  \np{ngeo\_flux}. If this parameter is set to 1, a constant  
     857geothermal heating is introduced whose value is given by the  
     858\np{ngeo\_flux\_const}, which is also a namelist parameter. If it is set to 2,  
     859a spatially varying geothermal heat flux is introduced which is provided  
     860in the geothermal\_heating.nc NetCDF file (Fig.\ref{Fig_geothermal}). 
    644861 
    645862% ================================================================ 
    646863% Bottom Boundary Layer 
    647864% ================================================================ 
    648 \section{Bottom Boundary Layer (\mdl{trabbl} + \key{bbl\_diff} or \key{bbl\_adv})} 
     865\section  [Bottom Boundary Layer (\textit{trabbl}, \textit{trabbl\_adv} )] 
     866      {Bottom Boundary Layer (\mdl{trabbl}, \mdl{trabbl\_adv})} 
    649867\label{TRA_bbl} 
    650868%--------------------------------------------nambbl--------------------------------------------------------- 
     
    652870%-------------------------------------------------------------------------------------------------------------- 
    653871 
    654 In z-coordinate configuration, the bottom topography is represented as a  
     872In a $z$-coordinate configuration, the bottom topography is represented by a  
    655873series of discrete steps. This is not adequate to represent gravity driven  
    656874downslope flows. Such flows arise downstream of sills such as the Strait of  
    657875Gibraltar, Bab El Mandeb, or Denmark Strait, where dense water formed in  
    658876marginal seas flows into a basin filled with less dense water. The amount of  
    659 entrainment that occurs in those gravity plumes is critical to determine the  
    660 density and volume flux of the densest waters of the ocean, such as the  
    661 Antarctic Bottom water, or the North Atlantic Deep Water. $z$-coordinate  
    662 models tend to overestimate the entrainment because the gravity flow is  
     877entrainment that occurs in these gravity plumes is critical in determining the  
     878density and volume flux of the densest waters of the ocean, such as  
     879Antarctic Bottom Water, or North Atlantic Deep Water. $z$-coordinate  
     880models tend to overestimate the entrainment, because the gravity flow is  
    663881mixed down vertically by convection as it goes ``downstairs'' following the  
    664882step topography, sometimes over a thickness much larger than the thickness  
    665 of the observed gravity plume. A similar problem occurs in $s$-coordinate when  
     883of the observed gravity plume. A similar problem occurs in the $s$-coordinate when  
    666884the thickness of the bottom level varies in large proportions downstream of  
    667 a sill \citep{Willebrand2001}, and the thickness of the plume is not  
    668 resolved.  
    669  
    670 The idea of the bottom boundary layer parameterization first introduced by  
     885a sill \citep{Willebrand2001}, and the thickness of the plume is not resolved.  
     886 
     887The idea of the bottom boundary layer (BBL) parameterization first introduced by  
    671888\citet{BeckDos1998} is to allow a direct communication between  
    672 two adjacent bottom cells at varying level, whenever the densest water is  
    673 located above the less dense water. The communication can be by diffusive  
    674 fluxes (diffusive BBL), advective fluxes (advective BBL) or both. Only  
    675 tracers are modified, not the velocities. Implementing a BBL  
    676 parameterization for momentum is a more complex problem because of the  
    677 pressure gradient errors.  
     889two adjacent bottom cells at different levels, whenever the densest water is  
     890located above the less dense water. The communication can be by a diffusive  
     891(diffusive BBL), advective fluxes (advective BBL), or both. In the current  
     892implementation of the BBL, only the tracers are modified, not the velocities.  
     893Furthermore, it only connects ocean bottom cells, and therefore does not include  
     894the improvment proposed by \citet{Campin_Goosse_Tel99}. 
    678895 
    679896% ------------------------------------------------------------------------------------------------------------- 
    680897%        Diffusive BBL 
    681898% ------------------------------------------------------------------------------------------------------------- 
    682 \subsection{Diffusive Bottom Boundary layer (\mdl{trabbl})} 
     899\subsection{Diffusive Bottom Boundary layer (\key{bbl\_diff})} 
    683900\label{TRA_bbl_diff} 
    684901 
    685 The lateral diffusivity $A_l^\sigma $ in the BBL can be prescribed with a  
    686 spatial dependence, e.g., in the conditional form 
    687 \begin{equation} \label{Eq_tra_bbl} 
     902When applying sigma-diffusion (\key{trabbl} is defined), the diffusive flux between  
     903two adjacent cells living at the ocean bottom is given by  
     904\begin{equation} \label{Eq_tra_bbl_diff} 
     905{\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T 
     906\end{equation}  
     907with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells,  
     908and  $A_l^\sigma $ the lateral diffusivity in the BBL. Following \citet{BeckDos1998},  
     909the latter is prescribed with a spatial dependence, $e.g.$ in the conditional form 
     910\begin{equation} \label{Eq_tra_bbl_coef} 
    688911A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} 
    689  \mbox{large}\quad if\;\nabla \rho \cdot \nabla H<0 \\  
     912 A_{bbl}  \quad \quad   \mbox{if}  \quad   \nabla_\sigma \rho  \cdot \nabla H<0 \\  
    690913 \\ 
    691914 0\quad \quad \;\,\mbox{otherwise} \\  
    692915 \end{array}} \right. 
    693916\end{equation}  
    694  
    695 The large value of the coefficient when the diffusive BBL is active is given  
    696 by the namelist parameter \np{atrbbl.} 
     917where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist  
     918parameter \np{atrbbl}. $A_{bbl}$ is usually set to a value much larger  
     919than the one used on lateral mixing in open ocean.  
     920Note that in practice, \eqref{Eq_tra_bbl_coef} constraint is applied  
     921separately in the two horizontal directions, and the density gradient in  
     922\eqref{Eq_tra_bbl_coef} is evaluated at $\overline{H}^i$ ($\overline{H}^j$)  
     923using the along bottom mean temperature and salinity.  
    697924 
    698925% ------------------------------------------------------------------------------------------------------------- 
    699926%        Advective BBL 
    700927% ------------------------------------------------------------------------------------------------------------- 
    701 \subsection{Advective Bottom Boundary Layer (\mdl{trabb\_adv})} 
     928\subsection   {Advective Bottom Boundary Layer (\key{bbl\_adv})} 
    702929\label{TRA_bbl_adv} 
    703930 
    704 Implemented in NEMO v2.  
    705  
    706 \colorbox{yellow} {Documentation to be added here } 
     931 
     932%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     933\begin{figure}[!t] \label{Fig_bbl}  \begin{center} 
     934\includegraphics[width=1.0\textwidth]{./Figures/Fig_BBL_adv.pdf} 
     935\caption{Advective Bottom Boundary Layer.} 
     936\end{center}   \end{figure} 
     937%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     938 
     939%%%gmcomment   :  this section has to be really written 
     940 
     941The advective BBL is in fact not only an advective one but include a diffusive  
     942component as we chose an upstream scheme to perform the advection within  
     943the BBL. The associated diffusion only act in the stream direction and is  
     944proportional to the velocity. 
     945 
     946When applying sigma-advection (\key{trabbl\_adv} defined), the advective  
     947flux between two adjacent cells living at the ocean bottom is given by  
     948\begin{equation} \label{Eq_tra_bbl_fadv} 
     949{\rm {\bf F}}_\sigma={\rm {\bf U}}_h^\sigma \; \overline{T}^\sigma 
     950\end{equation}  
     951with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells,  
     952and  $A_l^\sigma$ the lateral diffusivity in the BBL. Following \citet{BeckDos1998},  
     953the latter is prescribed with a spatial dependence, $e.g.$ in the conditional form 
     954\begin{equation} \label{Eq_tra_bbl_Aadv} 
     955A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} 
     956 A_{bbl} \quad \quad \mbox{if}     \quad    \nabla_\sigma \rho \cdot \nabla H<0  
     957              \quad \quad \mbox{and} \quad         {\rm {\bf U}}_h  \cdot \nabla H<0 \\  
     958 \\ 
     959 0\quad \quad \;\,\mbox{otherwise} \\  
     960 \end{array}} \right. 
     961\end{equation}  
    707962 
    708963% ================================================================ 
    709964% Tracer damping 
    710965% ================================================================ 
    711 \section{Tracer damping (\mdl{tradmp})} 
     966\section  [Tracer damping (\textit{tradmp})] 
     967      {Tracer damping (\mdl{tradmp})} 
    712968\label{TRA_dmp} 
    713969%--------------------------------------------namdmp----------------------------------------------------- 
     
    715971%-------------------------------------------------------------------------------------------------------------- 
    716972 
    717 In some applications it can be useful to add a Newtonian damping term in the  
    718 temperature and salinity equations: 
     973In some applications it can be useful to add a Newtonian damping term  
     974into the temperature and salinity equations: 
    719975\begin{equation} \label{Eq_tra_dmp} 
    720976\begin{split} 
     
    724980 \end{split} 
    725981 \end{equation}  
    726 where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ are given temperature and salinity fields (usually a climatology). The restoring term is added when \key{tradmp} is defined. It also requires that both \key{temdta} and \key{saldta} are defined ($i.e.$ that $T_o$ and $S_o$ are read). The restoring coefficient $S_o$ is a three-dimensional array initialized by the user in  
    727 \rou{dtacof} routine also located in  \mdl{tradmp}.  
    728  
    729 The two main cases in which \eqref{Eq_tra_dmp} is used are \textit{(a)} the specification of  
    730 the boundary conditions along artificial walls of a limited domain basin and  
    731 \textit{(b)} the computation of the velocity field associated with a given $T$-$S$ field  
    732 (for example to build the initial state of a prognostic simulation, or to  
    733 use the resulting velocity field for a passive tracer study). The first case  
    734 applies to regional models that have artificial walls instead of open  
    735 boundaries. In the vicinity of these walls, $S_o$ takes large values  
    736 (equivalent to a few day time scale) whereas it is zero in the interior of  
    737 the model domain. The second case corresponds to the use of the robust  
    738 diagnostic method \citep{Sarmiento1982}. It allows to find the velocity  
    739 field consistent with the model dynamics while having a $T$-$S$ field close to a  
    740 given climatology field ($T_o -S_o$). The time scale associated with  
    741 $S_o$ is generally not a constant but spatially varying in order to respect  
    742 some considerations. For example, it is usually set to zero in the mixed  
    743 layer (defined either on a density or $S_o$ criterion) \citep{Madec1996} and in the equatorial region \citep{Reverdin1991, Fujio1991, MartiTh1992} as those two regions have a small time scale of adjustment,  
    744 while smaller $S_o$ are used in the deep ocean where the typical time scale  
    745 is long \citep{Sarmiento1982}. In addition it is reduced (and even  
    746 zero) along the western boundary to allow the model to reconstruct its own  
    747 western boundary structure in equilibrium with its physics. The choice of a  
    748 Newtonian damping acting in the mixed layer or not is controlled by \np{nmldmp}  
    749 (\textbf{namelist} \np{nmldmp}parameter). 
    750  
    751 The robust diagnostic method is very efficient to prevent the temperature drift in intermediate waters but it produces artificial sources of heat and salt within the ocean. It has also undesirable effects on the ocean convection. It tends to prevent deep convection and subsequent deep-water formation by stabilising too much the water columns. 
    752  
    753 An example of computation of $S_o$ for robust diagnostic experiments with the ORCA2 model is provided in the \mdl{tradmp} module (subroutines \rou{dtacof} and \rou{cofdis} which compute coefficient and the distance to the bathymetry, respectively). Those routines are provided as examples and can be customised by the user.  
     982where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$  
     983are given temperature and salinity fields (usually a climatology).  
     984The restoring term is added when \key{tradmp} is defined.  
     985It also requires that both \key{temdta} and \key{saldta} are defined  
     986($i.e.$ that $T_o$ and $S_o$ are read). The restoring coefficient  
     987$S_o$ is a three-dimensional array initialized by the user in routine  
     988\rou{dtacof} also located in module \mdl{tradmp}.  
     989 
     990The two main cases in which \eqref{Eq_tra_dmp} is used are \textit{(a)}  
     991the specification of the boundary conditions along artificial walls of a  
     992limited domain basin and \textit{(b)} the computation of the velocity  
     993field associated with a given $T$-$S$ field (for example to build the  
     994initial state of a prognostic simulation, or to use the resulting velocity  
     995field for a passive tracer study). The first case applies to regional  
     996models that have artificial walls instead of open boundaries.  
     997In the vicinity of these walls, $S_o$ takes large values (equivalent to  
     998a time scale of a few days) whereas it is zero in the interior of the  
     999model domain. The second case corresponds to the use of the robust  
     1000diagnostic method \citep{Sarmiento1982}. It allows us to find the velocity  
     1001field consistent with the model dynamics whilst having a $T$-$S$ field  
     1002close to a given climatological field ($T_o -S_o$). The time scale  
     1003associated with $S_o$ is generally not a constant but spatially varying  
     1004in order to respect other properties. For example, it is usually set to zero  
     1005in the mixed layer (defined either on a density or $S_o$ criterion)  
     1006\citep{Madec1996} and in the equatorial region  
     1007\citep{Reverdin1991, Fujio1991, MartiTh1992} since these two regions  
     1008have a short time scale of adjustment; while smaller $S_o$ are used  
     1009in the deep ocean where the typical time scale is long \citep{Sarmiento1982}.  
     1010In addition the time scale is reduced (even to zero) along the western  
     1011boundary to allow the model to reconstruct its own western boundary  
     1012structure in equilibrium with its physics. The choice of a  
     1013Newtonian damping acting in the mixed layer or not is controlled by 
     1014namelist parameter \np{nmldmp}. 
     1015 
     1016The robust diagnostic method is very efficient in preventing temperature  
     1017drift in intermediate waters but it produces artificial sources of heat and salt  
     1018within the ocean. It also has undesirable effects on the ocean convection.  
     1019It tends to prevent deep convection and subsequent deep-water formation,  
     1020by stabilising the water column too much. 
     1021 
     1022An example of the computation of $S_o$ for robust diagnostic experiments  
     1023with the ORCA2 model is provided in the \mdl{tradmp} module  
     1024(subroutines \rou{dtacof} and \rou{cofdis} which compute the coefficient  
     1025and the distance to the bathymetry, respectively). These routines are  
     1026provided as examples and can be customised by the user.  
    7541027 
    7551028% ================================================================ 
    7561029% Tracer time evolution 
    7571030% ================================================================ 
    758 \section{Tracer time evolution (\mdl{tranxt})} 
     1031\section  [Tracer time evolution (\textit{tranxt})] 
     1032      {Tracer time evolution (\mdl{tranxt})} 
    7591033\label{TRA_nxt} 
    7601034%--------------------------------------------namdom----------------------------------------------------- 
     
    7621036%-------------------------------------------------------------------------------------------------------------- 
    7631037 
    764 The general framework of dynamics time stepping is a leap-frog scheme, $i.e.$ a three level centred time scheme associated with a Asselin time filter (cf. \S\ref{DOM_nxt}): 
     1038The general framework for tracer time stepping is a leap-frog scheme,  
     1039$i.e.$ a three level centred time scheme associated with a Asselin time  
     1040filter (cf. \S\ref{DOM_nxt}): 
    7651041\begin{equation} \label{Eq_tra_nxt} 
    7661042\begin{split} 
     
    7711047\end{equation}  
    7721048 
    773 where $\text{RHS}_T$ is the right hand side of the temperature equation, the subscript $f$ denotes  
    774 filtered values and $\gamma$ is the Asselin coefficient. $\gamma$ is initialized as \np{atfp} (\textbf{namelist} parameter). Its default value is \np{atfp=0.1}.  
    775  
    776 When the vertical mixing is solved implicitly, the update of the next tracer  
    777 fields is done in module \mdl{trazdf}. In that case only the swap of arrays  
    778 and the Asselin filtering is done in \mdl{tranxt} module. 
    779  
    780 In order to prepare the computation of the next time step, a swap of tracer arrays is performed: $T^{t-\Delta t} = T^t$ and $T^t = T_f$.  
     1049where $\text{RHS}_T$ is the right hand side of the temperature equation,  
     1050the subscript $f$ denotes filtered values and $\gamma$ is the Asselin  
     1051coefficient. $\gamma$ is initialized as \np{atfp} (\textbf{namelist} parameter).  
     1052Its default value is \np{atfp=0.1}.  
     1053 
     1054When the vertical mixing is solved implicitly, the update of the \textit{next} tracer  
     1055fields is done in module \mdl{trazdf}. In this case only the swapping of arrays  
     1056and the Asselin filtering is done in the \mdl{tranxt} module. 
     1057 
     1058In order to prepare for the computation of the \textit{next} time step,  
     1059a swap of tracer arrays is performed: $T^{t-\Delta t} = T^t$ and $T^t = T_f$.  
    7811060 
    7821061% ================================================================ 
    7831062% Equation of State (eosbn2)  
    7841063% ================================================================ 
    785 \section{Equation of State (\mdl{eosbn2}) } 
     1064\section  [Equation of State (\textit{eosbn2}) ] 
     1065      {Equation of State (\mdl{eosbn2}) } 
    7861066\label{TRA_eosbn2} 
    7871067%--------------------------------------------nameos----------------------------------------------------- 
     
    7951075\label{TRA_eos} 
    7961076 
    797 It is necessary to know the equation of state for the ocean very accurately to determine stability properties (especially the Brunt-Vais\"{a}l\"{a} frequency), particularly in the deep ocean. The ocean density is a non linear empirical function of \textit{in situ }temperature, salinity and pressure. The reference is the equation of state defined by the Joint Panel on Oceanographic Tables  
    798 and Standards \citep{UNESCO1983}. It was the standard equation of state used in early releases of OPA. Even though this computation is fully vectorised, it is quite time consuming ($15$ to $20${\%} of the total CPU time) as it requires the prior computation of the \textit{in situ} temperature from the model \textit{potential} temperature using the \citep{Bryden1973} polynomial for adiabatic lapse rate and a $4^th$ order Runge-Kutta integration scheme. Since OPA6, we have chosen the \citet{JackMcD1995} equation of state for seawater. It allows the computation of the \textit{in situ} ocean density directly as a function of \textit{potential} temperature relative to the sea surface (an OPA variable), the practical salinity (another OPA variable) and the pressure (assuming no pressure variation along geopotential surfaces, i.e. the pressure in decibars is  
    799 approximated by the depth in meters). Both the \citet{UNESCO1983} and \citet{JackMcD1995} equations of state have the same expression except that the values of the various coefficients have been adjusted by \citet{JackMcD1995} in order to use directly the \textit{potential} temperature instead of the \textit{in situ} one. This reduces the CPU time of the in situ density computation to about $3${\%} of the total CPU time, while maintaining a quite accurate equation of state. 
    800  
    801 In the computer code, a \textit{true} density, $d$, is computed, i.e. the ratio of seawater volumic mass over $\rho_o$, a reference volumic mass (\textit{rau0} defined in \mdl{phycst}, usually $rau0= 1,020~Kg/m^3$). The default option (\np{neos}=0) is the \citet{JackMcD1995} equation of state. It is highly recommended to use it. Nevertheless, for process studies, it is often convenient to use a linear approximation of the density$^{\ast}$\footnote{$^{\ast }$ With the linear equation of state there is no longer  
    802 a distinction between \textit{in situ} and \textit{potential} density. Cabling and thermobaric effects are also removed.}. Two linear formulations are available: a function of $T$ only (\np{neos}=1) and a function of both $T$ and $S$ (\np{neos}=2): 
     1077It is necessary to know the equation of state for the ocean very accurately  
     1078to determine stability properties (especially the Brunt-Vais\"{a}l\"{a} frequency),  
     1079particularly in the deep ocean. The ocean density is a non linear empirical  
     1080function of \textit{in situ }temperature, salinity and pressure. The reference  
     1081equation of state is that defined by the Joint Panel on Oceanographic Tables  
     1082and Standards \citep{UNESCO1983}. It was the standard equation of state  
     1083used in early releases of OPA. However, even though this computation is  
     1084fully vectorised, it is quite time consuming ($15$ to $20${\%} of the total  
     1085CPU time) since it requires the prior computation of the \textit{in situ}  
     1086temperature from the model \textit{potential} temperature using the  
     1087\citep{Bryden1973} polynomial for adiabatic lapse rate and a $4^th$ order  
     1088Runge-Kutta integration scheme. Since OPA6, we have used the  
     1089\citet{JackMcD1995} equation of state for seawater instead. It allows the  
     1090computation of the \textit{in situ} ocean density directly as a function of  
     1091\textit{potential} temperature relative to the surface (an \NEMO variable),  
     1092the practical salinity (another \NEMO variable) and the pressure (assuming no  
     1093pressure variation along geopotential surfaces, i.e. the pressure in decibars is  
     1094approximated by the depth in meters). Both the \citet{UNESCO1983} and \citet{JackMcD1995} equations of state have exactly the same except that  
     1095the values of the various coefficients have been adjusted by \citet{JackMcD1995}  
     1096in order to directly use the \textit{potential} temperature instead of the  
     1097\textit{in situ} one. This reduces the CPU time of the in situ density computation  
     1098to about $3${\%} of the total CPU time, while maintaining a quite accurate  
     1099equation of state. 
     1100 
     1101In the computer code, a \textit{true} density $d$ is computed, $i.e.$ the ratio  
     1102of seawater volumic mass to $\rho_o$, a reference volumic mass (\textit{rau0}  
     1103defined in \mdl{phycst}, usually $rau0= 1,020~Kg/m^3$). The default option  
     1104(namelist prameter \np{neos}=0) is the \citet{JackMcD1995} equation of state.  
     1105Its use is highly recommended. However, for process studies, it is often  
     1106convenient to use a linear approximation of the density$^{\ast}$ 
     1107\footnote{$^{\ast }$ With the linear equation of state there is no longer  
     1108a distinction between \textit{in situ} and \textit{potential} density. Cabling  
     1109and thermobaric effects are also removed.}.  
     1110Two linear formulations are available: a function of $T$ only (\np{neos}=1)  
     1111and a function of both $T$ and $S$ (\np{neos}=2): 
    8031112\begin{equation} \label{Eq_tra_eos_linear} 
    8041113\begin{aligned} 
     
    8071116\end{aligned} 
    8081117\end{equation}  
    809 where $\alpha $ and $\beta $ are the thermal and haline expansion coefficients, and $\rho_o$, the reference volumic mass, $rau0$. $\alpha $ and $\beta$ can be modified through \np{ralpha} and \np{rbeta} namelist parameters). Note that when $d$ is a function of $T$ only (\np{neos}=1), the salinity is a passive tracer and can be used as such. 
    810  
     1118where $\alpha$ and $\beta$ are the thermal and haline expansion  
     1119coefficients, and $\rho_o$, the reference volumic mass, $rau0$.  
     1120($\alpha$ and $\beta$ can be modified through the \np{ralpha} and  
     1121\np{rbeta} namelist parameters). Note that when $d$ is a function  
     1122of $T$ only (\np{neos}=1), the salinity is a passive tracer and can be  
     1123used as such. 
    8111124 
    8121125% ------------------------------------------------------------------------------------------------------------- 
     
    8161129\label{TRA_bn2} 
    8171130 
    818 An accurate computation of the ocean stability (i.e. of $N$, the brunt-Vais\"{a}l\"{a} frequency) is of paramount importance as it is used in several ocean parameterisations (namely TKE, KPP, Richardson number dependent vertical diffusion, enhanced vertical diffusion, non-penetrative convection, iso-neutral diffusion). In particular, one must be aware that $N^2$ has to be computed with an \textit{in situ} reference. The expression of $N^2$ depends on the type of equation of state used (\np{neos} namelist parameter). 
     1131An accurate computation of the ocean stability (i.e. of $N$, the brunt-Vais\"{a}l\"{a} 
     1132 frequency) is of paramount importance as it is used in several ocean  
     1133 parameterisations (namely TKE, KPP, Richardson number dependent  
     1134 vertical diffusion, enhanced vertical diffusion, non-penetrative convection,  
     1135 iso-neutral diffusion). In particular, one must be aware that $N^2$ has to  
     1136 be computed with an \textit{in situ} reference. The expression for $N^2$  
     1137 depends on the type of equation of state used (\np{neos} namelist parameter). 
    8191138 
    8201139For \np{neos}=0 (\citet{JackMcD1995} equation of state), the \citet{McDougall1987}  
    821 polynomial expression is used with the pressure in decibar approximated by  
    822 the depth in meters:  
    823 \begin{multline} \label{Eq_tra_bn2} 
    824 N^2 = \frac{g}{e_{3w}} \; \beta ( \overline{T}^{\,k+1/2},\widetilde{S},z_w )   \\ 
    825       \left\{  \alpha / \beta ( \overline{T}^{\,k+1/2},\widetilde{S},z_w ) 
    826          \ \delta_{k+1/2}[T]     - \delta_{k+1/2}[S] 
    827        \right\} 
    828 \end{multline}  
    829 where $T$ is the \textit{potential} temperature, $\widetilde{S}=\overline{S}^{\,k+1/2} - 35.$ a salinity anomaly, and $\alpha$ ($\beta\,$) the thermal (haline) expansion coefficient. Both $\alpha$ and $\beta$ depend on \textit{potential} temperature, salinity which are averaged at $w$-points prior to the computation. 
    830  
    831 When a linear equation of state is used (\np{neos}=1 or 2, \eqref{Eq_tra_bn2} reduces to: 
     1140polynomial expression is used (with the pressure in decibar approximated by  
     1141the depth in meters):  
     1142\begin{equation} \label{Eq_tra_bn2} 
     1143N^2 = \frac{g}{e_{3w}} \; \beta   \  
     1144      \left(  \alpha / \beta \ \delta_{k+1/2}[T]     - \delta_{k+1/2}[S]   \right)  
     1145\end{equation}  
     1146where $\alpha$ ($\beta$) is the thermal (haline) expansion coefficient.  
     1147They are a function of   
     1148$\overline{T}^{\,k+1/2},\widetilde{S}=\overline{S}^{\,k+1/2} - 35.$,  
     1149and  $z_w$, with $T$ the \textit{potential} temperature and  
     1150$\widetilde{S}$ a salinity anomaly.  
     1151Note that both $\alpha$ and $\beta$ depend on \textit{potential}  
     1152temperature and salinity which are averaged at $w$-points prior  
     1153to the computation instead of being computed at $T$-points and  
     1154then averaged to $w$-points. 
     1155 
     1156When a linear equation of state is used (\np{neos}=1 or 2,  
     1157\eqref{Eq_tra_bn2} reduces to: 
    8321158\begin{equation} \label{Eq_tra_bn2_linear} 
    8331159N^2 = \frac{g}{e_{3w}} \left(   \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T]   \right) 
    8341160\end{equation}  
    835 where $\alpha$ and $\beta $ are the constant coefficients used to defined the linear  
    836 equation of state \eqref{Eq_tra_eos_linear}. 
     1161where $\alpha$ and $\beta $ are the constant coefficients used to  
     1162defined the linear equation of state \eqref{Eq_tra_eos_linear}. 
    8371163 
    8381164% ------------------------------------------------------------------------------------------------------------- 
    8391165%        Specific Heat 
    8401166% ------------------------------------------------------------------------------------------------------------- 
    841 \subsection{Specific Heat (\textit{rcp}, \mdl{phycst})} 
     1167\subsection   [Specific Heat (\textit{phycst})] 
     1168         {Specific Heat (\mdl{phycst})} 
    8421169\label{TRA_adv_ldf} 
    8431170 
    844 The specific heat of sea water, $C_p$, is a function of temperature, salinity and pressure \citep{UNESCO1983}. It is only used in the model to convert surface heat fluxes into surface temperature increase, thus the pressure dependence is neglected. The dependence on $T$ and $S$ is weak. For example, with $S=35~psu$, $C_p$ increases from $3989$ to $4002$ when $T$ varies from -2~\degres C to 31~\degres C. Therefore, $C_p$ has been chosen as a constant: $C_p=4.10^3~J\,Kg^{-1}\,\degres K^{-1}$. Its computer name is \textit{rcp} and its value is set in \mdl{phycst} module. 
     1171The specific heat of sea water, $C_p$, is a function of temperature, salinity  
     1172and pressure \citep{UNESCO1983}. It is only used in the model to convert  
     1173surface heat fluxes into surface temperature increase and so the pressure  
     1174dependence is neglected. The dependence on $T$ and $S$ is weak.  
     1175For example, with $S=35~psu$, $C_p$ increases from $3989$ to $4002$  
     1176when $T$ varies from -2~\degres C to 31~\degres C. Therefore, $C_p$ has  
     1177been chosen as a constant: $C_p=4.10^3~J\,Kg^{-1}\,\degres K^{-1}$.  
     1178Its value is set in \mdl{phycst} module.  
     1179 
     1180%%% 
     1181\gmcomment{ STEVEN:  consistency, no other computer variable names are  
     1182supplied, so why this one} 
     1183%%% 
    8451184 
    8461185% ------------------------------------------------------------------------------------------------------------- 
    8471186%        Freezing Point of Seawater 
    8481187% ------------------------------------------------------------------------------------------------------------- 
    849 \subsection{Freezing Point of Seawater (\mdl{ocfzpt})} 
     1188\subsection   [Freezing Point of Seawater (\textit{ocfzpt})] 
     1189         {Freezing Point of Seawater (\mdl{ocfzpt})} 
    8501190\label{TRA_fzp} 
    8511191 
     
    8591199\end{equation} 
    8601200 
    861 \eqref{Eq_tra_eos_fzp} is only used to compute the potential freezing point of sea water  
    862 ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent terms in \eqref{Eq_tra_eos_fzp} (last term) has been dropped. The \textit{before} and \textit{now} surface freezing point is introduced in the code as $fzptb$ and $fzptn$ 2D arrays together with a  \textit{now} mask (\textit{freezn}) which takes 0 or 1 whether the ocean temperature is above or at the freezing point. Caution: do not confuse \textit{freezn} with the fraction of lead (\textit{frld}) defined in LIM.  
     1201\eqref{Eq_tra_eos_fzp} is only used to compute the potential freezing point of  
     1202sea water ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent  
     1203terms in \eqref{Eq_tra_eos_fzp} (last term) have been dropped. The \textit{before}  
     1204and \textit{now} surface freezing point is introduced in the code as $fzptb$ and  
     1205$fzptn$ 2D arrays together with a  \textit{now} mask (\textit{freezn}) which takes  
     1206the value 0 or 1 depending on whether the ocean temperature is above or at the  
     1207freezing point. Caution: do not confuse \textit{freezn} with the fraction of lead  
     1208(\textit{frld}) defined in LIM.   
     1209 
     1210%%% 
     1211\gmcomment{STEVEN: consistency, not many computer variable names are supplied, so why these    ===>  gm  I agree   this should evolve both here and in the code itself} 
     1212%%% 
    8631213 
    8641214% ================================================================ 
    8651215% Horizontal Derivative in zps-coordinate  
    8661216% ================================================================ 
    867 \section{Horizontal Derivative in \textit{zps}-coordinate (\mdl{zpshde})} 
     1217\section  [Horizontal Derivative in \textit{zps}-coordinate (\textit{zpshde})] 
     1218      {Horizontal Derivative in \textit{zps}-coordinate (\mdl{zpshde})} 
    8681219\label{TRA_zpshde} 
    8691220 
    870 With partial bottom cells (\np{ln\_zps}=T), tracers in horizontally adjacent cells generally live at different depths. Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module) and for the hydrostatic pressure gradient (\mdl{dynhpg} module). Before taking horizontal gradients between the tracers next to the bottom, a linear interpolation is used to approximate the deeper tracer as if it actually lived at the depth of the shallower tracer point (Fig.~\ref{Fig_Partial_step_scheme}). For example on temperature in the i-direction, the needed interpolated temperature, $\widetilde{T}$, is: 
     1221\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, I've changed "derivative" to "difference" and "mean" to "average"} 
     1222 
     1223With partial bottom cells (\np{ln\_zps}=.true.), in general, tracers in horizontally  
     1224adjacent cells live at different depths. Horizontal gradients of tracers are needed  
     1225for horizontal diffusion (\mdl{traldf} module) and for the hydrostatic pressure  
     1226gradient (\mdl{dynhpg} module) to be active.  
     1227\gmcomment{STEVEN from gm : question: not sure of  what -to be active- means} 
     1228Before taking horizontal gradients between the tracers next to the bottom, a linear  
     1229interpolation in the vertical is used to approximate the deeper tracer as if it actually  
     1230lived at the depth of the shallower tracer point (Fig.~\ref{Fig_Partial_step_scheme}).  
     1231For example, for temperature in the $i$-direction the needed interpolated  
     1232temperature, $\widetilde{T}$, is: 
     1233 
    8711234%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    8721235\begin{figure}[!p] \label{Fig_Partial_step_scheme}  \begin{center} 
    8731236\includegraphics[width=0.9\textwidth]{./Figures/Partial_step_scheme.pdf} 
    874 \caption{ Discretisation of horizontal derivative and mean of tracers in z-partial step coordinate (\np{ln\_zps}=T) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$. A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points. The horizontal derivative is then given by: $\delta _{i+1/2} T_k=  \widetilde{T}_k^{\,i+1} -T_k^{\,i}$ and the mean by: $\overline{T}_k^{\,i+1/2}= ( \widetilde{T}_k^{\,i+1/2} - T_k^{\,i} ) / 2$.  } 
     1237\caption{ Discretisation of the horizontal difference and average of tracers in the $z$-partial step coordinate (\np{ln\_zps}=.true.) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$. A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points. The horizontal difference is then given by: $\delta _{i+1/2} T_k=  \widetilde{T}_k^{\,i+1} -T_k^{\,i}$ and the average by: $\overline{T}_k^{\,i+1/2}= ( \widetilde{T}_k^{\,i+1/2} - T_k^{\,i} ) / 2$.  } 
    8751238\end{center}   \end{figure} 
    8761239%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    8841247            \end{aligned}   \right. 
    8851248\end{equation*} 
    886 and the resulting formulation of horizontal derivative and horizontal mean value of $T$ at $U$-point are:  
     1249and the resulting forms for the horizontal difference and the horizontal average  
     1250value of $T$ at a $U$-point are:  
    8871251\begin{equation} \label{Eq_zps_hde} 
    8881252\begin{aligned} 
     
    9011265\end{equation} 
    9021266 
    903 The computation of horizontal derivative of tracers as well as of density is performed once for all at each time step in \mdl{zpshde} module and stored in shared arrays to be used when needed. It has to be emphasized that the computation of the interpolated density, $\widetilde{\rho}$, is not identical to the one of $T$ and $S$. Instead of forming a linear approximation of density, we compute $\widetilde{\rho }$ from the interpolated value of $T$ and $S$, and the pressure of at $u$-point (in the equation of state pressure is approximated by depth, see \S\ref{TRA_eos} ) :  
     1267The computation of horizontal derivative of tracers as well as of density is  
     1268performed once for all at each time step in \mdl{zpshde} module and stored  
     1269in shared arrays to be used when needed. It has to be emphasized that the  
     1270procedure used to compute the interpolated density, $\widetilde{\rho}$, is not  
     1271the same as that used for $T$ and $S$. Instead of forming a linear approximation  
     1272of density, we compute $\widetilde{\rho }$ from the interpolated values of $T$  
     1273and $S$, and the pressure at a $u$-point (in the equation of state pressure is  
     1274approximated by depth, see \S\ref{TRA_eos} ) :  
    9041275\begin{equation} \label{Eq_zps_hde_rho} 
    9051276\widetilde{\rho } = \rho ( {\widetilde{T},\widetilde {S},z_u })  
     
    9071278\end{equation}  
    9081279 
    909 This is a much better approximation as the variation of $\rho$ with depth (and thus pressure) is highly non-linear with a true equation of state and thus is badly approximated with a linear interpolation. This approximation is used to compute both the horizontal pressure gradient (\S\ref{DYN_hpg}) and the slopes of neutral surfaces (\S\ref{LDF_slp}) 
    910  
    911 \textit{Notes}: in almost all the advection schemes presented in this Chapter, both mean and derivative operators appear. Yet, it has been chosen not to use \eqref{Eq_zps_hde} in those schemes.: contrary to diffusion and pressure gradient computation, no correction for partial steps is applied for advection.The main motivation was to preserve the domain averaged mean variance of the field advected when using $2^{nd}$ order centred scheme. Sensitivity of the advection schemes to the way horizontal means are performed in the vicinity of partial cells should be further investigated in a near future. 
    912  
     1280This is a much better approximation as the variation of $\rho$ with depth (and  
     1281thus pressure) is highly non-linear with a true equation of state and thus is badly  
     1282approximated with a linear interpolation. This approximation is used to compute  
     1283both the horizontal pressure gradient (\S\ref{DYN_hpg}) and the slopes of neutral  
     1284surfaces (\S\ref{LDF_slp}) 
     1285 
     1286Note that in almost all the advection schemes presented in this Chapter, both  
     1287averaging and differencing operators appear. Yet \eqref{Eq_zps_hde} has not  
     1288been used in these schemes: in contrast to diffusion and pressure gradient  
     1289computations, no correction for partial steps is applied for advection. The main  
     1290motivation is to preserve the domain averaged mean variance of the advected  
     1291field when using the $2^{nd}$ order centred scheme. Sensitivity of the advection  
     1292schemes to the way horizontal averages are performed in the vicinity of partial  
     1293cells should be further investigated in the near future. 
     1294%%% 
     1295\gmcomment{gm :   this last remark has to be done} 
     1296%%% 
Note: See TracChangeset for help on using the changeset viewer.