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 2282 for branches/nemo_v3_3_beta/DOC/TexFiles/Chapters/Chap_TRA.tex – NEMO

Ignore:
Timestamp:
2010-10-15T16:42:00+02:00 (14 years ago)
Author:
gm
Message:

ticket:#658 merge DOC of all the branches that form the v3.3 beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/DOC/TexFiles/Chapters/Chap_TRA.tex

    r1225 r2282  
    88% missing/update  
    99% traqsr: need to coordinate with SBC module 
    10 % trabbl : advective case to be discussed 
    11 %        diffusive case : add : only the bottom ocean cell is concerned 
    12 %        ==> addfigure on bbl 
    1310 
    1411%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 
     
    5148In the present chapter we also describe the diagnostic equations used to compute  
    5249the sea-water properties (density, Brunt-Vais\"{a}l\"{a} frequency, specific heat and  
    53 freezing point) although the associated modules ($i.e.$ \mdl{eosbn2}, \mdl{ocfzpt}  
    54 and \mdl{phycst}) are (temporarily) located in the NEMO/OPA directory. 
    55  
    56 The different options available to the user are managed by namelist logical or  
     50freezing point with associated modules \mdl{eosbn2}, \mdl{ocfzpt} and \mdl{phycst}). 
     51 
     52The different options available to the user are managed by namelist logicals or  
    5753CPP keys. For each equation term \textit{ttt}, the namelist logicals are \textit{ln\_trattt\_xxx},  
    58 where \textit{xxx} is a 3 or 4 letter acronym accounting for each optional scheme.  
    59 The CPP key (when it exists) is \textbf{key\_trattt}. The corresponding code can be  
     54where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme.  
     55The CPP key (when it exists) is \textbf{key\_trattt}. The equivalent code can be  
    6056found in the \textit{trattt} or \textit{trattt\_xxx} module, in the NEMO/OPA/TRA directory. 
    6157 
     
    7066      {Tracer Advection (\mdl{traadv})} 
    7167\label{TRA_adv} 
    72 %------------------------------------------nam_traadv----------------------------------------------------- 
    73 \namdisplay{nam_traadv} 
     68%------------------------------------------namtra_adv----------------------------------------------------- 
     69\namdisplay{namtra_adv} 
    7470%------------------------------------------------------------------------------------------------------------- 
    7571 
     
    7773fluxes. Its discrete expression is given by : 
    7874\begin{equation} \label{Eq_tra_adv} 
    79 ADV_\tau =-\frac{1}{b_T} \left(  
     75ADV_\tau =-\frac{1}{b_t} \left(  
    8076\;\delta _i \left[ e_{2u}\,e_{3u} \;  u\; \tau _u  \right] 
    8177+\delta _j \left[ e_{1v}\,e_{3v}  \;  v\; \tau _v  \right] \; \right) 
    82 -\frac{1}{e_{3T}} \;\delta _k \left[ w\; \tau _w \right] 
    83 \end{equation} 
    84 where $\tau$ is either T or S, and $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells.  
     78-\frac{1}{e_{3t}} \;\delta _k \left[ w\; \tau _w \right] 
     79\end{equation} 
     80where $\tau$ is either T or S, and $b_t= e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells.  
    8581In pure $z$-coordinate (\key{zco} is defined), it reduces to : 
    8682\begin{equation} \label{Eq_tra_adv_zco} 
    87 ADV_\tau =-\frac{1}{e_{1T} {\kern 1pt}e_{2T} {\kern 1pt}}\left( {\;\delta _i  
    88 \left[ {e_{2u} {\kern 1pt}{\kern 1pt}\;u\;\tau _u } \right]+\delta _j \left[  
    89 {e_{1v} {\kern 1pt}v\;\tau _v } \right]\;} \right)-\frac{1}{\mathop  
    90 e\nolimits_{3T} }\delta _k \left[ {w\;\tau _w } \right] 
     83ADV_\tau = - \frac{1}{e_{1t}\,e_{2t}} \left( \; \delta_i \left[ e_{2u} \;u \;\tau_u \right]  
     84                                                                 + \delta_j \left[ e_{1v} \;v \;\tau_v  \right] \; \right) 
     85                   -  \frac{1}{e_{3t}}                      \delta_k \left[             w \;\tau_w \right] 
    9186\end{equation} 
    9287since the vertical scale factors are functions of $k$ only, and thus  
    93 $e_{3u} =e_{3v} =e_{3T} $. The flux form in \eqref{Eq_tra_adv}  
    94 requires implicitly the use of the continuity equation. Indeed, it is obtained 
     88$e_{3u} =e_{3v} =e_{3t} $. The flux form in \eqref{Eq_tra_adv}  
     89implicitly requires the use of the continuity equation. Indeed, it is obtained 
    9590by using the following equality : $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$  
    9691which results from the use of the continuity equation, $\nabla \cdot \vect{U}=0$ or  
    97 $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$ in constant (default option)  
    98 or variable (\key{vvl} defined) volume case, respectively.  
     92$\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$ in constant volume (default option)  
     93or variable volume (\key{vvl} defined) case, respectively.  
    9994Therefore it is of paramount importance to design the discrete analogue of the  
    10095advection tendency so that it is consistent with the continuity equation in order to  
    10196enforce the conservation properties of the continuous equations. In other words,  
    102 by substituting $\tau$ by 1 in (\ref{Eq_tra_adv}) we recover the discrete form of  
     97by replacing $\tau$ by the number 1 in (\ref{Eq_tra_adv}) we recover the discrete form of  
    10398the continuity equation which is used to calculate the vertical velocity. 
    10499%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    117112%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    118113 
    119 The key difference between the advection schemes used in \NEMO is the choice  
     114The key difference between the advection schemes available in \NEMO is the choice  
    120115made in space and time interpolation to define the value of the tracer at the  
    121116velocity points (Fig.~\ref{Fig_adv_scheme}).  
    122117 
    123 Along solid lateral and bottom boundaries a zero tracer flux is naturally  
     118Along solid lateral and bottom boundaries a zero tracer flux is automatically  
    124119specified, since the normal velocity is zero there. At the sea surface the  
    125120boundary condition depends on the type of sea surface chosen:  
    126121\begin{description} 
    127 \item  [rigid-lid formulation:] $w=0$ at the surface, so the advective  
    128 fluxes through the surface are zero. 
    129122\item [linear free surface:] the first level thickness is constant in time:  
    130123the vertical boundary condition is applied at the fixed surface $z=0$  
    131124rather than on the moving surface $z=\eta$. There is a non-zero advective  
    132 flux which is set for all advection schemes as the product of surface  
    133 velocity (at $z=0$) by the first level tracer value:  
    134 $\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $.  
     125flux which is set for all advection schemes as  
     126$\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $, $i.e.$  
     127the product of surface velocity (at $z=0$) by the first level tracer value. 
    135128\item [non-linear free surface:] (\key{vvl} is defined)  
    136129convergence/divergence in the first ocean level moves the free surface  
     
    144137term is the product of the time derivative of the tracer and the free surface  
    145138height, two quantities that are not correlated (see \S\ref{PE_free_surface},  
    146 and also \citet{Roullet2000,Griffies2001,Campin2004}). 
     139and also \citet{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}). 
    147140 
    148141The velocity field that appears in (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_zco})  
    149142is the centred (\textit{now}) \textit{eulerian} ocean velocity (see Chap.~\ref{DYN}).  
    150 When advective bottom boundary layer (\textit{bbl}) and/or eddy induced velocity  
    151 (\textit{eiv}) parameterisations are used it is the \textit{now} \textit{effective}  
    152 velocity ($i.e.$ the sum of the eulerian, the bbl and/or the eiv velocities) which is used. 
    153  
    154 The choice of an advection scheme is made in the \np{nam\_traadv} namelist, by  
     143When eddy induced velocity (\textit{eiv}) parameterisation is used it is the \textit{now}  
     144\textit{effective} velocity ($i.e.$ the sum of the eulerian and eiv velocities) which is used. 
     145 
     146The choice of an advection scheme is made in the \textit{nam\_traadv} namelist, by  
    155147setting to \textit{true} one and only one of the logicals \textit{ln\_traadv\_xxx}. The  
    156148corresponding code can be found in the \textit{traadv\_xxx.F90} module, where  
     
    174166that are pure numerical artefacts.  
    175167 
     168\sgacomment{not sure whether 3 is still relevant after TRA-TRC branch is merged in?} 
    176169% ------------------------------------------------------------------------------------------------------------- 
    177170%        2nd order centred scheme   
    178171% ------------------------------------------------------------------------------------------------------------- 
    179172\subsection   [$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2})] 
    180          {$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2}=.true.)} 
     173         {$2^{nd}$ order centred scheme (cen2) (\np{ln\_traadv\_cen2}=true)} 
    181174\label{TRA_adv_cen2} 
    182175 
     
    195188(\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value. The centered second  
    196189order advection is computed in the \mdl{traadv\_cen2} module. In this module, 
    197 it is also proposed to combine the \textit{cen2} scheme with an upstream scheme 
    198 in specific areas which requires a strong diffusion in order to avoid the generation  
     190it is advantageous to combine the \textit{cen2} scheme with an upstream scheme 
     191in specific areas which require a strong diffusion in order to avoid the generation  
    199192of false extrema. These areas are the vicinity of large river mouths, some straits  
    200193with coarse resolution, and the vicinity of ice cover area ($i.e.$ when the ocean  
    201194temperature is close to the freezing point). 
     195This combined scheme has been included for specific grid points in the ORCA2 and ORCA4 configurations only. 
    202196 
    203197Note that using the cen2 scheme, the overall tracer advection is of second  
    204198order accuracy since both (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_cen2})  
    205 have this order of accuracy. Note also that  
     199have this order of accuracy. \gmcomment{Note also that ... blah, blah} 
    206200 
    207201% ------------------------------------------------------------------------------------------------------------- 
     
    209203% ------------------------------------------------------------------------------------------------------------- 
    210204\subsection   [$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4})] 
    211            {$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4}=.true.)} 
     205           {$4^{nd}$ order centred scheme (cen4) (\np{ln\_traadv\_cen4}=true)} 
    212206\label{TRA_adv_cen4} 
    213207 
    214208In the $4^{th}$ order formulation (to be implemented), tracer values are  
    215 evaluated at velocity points as a $4^{th}$ order interpolation, and thus uses  
     209evaluated at velocity points as a $4^{th}$ order interpolation, and thus depend on  
    216210the four neighbouring $T$-points. For example, in the $i$-direction: 
    217211\begin{equation} \label{Eq_tra_adv_cen4} 
     
    247241% ------------------------------------------------------------------------------------------------------------- 
    248242\subsection   [Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd})] 
    249          {Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd}=.true.)} 
     243         {Total Variance Dissipation scheme (TVD) (\np{ln\_traadv\_tvd}=true)} 
    250244\label{TRA_adv_tvd} 
    251245 
     
    264258\end{equation} 
    265259where $c_u$ is a flux limiter function taking values between 0 and 1.  
    266 There exist many ways to define $c_u$, each correcponding to a different  
     260There exist many ways to define $c_u$, each corresponding to a different  
    267261total variance decreasing scheme. The one chosen in \NEMO is described in  
    268 \citet{Zalesak1979}. $c_u$ only departs from $1$ when the advective term  
     262\citet{Zalesak_JCP79}. $c_u$ only departs from $1$ when the advective term  
    269263produces a local extremum in the tracer field. The resulting scheme is quite  
    270264expensive but \emph{positive}. It can be used on both active and passive tracers.  
    271265This scheme is tested and compared with MUSCL and the MPDATA scheme in  
    272 \citet{Levy2001}; note that in this paper it is referred to as "FCT" (Flux corrected  
    273 transport) rather than TVD. The TVD scheme is computed in the \mdl{traadv\_tvd} module. 
    274  
    275 For stability reasons (see \S\ref{DOM_nxt}), in (\ref{Eq_tra_adv_tvd})  
    276 $\tau _u^{cen2}$ is evaluated using the \textit{now} tracer while $\tau _u^{ups}$  
     266\citet{Levy_al_GRL01}; note that in this paper it is referred to as "FCT" (Flux corrected  
     267transport) rather than TVD. The TVD scheme is implemented in the \mdl{traadv\_tvd} module. 
     268 
     269For stability reasons (see \S\ref{DOM_nxt}), 
     270$\tau _u^{cen2}$ is evaluated  in (\ref{Eq_tra_adv_tvd}) using the \textit{now} tracer while $\tau _u^{ups}$  
    277271is evaluated using the \textit{before} tracer. In other words, the advective part of  
    278272the scheme is time stepped with a leap-frog scheme while a forward scheme is  
     
    287281 
    288282The Monotone Upstream Scheme for Conservative Laws (MUSCL) has been  
    289 implemented by \citet{Levy2001}. In its formulation, the tracer at velocity points  
     283implemented by \citet{Levy_al_GRL01}. In its formulation, the tracer at velocity points  
    290284is evaluated assuming a linear tracer variation between two $T$-points  
    291285(Fig.\ref{Fig_adv_scheme}). For example, in the $i$-direction : 
    292286\begin{equation} \label{Eq_tra_adv_muscl} 
    293287   \tau _u^{mus} = \left\{      \begin{aligned} 
    294          &\tau _i  &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\Delta t}{e_{1u}} \right) 
     288         &\tau _i  &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\rdt}{e_{1u}} \right) 
    295289         &\ \widetilde{\partial _i \tau}  & \quad \text{if }\;u_{i+1/2} \geqslant 0      \\ 
    296          &\tau _{i+1/2} &+\frac{1}{2}\;\left( 1+\frac{u_{i+1/2} \;\Delta t}{e_{1u} } \right) 
     290         &\tau _{i+1/2} &+\frac{1}{2}\;\left( 1+\frac{u_{i+1/2} \;\rdt}{e_{1u} } \right) 
    297291         &\ \widetilde{\partial_{i+1/2} \tau } & \text{if }\;u_{i+1/2} <0 
    298292   \end{aligned}    \right. 
     
    306300For an ocean grid point adjacent to land and where the ocean velocity is  
    307301directed toward land, two choices are available: an upstream flux  
    308 (\np{ln\_traadv\_muscl}=.true.) or a second order flux  
    309 (\np{ln\_traadv\_muscl2}=.true.). Note that the latter choice does not ensure  
     302(\np{ln\_traadv\_muscl}=true) or a second order flux  
     303(\np{ln\_traadv\_muscl2}=true). Note that the latter choice does not ensure  
    310304the \textit{positive} character of the scheme. Only the former can be used  
    311 on both active and passive tracers. The two MUSCL schemes are computed  
     305on both active and passive tracers. The two MUSCL schemes are implemented  
    312306in the \mdl{traadv\_tvd} and \mdl{traadv\_tvd2} modules. 
    313307 
     
    316310% ------------------------------------------------------------------------------------------------------------- 
    317311\subsection   [Upstream-Biased Scheme (UBS) (\np{ln\_traadv\_ubs})] 
    318          {Upstream-Biased Scheme (UBS) (\np{ln\_traadv\_ubs}=.true.)} 
     312         {Upstream-Biased Scheme (UBS) (\np{ln\_traadv\_ubs}=true)} 
    319313\label{TRA_adv_ubs} 
    320314 
     
    333327 
    334328This results in a dissipatively dominant (i.e. hyper-diffusive) truncation  
    335 error \citep{Sacha2005}. The overall performance of the advection  
     329error \citep{Shchepetkin_McWilliams_OM05}. The overall performance of the advection  
    336330scheme is similar to that reported in \cite{Farrow1995}.  
    337331It is a relatively good compromise between accuracy and smoothness.  
     
    344338where the control of artificial diapycnal fluxes is of paramount importance.  
    345339Therefore the vertical flux is evaluated using the TVD scheme when  
    346 \np{ln\_traadv\_ubs}=.true.. 
    347  
    348 For stability reasons  (see \S\ref{DOM_nxt}), in \eqref{Eq_tra_adv_ubs},  
    349 the first term (which corresponds to a second order centred scheme)  
     340\np{ln\_traadv\_ubs}=true. 
     341 
     342For stability reasons  (see \S\ref{DOM_nxt}), 
     343the first term  in \eqref{Eq_tra_adv_ubs} (which corresponds to a second order centred scheme)  
    350344is evaluated using the \textit{now} tracer (centred in time) while the  
    351345second term (which is the diffusive part of the scheme), is  
    352346evaluated using the \textit{before} tracer (forward in time).  
    353 This choice is discussed by \citet{Webb1998} in the context of the  
     347This choice is discussed by \citet{Webb_al_JAOT98} in the context of the  
    354348QUICK advection scheme. UBS and QUICK schemes only differ  
    355349by one coefficient. Replacing 1/6 with 1/8 in \eqref{Eq_tra_adv_ubs}  
    356 leads to the QUICK advection scheme \citep{Webb1998}.  
     350leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.  
    357351This option is not available through a namelist parameter, since the  
    3583521/6 coefficient is hard coded. Nevertheless it is quite easy to make the  
    359353substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme. 
     354 
     355Four different options are possible for the vertical  
     356component used in the UBS scheme. $\tau _w^{ubs}$ can be evaluated  
     357using either \textit{(a)} a centred $2^{nd}$ order scheme, or  \textit{(b)}  
     358a TVD scheme, or  \textit{(c)} an interpolation based on conservative  
     359parabolic splines following the \citet{Shchepetkin_McWilliams_OM05}  
     360implementation of UBS in ROMS, or  \textit{(d)} a UBS. The $3^{rd}$ case  
     361has dispersion properties similar to an eighth-order accurate conventional scheme. 
     362The current reference version uses method b) 
    360363 
    361364Note that : 
     
    368371in the current reference version.  
    369372 
    370 (2) In a forthcoming release four options will be available for the vertical  
    371 component used in the UBS scheme. $\tau _w^{ubs}$ will be evaluated  
    372 using either \textit{(a)} a centred $2^{nd}$ order scheme, or  \textit{(b)}  
    373 a TVD scheme, or  \textit{(c)} an interpolation based on conservative  
    374 parabolic splines following the \citet{Sacha2005} implementation of UBS  
    375 in ROMS, or  \textit{(d)} a UBS. The $3^{rd}$ case has dispersion properties  
    376 similar to an eighth-order accurate conventional scheme. 
    377  
    378 (3) It is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
     373(2) It is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
    379374\begin{equation} \label{Eq_traadv_ubs2} 
    380375\tau _u^{ubs} = \tau _u^{cen4} + \frac{1}{12} \left\{   
     
    398393Thirdly, the diffusion term is in fact a biharmonic operator with an eddy  
    399394coefficient which is simply proportional to the velocity: 
    400  $A_u^{lm}= - \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note that NEMO v2.3 still uses  
    401  \eqref{Eq_tra_adv_ubs}, not \eqref{Eq_traadv_ubs2}. This should be  
    402  changed in forthcoming release. 
     395 $A_u^{lm}= - \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note that NEMO v3.3 still uses  
     396 \eqref{Eq_tra_adv_ubs}, not \eqref{Eq_traadv_ubs2}. 
    403397 %%% 
    404398 \gmcomment{the change in UBS scheme has to be done} 
     
    409403% ------------------------------------------------------------------------------------------------------------- 
    410404\subsection   [QUICKEST scheme (QCK) (\np{ln\_traadv\_qck})] 
    411          {QUICKEST scheme (QCK) (\np{ln\_traadv\_qck}=.true.)} 
     405         {QUICKEST scheme (QCK) (\np{ln\_traadv\_qck}=true)} 
    412406\label{TRA_adv_qck} 
    413407 
     
    419413The resulting scheme is quite expensive but \emph{positive}.  
    420414It can be used on both active and passive tracers.  
    421 Nevertheless, the intrinsic diffusion of QCK makes its use risky in the vertical  
     415However, the intrinsic diffusion of QCK makes its use risky in the vertical  
    422416direction where the control of artificial diapycnal fluxes is of paramount importance.  
    423417Therefore the vertical flux is evaluated using the CEN2 scheme.  
    424 This no more ensure the positivity of the scheme. The use of TVD in the vertical  
    425 direction as for the UBS case should be implemented to maintain the property. 
     418This no longer guarantees the positivity of the scheme. The use of TVD in the vertical  
     419direction (as for the UBS case) should be implemented to restore this property. 
    426420 
    427421 
     
    430424% ------------------------------------------------------------------------------------------------------------- 
    431425\subsection   [Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm})] 
    432          {Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm}=.true.)} 
     426         {Piecewise Parabolic Method (PPM) (\np{ln\_traadv\_ppm}=true)} 
    433427\label{TRA_adv_ppm} 
    434428 
    435429The Piecewise Parabolic Method (PPM) proposed by Colella and Woodward (1984)  
    436 is based on a quadradic piecewise rebuilding. Like the QCK scheme, it is associated  
     430\sgacomment{reference?} 
     431is based on a quadradic piecewise construction. Like the QCK scheme, it is associated  
    437432with the ULTIMATE QUICKEST limiter \citep{Leonard1991}. It has been implemented  
    438433in \NEMO by G. Reffray (MERCATOR-ocean) but is not yet offered in the reference  
    439 version 3.0. 
     434version 3.3. 
    440435 
    441436% ================================================================ 
     
    446441\label{TRA_ldf} 
    447442%-----------------------------------------nam_traldf------------------------------------------------------ 
    448 \namdisplay{nam_traldf} 
     443\namdisplay{namtra_ldf} 
    449444%------------------------------------------------------------------------------------------------------------- 
    450445  
     
    465460% ------------------------------------------------------------------------------------------------------------- 
    466461\subsection   [Iso-level laplacian operator (lap) (\np{ln\_traldf\_lap})] 
    467          {Iso-level laplacian operator (lap) (\np{ln\_traldf\_lap}=.true.) } 
     462         {Iso-level laplacian operator (lap) (\np{ln\_traldf\_lap}=true) } 
    468463\label{TRA_ldf_lap} 
    469464 
     
    471466surfaces is given by:  
    472467\begin{equation} \label{Eq_tra_ldf_lap} 
    473 D_T^{lT} =\frac{1}{b_T} \left( \; 
     468D_T^{lT} =\frac{1}{b_tT} \left( \; 
    474469   \delta _{i}\left[ A_u^{lT} \; \frac{e_{2u}\,e_{3u}}{e_{1u}} \;\delta _{i+1/2} [T] \right]  
    475470+ \delta _{j}\left[ A_v^{lT} \;  \frac{e_{1v}\,e_{3v}}{e_{2v}} \;\delta _{j+1/2} [T] \right]  \;\right) 
    476471\end{equation} 
    477 where  $b_T= e_{1T}\,e_{2T}\,e_{3T}$  is the volume of $T$-cells.  
    478 It can be found in the \mdl{traadv\_lap} module. 
     472where  $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$  is the volume of $T$-cells.  
     473It is implemented in the \mdl{traadv\_lap} module. 
    479474 
    480475This lateral operator is computed in \mdl{traldf\_lap}. It is a \emph{horizontal}  
    481476operator ($i.e.$ acting along geopotential surfaces) in the $z$-coordinate with  
    482 or without partial step, but is simply an iso-level operator in the $s$-coordinate.  
    483 It is thus used when, in addition to \np{ln\_traldf\_lap}=.true., we have  
    484 \np{ln\_traldf\_level}=.true., or \np{ln\_traldf\_hor}=\np{ln\_zco}=.true..  
     477or without partial steps, but 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 \np{ln\_traldf\_hor}=\np{ln\_zco}=true.  
    485480In both cases, it significantly contributes to diapycnal mixing.  
    486481It is therefore not recommended. 
    487482 
    488483Note that  
    489 (a) In pure $z$-coordinate (\key{zco} is defined), $e_{3u}=e_{3v}=e_{3T}$,  
     484(a) In the pure $z$-coordinate (\key{zco} is defined), $e_{3u}$=$e_{3v}$=$e_{3t}$,  
    490485so that the vertical scale factors disappear from (\ref{Eq_tra_ldf_lap}) ;  
    491 (b) In partial step $z$-coordinate (\np{ln\_zps}=.true.), tracers in horizontally  
     486(b) In the partial step $z$-coordinate (\np{ln\_zps}=true), tracers in horizontally  
    492487adjacent cells are located at different depths in the vicinity of the bottom.  
    493488In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level  
     
    499494% ------------------------------------------------------------------------------------------------------------- 
    500495\subsection   [Rotated laplacian operator (iso) (\np{ln\_traldf\_lap})] 
    501          {Rotated laplacian operator (iso) (\np{ln\_traldf\_lap}=.true.)} 
     496         {Rotated laplacian operator (iso) (\np{ln\_traldf\_lap}=true)} 
    502497\label{TRA_ldf_iso} 
    503498 
     
    507502\begin{equation} \label{Eq_tra_ldf_iso} 
    508503\begin{split} 
    509  D_T^{lT} = \frac{1}{b_T}   & \left\{   \,\;\delta_i \left[   A_u^{lT}  \left(  
    510      \frac{e_{2u}\;e_{3u}}{e_{1u}} \,\delta_{i+1/2}[T] 
     504 D_T^{lT} = \frac{1}{b_t}   & \left\{   \,\;\delta_i \left[   A_u^{lT}  \left(  
     505     \frac{e_{2u}\,e_{3u}}{e_{1u}} \,\delta_{i+1/2}[T] 
    511506   - e_{2u}\;r_{1u} \,\overline{\overline{ \delta_{k+1/2}[T] }}^{\,i+1/2,k} 
    512507                                                     \right)   \right]   \right.    \\  
     
    525520 \end{split} 
    526521 \end{equation} 
    527 where $b_T= e_{1T}\,e_{2T}\,e_{3T}$  is the volume of $T$-cells,  
     522where $b_t$=$e_{1t}\,e_{2t}\,e_{3t}$  is the volume of $T$-cells,  
    528523$r_1$ and $r_2$ are the slopes between the surface of computation  
    529524($z$- or $s$-surfaces) and the surface along which the diffusion operator  
    530525acts ($i.e.$ horizontal or iso-neutral surfaces).  It is thus used when,  
    531 in addition to \np{ln\_traldf\_lap}= .true., we have \np{ln\_traldf\_iso}=.true.,  
    532 or both \np{ln\_traldf\_hor}=.true. and \np{ln\_zco}=.true.. The way these  
     526in addition to \np{ln\_traldf\_lap}= true, we have \np{ln\_traldf\_iso}=true,  
     527or both \np{ln\_traldf\_hor}=true and \np{ln\_zco}=true. The way these  
    533528slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom  
    534529and lateral boundaries, the turbulent fluxes of heat and salt are set to zero  
     
    546541of the tracer variance. Nevertheless the treatment performed on the slopes  
    547542(see \S\ref{LDF}) allows the model to run safely without any additional  
    548 background horizontal diffusion \citep{Guily2001}. An alternative scheme  
    549 developed by \cite{Griffies1998} which preserves both tracer and its variance  
    550 is currently been tested in \NEMO. It should be available in a forthcoming 
    551 release. 
    552  
    553 Note that in the partial step $z$-coordinate (\np{ln\_zps}=.true.), the horizontal  
     543background horizontal diffusion \citep{Guilyardi_al_CD01}. An alternative scheme  
     544developed by \cite{Griffies_al_JPO98} which preserves both tracer and its variance  
     545is also available in \NEMO (\np{ln\_traldf\_grif}=true). A complete description of  
     546the algorithm is given in App.\ref{Apdx_Griffies}. 
     547 
     548Note that in the partial step $z$-coordinate (\np{ln\_zps}=true), the horizontal  
    554549derivatives at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific  
    555550treatment. They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     
    559554% ------------------------------------------------------------------------------------------------------------- 
    560555\subsection   [Iso-level bilaplacian operator (bilap) (\np{ln\_traldf\_bilap})] 
    561          {Iso-level bilaplacian operator (bilap) (\np{ln\_traldf\_bilap}=.true.)} 
     556         {Iso-level bilaplacian operator (bilap) (\np{ln\_traldf\_bilap}=true)} 
    562557\label{TRA_ldf_bilap} 
    563558 
    564559The lateral fourth order bilaplacian operator on tracers is obtained by  
    565 applying (\ref{Eq_tra_ldf_lap}) twice. It requires an additional assumption  
    566 on boundary conditions: the first and third derivative terms normal to the  
    567 coast are set to zero. It is used when, in addition to \np{ln\_traldf\_bilap}=.true.,  
    568 we have \np{ln\_traldf\_level}=.true., or both \np{ln\_traldf\_hor}=.true. and  
    569 \np{ln\_zco}=.false.. In both cases, it can contribute diapycnal mixing,  
     560applying (\ref{Eq_tra_ldf_lap}) twice. The operator requires an additional assumption  
     561on boundary conditions: both first and third derivative terms normal to the  
     562coast are set to zero. It is used when, in addition to \np{ln\_traldf\_bilap}=true,  
     563we have \np{ln\_traldf\_level}=true, or both \np{ln\_traldf\_hor}=true and  
     564\np{ln\_zco}=false. In both cases, it can contribute diapycnal mixing,  
    570565although less than in the laplacian case. It is therefore not recommended. 
    571566 
     
    579574where $a=\sqrt{|A|}$ and $A<0$. This was a mistake: both formulations  
    580575ensure the total variance decrease, but the former requires a larger  
    581 number of code-lines. It will be corrected in a forthcoming release. 
     576number of code-lines. 
    582577 
    583578% ------------------------------------------------------------------------------------------------------------- 
     
    585580% ------------------------------------------------------------------------------------------------------------- 
    586581\subsection   [Rotated bilaplacian operator (bilapg) (\np{ln\_traldf\_bilap})] 
    587          {Rotated bilaplacian operator (bilapg) (\np{ln\_traldf\_bilap}=.true.)} 
     582         {Rotated bilaplacian operator (bilapg) (\np{ln\_traldf\_bilap}=true)} 
    588583\label{TRA_ldf_bilapg} 
    589584 
     
    591586applying (\ref{Eq_tra_ldf_iso}) twice. It requires an additional assumption  
    592587on boundary conditions: first and third derivative terms normal to the  
    593 coast, the bottom and the surface are set to zero. It can be found in the 
     588coast, normal to the bottom and normal to the surface are set to zero. It can be found in the 
    594589\mdl{traldf\_bilapg}. 
    595590 
    596 It is used when, in addition to \np{ln\_traldf\_bilap}=.true., we have  
    597 \np{ln\_traldf\_iso}= .true, or both \np{ln\_traldf\_hor}=.true. and \np{ln\_zco}=.true..  
    598 Nevertheless, this rotated bilaplacian operator has never been seriously  
    599 tested. No warranties that it is neither free of bugs or correctly formulated.  
     591It is used when, in addition to \np{ln\_traldf\_bilap}=true, we have  
     592\np{ln\_traldf\_iso}= .true, or both \np{ln\_traldf\_hor}=true and \np{ln\_zco}=true.  
     593This rotated bilaplacian operator has never been seriously  
     594tested. There are no guarantees that it is either free of bugs or correctly formulated.  
    600595Moreover, the stability range of such an operator will be probably quite  
    601 narrow, requiring a significantly smaller time-step than the one used on  
     596narrow, requiring a significantly smaller time-step than the one used with an 
    602597unrotated operator. 
    603598 
     
    618613\begin{equation} \label{Eq_tra_zdf} 
    619614\begin{split} 
    620 D^{vT}_T &= \frac{1}{e_{3T}} \; \delta_k \left[ \;\frac{A^{vT}_w}{e_{3w}}  \delta_{k+1/2}[T] \;\right]  
     615D^{vT}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vT}_w}{e_{3w}}  \delta_{k+1/2}[T] \;\right]  
    621616\\ 
    622 D^{vS}_T &= \frac{1}{e_{3T}} \; \delta_k \left[ \;\frac{A^{vS}_w}{e_{3w}}  \delta_{k+1/2}[S] \;\right]  
     617D^{vS}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vS}_w}{e_{3w}}  \delta_{k+1/2}[S] \;\right]  
    623618\end{split} 
    624619\end{equation} 
     
    641636The large eddy coefficient found in the mixed layer together with high  
    642637vertical resolution implies that in the case of explicit time stepping  
    643 (\np{ln\_zdfexp}=.true.) there would be too restrictive a constraint on  
     638(\np{ln\_zdfexp}=true) there would be too restrictive a constraint on  
    644639the time step. Therefore, the default implicit time stepping is preferred  
    645640for the vertical diffusion since it overcomes the stability constraint.  
    646 A forward time differencing scheme (\np{ln\_zdfexp}=.true.) using a time  
    647 splitting technique (\np{n\_zdfexp} $> 1$) is provided as an alternative.  
    648 Namelist variables \np{ln\_zdfexp} and \np{n\_zdfexp} apply to both  
     641A forward time differencing scheme (\np{ln\_zdfexp}=true) using a time  
     642splitting technique (\np{nn\_zdfexp} $> 1$) is provided as an alternative.  
     643Namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both  
    649644tracers and dynamics.  
    650645 
     
    667662enhance readability of the code. The two formulations are completely  
    668663equivalent; the forcing terms in trasbc are the surface fluxes divided by  
    669 the thickness of the top model layer. Following \citet{Roullet2000} the  
    670 forcing on an ocean tracer, $c$, can be split into two parts: $F_{ext}$, the  
    671 flux of tracer crossing the sea surface and not linked with the water  
    672 exchange with the atmosphere, $F_{wf}^d$, and $F_{wf}^i$ the forcing  
    673 on the tracer concentration associated with this water exchange.  
    674 The latter forcing has two components: a direct effect of change  
    675 in concentration associated with the tracer carried by the water flux,  
    676 and an indirect concentration/dilution effect : 
    677 \begin{equation*} 
    678 \begin{split} 
    679  F^C &= F_{ext} + F_{wf}^d                                          +F_{wf}^i    \\ 
    680         &= F_{ext} - \left( c_E \, E - c_p \,P - c_R \,R \right) +c\left( E-P-R \right) 
    681 \end{split} 
    682 \end{equation*}  
    683  
    684 \gmcomment{add here a description of the variable names used in the above equation} 
    685  
    686 Two cases must be distinguished, the nonlinear free surface case  
    687 (\key{vvl} is defined) and the linear free surface case. The first case  
    688 is simpler, because the indirect concentration/dilution effect is naturally  
    689 taken into account by letting the vertical scale factors vary in time.  
    690 The salinity of water exchanged at the surface is assumed to be zero,  
    691 so there is no salt flux at the free surface, except in the presence of sea ice.  
    692 The heat flux at the free surface is the sum of $F_{ext}$, the direct  
    693 heating/cooling (by the total non-penetrative heat flux) and $F_{wf}^e$  
    694 the heat carried by the water exchanged through the surface (evaporation,  
    695 precipitation, runoff). The temperature of precipitation is not well known.  
    696 In the model we assume that this water has the same temperature as  
    697 the sea surface temperature. The resulting forcing terms for temperature  
    698 T and salinity S are:  
    699 \begin{equation} \label{Eq_tra_forcing} 
     664the thickness of the top model layer.  
     665 
     666Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components ($i.e.$ atmosphere, sea-ice, land), 
     667the change in the heat and salt content of the surface layer of the ocean is due both  
     668to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) 
     669 and to the heat and salt content of the mass exchange. 
     670\sgacomment{ the following does not apply to the release to which this documentation is  
     671attached and so should not be included .... 
     672In a forthcoming release, these two parts, computed in the surface module (SBC), will be included directly 
     673in $Q_{ns}$, the surface heat flux and $F_{salt}$, the surface salt flux. 
     674The specification of these fluxes is further detailed in the SBC chapter (see \S\ref{SBC}).  
     675This change will provide a forcing formulation which is the same for any tracer (including temperature and salinity). 
     676  
     677In the current version, the situation is a little bit more complicated. } 
     678The surface module (\mdl{sbcmod}, see \S\ref{SBC}) provides the following  
     679forcing fields (used on tracers): 
     680 
     681$\bullet$ $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface  
     682(i.e. the difference between the total surface heat flux and the fraction of the short wave flux that  
     683penetrates into the water column, see \S\ref{TRA_qsr}) 
     684 
     685$\bullet$ \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation) 
     686 
     687$\bullet$ $\textit{emp}_S$, an equivalent mass flux taking into account the effect of ice-ocean mass exchange 
     688 
     689$\bullet$ \textit{rnf}, the mass flux associated with runoff (see \S\ref{SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
     690 
     691The $\textit{emp}_S$ field is not simply the budget of evaporation-precipitation+freezing-melting because  
     692the sea-ice is not currently embedded in the ocean but levitates above it. There is no mass 
     693exchanged between the sea-ice and the ocean. Instead we only take into account the salt 
     694flux associated with the non-zero salinity of sea-ice, and the concentration/dilution effect 
     695due to the freezing/melting (F/M) process. These two parts of the forcing are then converted into  
     696an equivalent mass flux given by $\textit{emp}_S - \textit{emp}$. As a result of this mess,  
     697the surface boundary condition on temperature and salinity is applied as follows: 
     698 
     699In the nonlinear free surface case (\key{vvl} is defined): 
     700\begin{equation} \label{Eq_tra_sbc} 
    700701\begin{aligned} 
    701  &F^T =\frac{Q_{ns} }{\rho _o \;C_p \,e_{3T} }-\frac{\text{EMP}\;\left. T  
    702 \right|_{k=1} }{e_{3T} }  & \\  
    703 \\ 
    704 & F^S =\frac{\text{EMP}_S\;\left. S \right|_{k=1} }{e_{3T} }   & 
     702 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }    
     703           &\overline{ \left( Q_{ns} - \textit{emp}\;C_p\,\left. T \right|_{k=1} \right) }^t  & \\  
     704% 
     705& F^S =\frac{ 1 }{\rho _o \,\left. e_{3t} \right|_{k=1} }  
     706           &\overline{ \left( (\textit{emp}_S - \textit{emp})\;\left. S \right|_{k=1}  \right) }^t   & \\    
    705707 \end{aligned} 
    706708\end{equation}  
    707 where EMP is the freshwater budget (evaporation minus precipitation  
    708 minus river runoff) which forces the ocean volume, $Q_{ns}$ is the  
    709 non-penetrative part of the net surface heat flux (difference between  
    710 the total surface heat flux and the fraction of the short wave flux that  
    711 penetrates into the water column), the product EMP$_S\;.\left. S \right|_{k=1}$  
    712 is  the ice-ocean salt flux, and $\left. S\right|_{k=1}$ is the sea surface  
    713 salinity (\textit{SSS}). The total salt content is conserved in this formulation  
    714 (except for the effect of the Asselin filter). 
    715  
    716 %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?     ===> gm :  NO to be added at NOCS  
    717  
    718 In the second case (linear free surface), the vertical scale factors are  
    719 fixed in time so that the concentration/dilution effect must be added in  
    720 the \mdl{trasbc} module. Because of the hypothesis made for the  
    721 temperature of precipitation and runoffs, $F_{wf}^e +F_{wf}^i =0$  
    722 for temperature. The resulting forcing term for temperature is:  
    723 \begin{equation} \label{Eq_tra_forcing_q} 
    724 F^T=\frac{Q_{ns} }{\rho _o \;C_p \,e_{3T} } 
     709 
     710In the linear free surface case (\key{vvl} not defined): 
     711\begin{equation} \label{Eq_tra_sbc_lin} 
     712\begin{aligned} 
     713 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }  &\overline{ Q_{ns} }^t  & \\  
     714% 
     715& F^S =\frac{ 1 }{\rho _o \,\left. e_{3t} \right|_{k=1} }  
     716           &\overline{ \left( \textit{emp}_S\;\left. S \right|_{k=1}  \right) }^t   & \\    
     717 \end{aligned} 
    725718\end{equation}  
    726  
    727 The salinity forcing is still given by \eqref{Eq_tra_forcing} but the  
    728 definition of EMP$_S$ is different: it is the total surface freshwater  
    729 budget (evaporation minus precipitation minus river runoff plus  
    730 the rate of change of the sea ice thickness). The total salt content  
    731 is not exactly conserved (\citet{Roullet2000}.  
    732 See also \S\ref{PE_free_surface}). 
    733  
    734 In the case of the rigid lid approximation, the surface salinity forcing $F^s$  
    735 is also expressed by \eqref{Eq_tra_forcing}, but now the global integral of  
    736 the product of EMP and S, is not compensated by the advection of fluid  
    737 through the top level: this is because in the rigid lid case \textit{w(k=1) = 0}  
    738 (in contrast to the linear free surface case). As a result, even if the budget  
    739 of \textit{EMP} is zero on average over the whole ocean domain, the  
    740 associated salt flux is not, since sea-surface salinity and \textit{EMP} are  
    741 intrinsically correlated (high \textit{SSS} are found where evaporation is  
    742 strong whilst low \textit{SSS} is usually associated with high precipitation  
    743 or river runoff). 
    744  
    745 The $Q_{ns} $ and \textit{EMP} fields are defined and updated in the  
    746 \mdl{sbcmod} module (see \S\ref{SBC}). 
     719where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps  
     720($t-\rdt/2$ and $t+\rdt/2$). Such time averaging prevents the  
     721divergence of odd and even time step (see \S\ref{STP}). 
     722 
     723The two set of equations, \eqref{Eq_tra_sbc} and \eqref{Eq_tra_sbc_lin}, are obtained  
     724by assuming that the temperature of precipitation and evaporation are equal to 
     725the ocean surface temperature and that their salinity is zero. Therefore, the heat content 
     726of the \textit{emp} budget must be added to the temperature equation in the variable volume case,  
     727while it does not appear in the constant volume case. Similarly, the \textit{emp} budget affects  
     728the ocean surface salinity in the constant volume case (through the concentration dilution effect) 
     729while it does not appears explicitly in the variable volume case since salinity change will be 
     730induced by volume change. In both constant and variable volume cases, surface salinity  
     731will change with ice-ocean salt flux and F/M flux (both contained in $\textit{emp}_S - \textit{emp}$) without mass exchanges. 
     732 
     733Note that the concentration/dilution effect due to F/M is computed using 
     734a constant ice salinity as well as a constant ocean salinity.  
     735This approximation suppresses the correlation between \textit{SSS}  
     736and F/M flux, allowing the ice-ocean salt exchanges to be conservative. 
     737Indeed, if this approximation is not made, even if the F/M budget is zero  
     738on average over the whole ocean domain and over the seasonal cycle,  
     739the associated salt flux is not zero, since sea-surface salinity and F/M flux are  
     740intrinsically correlated (high \textit{SSS} are found where freezing is  
     741strong whilst low \textit{SSS} is usually associated with high melting areas). 
     742 
     743Even using this approximation, an exact conservation of heat and salt content  
     744is only achieved in the variable volume case. In the constant volume case,  
     745there is a small imbalance associated with the product $(\partial_t\eta - \textit{emp}) * \textit{SSS}$. 
     746Nevertheless, the salt content variation is quite small and will not induce 
     747a long term drift as there is no physical reason for $(\partial_t\eta - \textit{emp})$  
     748and \textit{SSS} to be correlated \citep{Roullet_Madec_JGR00}.  
     749Note that, while quite small, the imbalance in the constant volume case is larger  
     750than the imbalance associated with the Asselin time filter \citep{Leclair_Madec_OM09}.  
     751This is the reason why the modified filter is not applied in the constant volume case. 
    747752 
    748753% ------------------------------------------------------------------------------------------------------------- 
     
    753758\label{TRA_qsr} 
    754759%--------------------------------------------namqsr-------------------------------------------------------- 
    755 \namdisplay{namqsr} 
     760\namdisplay{namtra_qsr} 
    756761%-------------------------------------------------------------------------------------------------------------- 
    757762 
    758 When the penetrative solar radiation option is used (\np{ln\_flxqsr}=.true.),  
    759 the solar radiation penetrates the top few meters of the ocean, otherwise  
    760 all the heat flux is absorbed in the first ocean level (\np{ln\_flxqsr}=.false.).  
     763When the penetrative solar radiation option is used (\np{ln\_flxqsr}=true),  
     764the solar radiation penetrates the top few tens of meters of the ocean. If it is not used  
     765(\np{ln\_flxqsr}=false) all the heat flux is absorbed in the first ocean level.  
    761766Thus, in the former case a term is added to the time evolution equation of  
    762 temperature \eqref{Eq_PE_tra_T} whilst the surface boundary condition is  
     767temperature \eqref{Eq_PE_tra_T} and the surface boundary condition is  
    763768modified to take into account only the non-penetrative part of the surface  
    764769heat flux: 
     
    769774\end{split} 
    770775\end{equation} 
    771  
    772 where $I$ is the downward irradiance. The additional term in \eqref{Eq_PE_qsr}  
    773 is discretized as follows: 
     776where $Q_{sr}$ is the penetrative part of the surface heat flux ($i.e.$ the shortwave radiation)  
     777and $I$ is the downward irradiance ($\left. I \right|_{z=\eta}=Q_{sr}$).  
     778The additional term in \eqref{Eq_PE_qsr} is discretized as follows: 
    774779\begin{equation} \label{Eq_tra_qsr} 
    775 \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \equiv \frac{1}{\rho_o\, C_p\, e_{3T}} \delta_k \left[ I_w \right] 
    776 \end{equation} 
    777  
    778 A formulation involving two extinction coefficients is assumed for the  
    779 downward irradiance $I$ \citep{Paulson1977}: 
     780\frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \equiv \frac{1}{\rho_o\, C_p\, e_{3t}} \delta_k \left[ I_w \right] 
     781\end{equation} 
     782 
     783The shortwave radiation,  $Q_{sr}$, consists of energy distributed across a wide spectral range.  
     784The ocean is strongly absorbing for wavelengths longer than 700~nm and these  
     785wavelengths contribute to heating the upper few tens of centimetres. The fraction of $Q_{sr}$  
     786that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ (specified  
     787through namelist parameter \np{rn\_abs}).  It is assumed to penetrate the ocean  
     788with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$,  
     789of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn\_si0} in the namtra\_qsr namelist). 
     790For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy  
     791propagates to larger depths where it contributes to  
     792local heating.  
     793The way this second part of the solar energy penetrates into the ocean depends on  
     794which formulation is chosen. In the simple 2-waveband light penetration scheme  (\np{ln\_qsr\_2bd}=true)  
     795a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths,  
     796leading to the following expression  \citep{Paulson1977}: 
    780797\begin{equation} \label{Eq_traqsr_iradiance} 
    781 I(z) = Q_{sr} \left[Re^{-z / \xi_1} + \left( 1-R\right) e^{-z / \xi_2} \right] 
    782 \end{equation} 
    783 where $Q_{sr}$ is the penetrative part of the surface heat flux,  
    784 $\xi_1$ and $\xi_2$ are two extinction length scales and $R$  
    785 determines the relative contribution of the two terms.  
    786 The default values used correspond to a Type I water in Jerlov's [1968]  
    787 % 
    788 \gmcomment : Jerlov reference to be added 
    789 % 
    790 classification: $\xi_1 = 0.35~m$, $\xi_2 = 23~m$ and $R = 0.58$  
    791 (corresponding to \np{xsi1}, \np{xsi2} and \np{rabs} namelist parameters,  
    792 respectively). $I$ is masked (no flux through the ocean bottom),  
    793 so all the solar radiation that reaches the last ocean level is absorbed  
    794 in that level. The trend in \eqref{Eq_tra_qsr} associated with the  
    795 penetration of the solar radiation is added to the temperature trend,  
    796 and the surface heat flux is modified in routine \mdl{traqsr}.  
    797 Note that in the $z$-coordinate, the depth of $T-$levels depends  
    798 on the single variable $k$. A one dimensional array of the coefficients  
    799 $gdsr(k) = Re^{-z_w (k)/\xi_1} + (1-R)e^{-z_w (k)/\xi_2}$ can then  
    800 be computed once and saved in memory. Moreover \textit{nksr},  
    801 the level at which $gdrs$ becomes negligible (less than the  
    802 computer precision) is computed once, and the trend associated  
    803 with the penetration of the solar radiation is only added until that level.  
    804 Finally, note that when the ocean is shallow (< 200~m), part of the  
     798I(z) = Q_{sr} \left[Re^{-z / \xi_0} + \left( 1-R\right) e^{-z / \xi_1} \right] 
     799\end{equation} 
     800where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths.   
     801It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter.  
     802The set of default values ($\xi_0$, $\xi_1$, $R$) corresponds to a Type I water in  
     803Jerlov's (1968) classification (oligotrophic waters). 
     804 
     805Such assumptions have been shown to provide a very crude and simplistic  
     806representation of observed light penetration profiles (\cite{Morel_JGR88}, see also  
     807Fig.\ref{Fig_traqsr_irradiance}). Light absorption in the ocean depends on  
     808particle concentration and is spectrally selective. \cite{Morel_JGR88} has shown  
     809that an accurate representation of light penetration can be provided by a 61 waveband  
     810formulation. Unfortunately, such a model is very computationally expensive.  
     811Thus, \cite{Lengaigne_al_CD07} have constructed a simplified version of this  
     812formulation in which visible light is split into three wavebands: blue (400-500 nm),  
     813green (500-600 nm) and red (600-700nm). For each wave-band, the chlorophyll-dependent  
     814attenuation coefficient is fitted to the coefficients computed from the full spectral model  
     815of \cite{Morel_JGR88} (as modified by \cite{Morel_Maritorena_JGR01}), assuming  
     816the same power-law relationship. As shown in Fig.\ref{Fig_traqsr_irradiance},  
     817this formulation, called RGB (Red-Green-Blue), reproduces quite closely  
     818the light penetration profiles predicted by the full spectal model, but with much greater  
     819computational efficiency. The 2-bands formulation does not reproduce the full model very well.  
     820 
     821The RGB formulation is used when \np{ln\_qsr\_rgb}=true. The RGB attenuation coefficients 
     822($i.e.$ the inverses of the extinction length scales) are tabulated over 61 nonuniform  
     823chlorophyll classes ranging from 0.01 to 10 g.Chl/L (see the routine \rou{trc\_oce\_rgb}  
     824in \mdl{trc\_oce} module). Three types of chlorophyll can be chosen in the RGB formulation: 
     825(1) a constant 0.05 g.Chl/L value everywhere (\np{nn\_chdta}=0) ; (2) an observed  
     826time varying chlorophyll (\np{nn\_chdta}=1) ; (3) simulated time varying chlorophyll 
     827by TOP biogeochemical model (\np{ln\_qsr\_bio}=true). In the latter case, the RGB  
     828formulation is used to calculate both the phytoplankton light limitation in PISCES  
     829or LOBSTER and the oceanic heating rate.  
     830 
     831The trend in \eqref{Eq_tra_qsr} associated with the penetration of the solar radiation  
     832is added to the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}.  
     833 
     834When the $z$-coordinate is preferred to the $s$-coordinate, the depth of $w-$levels does  
     835not significantly vary with location. The level at which the light has been totally  
     836absorbed ($i.e.$ it is less than the computer precision) is computed once,  
     837and the trend associated with the penetration of the solar radiation is only added down to that level.  
     838Finally, note that when the ocean is shallow ($<$ 200~m), part of the  
    805839solar radiation can reach the ocean floor. In this case, we have  
    806840chosen that all remaining radiation is absorbed in the last ocean  
    807 level ($i.e.$ $I_w$ is masked).  
    808  
    809 When coupling with a biological model (for example PISCES or LOBSTER),  
    810 it is possible to calculate the light attenuation using information from  
    811 the biology model. Without biological model, it is still possible to introduce  
    812 a horizontal variation of the light attenuation by using the observed ocean  
    813 surface color. At the time of writing, the latter has not been implemented 
    814  in the reference version. 
    815 % 
    816 \gmcomment{  {yellow}{case 4 bands and bio-coupling to add !!!}  } 
    817 % 
     841level ($i.e.$ $I$ is masked).  
     842 
     843%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     844\begin{figure}[!t] \label{Fig_traqsr_irradiance}  \begin{center} 
     845\includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_TRA_Irradiance.pdf} 
     846\caption{Penetration profile of the downward solar irradiance  
     847calculated by four models. Two waveband chlorophyll-independent formulation (blue),  
     848a chlorophyll-dependent monochromatic formulation (green), 4 waveband RGB formulation (red),  
     84961 waveband Morel (1988) formulation (black) for a chlorophyll concentration of  
     850(a) Chl=0.05 mg/m$^3$ and (b) Chl=0.5 mg/m$^3$. From \citet{Lengaigne_al_CD07}.} 
     851\end{center}   \end{figure} 
     852%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    818853 
    819854% ------------------------------------------------------------------------------------------------------------- 
     
    824859\label{TRA_bbc} 
    825860%--------------------------------------------nambbc-------------------------------------------------------- 
    826 \namdisplay{nambbc} 
     861\namdisplay{namtra_bbc} 
    827862%-------------------------------------------------------------------------------------------------------------- 
    828863%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    829864\begin{figure}[!t] \label{Fig_geothermal}  \begin{center} 
    830865\includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_TRA_geoth.pdf} 
    831 \caption{Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OSD08}. 
    832 It is inferred from the age of the sea floor and the formulae of \citet{Stein1992}.} 
     866\caption{Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 
     867It is inferred from the age of the sea floor and the formulae of \citet{Stein_Stein_Nat92}.} 
    833868\end{center}   \end{figure} 
    834869%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    840875non-zero heat flux across the seafloor that is associated with solid  
    841876earth cooling. This flux is weak compared to surface fluxes (a mean  
    842 global value of $\sim0.1\;W/m^2$ \citep{Stein1992}), but it is  
    843 systematically positive and acts on the densest water masses.  
     877global value of $\sim0.1\;W/m^2$ \citep{Stein_Stein_Nat92}), but it is  
     878systematically positive \sgacomment{positive definite?} and acts on the densest water masses.  
    844879Taking this flux into account in a global ocean model increases 
    845880the deepest overturning cell ($i.e.$ the one associated with the Antarctic  
    846 Bottom Water) by a few Sverdrups  \citep{Emile-Geay_Madec_OSD08}.  
    847  
    848 The presence or not of geothermal heating is controlled by the namelist  
    849 parameter  \np{ngeo\_flux}. If this parameter is set to 1, a constant  
     881Bottom Water) by a few Sverdrups  \citep{Emile-Geay_Madec_OS09}.  
     882 
     883The presence of geothermal heating is controlled by the namelist  
     884parameter  \np{nn\_geoflx}. When this parameter is set to 1, a constant  
    850885geothermal heating is introduced whose value is given by the  
    851 \np{ngeo\_flux\_const}, which is also a namelist parameter. If it is set to 2,  
     886\np{nn\_geoflx\_cst}, which is also a namelist parameter. When it is set to 2,  
    852887a spatially varying geothermal heat flux is introduced which is provided  
    853 in the geothermal\_heating.nc NetCDF file (Fig.\ref{Fig_geothermal}). 
     888in the \ifile{geothermal\_heating} NetCDF file (Fig.\ref{Fig_geothermal}). 
    854889 
    855890% ================================================================ 
    856891% Bottom Boundary Layer 
    857892% ================================================================ 
    858 \section  [Bottom Boundary Layer (\textit{trabbl}, \textit{trabbl\_adv} )] 
    859       {Bottom Boundary Layer (\mdl{trabbl}, \mdl{trabbl\_adv})} 
     893\section  [Bottom Boundary Layer (\mdl{trabbl} - \key{trabbl})] 
     894      {Bottom Boundary Layer (\mdl{trabbl} - \key{trabbl})} 
    860895\label{TRA_bbl} 
    861896%--------------------------------------------nambbl--------------------------------------------------------- 
     
    865900In a $z$-coordinate configuration, the bottom topography is represented by a  
    866901series of discrete steps. This is not adequate to represent gravity driven  
    867 downslope flows. Such flows arise downstream of sills such as the Strait of  
    868 Gibraltar, Bab El Mandeb, or Denmark Strait, where dense water formed in  
    869 marginal seas flows into a basin filled with less dense water. The amount of  
    870 entrainment that occurs in these gravity plumes is critical in determining the  
    871 density and volume flux of the densest waters of the ocean, such as  
    872 Antarctic Bottom Water, or North Atlantic Deep Water. $z$-coordinate  
    873 models tend to overestimate the entrainment, because the gravity flow is  
    874 mixed down vertically by convection as it goes ``downstairs'' following the  
    875 step topography, sometimes over a thickness much larger than the thickness  
    876 of the observed gravity plume. A similar problem occurs in the $s$-coordinate when  
    877 the thickness of the bottom level varies in large proportions downstream of  
    878 a sill \citep{Willebrand2001}, and the thickness of the plume is not resolved.  
    879  
    880 The idea of the bottom boundary layer (BBL) parameterisation first introduced by  
    881 \citet{BeckDos1998} is to allow a direct communication between  
     902downslope flows. Such flows arise either downstream of sills such as the Strait of  
     903Gibraltar or Denmark Strait, where dense water formed in marginal seas flows  
     904into a basin filled with less dense water, or along the continental slope when dense  
     905water masses are formed on a continental shelf. The amount of entrainment  
     906that occurs in these gravity plumes is critical in determining the density  
     907and volume flux of the densest waters of the ocean, such as Antarctic Bottom Water,  
     908or North Atlantic Deep Water. $z$-coordinate models tend to overestimate the  
     909entrainment, because the gravity flow is mixed vertically by convection  
     910as it goes ''downstairs'' following the step topography, sometimes over a thickness  
     911much larger than the thickness of the observed gravity plume. A similar problem  
     912occurs in the $s$-coordinate when the thickness of the bottom level varies rapidly  
     913downstream of a sill \citep{Willebrand_al_PO01}, and the thickness  
     914of the plume is not resolved.  
     915 
     916The idea of the bottom boundary layer (BBL) parameterisation, first introduced by  
     917\citet{Beckmann_Doscher1997}, is to allow a direct communication between  
    882918two adjacent bottom cells at different levels, whenever the densest water is  
    883 located above the less dense water. The communication can be by a diffusive  
    884 (diffusive BBL), advective fluxes (advective BBL), or both. In the current  
     919located above the less dense water. The communication can be by a diffusive flux 
     920(diffusive BBL), an advective flux (advective BBL), or both. In the current  
    885921implementation of the BBL, only the tracers are modified, not the velocities.  
    886922Furthermore, it only connects ocean bottom cells, and therefore does not include  
    887 the improvment proposed by \citet{Campin_Goosse_Tel99}. 
     923the improvements introduced by \citet{Campin_Goosse_Tel99}. 
    888924 
    889925% ------------------------------------------------------------------------------------------------------------- 
    890926%        Diffusive BBL 
    891927% ------------------------------------------------------------------------------------------------------------- 
    892 \subsection{Diffusive Bottom Boundary layer (\key{bbl\_diff})} 
     928\subsection{Diffusive Bottom Boundary layer (\np{nn\_bbl\_ldf}=1)} 
    893929\label{TRA_bbl_diff} 
    894930 
    895 When applying sigma-diffusion (\key{trabbl} is defined), the diffusive flux between  
    896 two adjacent cells living at the ocean bottom is given by  
     931When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1),  
     932the diffusive flux between two adjacent cells at the ocean floor is given by  
    897933\begin{equation} \label{Eq_tra_bbl_diff} 
    898934{\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T 
    899935\end{equation}  
    900936with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells,  
    901 and  $A_l^\sigma $ the lateral diffusivity in the BBL. Following \citet{BeckDos1998},  
    902 the latter is prescribed with a spatial dependence, $e.g.$ in the conditional form 
     937and  $A_l^\sigma$ the lateral diffusivity in the BBL. Following \citet{Beckmann_Doscher1997},  
     938the latter is prescribed with a spatial dependence, $i.e.$ in the conditional form 
    903939\begin{equation} \label{Eq_tra_bbl_coef} 
    904940A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} 
     
    909945\end{equation}  
    910946where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist  
    911 parameter \np{atrbbl}. $A_{bbl}$ is usually set to a value much larger  
    912 than the one used on lateral mixing in open ocean.  
    913 Note that in practice, \eqref{Eq_tra_bbl_coef} constraint is applied  
    914 separately in the two horizontal directions, and the density gradient in  
    915 \eqref{Eq_tra_bbl_coef} is evaluated at $\overline{H}^i$ ($\overline{H}^j$)  
    916 using the along bottom mean temperature and salinity.  
     947parameter \np{rn\_ahtbbl} and usually set to a value much larger  
     948than the one used for lateral mixing in the open ocean. The constraint in \eqref{Eq_tra_bbl_coef}  
     949implies that sigma-like diffusion only occurs when the density above the sea floor, at the top of  
     950the slope, is larger than in the deeper ocean (see green arrow in Fig.\ref{Fig_bbl}).  
     951In practice, this constraint is applied separately in the two horizontal directions,  
     952and the density gradient in \eqref{Eq_tra_bbl_coef} is evaluated with the log gradient formulation:  
     953\begin{equation} \label{Eq_tra_bbl_Drho} 
     954   \nabla_\sigma \rho / \rho = \alpha \,\nabla_\sigma T + \beta   \,\nabla_\sigma S 
     955\end{equation}  
     956where $\rho$, $\alpha$ and $\beta$ are functions of $\overline{T}^\sigma$,  
     957$\overline{S}^\sigma$ and $\overline{H}^\sigma$, the along bottom mean temperature,  
     958salinity and depth, respectively. 
    917959 
    918960% ------------------------------------------------------------------------------------------------------------- 
    919961%        Advective BBL 
    920962% ------------------------------------------------------------------------------------------------------------- 
    921 \subsection   {Advective Bottom Boundary Layer (\key{bbl\_adv})} 
     963\subsection   {Advective Bottom Boundary Layer  (\np{nn\_bbl\_adv}= 1 or 2)} 
    922964\label{TRA_bbl_adv} 
    923965 
     966\sgacomment{"downsloping flow" has been replaced by "downslope flow" in the following 
     967if this is not what is meant then "downwards sloping flow" is also a possibility"} 
    924968 
    925969%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    926970\begin{figure}[!t] \label{Fig_bbl}  \begin{center} 
    927 \includegraphics[width=0.8\textwidth]{./TexFiles/Figures/Fig_BBL_adv.pdf} 
    928 \caption{Advective Bottom Boundary Layer.} 
     971\includegraphics[width=0.7\textwidth]{./TexFiles/Figures/Fig_BBL_adv.pdf} 
     972\caption{Advective/diffusive Bottom Boundary Layer. The BBL parameterisation is  
     973activated when $\rho^i_{kup}$ is larger than $\rho^{i+1}_{kdnw}$.  
     974Red arrows indicate the additional overturning circulation due to the advective BBL.  
     975The transport of the downslope flow is defined either as the transport of the bottom  
     976ocean cell (black arrow), or as a function of the along slope density gradient.  
     977The green arrow indicates the diffusive BBL flux directly connecting $kup$ and $kdwn$ 
     978ocean bottom cells. 
     979connection} 
    929980\end{center}   \end{figure} 
    930981%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    931982 
     983 
     984%!!      nn_bbl_adv = 1   use of the ocean velocity as bbl velocity 
     985%!!      nn_bbl_adv = 2   follow Campin and Goosse (1999) implentation 
     986%!!        i.e. transport proportional to the along-slope density gradient 
     987 
    932988%%%gmcomment   :  this section has to be really written 
    933989 
    934 The advective BBL is in fact not only an advective one but include a diffusive  
    935 component as we chose an upstream scheme to perform the advection within  
    936 the BBL. The associated diffusion only act in the stream direction and is  
    937 proportional to the velocity. 
    938  
    939 When applying sigma-advection (\key{trabbl\_adv} defined), the advective  
    940 flux between two adjacent cells living at the ocean bottom is given by  
    941 \begin{equation} \label{Eq_tra_bbl_fadv} 
    942 {\rm {\bf F}}_\sigma={\rm {\bf U}}_h^\sigma \; \overline{T}^\sigma 
    943 \end{equation}  
    944 with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells,  
    945 and  $A_l^\sigma$ the lateral diffusivity in the BBL. Following \citet{BeckDos1998},  
    946 the latter is prescribed with a spatial dependence, $e.g.$ in the conditional form 
    947 \begin{equation} \label{Eq_tra_bbl_Aadv} 
    948 A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} 
    949  A_{bbl} \quad \quad \mbox{if}     \quad    \nabla_\sigma \rho \cdot \nabla H<0  
    950               \quad \quad \mbox{and} \quad         {\rm {\bf U}}_h  \cdot \nabla H<0 \\  
    951  \\ 
    952  0\quad \quad \;\,\mbox{otherwise} \\  
    953  \end{array}} \right. 
    954 \end{equation}  
     990When applying an advective BBL (\np{nn\_bbl\_adv} = 1 or 2), an overturning  
     991circulation is added which connects two adjacent bottom grid-points only if dense  
     992water overlies less dense water on the slope. The density difference causes dense  
     993water to move down the slope.  
     994 
     995\np{nn\_bbl\_adv} = 1 : the downslope velocity is chosen to be the Eulerian 
     996ocean velocity just above the topographic step (see black arrow in Fig.\ref{Fig_bbl})  
     997\citep{Beckmann_Doscher1997}. It is a \textit{conditional advection}, that is, advection 
     998is allowed only if dense water overlies less dense water on the slope ($i.e.$  
     999$\nabla_\sigma \rho  \cdot  \nabla H<0$) and if the velocity is directed towards  
     1000greater depth ($i.e.$ $\vect{U}  \cdot  \nabla H>0$). 
     1001 
     1002\np{nn\_bbl\_adv} = 2 : the downslope velocity is chosen to be proportional to $\Delta \rho$, 
     1003the density difference between the higher cell and lower cell densities \citep{Campin_Goosse_Tel99}. 
     1004The advection is allowed only  if dense water overlies less dense water on the slope ($i.e.$  
     1005$\nabla_\sigma \rho  \cdot  \nabla H<0$). For example, the resulting transport of the  
     1006downslope flow, here in the $i$-direction (Fig.\ref{Fig_bbl}), is simply given by the  
     1007following expression: 
     1008\begin{equation} \label{Eq_bbl_Utr} 
     1009 u^{tr}_{bbl} = \gamma \, g \frac{\Delta \rho}{\rho_o}  e_{1u} \; min \left( {e_{3u}}_{kup},{e_{3u}}_{kdwn} \right) 
     1010\end{equation} 
     1011where $\gamma$, expressed in seconds, is the coefficient of proportionality  
     1012provided as \np{rn\_gambbl}, a namelist parameter, and \textit{kup} and \textit{kdwn}  
     1013are the vertical index of the higher and lower cells, respectively. 
     1014The parameter $\gamma$ should take a different value for each bathymetric  
     1015step, but for simplicity, and because no direct estimation of this parameter is  
     1016available, a uniform value has been assumed. The possible values for $\gamma$  
     1017range between 1 and $10~s$ \citep{Campin_Goosse_Tel99}.   
     1018 
     1019Scalar properties are advected by this additional transport $( u^{tr}_{bbl}, v^{tr}_{bbl} )$  
     1020using the upwind scheme. Such a diffusive advective scheme has been chosen  
     1021to mimic the entrainment between the downslope plume and the surrounding  
     1022water at intermediate depths. The entrainment is replaced by the vertical mixing  
     1023implicit in the advection scheme. Let us consider as an example the  
     1024case displayed in Fig.\ref{Fig_bbl} where the density at level $(i,kup)$ is  
     1025larger than the one at level $(i,kdwn)$. The advective BBL scheme 
     1026modifies the tracer time tendency of the ocean cells near the  
     1027topographic step by the downslope flow \eqref{Eq_bbl_dw},  
     1028the horizontal \eqref{Eq_bbl_hor}  and the upward \eqref{Eq_bbl_up}  
     1029return flows as follows:  
     1030\begin{align}  
     1031\partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} 
     1032                                     +  \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}}  \left( T^{sh}_{kup} - T^{do}_{kdw} \right)  \label{Eq_bbl_dw} \\ 
     1033% 
     1034\partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup}  
     1035               + \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}}   \left( T^{do}_{kup} - T^{sh}_{kup} \right)   \label{Eq_bbl_hor} \\ 
     1036% 
     1037\intertext{and for $k =kdw-1,\;..., \; kup$ :}  
     1038% 
     1039\partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k} 
     1040               + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   \left( T^{do}_{k+1} - T^{sh}_{k} \right)   \label{Eq_bbl_up} 
     1041\end{align} 
     1042where $b_t$ is the $T$-cell volume.  
     1043 
     1044Note that the BBL transport, $( u^{tr}_{bbl}, v^{tr}_{bbl} )$, is available in  
     1045the model outputs. It has to be used to compute the effective velocity  
     1046as well as the effective overturning circulation. 
    9551047 
    9561048% ================================================================ 
     
    9601052      {Tracer damping (\mdl{tradmp})} 
    9611053\label{TRA_dmp} 
    962 %--------------------------------------------namtdp----------------------------------------------------- 
    963 \namdisplay{namtdp} 
     1054%--------------------------------------------namtra_dmp------------------------------------------------- 
     1055\namdisplay{namtra_dmp} 
    9641056%-------------------------------------------------------------------------------------------------------------- 
    9651057 
     
    9691061\begin{split} 
    9701062 \frac{\partial T}{\partial t}=\;\cdots \;-\gamma \,\left( {T-T_o } \right)  \\ 
    971 \\  
    9721063 \frac{\partial S}{\partial t}=\;\cdots \;-\gamma \,\left( {S-S_o } \right)  
    9731064 \end{split} 
     
    9761067are given temperature and salinity fields (usually a climatology).  
    9771068The restoring term is added when \key{tradmp} is defined.  
    978 It also requires that both \key{temdta} and \key{saldta} are defined  
     1069It also requires that both \key{dtatem} and \key{dtasal} are defined  
    9791070($i.e.$ that $T_o$ and $S_o$ are read). The restoring coefficient  
    980 $S_o$ is a three-dimensional array initialized by the user in routine  
     1071$\gamma$ is a three-dimensional array initialized by the user in routine  
    9811072\rou{dtacof} also located in module \mdl{tradmp}.  
    9821073 
     
    9881079field for a passive tracer study). The first case applies to regional  
    9891080models that have artificial walls instead of open boundaries.  
    990 In the vicinity of these walls, $S_o$ takes large values (equivalent to  
     1081In the vicinity of these walls, $\gamma$ takes large values (equivalent to  
    9911082a time scale of a few days) whereas it is zero in the interior of the  
    9921083model domain. The second case corresponds to the use of the robust  
    9931084diagnostic method \citep{Sarmiento1982}. It allows us to find the velocity  
    994 field consistent with the model dynamics whilst having a $T$-$S$ field  
    995 close to a given climatological field ($T_o -S_o$). The time scale  
     1085field consistent with the model dynamics whilst having a $T$, $S$ field  
     1086close to a given climatological field ($T_o$, $S_o$). The time scale  
    9961087associated with $S_o$ is generally not a constant but spatially varying  
    9971088in order to respect other properties. For example, it is usually set to zero  
    9981089in the mixed layer (defined either on a density or $S_o$ criterion)  
    999 \citep{Madec1996} and in the equatorial region  
    1000 \citep{Reverdin1991, Fujio1991, MartiTh1992} since these two regions  
    1001 have a short time scale of adjustment; while smaller $S_o$ are used  
     1090\citep{Madec_al_JPO96} and in the equatorial region  
     1091\citep{Reverdin1991, Fujio1991, Marti_PhD92} since these two regions  
     1092have a short time scale of adjustment; while smaller $\gamma$ are used  
    10021093in the deep ocean where the typical time scale is long \citep{Sarmiento1982}.  
    10031094In addition the time scale is reduced (even to zero) along the western  
    10041095boundary to allow the model to reconstruct its own western boundary  
    1005 structure in equilibrium with its physics. The choice of a  
    1006 Newtonian damping acting in the mixed layer or not is controlled by 
    1007 namelist parameter \np{nmldmp}. 
     1096structure in equilibrium with its physics.  
     1097The choice of the shape of the Newtonian damping is controlled by two  
     1098namelist parameters \np{??} and \np{nn\_zdmp}. The former allows us to specify: the  
     1099width of the equatorial band in which no damping is applied; a decrease  
     1100in the vicinity of the coast; and a damping everywhere in the Red and Med Seas. 
     1101The latter sets whether damping should act in the mixed layer or not.  
     1102The time scale associated with the damping depends on the depth as 
     1103a hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as  
     1104bottom value and a transition depth of \np{rn\_dep}.   
    10081105 
    10091106The robust diagnostic method is very efficient in preventing temperature  
     
    10131110by stabilising the water column too much. 
    10141111 
    1015 An example of the computation of $S_o$ for robust diagnostic experiments  
     1112An example of the computation of $\gamma$ for a robust diagnostic experiment  
    10161113with the ORCA2 model is provided in the \mdl{tradmp} module  
    10171114(subroutines \rou{dtacof} and \rou{cofdis} which compute the coefficient  
     
    10291126%-------------------------------------------------------------------------------------------------------------- 
    10301127 
    1031 The general framework for tracer time stepping is a leap-frog scheme,  
    1032 $i.e.$ a three level centred time scheme associated with a Asselin time  
    1033 filter (cf. \S\ref{DOM_nxt}): 
     1128The general framework for tracer time stepping is a modified leap-frog scheme  
     1129\citep{Leclair_Madec_OM09}, $i.e.$ a three level centred time scheme associated  
     1130with a Asselin time filter (cf. \S\ref{STP_mLF}): 
    10341131\begin{equation} \label{Eq_tra_nxt} 
    1035 \begin{split} 
    1036 T^{t+\Delta t} &= T^{t-\Delta t} + 2 \, \Delta t  \ \text{RHS}_T^t   \\ 
     1132\begin{aligned} 
     1133(e_{3t}T)^{t+\rdt} &= (e_{3t}T)_f^{t-\rdt} &+ 2 \, \rdt  \,e_{3t}^t\ \text{RHS}^t & \\ 
    10371134\\ 
    1038 T_f^t  \;\ \quad &= T^t \;\quad +\gamma \,\left[ {T_f^{t-\Delta t} -2T^t+T^{t+\Delta t}} \right] 
    1039 \end{split} 
     1135(e_{3t}T)_f^t  \;\ \quad &= (e_{3t}T)^t \;\quad  
     1136                                    &+\gamma \,\left[ {(e_{3t}T)_f^{t-\rdt} -2(e_{3t}T)^t+(e_{3t}T)^{t+\rdt}} \right] &  \\ 
     1137                                 & &- \gamma\,\rdt \, \left[ Q^{t+\rdt/2} -  Q^{t-\rdt/2} \right]  &                       
     1138\end{aligned} 
    10401139\end{equation}  
    1041 where $\text{RHS}_T$ is the right hand side of the temperature equation,  
    1042 the subscript $f$ denotes filtered values and $\gamma$ is the Asselin  
    1043 coefficient. $\gamma$ is initialized as \np{atfp} (\textbf{namelist} parameter).  
    1044 Its default value is \np{atfp=0.1}.  
     1140where RHS is the right hand side of the temperature equation,  
     1141the subscript $f$ denotes filtered values, $\gamma$ is the Asselin coefficient, 
     1142and $S$ is the total forcing applied on $T$ ($i.e.$ fluxes plus content in mass exchanges).  
     1143$\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter).  
     1144Its default value is \np{rn\_atfp}=$10^{-3}$. Note that the forcing correction term in the filter 
     1145is not applied in linear free surface (\jp{lk\_vvl}=false) (see \S\ref{TRA_sbc}. 
     1146Not also that in constant volume case, the time stepping is performed on $T$,  
     1147not on its content, $e_{3t}T$. 
    10451148 
    10461149When the vertical mixing is solved implicitly, the update of the \textit{next} tracer  
     
    10491152 
    10501153In order to prepare for the computation of the \textit{next} time step,  
    1051 a swap of tracer arrays is performed: $T^{t-\Delta t} = T^t$ and $T^t = T_f$.  
     1154a swap of tracer arrays is performed: $T^{t-\rdt} = T^t$ and $T^t = T_f$.  
    10521155 
    10531156% ================================================================ 
     
    10641167%        Equation of State 
    10651168% ------------------------------------------------------------------------------------------------------------- 
    1066 \subsection{Equation of State (\np{neos} = 0, 1 or 2)} 
     1169\subsection{Equation of State (\np{nn\_eos} = 0, 1 or 2)} 
    10671170\label{TRA_eos} 
    10681171 
    10691172It is necessary to know the equation of state for the ocean very accurately  
    10701173to determine stability properties (especially the Brunt-Vais\"{a}l\"{a} frequency),  
    1071 particularly in the deep ocean. The ocean density is a non linear empirical  
    1072 function of \textit{in situ }temperature, salinity and pressure. The reference  
    1073 equation of state is that defined by the Joint Panel on Oceanographic Tables  
    1074 and Standards \citep{UNESCO1983}. It was the standard equation of state  
    1075 used in early releases of OPA. However, even though this computation is  
    1076 fully vectorised, it is quite time consuming ($15$ to $20${\%} of the total  
    1077 CPU time) since it requires the prior computation of the \textit{in situ}  
    1078 temperature from the model \textit{potential} temperature using the  
    1079 \citep{Bryden1973} polynomial for adiabatic lapse rate and a $4^th$ order  
    1080 Runge-Kutta integration scheme. Since OPA6, we have used the  
    1081 \citet{JackMcD1995} equation of state for seawater instead. It allows the  
    1082 computation of the \textit{in situ} ocean density directly as a function of  
    1083 \textit{potential} temperature relative to the surface (an \NEMO variable),  
    1084 the practical salinity (another \NEMO variable) and the pressure (assuming no  
    1085 pressure variation along geopotential surfaces, i.e. the pressure in decibars is  
    1086 approximated by the depth in meters). Both the \citet{UNESCO1983} and  
    1087 \citet{JackMcD1995} equations of state have exactly the same except that  
    1088 the values of the various coefficients have been adjusted by \citet{JackMcD1995}  
    1089 in order to directly use the \textit{potential} temperature instead of the  
    1090 \textit{in situ} one. This reduces the CPU time of the in situ density computation  
    1091 to about $3${\%} of the total CPU time, while maintaining a quite accurate  
    1092 equation of state. 
    1093  
    1094 In the computer code, a \textit{true} density $d$ is computed, $i.e.$ the ratio  
    1095 of seawater volumic mass to $\rho_o$, a reference volumic mass (\textit{rau0}  
    1096 defined in \mdl{phycst}, usually $rau0= 1,020~Kg/m^3$). The default option  
    1097 (namelist prameter \np{neos}=0) is the \citet{JackMcD1995} equation of state.  
    1098 Its use is highly recommended. However, for process studies, it is often  
    1099 convenient to use a linear approximation of the density$^{\ast}$ 
    1100 \footnote{$^{\ast }$ With the linear equation of state there is no longer  
    1101 a distinction between \textit{in situ} and \textit{potential} density. Cabling  
    1102 and thermobaric effects are also removed.}.  
    1103 Two linear formulations are available: a function of $T$ only (\np{neos}=1)  
    1104 and a function of both $T$ and $S$ (\np{neos}=2): 
     1174particularly in the deep ocean. The ocean seawater volumic mass, $\rho$,  
     1175abusively called density, is a non linear empirical function of \textit{in situ}  
     1176temperature, salinity and pressure. The reference equation of state is that  
     1177defined by the Joint Panel on Oceanographic Tables and Standards  
     1178\citep{UNESCO1983}. It was the standard equation of state used in early  
     1179releases of OPA. However, even though this computation is fully vectorised,  
     1180it is quite time consuming ($15$ to $20${\%} of the total CPU time) since  
     1181it requires the prior computation of the \textit{in situ} temperature from the  
     1182model \textit{potential} temperature using the \citep{Bryden1973} polynomial  
     1183for adiabatic lapse rate and a $4^th$ order Runge-Kutta integration scheme.  
     1184Since OPA6, we have used the \citet{JackMcD1995} equation of state for  
     1185seawater instead. It allows the computation of the \textit{in situ} ocean density  
     1186directly as a function of \textit{potential} temperature relative to the surface  
     1187(an \NEMO variable), the practical salinity (another \NEMO variable) and the  
     1188pressure (assuming no pressure variation along geopotential surfaces, $i.e.$  
     1189the pressure in decibars is approximated by the depth in meters).  
     1190Both the \citet{UNESCO1983} and \citet{JackMcD1995} equations of state  
     1191have exactly the same except that the values of the various coefficients have  
     1192been adjusted by \citet{JackMcD1995} in order to directly use the \textit{potential}  
     1193temperature instead of the \textit{in situ} one. This reduces the CPU time of the  
     1194\textit{in situ} density computation to about $3${\%} of the total CPU time,  
     1195while maintaining a quite accurate equation of state. 
     1196 
     1197In the computer code, a \textit{true} density anomaly, $d_a= \rho / \rho_o - 1$,  
     1198is computed, with $\rho_o$ a reference volumic mass. Called \textit{rau0}  
     1199in the code, $\rho_o$ is defined in \mdl{phycst}, and a value of $1,035~Kg/m^3$.  
     1200This is a sensible choice for the reference density used in a Boussinesq ocean  
     1201climate model, as, with the exception of only a small percentage of the ocean,  
     1202density in the World Ocean varies by no more than 2$\%$ from $1,035~kg/m^3$  
     1203\citep{Gill1982}. 
     1204 
     1205The default option (namelist parameter \np{nn\_eos}=0) is the \citet{JackMcD1995}  
     1206equation of state. Its use is highly recommended. However, for process studies,  
     1207it is often convenient to use a linear approximation of the density. 
     1208With such an equation of state there is no longer a distinction between  
     1209\textit{in situ} and \textit{potential} density and both cabbeling and thermobaric 
     1210effects are removed. 
     1211Two linear formulations are available: a function of $T$ only (\np{nn\_eos}=1)  
     1212and a function of both $T$ and $S$ (\np{nn\_eos}=2): 
    11051213\begin{equation} \label{Eq_tra_eos_linear} 
    1106 \begin{aligned} 
    1107  d(T)    &= {\rho (T)} / {\rho _0 } &&= 1.028 - \alpha \;T     \\  
    1108  d(T,S) &= {\rho (T,S)}                &&= \ \ \ \beta \;S - \alpha \;T  
    1109 \end{aligned} 
     1214\begin{split} 
     1215  d_a(T)       &=  \rho (T)      /  \rho_o   - 1     =  \  0.0285         -  \alpha  \;T     \\  
     1216  d_a(T,S)    &=  \rho (T,S)   /  \rho_o   - 1     =  \  \beta \; S       -  \alpha   \;T     
     1217\end{split} 
    11101218\end{equation}  
    11111219where $\alpha$ and $\beta$ are the thermal and haline expansion  
    11121220coefficients, and $\rho_o$, the reference volumic mass, $rau0$.  
    1113 ($\alpha$ and $\beta$ can be modified through the \np{ralpha} and  
    1114 \np{rbeta} namelist parameters). Note that when $d$ is a function  
    1115 of $T$ only (\np{neos}=1), the salinity is a passive tracer and can be  
     1221($\alpha$ and $\beta$ can be modified through the \np{rn\_alpha} and  
     1222\np{rn\_beta} namelist parameters). Note that when $d_a$ is a function  
     1223of $T$ only (\np{nn\_eos}=1), the salinity is a passive tracer and can be  
    11161224used as such. 
    11171225 
     
    11191227%        Brunt-Vais\"{a}l\"{a} Frequency 
    11201228% ------------------------------------------------------------------------------------------------------------- 
    1121 \subsection{Brunt-Vais\"{a}l\"{a} Frequency (\np{neos} = 0, 1 or 2)} 
     1229\subsection{Brunt-Vais\"{a}l\"{a} Frequency (\np{nn\_eos} = 0, 1 or 2)} 
    11221230\label{TRA_bn2} 
    11231231 
     
    11281236 iso-neutral diffusion). In particular, one must be aware that $N^2$ has to  
    11291237 be computed with an \textit{in situ} reference. The expression for $N^2$  
    1130  depends on the type of equation of state used (\np{neos} namelist parameter). 
    1131  
    1132 For \np{neos}=0 (\citet{JackMcD1995} equation of state), the \citet{McDougall1987}  
     1238 depends on the type of equation of state used (\np{nn\_eos} namelist parameter). 
     1239 
     1240For \np{nn\_eos}=0 (\citet{JackMcD1995} equation of state), the \citet{McDougall1987}  
    11331241polynomial expression is used (with the pressure in decibar approximated by  
    11341242the depth in meters):  
     
    11371245      \left(  \alpha / \beta \ \delta_{k+1/2}[T]     - \delta_{k+1/2}[S]   \right)  
    11381246\end{equation}  
    1139 where $\alpha$ ($\beta$) is the thermal (haline) expansion coefficient.  
    1140 They are a function of   
    1141 $\overline{T}^{\,k+1/2},\widetilde{S}=\overline{S}^{\,k+1/2} - 35.$,  
    1142 and  $z_w$, with $T$ the \textit{potential} temperature and  
    1143 $\widetilde{S}$ a salinity anomaly.  
     1247where $\alpha$ and $\beta$ are the thermal and haline expansion coefficients.  
     1248They are a function of  $\overline{T}^{\,k+1/2},\widetilde{S}=\overline{S}^{\,k+1/2} - 35.$,  
     1249and  $z_w$, with $T$ the \textit{potential} temperature and $\widetilde{S}$ a salinity anomaly.  
    11441250Note that both $\alpha$ and $\beta$ depend on \textit{potential}  
    11451251temperature and salinity which are averaged at $w$-points prior  
     
    11471253then averaged to $w$-points. 
    11481254 
    1149 When a linear equation of state is used (\np{neos}=1 or 2,  
     1255When a linear equation of state is used (\np{nn\_eos}=1 or 2,  
    11501256\eqref{Eq_tra_bn2} reduces to: 
    11511257\begin{equation} \label{Eq_tra_bn2_linear} 
     
    11581264%        Specific Heat 
    11591265% ------------------------------------------------------------------------------------------------------------- 
    1160 \subsection   [Specific Heat (\textit{phycst})] 
     1266\subsection    [Specific Heat (\textit{phycst})] 
    11611267         {Specific Heat (\mdl{phycst})} 
    11621268\label{TRA_adv_ldf} 
     
    11711277Its value is set in \mdl{phycst} module.  
    11721278 
    1173 %%% 
    1174 \gmcomment{ STEVEN:  consistency, no other computer variable names are  
    1175 supplied, so why this one} 
    1176 %%% 
    11771279 
    11781280% ------------------------------------------------------------------------------------------------------------- 
    11791281%        Freezing Point of Seawater 
    11801282% ------------------------------------------------------------------------------------------------------------- 
    1181 \subsection   [Freezing Point of Seawater (\textit{ocfzpt})] 
    1182          {Freezing Point of Seawater (\mdl{ocfzpt})} 
     1283\subsection   [Freezing Point of Seawater] 
     1284         {Freezing Point of Seawater} 
    11831285\label{TRA_fzp} 
    11841286 
     
    11941296\eqref{Eq_tra_eos_fzp} is only used to compute the potential freezing point of  
    11951297sea water ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent  
    1196 terms in \eqref{Eq_tra_eos_fzp} (last term) have been dropped. The \textit{before}  
    1197 and \textit{now} surface freezing point is introduced in the code as $fzptb$ and  
    1198 $fzptn$ 2D arrays together with a  \textit{now} mask (\textit{freezn}) which takes  
    1199 the value 0 or 1 depending on whether the ocean temperature is above or at the  
    1200 freezing point. Caution: do not confuse \textit{freezn} with the fraction of lead  
    1201 (\textit{frld}) defined in LIM.   
    1202  
    1203 %%% 
    1204 \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} 
    1205 %%% 
     1298terms in \eqref{Eq_tra_eos_fzp} (last term) have been dropped. The freezing 
     1299point is computed through \textit{tfreez}, a \textsc{Fortran} function that can be found  
     1300in \mdl{eosbn2}.   
    12061301 
    12071302% ================================================================ 
     
    12141309\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, I've changed "derivative" to "difference" and "mean" to "average"} 
    12151310 
    1216 With partial bottom cells (\np{ln\_zps}=.true.), in general, tracers in horizontally  
     1311With partial bottom cells (\np{ln\_zps}=true), in general, tracers in horizontally  
    12171312adjacent cells live at different depths. Horizontal gradients of tracers are needed  
    12181313for horizontal diffusion (\mdl{traldf} module) and for the hydrostatic pressure  
     
    12281323\begin{figure}[!p] \label{Fig_Partial_step_scheme}  \begin{center} 
    12291324\includegraphics[width=0.9\textwidth]{./TexFiles/Figures/Partial_step_scheme.pdf} 
    1230 \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$.  } 
     1325\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$.  } 
    12311326\end{center}   \end{figure} 
    12321327%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.