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 9392 for branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex – NEMO

Ignore:
Timestamp:
2018-03-09T16:57:00+01:00 (6 years ago)
Author:
nicolasmartin
Message:

Global replacement of patterns \np{id}=value by \forcode{id = value} for integer and booleans

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex

    r9389 r9392  
    5757 
    5858The user has the option of extracting each tendency term on the RHS of the tracer  
    59 equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}~=~true), as described in Chap.~\ref{DIA}. 
     59equation for output (\np{ln_tra_trd} or \np{ln_tra_mxl}~=~true), as described in Chap.~\ref{DIA}. 
    6060 
    6161$\ $\newline    % force a new ligne 
     
    7070%------------------------------------------------------------------------------------------------------------- 
    7171 
    72 When considered ($i.e.$ when \np{ln\_traadv\_NONE} is not set to \textit{true}),  
     72When considered ($i.e.$ when \np{ln_traadv_NONE} is not set to \textit{true}),  
    7373the advection tendency of a tracer is expressed in flux form,  
    7474$i.e.$ as the divergence of the advective fluxes. Its discrete expression is given by : 
     
    8484by using the following equality : $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$  
    8585which results from the use of the continuity equation,  $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$  
    86 (which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \np{ln\_linssh}=true).  
     86(which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \forcode{ln_linssh = .true.}).  
    8787Therefore it is of paramount importance to design the discrete analogue of the  
    8888advection tendency so that it is consistent with the continuity equation in order to  
     
    114114boundary condition depends on the type of sea surface chosen:  
    115115\begin{description} 
    116 \item [linear free surface:] (\np{ln\_linssh}=true) the first level thickness is constant in time:  
     116\item [linear free surface:] (\forcode{ln_linssh = .true.}) the first level thickness is constant in time:  
    117117the vertical boundary condition is applied at the fixed surface $z=0$  
    118118rather than on the moving surface $z=\eta$. There is a non-zero advective  
     
    120120$\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $, $i.e.$  
    121121the product of surface velocity (at $z=0$) by the first level tracer value. 
    122 \item [non-linear free surface:] (\np{ln\_linssh}=false)  
     122\item [non-linear free surface:] (\forcode{ln_linssh = .false.})  
    123123convergence/divergence in the first ocean level moves the free surface  
    124124up/down. There is no tracer advection through it so that the advective  
     
    174174%        2nd and 4th order centred schemes 
    175175% ------------------------------------------------------------------------------------------------------------- 
    176 \subsection [Centred schemes (CEN) (\protect\np{ln\_traadv\_cen})] 
    177             {Centred schemes (CEN) (\protect\np{ln\_traadv\_cen}=true)} 
     176\subsection [Centred schemes (CEN) (\protect\np{ln_traadv_cen})] 
     177            {Centred schemes (CEN) (\protect\forcode{ln_traadv_cen = .true.})} 
    178178\label{TRA_adv_cen} 
    179179 
    180180%        2nd order centred scheme   
    181181 
    182 The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}~=~\textit{true}.  
     182The centred advection scheme (CEN) is used when \np{ln_traadv_cen}~=~\textit{true}.  
    183183Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level)  
    184 and vertical direction by setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$.  
     184and vertical direction by setting \np{nn_cen_h} and \np{nn_cen_v} to $2$ or $4$.  
    185185CEN implementation can be found in the \mdl{traadv\_cen} module. 
    186186 
     
    212212=\overline{   T - \frac{1}{6}\,\delta _i \left[ \delta_{i+1/2}[T] \,\right]   }^{\,i+1/2} 
    213213\end{equation} 
    214 In the vertical direction (\np{nn\_cen\_v}=$4$), a $4^{th}$ COMPACT interpolation  
     214In the vertical direction (\np{nn_cen_v}=$4$), a $4^{th}$ COMPACT interpolation  
    215215has been prefered \citep{Demange_PhD2014}. 
    216216In the COMPACT scheme, both the field and its derivative are interpolated,  
     
    246246%        FCT scheme   
    247247% ------------------------------------------------------------------------------------------------------------- 
    248 \subsection   [Flux Corrected Transport schemes (FCT) (\protect\np{ln\_traadv\_fct})] 
    249          {Flux Corrected Transport schemes (FCT) (\protect\np{ln\_traadv\_fct}=true)} 
     248\subsection   [Flux Corrected Transport schemes (FCT) (\protect\np{ln_traadv_fct})] 
     249         {Flux Corrected Transport schemes (FCT) (\protect\forcode{ln_traadv_fct = .true.})} 
    250250\label{TRA_adv_tvd} 
    251251 
    252 The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}~=~\textit{true}.  
     252The Flux Corrected Transport schemes (FCT) is used when \np{ln_traadv_fct}~=~\textit{true}.  
    253253Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level)  
    254 and vertical direction by setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$. 
     254and vertical direction by setting \np{nn_fct_h} and \np{nn_fct_v} to $2$ or $4$. 
    255255FCT implementation can be found in the \mdl{traadv\_fct} module. 
    256256 
     
    269269where $c_u$ is a flux limiter function taking values between 0 and 1.  
    270270The FCT order is the one of the centred scheme used ($i.e.$ it depends on the setting of 
    271 \np{nn\_fct\_h} and \np{nn\_fct\_v}. 
     271\np{nn_fct_h} and \np{nn_fct_v}. 
    272272There exist many ways to define $c_u$, each corresponding to a different  
    273273FCT scheme. The one chosen in \NEMO is described in \citet{Zalesak_JCP79}.  
     
    277277A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{Levy_al_GRL01}.  
    278278 
    279 An additional option has been added controlled by \np{nn\_fct\_zts}. By setting this integer to  
     279An additional option has been added controlled by \np{nn_fct_zts}. By setting this integer to  
    280280a value larger than zero, a $2^{nd}$ order FCT scheme is used on both horizontal and vertical direction,  
    281281but on the latter, a split-explicit time stepping is used, with a number of sub-timestep equals 
    282 to \np{nn\_fct\_zts}. This option can be useful when the size of the timestep is limited  
     282to \np{nn_fct_zts}. This option can be useful when the size of the timestep is limited  
    283283by vertical advection \citep{Lemarie_OM2015}. Note that in this case, a similar split-explicit  
    284284time stepping should be used on vertical advection of momentum to insure a better stability 
     
    293293%        MUSCL scheme   
    294294% ------------------------------------------------------------------------------------------------------------- 
    295 \subsection[MUSCL scheme  (\protect\np{ln\_traadv\_mus})] 
    296    {Monotone Upstream Scheme for Conservative Laws (MUSCL) (\protect\np{ln\_traadv\_mus}=T)} 
     295\subsection[MUSCL scheme  (\protect\np{ln_traadv_mus})] 
     296   {Monotone Upstream Scheme for Conservative Laws (MUSCL) (\protect\forcode{ln_traadv_mus = .true.})} 
    297297\label{TRA_adv_mus} 
    298298 
    299 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}~=~\textit{true}.  
     299The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln_traadv_mus}~=~\textit{true}.  
    300300MUSCL implementation can be found in the \mdl{traadv\_mus} module. 
    301301 
     
    321321the \textit{positive} character of the scheme.  
    322322In addition, fluxes round a grid-point where a runoff is applied can optionally be  
    323 computed using upstream fluxes (\np{ln\_mus\_ups}~=~\textit{true}). 
     323computed using upstream fluxes (\np{ln_mus_ups}~=~\textit{true}). 
    324324 
    325325% ------------------------------------------------------------------------------------------------------------- 
    326326%        UBS scheme   
    327327% ------------------------------------------------------------------------------------------------------------- 
    328 \subsection   [Upstream-Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs})] 
    329          {Upstream-Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}=true)} 
     328\subsection   [Upstream-Biased Scheme (UBS) (\protect\np{ln_traadv_ubs})] 
     329         {Upstream-Biased Scheme (UBS) (\protect\forcode{ln_traadv_ubs = .true.})} 
    330330\label{TRA_adv_ubs} 
    331331 
    332 The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}~=~\textit{true}.  
     332The Upstream-Biased Scheme (UBS) is used when \np{ln_traadv_ubs}~=~\textit{true}.  
    333333UBS implementation can be found in the \mdl{traadv\_mus} module. 
    334334 
     
    358358where the control of artificial diapycnal fluxes is of paramount importance \citep{Shchepetkin_McWilliams_OM05, Demange_PhD2014}.  
    359359Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme  
    360 or a $4^th$ order COMPACT scheme (\np{nn\_cen\_v}=2 or 4). 
     360or a $4^th$ order COMPACT scheme (\forcode{nn_cen_v = 2} or 4). 
    361361 
    362362For stability reasons  (see \S\ref{STP}), 
     
    401401%        QCK scheme   
    402402% ------------------------------------------------------------------------------------------------------------- 
    403 \subsection   [QUICKEST scheme (QCK) (\protect\np{ln\_traadv\_qck})] 
    404          {QUICKEST scheme (QCK) (\protect\np{ln\_traadv\_qck}=true)} 
     403\subsection   [QUICKEST scheme (QCK) (\protect\np{ln_traadv_qck})] 
     404         {QUICKEST scheme (QCK) (\protect\forcode{ln_traadv_qck = .true.})} 
    405405\label{TRA_adv_qck} 
    406406 
    407407The Quadratic Upstream Interpolation for Convective Kinematics with  
    408408Estimated Streaming Terms (QUICKEST) scheme proposed by \citet{Leonard1979}  
    409 is used when \np{ln\_traadv\_qck}~=~\textit{true}.  
     409is used when \np{ln_traadv_qck}~=~\textit{true}.  
    410410QUICKEST implementation can be found in the \mdl{traadv\_qck} module. 
    411411 
     
    449449except for the pure vertical component that appears when a rotation tensor is used.  
    450450This latter component is solved implicitly together with the vertical diffusion term (see \S\ref{STP}).  
    451 When \np{ln\_traldf\_msc}~=~\textit{true}, a Method of Stabilizing Correction is used in which  
     451When \np{ln_traldf_msc}~=~\textit{true}, a Method of Stabilizing Correction is used in which  
    452452the pure vertical component is split into an explicit and an implicit part \citep{Lemarie_OM2012}. 
    453453 
     
    456456% ------------------------------------------------------------------------------------------------------------- 
    457457\subsection   [Type of operator (\protect\np{ln\_traldf\{\_NONE, \_lap, \_blp\}})] 
    458               {Type of operator (\protect\np{ln\_traldf\_NONE}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp} = true) }  
     458              {Type of operator (\protect\np{ln_traldf_NONE}, \protect\np{ln_traldf_lap}, or \protect\np{ln_traldf_blp} = true) }  
    459459\label{TRA_ldf_op} 
    460460 
    461461Three operator options are proposed and, one and only one of them must be selected: 
    462462\begin{description} 
    463 \item [\np{ln\_traldf\_NONE}] = true : no operator selected, the lateral diffusive tendency will not be  
     463\item [\np{ln_traldf_NONE}] = true : no operator selected, the lateral diffusive tendency will not be  
    464464applied to the tracer equation. This option can be used when the selected advection scheme  
    465465is diffusive enough (MUSCL scheme for example). 
    466 \item [ \np{ln\_traldf\_lap}] = true : a laplacian operator is selected. This harmonic operator  
     466\item [ \np{ln_traldf_lap}] = true : a laplacian operator is selected. This harmonic operator  
    467467takes the following expression:  $\mathpzc{L}(T)=\nabla \cdot A_{ht}\;\nabla T $,  
    468468where the gradient operates along the selected direction (see \S\ref{TRA_ldf_dir}), 
    469469and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see Chap.~\ref{LDF}). 
    470 \item [\np{ln\_traldf\_blp}] = true : a bilaplacian operator is selected. This biharmonic operator  
     470\item [\np{ln_traldf_blp}] = true : a bilaplacian operator is selected. This biharmonic operator  
    471471takes the following expression:   
    472472$\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$  
     
    489489% ------------------------------------------------------------------------------------------------------------- 
    490490\subsection   [Direction of action (\protect\np{ln\_traldf\{\_lev, \_hor, \_iso, \_triad\}})] 
    491               {Direction of action (\protect\np{ln\_traldf\_lev}, \textit{...\_hor}, \textit{...\_iso}, or \textit{...\_triad} = true) }  
     491              {Direction of action (\protect\np{ln_traldf_lev}, \textit{...\_hor}, \textit{...\_iso}, or \textit{...\_triad} = true) }  
    492492\label{TRA_ldf_dir} 
    493493 
    494494The choice of a direction of action determines the form of operator used.  
    495495The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane  
    496 when iso-level option is used (\np{ln\_traldf\_lev}~=~\textit{true}) 
     496when iso-level option is used (\np{ln_traldf_lev}~=~\textit{true}) 
    497497or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{z}-coordinate  
    498 (\np{ln\_traldf\_hor} and \np{ln\_zco} equal \textit{true}).  
     498(\np{ln_traldf_hor} and \np{ln_zco} equal \textit{true}).  
    499499The associated code can be found in the \mdl{traldf\_lap\_blp} module. 
    500500The operator is a rotated (re-entrant) laplacian when the direction along which it acts  
    501501does not coincide with the iso-level surfaces,  
    502 that is when standard or triad iso-neutral option is used (\np{ln\_traldf\_iso} or  
    503  \np{ln\_traldf\_triad} equals \textit{true}, see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.),  
     502that is when standard or triad iso-neutral option is used (\np{ln_traldf_iso} or  
     503 \np{ln_traldf_triad} equals \textit{true}, see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.),  
    504504or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{s}-coordinate  
    505 (\np{ln\_traldf\_hor} and \np{ln\_sco} equal \textit{true}) 
     505(\np{ln_traldf_hor} and \np{ln_sco} equal \textit{true}) 
    506506\footnote{In this case, the standard iso-neutral operator will be automatically selected}.  
    507507In that case, a rotation is applied to the gradient(s) that appears in the operator  
     
    515515%       iso-level operator 
    516516% ------------------------------------------------------------------------------------------------------------- 
    517 \subsection   [Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso})] 
    518          {Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso}) } 
     517\subsection   [Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso})] 
     518         {Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso}) } 
    519519\label{TRA_ldf_lev} 
    520520 
     
    534534It is a \emph{horizontal} operator ($i.e.$ acting along geopotential surfaces) in the $z$-coordinate  
    535535with or without partial steps, but is simply an iso-level operator in the $s$-coordinate.  
    536 It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}~=~\textit{true},  
    537 we have \np{ln\_traldf\_lev}~=~\textit{true} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}~=~\textit{true}.  
     536It is thus used when, in addition to \np{ln_traldf_lap} or \np{ln_traldf_blp}~=~\textit{true},  
     537we have \np{ln_traldf_lev}~=~\textit{true} or \np{ln_traldf_hor}~=~\np{ln_zco}~=~\textit{true}.  
    538538In both cases, it significantly contributes to diapycnal mixing.  
    539539It is therefore never recommended, even when using it in the bilaplacian case. 
    540540 
    541 Note that in the partial step $z$-coordinate (\np{ln\_zps}=true), tracers in horizontally  
     541Note that in the partial step $z$-coordinate (\forcode{ln_zps = .true.}), tracers in horizontally  
    542542adjacent cells are located at different depths in the vicinity of the bottom.  
    543543In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level  
     
    584584($z$- or $s$-surfaces) and the surface along which the diffusion operator  
    585585acts ($i.e.$ horizontal or iso-neutral surfaces).  It is thus used when,  
    586 in addition to \np{ln\_traldf\_lap}= true, we have \np{ln\_traldf\_iso}=true,  
    587 or both \np{ln\_traldf\_hor}=true and \np{ln\_zco}=true. The way these  
     586in addition to \np{ln_traldf_lap}= true, we have \forcode{ln_traldf_iso = .true.},  
     587or both \forcode{ln_traldf_hor = .true.} and \forcode{ln_zco = .true.}. The way these  
    588588slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom  
    589589and lateral boundaries, the turbulent fluxes of heat and salt are set to zero  
     
    603603background horizontal diffusion \citep{Guilyardi_al_CD01}.  
    604604 
    605 Note that in the partial step $z$-coordinate (\np{ln\_zps}=true), the horizontal derivatives  
     605Note that in the partial step $z$-coordinate (\forcode{ln_zps = .true.}), the horizontal derivatives  
    606606at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific treatment.  
    607607They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     
    609609%&&     Triad rotated (bi-)laplacian operator 
    610610%&&  ------------------------------------------- 
    611 \subsubsection   [Triad rotated (bi-)laplacian operator (\protect\np{ln\_traldf\_triad})] 
    612                  {Triad rotated (bi-)laplacian operator (\protect\np{ln\_traldf\_triad})} 
     611\subsubsection   [Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad})] 
     612                 {Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad})} 
    613613\label{TRA_ldf_triad} 
    614614 
    615 If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}=true ; see App.\ref{sec:triad})  
     615If the Griffies triad scheme is employed (\forcode{ln_traldf_triad = .true.} ; see App.\ref{sec:triad})  
    616616 
    617617An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases  
    618 is also available in \NEMO (\np{ln\_traldf\_grif}=true). A complete description of  
     618is also available in \NEMO (\forcode{ln_traldf_grif = .true.}). A complete description of  
    619619the algorithm is given in App.\ref{sec:triad}. 
    620620 
     
    635635\label{TRA_ldf_options} 
    636636 
    637 \np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 
    638  
    639 \np{rn\_slpmax} = slope limit (both operators) 
    640  
    641 \np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 
    642  
    643 \np{rn\_sw\_triad} =1 switching triad ; =0 all 4 triads used (triad only)  
    644  
    645 \np{ln\_botmix\_triad} = lateral mixing on bottom (triad only) 
     637\np{ln_traldf_msc} = Method of Stabilizing Correction (both operators) 
     638 
     639\np{rn_slpmax} = slope limit (both operators) 
     640 
     641\np{ln_triad_iso} = pure horizontal mixing in ML (triad only) 
     642 
     643\np{rn_sw_triad} =1 switching triad ; =0 all 4 triads used (triad only)  
     644 
     645\np{ln_botmix_triad} = lateral mixing on bottom (triad only) 
    646646 
    647647% ================================================================ 
     
    685685The large eddy coefficient found in the mixed layer together with high  
    686686vertical resolution implies that in the case of explicit time stepping  
    687 (\np{ln\_zdfexp}=true) there would be too restrictive a constraint on  
     687(\forcode{ln_zdfexp = .true.}) there would be too restrictive a constraint on  
    688688the time step. Therefore, the default implicit time stepping is preferred  
    689689for the vertical diffusion since it overcomes the stability constraint.  
    690 A forward time differencing scheme (\np{ln\_zdfexp}=true) using a time  
    691 splitting technique (\np{nn\_zdfexp} $> 1$) is provided as an alternative.  
    692 Namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both  
     690A forward time differencing scheme (\forcode{ln_zdfexp = .true.}) using a time  
     691splitting technique (\np{nn_zdfexp} $> 1$) is provided as an alternative.  
     692Namelist variables \np{ln_zdfexp} and \np{nn_zdfexp} apply to both  
    693693tracers and dynamics.  
    694694 
     
    750750divergence of odd and even time step (see \S\ref{STP}). 
    751751 
    752 In the linear free surface case (\np{ln\_linssh}~=~\textit{true}),  
     752In the linear free surface case (\np{ln_linssh}~=~\textit{true}),  
    753753an additional term has to be added on both temperature and salinity.  
    754754On temperature, this term remove the heat content associated with mass exchange 
     
    781781 
    782782Options are defined through the  \ngn{namtra\_qsr} namelist variables. 
    783 When the penetrative solar radiation option is used (\np{ln\_flxqsr}=true),  
     783When the penetrative solar radiation option is used (\forcode{ln_flxqsr = .true.}),  
    784784the solar radiation penetrates the top few tens of meters of the ocean. If it is not used  
    785 (\np{ln\_flxqsr}=false) all the heat flux is absorbed in the first ocean level.  
     785(\forcode{ln_flxqsr = .false.}) all the heat flux is absorbed in the first ocean level.  
    786786Thus, in the former case a term is added to the time evolution equation of  
    787787temperature \eqref{Eq_PE_tra_T} and the surface boundary condition is  
     
    805805wavelengths contribute to heating the upper few tens of centimetres. The fraction of $Q_{sr}$  
    806806that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ (specified  
    807 through namelist parameter \np{rn\_abs}).  It is assumed to penetrate the ocean  
     807through namelist parameter \np{rn_abs}).  It is assumed to penetrate the ocean  
    808808with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$,  
    809 of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn\_si0} in the namtra\_qsr namelist). 
     809of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn_si0} in the namtra\_qsr namelist). 
    810810For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy  
    811811propagates to larger depths where it contributes to  
    812812local heating.  
    813813The way this second part of the solar energy penetrates into the ocean depends on  
    814 which formulation is chosen. In the simple 2-waveband light penetration scheme  (\np{ln\_qsr\_2bd}=true)  
     814which formulation is chosen. In the simple 2-waveband light penetration scheme  (\forcode{ln_qsr_2bd = .true.})  
    815815a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths,  
    816816leading to the following expression  \citep{Paulson1977}: 
     
    819819\end{equation} 
    820820where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths.   
    821 It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter.  
     821It is usually chosen to be 23~m by setting the \np{rn_si0} namelist parameter.  
    822822The set of default values ($\xi_0$, $\xi_1$, $R$) corresponds to a Type I water in  
    823823Jerlov's (1968) classification (oligotrophic waters). 
     
    839839computational efficiency. The 2-bands formulation does not reproduce the full model very well.  
    840840 
    841 The RGB formulation is used when \np{ln\_qsr\_rgb}=true. The RGB attenuation coefficients 
     841The RGB formulation is used when \forcode{ln_qsr_rgb = .true.}. The RGB attenuation coefficients 
    842842($i.e.$ the inverses of the extinction length scales) are tabulated over 61 nonuniform  
    843843chlorophyll classes ranging from 0.01 to 10 g.Chl/L (see the routine \rou{trc\_oce\_rgb}  
    844844in \mdl{trc\_oce} module). Four types of chlorophyll can be chosen in the RGB formulation: 
    845845\begin{description}  
    846 \item[\np{nn\_chdta}=0]  
     846\item[\forcode{nn_chdta = 0}]  
    847847a constant 0.05 g.Chl/L value everywhere ;  
    848 \item[\np{nn\_chdta}=1 
     848\item[\forcode{nn_chdta = 1} 
    849849an observed time varying chlorophyll deduced from satellite surface ocean color measurement  
    850850spread uniformly in the vertical direction ;  
    851 \item[\np{nn\_chdta}=2 
     851\item[\forcode{nn_chdta = 2} 
    852852same as previous case except that a vertical profile of chlorophyl is used.  
    853853Following \cite{Morel_Berthon_LO89}, the profile is computed from the local surface chlorophyll value ; 
    854 \item[\np{ln\_qsr\_bio}=true 
     854\item[\forcode{ln_qsr_bio = .true.} 
    855855simulated time varying chlorophyll by TOP biogeochemical model.  
    856856In this case, the RGB formulation is used to calculate both the phytoplankton  
     
    913913Options are defined through the  \ngn{namtra\_bbc} namelist variables. 
    914914The presence of geothermal heating is controlled by setting the namelist  
    915 parameter  \np{ln\_trabbc} to true. Then, when \np{nn\_geoflx} is set to 1,  
     915parameter  \np{ln_trabbc} to true. Then, when \np{nn_geoflx} is set to 1,  
    916916a constant geothermal heating is introduced whose value is given by the  
    917 \np{nn\_geoflx\_cst}, which is also a namelist parameter.  
    918 When  \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is  
     917\np{nn_geoflx_cst}, which is also a namelist parameter.  
     918When  \np{nn_geoflx} is set to 2, a spatially varying geothermal heat flux is  
    919919introduced which is provided in the \ifile{geothermal\_heating} NetCDF file  
    920920(Fig.\ref{Fig_geothermal}) \citep{Emile-Geay_Madec_OS09}. 
     
    959959%        Diffusive BBL 
    960960% ------------------------------------------------------------------------------------------------------------- 
    961 \subsection{Diffusive Bottom Boundary layer (\protect\np{nn\_bbl\_ldf}=1)} 
     961\subsection{Diffusive Bottom Boundary layer (\protect\forcode{nn_bbl_ldf = 1})} 
    962962\label{TRA_bbl_diff} 
    963963 
    964 When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1),  
     964When applying sigma-diffusion (\key{trabbl} defined and \np{nn_bbl_ldf} set to 1),  
    965965the diffusive flux between two adjacent cells at the ocean floor is given by  
    966966\begin{equation} \label{Eq_tra_bbl_diff} 
     
    978978\end{equation}  
    979979where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist  
    980 parameter \np{rn\_ahtbbl} and usually set to a value much larger  
     980parameter \np{rn_ahtbbl} and usually set to a value much larger  
    981981than the one used for lateral mixing in the open ocean. The constraint in \eqref{Eq_tra_bbl_coef}  
    982982implies that sigma-like diffusion only occurs when the density above the sea floor, at the top of  
     
    994994%        Advective BBL 
    995995% ------------------------------------------------------------------------------------------------------------- 
    996 \subsection   {Advective Bottom Boundary Layer  (\protect\np{nn\_bbl\_adv}= 1 or 2)} 
     996\subsection   {Advective Bottom Boundary Layer  (\protect\np{nn_bbl_adv}= 1 or 2)} 
    997997\label{TRA_bbl_adv} 
    998998 
     
    10221022%%%gmcomment   :  this section has to be really written 
    10231023 
    1024 When applying an advective BBL (\np{nn\_bbl\_adv} = 1 or 2), an overturning  
     1024When applying an advective BBL (\np{nn_bbl_adv} = 1 or 2), an overturning  
    10251025circulation is added which connects two adjacent bottom grid-points only if dense  
    10261026water overlies less dense water on the slope. The density difference causes dense  
    10271027water to move down the slope.  
    10281028 
    1029 \np{nn\_bbl\_adv} = 1 : the downslope velocity is chosen to be the Eulerian 
     1029\np{nn_bbl_adv} = 1 : the downslope velocity is chosen to be the Eulerian 
    10301030ocean velocity just above the topographic step (see black arrow in Fig.\ref{Fig_bbl})  
    10311031\citep{Beckmann_Doscher1997}. It is a \textit{conditional advection}, that is, advection 
     
    10341034greater depth ($i.e.$ $\vect{U}  \cdot  \nabla H>0$). 
    10351035 
    1036 \np{nn\_bbl\_adv} = 2 : the downslope velocity is chosen to be proportional to $\Delta \rho$, 
     1036\np{nn_bbl_adv} = 2 : the downslope velocity is chosen to be proportional to $\Delta \rho$, 
    10371037the density difference between the higher cell and lower cell densities \citep{Campin_Goosse_Tel99}. 
    10381038The advection is allowed only  if dense water overlies less dense water on the slope ($i.e.$  
     
    10441044\end{equation} 
    10451045where $\gamma$, expressed in seconds, is the coefficient of proportionality  
    1046 provided as \np{rn\_gambbl}, a namelist parameter, and \textit{kup} and \textit{kdwn}  
     1046provided as \np{rn_gambbl}, a namelist parameter, and \textit{kup} and \textit{kdwn}  
    10471047are the vertical index of the higher and lower cells, respectively. 
    10481048The parameter $\gamma$ should take a different value for each bathymetric  
     
    11011101are given temperature and salinity fields (usually a climatology).  
    11021102Options are defined through the  \ngn{namtra\_dmp} namelist variables. 
    1103 The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true.  
    1104 It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_tradmp} are set to true 
    1105 in \textit{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are  
     1103The restoring term is added when the namelist parameter \np{ln_tradmp} is set to true.  
     1104It also requires that both \np{ln_tsd_init} and \np{ln_tsd_tradmp} are set to true 
     1105in \textit{namtsd} namelist as well as \np{sn_tem} and \np{sn_sal} structures are  
    11061106correctly set  ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read  
    11071107using \mdl{fldread}, see \S\ref{SBC_fldread}).  
    1108 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. The file name is specified by the namelist variable \np{cn\_resto}. The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 
     1108The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. The file name is specified by the namelist variable \np{cn_resto}. The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 
    11091109 
    11101110The two main cases in which \eqref{Eq_tra_dmp} is used are \textit{(a)}  
     
    11281128by stabilising the water column too much. 
    11291129 
    1130 The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here \citep{Madec_al_JPO96}. 
    1131  
    1132 \subsection[DMP\_TOOLS]{Generating resto.nc using DMP\_TOOLS} 
     1130The namelist parameter \np{nn_zdmp} sets whether the damping should be applied in the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here \citep{Madec_al_JPO96}. 
     1131 
     1132\subsection[DMP\_TOOLS]{Generating \ifile{resto} using DMP\_TOOLS} 
    11331133 
    11341134DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$.  
    11351135Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled  
    1136 and run on the same machine as the NEMO model. A mesh\_mask.nc file for the model configuration is required as an input.  
    1137 This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1.  
    1138 The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work.  
     1136and run on the same machine as the NEMO model. A \ifile{mesh\_mask} file for the model configuration is required as an input.  
     1137This can be generated by carrying out a short model run with the namelist parameter \np{nn_msh} set to 1.  
     1138The namelist parameter \np{ln_tradmp} will also need to be set to .false. for this to work.  
    11391139The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for the restoration coefficient. 
    11401140 
     
    11431143%------------------------------------------------------------------------------------------------------- 
    11441144 
    1145 \np{cp\_cfg}, \np{cp\_cpz}, \np{jp\_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom\_n}, \np{lzoom\_e}, \np{lzoom\_s}, \np{lzoom\_w} in the \nl{nam\_zoom\_dmp} name list. 
     1145\np{cp_cfg}, \np{cp_cpz}, \np{jp_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom_n}, \np{lzoom_e}, \np{lzoom_s}, \np{lzoom_w} in the \nl{nam\_zoom\_dmp} name list. 
    11461146 
    11471147The remaining switch namelist variables determine the spatial variation of the restoration coefficient in non-zoom configurations.  
    1148 \np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain.  
    1149 \np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea  
     1148\np{ln_full_field} specifies that newtonian damping should be applied to the whole model domain.  
     1149\np{ln_med_red_seas} specifies grid specific restoration coefficients in the Mediterranean Sea  
    11501150for the ORCA4, ORCA2 and ORCA05 configurations.  
    1151 If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as  
     1151If \np{ln_old_31_lev_code} is set then the depth variation of the coeffients will be specified as  
    11521152a function of the model number. This option is included to allow backwards compatability of the ORCA2 reference  
    11531153configurations with previous model versions.  
    1154 \np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines.  
    1155 This option only has an effect if \np{ln\_full\_field} is true.  
    1156 \np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer.  
    1157 Finally \np{ln\_custom} specifies that the custom module will be called.  
     1154\np{ln_coast} specifies that the restoration coefficient should be reduced near to coastlines.  
     1155This option only has an effect if \np{ln_full_field} is true.  
     1156\np{ln_zero_top_layer} specifies that the restoration coefficient should be zero in the surface layer.  
     1157Finally \np{ln_custom} specifies that the custom module will be called.  
    11581158This module is contained in the file custom.F90 and can be edited by users. For example damping could be applied in a specific region. 
    11591159 
    1160 The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}.  
     1160The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn_hdmp}.  
    11611161Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to  
    11621162the full values of a 10\deg latitud band.  
    11631163This is often used because of the short adjustment time scale in the equatorial region  
    11641164\citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a  
    1165 hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}.   
     1165hyperbolic tangent, with \np{rn_surf} as surface value, \np{rn_bot} as bottom value and a transition depth of \np{rn_dep}.   
    11661166 
    11671167% ================================================================ 
     
    11911191the subscript $f$ denotes filtered values, $\gamma$ is the Asselin coefficient, 
    11921192and $S$ is the total forcing applied on $T$ ($i.e.$ fluxes plus content in mass exchanges).  
    1193 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter).  
    1194 Its default value is \np{rn\_atfp}=$10^{-3}$. Note that the forcing correction term in the filter 
     1193$\gamma$ is initialized as \np{rn_atfp} (\textbf{namelist} parameter).  
     1194Its default value is \np{rn_atfp}=$10^{-3}$. Note that the forcing correction term in the filter 
    11951195is not applied in linear free surface (\jp{lk\_vvl}=false) (see \S\ref{TRA_sbc}. 
    11961196Not also that in constant volume case, the time stepping is performed on $T$,  
     
    12171217%        Equation of State 
    12181218% ------------------------------------------------------------------------------------------------------------- 
    1219 \subsection{Equation Of Seawater (\protect\np{nn\_eos} = -1, 0, or 1)} 
     1219\subsection{Equation Of Seawater (\protect\np{nn_eos} = -1, 0, or 1)} 
    12201220\label{TRA_eos} 
    12211221 
     
    12481248density in the World Ocean varies by no more than 2$\%$ from that value \citep{Gill1982}. 
    12491249 
    1250 Options are defined through the  \ngn{nameos} namelist variables, and in particular \np{nn\_eos}  
     1250Options are defined through the  \ngn{nameos} namelist variables, and in particular \np{nn_eos}  
    12511251which controls the EOS used (=-1 for TEOS10 ; =0 for EOS-80 ; =1 for S-EOS). 
    12521252\begin{description} 
    12531253 
    1254 \item[\np{nn\_eos}$=-1$] the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used.   
     1254\item[\np{nn_eos}$=-1$] the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used.   
    12551255The accuracy of this approximation is comparable to the TEOS-10 rational function approximation,  
    12561256but it is optimized for a boussinesq fluid and the polynomial expressions have simpler  
     
    12681268$\Theta$ and $S_A$. In particular, the initial state deined by the user have to be given as  
    12691269\textit{Conservative} Temperature and \textit{Absolute} Salinity.  
    1270 In addition, setting \np{ln\_useCT} to \textit{true} convert the Conservative SST to potential SST  
     1270In addition, setting \np{ln_useCT} to \textit{true} convert the Conservative SST to potential SST  
    12711271prior to either computing the air-sea and ice-sea fluxes (forced mode)  
    12721272or sending the SST field to the atmosphere (coupled mode). 
    12731273 
    1274 \item[\np{nn\_eos}$=0$] the polyEOS80-bsq equation of seawater is used. 
     1274\item[\np{nn_eos}$=0$] the polyEOS80-bsq equation of seawater is used. 
    12751275It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized  
    12761276to accurately fit EOS80 (Roquet, personal comm.). The state variables used in both the EOS80  
     
    12831283value, the TEOS10 value.  
    12841284  
    1285 \item[\np{nn\_eos}$=1$] a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen,  
     1285\item[\np{nn_eos}$=1$] a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen,  
    12861286the coefficients of which has been optimized to fit the behavior of TEOS10 (Roquet, personal comm.)  
    12871287(see also \citet{Roquet_JPO2015}). It provides a simplistic linear representation of both  
     
    13151315\hline 
    13161316coeff.   & computer name   & S-EOS     &  description                      \\ \hline 
    1317 $a_0$       & \np{rn\_a0}     & 1.6550 $10^{-1}$ &  linear thermal expansion coeff.    \\ \hline 
    1318 $b_0$       & \np{rn\_b0}     & 7.6554 $10^{-1}$ &  linear haline  expansion coeff.    \\ \hline 
    1319 $\lambda_1$ & \np{rn\_lambda1}& 5.9520 $10^{-2}$ &  cabbeling coeff. in $T^2$          \\ \hline 
    1320 $\lambda_2$ & \np{rn\_lambda2}& 5.4914 $10^{-4}$ &  cabbeling coeff. in $S^2$       \\ \hline 
    1321 $\nu$       & \np{rn\_nu}     & 2.4341 $10^{-3}$ &  cabbeling coeff. in $T \, S$       \\ \hline 
    1322 $\mu_1$     & \np{rn\_mu1}    & 1.4970 $10^{-4}$ &  thermobaric coeff. in T         \\ \hline 
    1323 $\mu_2$     & \np{rn\_mu2}    & 1.1090 $10^{-5}$ &  thermobaric coeff. in S            \\ \hline 
     1317$a_0$       & \np{rn_a0}     & 1.6550 $10^{-1}$ &  linear thermal expansion coeff.  \\ \hline 
     1318$b_0$       & \np{rn_b0}      & 7.6554 $10^{-1}$ &  linear haline  expansion coeff.    \\ \hline 
     1319$\lambda_1$ & \np{rn_lambda1}& 5.9520 $10^{-2}$ &  cabbeling coeff. in $T^2$        \\ \hline 
     1320$\lambda_2$ & \np{rn_lambda2}& 5.4914 $10^{-4}$ &  cabbeling coeff. in $S^2$        \\ \hline 
     1321$\nu$       & \np{rn_nu}     & 2.4341 $10^{-3}$ &  cabbeling coeff. in $T \, S$     \\ \hline 
     1322$\mu_1$     & \np{rn_mu1}  & 1.4970 $10^{-4}$ &  thermobaric coeff. in T         \\ \hline 
     1323$\mu_2$     & \np{rn_mu2}  & 1.1090 $10^{-5}$ &  thermobaric coeff. in S            \\ \hline 
    13241324\end{tabular} 
    13251325\caption{ \protect\label{Tab_SEOS} 
     
    13331333%        Brunt-V\"{a}is\"{a}l\"{a} Frequency 
    13341334% ------------------------------------------------------------------------------------------------------------- 
    1335 \subsection{Brunt-V\"{a}is\"{a}l\"{a} Frequency (\protect\np{nn\_eos} = 0, 1 or 2)} 
     1335\subsection{Brunt-V\"{a}is\"{a}l\"{a} Frequency (\protect\np{nn_eos} = 0, 1 or 2)} 
    13361336\label{TRA_bn2} 
    13371337 
     
    13951395                   I've changed "derivative" to "difference" and "mean" to "average"} 
    13961396 
    1397 With partial cells (\np{ln\_zps}=true) at bottom and top (\np{ln\_isfcav}=true), in general,  
     1397With partial cells (\forcode{ln_zps = .true.}) at bottom and top (\forcode{ln_isfcav = .true.}), in general,  
    13981398tracers in horizontally adjacent cells live at different depths.  
    13991399Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module)  
    14001400and the hydrostatic pressure gradient calculations (\mdl{dynhpg} module).  
    1401 The partial cell properties at the top (\np{ln\_isfcav}=true) are computed in the same way as for the bottom.  
     1401The partial cell properties at the top (\forcode{ln_isfcav = .true.}) are computed in the same way as for the bottom.  
    14021402So, only the bottom interpolation is explained below. 
    14031403 
     
    14131413\caption{   \protect\label{Fig_Partial_step_scheme}  
    14141414Discretisation of the horizontal difference and average of tracers in the $z$-partial  
    1415 step coordinate (\protect\np{ln\_zps}=true) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$.  
     1415step coordinate (\protect\forcode{ln_zps = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$.  
    14161416A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, the tracer value  
    14171417at the depth of the shallower tracer point of the two adjacent bottom $T$-points.  
Note: See TracChangeset for help on using the changeset viewer.