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 – NEMO

Changeset 9392 for branches/2017


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

Location:
branches/2017/dev_merge_2017/DOC/tex_sub
Files:
19 edited

Legend:

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

    r9389 r9392  
    363363%       Vorticity Term with ENE scheme 
    364364% ------------------------------------------------------------------------------------------------------------- 
    365 \subsubsection{Vorticity Term with ENE scheme (\protect\np{ln\_dynvor\_ene}=.true.)} 
     365\subsubsection{Vorticity Term with ENE scheme (\protect\np{ln_dynvor_ene}=.true.)} 
    366366\label{Apdx_C_vorENE}  
    367367 
     
    400400%       Vorticity Term with EEN scheme 
    401401% ------------------------------------------------------------------------------------------------------------- 
    402 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}=.true.)} 
     402\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln_dynvor_een}=.true.)} 
    403403\label{Apdx_C_vorEEN}  
    404404 
     
    883883%       Vorticity Term with ENS scheme 
    884884% ------------------------------------------------------------------------------------------------------------- 
    885 \subsubsection{Vorticity Term with ENS scheme  (\protect\np{ln\_dynvor\_ens}=.true.)} 
     885\subsubsection{Vorticity Term with ENS scheme  (\protect\np{ln_dynvor_ens}=.true.)} 
    886886\label{Apdx_C_vorENS}  
    887887 
     
    943943%       Vorticity Term with EEN scheme 
    944944% ------------------------------------------------------------------------------------------------------------- 
    945 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}=.true.)} 
     945\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln_dynvor_een}=.true.)} 
    946946\label{Apdx_C_vorEEN}  
    947947 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex

    r9389 r9392  
    1919%        UBS scheme   
    2020% ------------------------------------------------------------------------------------------------------------- 
    21 \section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}=T)} 
     21\section{Upstream Biased Scheme (UBS) (\protect\forcode{ln_traadv_ubs = .true.})} 
    2222\label{TRA_adv_ubs} 
    2323 
     
    5959where the control of artificial diapycnal fluxes is of paramount importance.  
    6060It has therefore been preferred to evaluate the vertical flux using the TVD  
    61 scheme when \np{ln\_traadv\_ubs}=T. 
     61scheme when \forcode{ln_traadv_ubs = .true.}. 
    6262 
    6363For stability reasons, in \eqref{Eq_tra_adv_ubs}, the first term which corresponds  
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex

    r9389 r9392  
    1515 
    1616Two scheme are available to perform the iso-neutral diffusion.  
    17 If the namelist logical \np{ln\_traldf\_triad} is set true,  
     17If the namelist logical \np{ln_traldf_triad} is set true,  
    1818\NEMO updates both active and passive tracers using the Griffies triad representation  
    1919of iso-neutral diffusion and the eddy-induced advective skew (GM) fluxes.  
    20 If the namelist logical \np{ln\_traldf\_iso} is set true,  
     20If the namelist logical \np{ln_traldf_iso} is set true,  
    2121the filtered version of Cox's original scheme (the Standard scheme) is employed (\S\ref{LDF_slp}).  
    2222In the present implementation of the Griffies scheme,  
    23 the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 
     23the advective skew fluxes are implemented even if \np{ln_traldf_eiv} is false. 
    2424 
    2525Values of iso-neutral diffusivity and GM coefficient are set as 
     
    3131The options specific to the Griffies scheme include: 
    3232\begin{description}[font=\normalfont] 
    33 \item[\np{ln\_triad\_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
     33\item[\np{ln_triad_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
    3434  `iso-neutral' mixing is accomplished within the surface mixed-layer 
    3535  along slopes linearly decreasing with depth from the value immediately below 
    3636  the mixed-layer to zero (flat) at the surface (\S\ref{sec:triad:lintaper}).  
    3737  This is the same treatment as used in the default implementation \S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.   
    38   Where \np{ln\_triad\_iso} is set true, the vertical skew flux is further reduced  
     38  Where \np{ln_triad_iso} is set true, the vertical skew flux is further reduced  
    3939  to ensure no vertical buoyancy flux, giving an almost pure 
    4040  horizontal diffusive tracer flux within the mixed layer. This is similar to 
    4141  the tapering suggested by \citet{Gerdes1991}. See \S\ref{sec:triad:Gerdes-taper} 
    42 \item[\np{ln\_botmix\_triad}] See \S\ref{sec:triad:iso_bdry}.  
     42\item[\np{ln_botmix_triad}] See \S\ref{sec:triad:iso_bdry}.  
    4343  If this is set false (the default) then the lateral diffusive fluxes 
    4444  associated with triads partly masked by topography are neglected.  
    4545  If it is set true, however, then these lateral diffusive fluxes are applied,  
    4646  giving smoother bottom tracer fields at the cost of introducing diapycnal mixing. 
    47 \item[\np{rn\_sw\_triad}]  blah blah to be added.... 
     47\item[\np{rn_sw_triad}]  blah blah to be added.... 
    4848\end{description} 
    4949The options shared with the Standard scheme include: 
    5050\begin{description}[font=\normalfont] 
    51 \item[\np{ln\_traldf\_msc}]   blah blah to be added 
    52 \item[\np{rn\_slpmax}]  blah blah to be added 
     51\item[\np{ln_traldf_msc}]   blah blah to be added 
     52\item[\np{rn_slpmax}]  blah blah to be added 
    5353\end{description} 
    5454\section{Triad formulation of iso-neutral diffusion} 
     
    651651or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point is 
    652652masked. The associated lateral fluxes (grey-black dashed line) are 
    653 masked if \np{ln\_botmix\_triad}=false, but left unmasked, 
    654 giving bottom mixing, if \np{ln\_botmix\_triad}=true. 
    655  
    656 The default option \np{ln\_botmix\_triad}=false is suitable when the 
    657 bbl mixing option is enabled (\key{trabbl}, with \np{nn\_bbl\_ldf}=1), 
     653masked if \forcode{ln_botmix_triad = .false.}, but left unmasked, 
     654giving bottom mixing, if \forcode{ln_botmix_triad = .true.}. 
     655 
     656The default option \forcode{ln_botmix_triad = .false.} is suitable when the 
     657bbl mixing option is enabled (\key{trabbl}, with \forcode{nn_bbl_ldf = 1}), 
    658658or  for simple idealized  problems. For setups with topography without 
    659 bbl mixing, \np{ln\_botmix\_triad}=true may be necessary. 
     659bbl mixing, \forcode{ln_botmix_triad = .true.} may be necessary. 
    660660% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    661661\begin{figure}[h] \begin{center} 
     
    674674      or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point 
    675675      is masked. The associated lateral fluxes (grey-black dashed 
    676       line) are masked if \protect\np{botmix\_triad}=.false., but left 
    677       unmasked, giving bottom mixing, if \protect\np{botmix\_triad}=.true.} 
     676      line) are masked if \protect\np{botmix_triad}=.false., but left 
     677      unmasked, giving bottom mixing, if \protect\np{botmix_triad}=.true.} 
    678678 \end{center} \end{figure} 
    679679% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    710710\subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:triad:lintaper} 
    711711This is the option activated by the default choice 
    712 \np{ln\_triad\_iso}=false. Slopes $\tilde{r}_i$ relative to 
     712\forcode{ln_triad_iso = .false.}. Slopes $\tilde{r}_i$ relative to 
    713713geopotentials are tapered linearly from their value immediately below the mixed layer to zero at the 
    714714surface, as described in option (c) of Fig.~\ref{Fig_eiv_slp}, to values 
     
    842842  components} 
    843843\label{sec:triad:Gerdes-taper} 
    844 The alternative option is activated by setting \np{ln\_triad\_iso} = 
     844The alternative option is activated by setting \np{ln_triad_iso} = 
    845845  true. This retains the same tapered slope $\rML$  described above for the 
    846846calculation of the $_{33}$ term of the iso-neutral diffusion tensor (the 
     
    917917it to the Eulerian velocity prior to computing the tracer 
    918918advection. This is implemented if \key{traldf\_eiv} is set in the 
    919 default implementation, where \np{ln\_traldf\_triad} is set 
     919default implementation, where \np{ln_traldf_triad} is set 
    920920false. This allows us to take advantage of all the advection schemes 
    921921offered for the tracers (see \S\ref{TRA_adv}) and not just a $2^{nd}$ 
     
    924924paramount importance. 
    925925 
    926 However, when \np{ln\_traldf\_triad} is set true, \NEMO instead 
     926However, when \np{ln_traldf_triad} is set true, \NEMO instead 
    927927implements eddy induced advection according to the so-called skew form 
    928928\citep{Griffies_JPO98}. It is based on a transformation of the advective fluxes 
     
    11231123and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the 
    11241124$i,k+1$ or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ 
    1125 $u$-point is masked. The namelist parameter \np{ln\_botmix\_triad} has 
     1125$u$-point is masked. The namelist parameter \np{ln_botmix_triad} has 
    11261126no effect on the eddy-induced skew-fluxes. 
    11271127 
     
    11381138option (c) of Fig.~\ref{Fig_eiv_slp}. This linear tapering for the 
    11391139slopes used to calculate the eddy-induced fluxes is 
    1140 unaffected by the value of \np{ln\_triad\_iso}. 
     1140unaffected by the value of \np{ln_triad_iso}. 
    11411141 
    11421142The justification for this linear slope tapering is that, for $A_e$ 
     
    11531153 
    11541154\subsection{Streamfunction diagnostics}\label{sec:triad:sfdiag} 
    1155 Where the namelist parameter \np{ln\_traldf\_gdia}=true, diagnosed 
     1155Where the namelist parameter \forcode{ln_traldf_gdia = .true.}, diagnosed 
    11561156mean eddy-induced velocities are output. Each time step, 
    11571157streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex

    r9389 r9392  
    3030Direct initialization (DI) refers to the instantaneous correction 
    3131of the model background state using the analysis increment. 
    32 DI is used when \np{ln\_asmdin} is set to true. 
     32DI is used when \np{ln_asmdin} is set to true. 
    3333 
    3434\section{Incremental Analysis Updates} 
     
    4040is referred to as Incremental Analysis Updates (IAU) \citep{Bloom_al_MWR96}. 
    4141IAU is a common technique used with 3D assimilation methods such as 3D-Var or OI. 
    42 IAU is used when \np{ln\_asmiau} is set to true. 
     42IAU is used when \np{ln_asmiau} is set to true. 
    4343 
    4444With IAU, the model state trajectory ${\bf x}$ in the assimilation window  
     
    117117integration \citep{Talagrand_JAS72, Dobricic_al_OS07}. Diffusion coefficients are defined as  
    118118$A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. The divergence damping is activated by 
    119 assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist a value greater than zero.  
     119assigning to \np{nn_divdmp} in the \textit{nam\_asminc} namelist a value greater than zero.  
    120120By choosing this value to be of the order of 100 the increments in the vertical velocity will  
    121121be significantly reduced. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex

    r9389 r9392  
    8686the LIM sea-ice model (ORCA-LIM) and possibly with PISCES biogeochemical model  
    8787(ORCA-LIM-PISCES), using various resolutions. 
    88 An appropriate namelist is available in \textit{CONFIG/ORCA2\_LIM3\_PISCES/EXP00/namelist\_cfg}  
     88An appropriate namelist is available in \path{CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg}  
    8989for ORCA2. 
    90 The domain of ORCA2 configuration is defined in ORCA\_R2\_zps\_domcfg.nc file, this file is available in tar file in the wiki of NEMO : \\ 
     90The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file, this file is available in tar file in the wiki of NEMO : \\ 
    9191https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ReferenceConfigurations/ORCA2\_LIM3\_PISCES \\ 
    9292In this namelist\_cfg the name of domain input file is set in \ngn{namcfg} block of namelist.  
     
    156156horizontal resolution. The value of the resolution is given by the resolution at the Equator  
    157157expressed in degrees. Each of configuration is set through the \textit{domain\_cfg} domain configuration file,  
    158 which sets the grid size and configuration name parameters. The NEMO System Team provides only ORCA2 domain input file "ORCA\_R2\_zps\_domcfg.nc" file  (Tab. \ref{Tab_ORCA}). 
     158which sets the grid size and configuration name parameters. The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file  (Tab. \ref{Tab_ORCA}). 
    159159 
    160160 
     
    164164\begin{table}[!t]     \begin{center} 
    165165\begin{tabular}{p{4cm} c c c c} 
    166 Horizontal Grid                         & \np{ORCA\_index} &  \np{jpiglo} & \np{jpjglo} &       \\   
     166Horizontal Grid                         & \np{ORCA_index} &  \np{jpiglo} & \np{jpjglo} &       \\   
    167167\hline  \hline 
    168168\~4\deg     &        4         &         92     &      76      &       \\ 
     
    214214 
    215215ORCA\_R2 pre-defined configuration can also be run with an AGRIF zoom over the Agulhas  
    216 current area ( \key{agrif}  defined) and, by setting the appropriate variables, see \textit{CONFIG/SHARED/namelist\_ref} 
     216current area ( \key{agrif}  defined) and, by setting the appropriate variables, see \path{CONFIG/SHARED/namelist_ref} 
    217217a regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations 
    218218using sponge layers at open boundaries.  
     
    252252 
    253253The GYRE configuration is set like an analytical configuration. Through \np{ln\_read\_cfg\textit{=false}} in \textit{namcfg} namelist defined in the reference configuration \textit{CONFIG/GYRE/EXP00/namelist\_cfg} anaylitical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. Its horizontal resolution  
    254 (and thus the size of the domain) is determined by setting \np{nn\_GYRE} in  \ngn{namusr\_def}: \\ 
    255 \np{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\ 
    256 \np{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\ 
     254(and thus the size of the domain) is determined by setting \np{nn_GYRE} in  \ngn{namusr\_def}: \\ 
     255\np{jpiglo} $= 30 \times$ \np{nn_GYRE} + 2   \\ 
     256\np{jpjglo} $= 20 \times$ \np{nn_GYRE} + 2   \\ 
    257257Obviously, the namelist parameters have to be adjusted to the chosen resolution, see the Configurations  
    258258pages on the NEMO web site (Using NEMO\/Configurations) . 
     
    296296In addition to the tidal boundary condition the model may also take 
    297297open boundary conditions from a North Atlantic model. Boundaries may be 
    298 completely omitted by setting \np{ln\_bdy} to false. 
     298completely omitted by setting \np{ln_bdy} to false. 
    299299Sample surface fluxes, river forcing and a sample initial restart file 
    300300are included to test a realistic model run. The Baltic boundary is 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex

    r9389 r9392  
    217217For example: 
    218218\vspace{-20pt} 
    219 \begin{xmlcode} 
     219\begin{xmllines} 
    220220   <field_definition> 
    221221      <!-- T grid --> 
     
    226226      ... 
    227227   </field_definition>  
    228 \end{xmlcode} 
     228\end{xmllines} 
    229229Note your definition must be added to the field\_group whose reference grid is consistent  
    230230with the size of the array passed to iomput.  
     
    233233or defined in the domain\_def.xml file. $e.g.$: 
    234234\vspace{-20pt} 
    235 \begin{xmlcode} 
     235\begin{xmllines} 
    236236     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/> 
    237 \end{xmlcode} 
     237\end{xmllines} 
    238238Note, if your array is computed within the surface module each nn\_fsbc time\_step,  
    239239add the field definition within the field\_group defined with the id ''SBC'': $<$field\_group id=''SBC''...$>$  
     
    242242\item[4.] add your field in one of the output files defined in iodef.xml (again see subsequent sections for syntax and rules)   \\ 
    243243\vspace{-20pt} 
    244 \begin{xmlcode} 
     244\begin{xmllines} 
    245245   <file id="file1" .../>    
    246246      ... 
     
    248248      ... 
    249249   </file>    
    250 \end{xmlcode} 
     250\end{xmllines} 
    251251 
    252252\end{description} 
     
    398398example 1: Direct inheritance. 
    399399\vspace{-20pt} 
    400 \begin{xmlcode} 
     400\begin{xmllines} 
    401401   <field_definition operation="average" > 
    402402     <field id="sst"                    />   <!-- averaged      sst -->  
    403403     <field id="sss" operation="instant"/>   <!-- instantaneous sss -->  
    404404   </field_definition>  
    405 \end{xmlcode} 
     405\end{xmllines} 
    406406The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''average''  
    407407of the attribute ''operation'' from its parent. Note that a child can overwrite  
     
    411411example 2: Inheritance by reference. 
    412412\vspace{-20pt} 
    413 \begin{xmlcode} 
     413\begin{xmllines} 
    414414   <field_definition> 
    415415     <field id="sst" long_name="sea surface temperature" />    
     
    423423     </file>    
    424424   </file_definition>  
    425 \end{xmlcode} 
     425\end{xmllines} 
    426426Inherit (and overwrite, if needed) the attributes of a tag you are refering to. 
    427427 
     
    433433Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 
    434434\vspace{-20pt} 
    435 \begin{xmlcode} 
     435\begin{xmllines} 
    436436   <field_group id="grid_T" grid_ref="grid_T_2D"> 
    437437    <field id="toce" long_name="temperature"             unit="degC" grid_ref="grid_T_3D"/> 
     
    440440    <field id="ssh"  long_name="sea surface height"      unit="m"                        /> 
    441441         ... 
    442 \end{xmlcode} 
     442\end{xmllines} 
    443443 
    444444Secondly, the group can be used to replace a list of elements.  
     
    446446For example, a short list of the usual variables related to the U grid: 
    447447\vspace{-20pt} 
    448 \begin{xmlcode} 
     448\begin{xmllines} 
    449449   <field_group id="groupU" > 
    450450    <field field_ref="uoce"  /> 
     
    452452    <field field_ref="utau"  /> 
    453453   </field_group> 
    454 \end{xmlcode} 
     454\end{xmllines} 
    455455that can be directly included in a file through the following syntax: 
    456456\vspace{-20pt} 
    457 \begin{xmlcode} 
     457\begin{xmllines} 
    458458   <file id="myfile_U" output_freq="1d" />    
    459459    <field_group group_ref="groupU"/>   
    460460    <field field_ref="uocetr_eff"  />  <!-- add another field --> 
    461461   </file>    
    462 \end{xmlcode} 
     462\end{xmllines} 
    463463 
    464464\subsection{Detailed functionalities } 
     
    473473of a 5 by 5 box with the bottom left corner at point (10,10). 
    474474\vspace{-20pt} 
    475 \begin{xmlcode} 
     475\begin{xmllines} 
    476476   <domain_group id="grid_T"> 
    477477    <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 
    478 \end{xmlcode} 
     478\end{xmllines} 
    479479The use of this subdomain is done through the redefinition of the attribute domain\_ref of the tag family field. For example: 
    480480\vspace{-20pt} 
    481 \begin{xmlcode} 
     481\begin{xmllines} 
    482482   <file id="myfile_vzoom" output_freq="1d" > 
    483483      <field field_ref="toce" domain_ref="myzoom"/> 
    484484   </file> 
    485 \end{xmlcode} 
     485\end{xmllines} 
    486486Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
    487487The Equatorial section, the TAO, RAMA and PIRATA moorings are alredy registered in the code  
     
    491491by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 
    492492\vspace{-20pt} 
    493 \begin{xmlcode} 
     493\begin{xmllines} 
    494494   <file id="myfile_vzoom" output_freq="1d" > 
    495495      <field field_ref="toce" domain_ref="0n180wT"/> 
    496496   </file> 
    497 \end{xmlcode} 
     497\end{xmllines} 
    498498Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if you use the ''multiple\_file'' type for your output files, you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, \href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). We are therefore advising to use the ''one\_file'' type in this case. 
    499499 
     
    501501Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. It must therefore be done in the axis part of the XML file. For example, in NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml, we provide the following example: 
    502502\vspace{-20pt} 
    503 \begin{xmlcode} 
     503\begin{xmllines} 
    504504   <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 
    505505      <axis id="deptht" /> 
    506506      <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 
    507 \end{xmlcode} 
     507\end{xmllines} 
    508508The use of this vertical zoom is done through the redefinition of the attribute axis\_ref of the tag family field. For example: 
    509509\vspace{-20pt} 
    510 \begin{xmlcode} 
     510\begin{xmllines} 
    511511   <file id="myfile_hzoom" output_freq="1d" > 
    512512      <field field_ref="toce" axis_ref="deptht_myzoom"/> 
    513513   </file> 
    514 \end{xmlcode} 
     514\end{xmllines} 
    515515 
    516516\subsubsection{Control of the output file names} 
     
    518518The output file names are defined by the attributs ''name'' and ''name\_suffix'' of the tag family file. for example: 
    519519\vspace{-20pt} 
    520 \begin{xmlcode} 
     520\begin{xmllines} 
    521521   <file_group id="1d" output_freq="1d" name="myfile_1d" >  
    522522      <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA"  --> 
     
    527527      </file> 
    528528   </file_group> 
    529 \end{xmlcode} 
     529\end{xmllines} 
    530530However it is often very convienent to define the file name with the name of the experiment, the output file frequency and the date of the beginning and the end of the simulation (which are informations stored either in the namelist or in the XML file). To do so, we added the following rule: if the id of the tag file is ''fileN''(where N = 1 to 999 on 1 to 3 digits) or one of the predefined sections or moorings (see next subsection), the following part of the name and the name\_suffix (that can be inherited) will be automatically replaced by:\\ 
    531531\\ 
     
    589589   \hline 
    590590   \hline 
    591     \multicolumn{2}{|c|}{field\_definition} & freq\_op & \np{rn\_rdt} \\ 
    592    \hline 
    593     \multicolumn{2}{|c|}{SBC}               & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\ 
    594    \hline 
    595     \multicolumn{2}{|c|}{ptrc\_T}           & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
    596    \hline 
    597     \multicolumn{2}{|c|}{diad\_T}           & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     591    \multicolumn{2}{|c|}{field\_definition} & freq\_op & \np{rn_rdt} \\ 
     592   \hline 
     593    \multicolumn{2}{|c|}{SBC}               & freq\_op & \np{rn_rdt} $\times$ \np{nn_fsbc}  \\ 
     594   \hline 
     595    \multicolumn{2}{|c|}{ptrc\_T}           & freq\_op & \np{rn_rdt} $\times$ \np{nn_dttrc} \\ 
     596   \hline 
     597    \multicolumn{2}{|c|}{diad\_T}           & freq\_op & \np{rn_rdt} $\times$ \np{nn_dttrc} \\ 
    598598   \hline 
    599599    \multicolumn{2}{|c|}{EqT, EqU, EqW} & jbegin, ni,      & according to the grid    \\ 
     
    613613 
    614614\vspace{-20pt} 
    615 \begin{xmlcode} 
     615\begin{xmllines} 
    616616 <field field\_ref="sst"  name="tosK"  unit="degK" > sst + 273.15 </field> 
    617617 <field field\_ref="taum" name="taum2" unit="N2/m4" long\_name="square of wind stress module" > taum * taum </field> 
    618618 <field field\_ref="qt"   name="stupid\_check" > qt - qsr - qns </field> 
    619 \end{xmlcode} 
     619\end{xmllines} 
    620620 
    621621(2) Simple computation: define a new variable and use it in the file definition. 
     
    623623in field\_definition: 
    624624\vspace{-20pt} 
    625 \begin{xmlcode} 
     625\begin{xmllines} 
    626626 <field id="sst2" long\_name="square of sea surface temperature" unit="degC2" >  sst * sst </field > 
    627 \end{xmlcode} 
     627\end{xmllines} 
    628628in file\_definition: 
    629629\vspace{-20pt} 
    630 \begin{xmlcode} 
     630\begin{xmllines} 
    631631 <field field\_ref="sst2" > sst2 </field> 
    632 \end{xmlcode} 
     632\end{xmllines} 
    633633Note that in this case, the following syntaxe $<$field field\_ref="sst2" /$>$ is not working as sst2 won't be evaluated. 
    634634 
     
    636636 
    637637\vspace{-20pt} 
    638 \begin{xmlcode} 
     638\begin{xmllines} 
    639639     <!-- force to keep real 8 --> 
    640640 <field field\_ref="sst" name="tos\_r8" prec="8" /> 
    641641      <!-- integer 2  with add\_offset and scale\_factor attributes --> 
    642642 <field field\_ref="sss" name="sos\_i2" prec="2" add\_offset="20." scale\_factor="1.e-3" /> 
    643 \end{xmlcode} 
     643\end{xmllines} 
    644644Note that, then the code is crashing, writting real4 variables forces a numerical convection from real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 
    645645 
     
    647647 
    648648\vspace{-20pt} 
    649 \begin{xmlcode} 
     649\begin{xmllines} 
    650650      <file\_group id="1d" output\_freq="1d" output\_level="10" enabled=".TRUE."> <!-- 1d files -->  
    651651   <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
     
    658658       </file> 
    659659     </file\_group>  
    660 \end{xmlcode} 
     660\end{xmllines} 
    661661 
    662662(5) use of the ``@'' function: example 1, weighted temporal average 
     
    664664 - define a new variable in field\_definition 
    665665\vspace{-20pt} 
    666 \begin{xmlcode} 
     666\begin{xmllines} 
    667667 <field id="toce\_e3t" long\_name="temperature * e3t" unit="degC*m" grid\_ref="grid\_T\_3D" > toce * e3t </field > 
    668 \end{xmlcode} 
     668\end{xmllines} 
    669669 - use it when defining your file.   
    670670\vspace{-20pt} 
    671 \begin{xmlcode} 
     671\begin{xmllines} 
    672672<file\_group id="5d" output\_freq="5d"  output\_level="10" enabled=".TRUE." >  <!-- 5d files -->   
    673673 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
     
    675675 </file> 
    676676</file\_group>  
    677 \end{xmlcode} 
     677\end{xmllines} 
    678678The freq\_op="5d" attribute is used to define the operation frequency of the ``@'' function: here 5 day. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @toce\_e3t will do the 5-day mean of toce*e3t. Operation="instant" refers to the temporal operation to be performed on the field''@toce\_e3t / @e3t'': here the temporal average is alreday done by the ``@'' function so we just use instant to do the ratio of the 2 mean values. field\_ref="toce" means that attributes not explicitely defined, are inherited from toce field. Note that in this case, freq\_op must be equal to the file output\_freq. 
    679679 
     
    682682 - define a new variable in field\_definition 
    683683\vspace{-20pt} 
    684 \begin{xmlcode} 
     684\begin{xmllines} 
    685685 <field id="ssh2" long\_name="square of sea surface temperature" unit="degC2" >  ssh * ssh </field > 
    686 \end{xmlcode} 
     686\end{xmllines} 
    687687 - use it when defining your file.   
    688688\vspace{-20pt} 
    689 \begin{xmlcode} 
     689\begin{xmllines} 
    690690<file\_group id="1m" output\_freq="1m"  output\_level="10" enabled=".TRUE." >  <!-- 1m files -->   
    691691 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
     
    693693 </file> 
    694694</file\_group>  
    695 \end{xmlcode} 
     695\end{xmllines} 
    696696The freq\_op="1m" attribute is used to define the operation frequency of the ``@'' function: here 1 month. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': here the temporal average is alreday done by the ``@'' function so we just use instant. field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. Note that in this case, freq\_op must be equal to the file output\_freq. 
    697697 
     
    700700 - define 2 new variables in field\_definition 
    701701\vspace{-20pt} 
    702 \begin{xmlcode} 
     702\begin{xmllines} 
    703703 <field id="sstmax" field\_ref="sst" long\_name="max of sea surface temperature" operation="maximum" /> 
    704704 <field id="sstmin" field\_ref="sst" long\_name="min of sea surface temperature" operation="minimum" /> 
    705 \end{xmlcode} 
     705\end{xmllines} 
    706706 - use these 2 new variables when defining your file.   
    707707\vspace{-20pt} 
    708 \begin{xmlcode} 
     708\begin{xmllines} 
    709709<file\_group id="1m" output\_freq="1m"  output\_level="10" enabled=".TRUE." >  <!-- 1m files -->   
    710710 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
     
    712712 </file> 
    713713</file\_group>  
    714 \end{xmlcode} 
     714\end{xmllines} 
    715715The freq\_op="1d" attribute is used to define the operation frequency of the ``@'' function: here 1 day. The temporal operation done by the ``@'' is the one defined in the field definition: here maximum for sstmax and minimum for sstmin. So, in the above case, @sstmax will do the daily max and @sstmin the daily min. Operation="average" refers to the temporal operation to be performed on the field ``@sstmax - @sstmin'': here monthly mean (of daily max - daily min of the sst). field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field. 
    716716 
     
    10241024Output from the XIOS-1.0 IO server is compliant with \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of the CF metadata standard. Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of section \ref{IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
    10251025 
    1026 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. This must be set to true if these metadata are to be included in the output files. 
     1026Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the namelist parameter \np{ln_cfmeta} in the \ngn{namrun} namelist. This must be set to true if these metadata are to be included in the output files. 
    10271027 
    10281028 
     
    10481048new libraries and will then read both NetCDF3 and NetCDF4 files. NEMO 
    10491049executables linked with NetCDF4 libraries can be made to produce NetCDF3 
    1050 files by setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4}  
     1050files by setting the \np{ln_nc4zip} logical to false in the \textit{namnc4}  
    10511051namelist: 
    10521052 
     
    10561056 
    10571057If \key{netcdf4} has not been defined, these namelist parameters are not read.  
    1058 In this case, \np{ln\_nc4zip} is set false and dummy routines for a few 
     1058In this case, \np{ln_nc4zip} is set false and dummy routines for a few 
    10591059NetCDF4-specific functions are defined. These functions will not be used but 
    10601060need to be included so that compilation is possible with NetCDF3 libraries. 
     
    11061106         &filesize & filesize & \% \\ 
    11071107         &(KB)     & (KB)     & \\ 
    1108 ORCA2\_restart\_0000.nc & 16420 & 8860 & 47\%\\ 
    1109 ORCA2\_restart\_0001.nc & 16064 & 11456 & 29\%\\ 
    1110 ORCA2\_restart\_0002.nc & 16064 & 9744 & 40\%\\ 
    1111 ORCA2\_restart\_0003.nc & 16420 & 9404 & 43\%\\ 
    1112 ORCA2\_restart\_0004.nc & 16200 & 5844 & 64\%\\ 
    1113 ORCA2\_restart\_0005.nc & 15848 & 8172 & 49\%\\ 
    1114 ORCA2\_restart\_0006.nc & 15848 & 8012 & 50\%\\ 
    1115 ORCA2\_restart\_0007.nc & 16200 & 5148 & 69\%\\ 
    1116 ORCA2\_2d\_grid\_T\_0000.nc & 2200 & 1504 & 32\%\\ 
    1117 ORCA2\_2d\_grid\_T\_0001.nc & 2200 & 1748 & 21\%\\ 
    1118 ORCA2\_2d\_grid\_T\_0002.nc & 2200 & 1592 & 28\%\\ 
    1119 ORCA2\_2d\_grid\_T\_0003.nc & 2200 & 1540 & 30\%\\ 
    1120 ORCA2\_2d\_grid\_T\_0004.nc & 2200 & 1204 & 46\%\\ 
    1121 ORCA2\_2d\_grid\_T\_0005.nc & 2200 & 1444 & 35\%\\ 
    1122 ORCA2\_2d\_grid\_T\_0006.nc & 2200 & 1428 & 36\%\\ 
    1123 ORCA2\_2d\_grid\_T\_0007.nc & 2200 & 1148 & 48\%\\ 
    1124              ...            &  ... &  ... & ..  \\ 
    1125 ORCA2\_2d\_grid\_W\_0000.nc & 4416 & 2240 & 50\%\\ 
    1126 ORCA2\_2d\_grid\_W\_0001.nc & 4416 & 2924 & 34\%\\ 
    1127 ORCA2\_2d\_grid\_W\_0002.nc & 4416 & 2512 & 44\%\\ 
    1128 ORCA2\_2d\_grid\_W\_0003.nc & 4416 & 2368 & 47\%\\ 
    1129 ORCA2\_2d\_grid\_W\_0004.nc & 4416 & 1432 & 68\%\\ 
    1130 ORCA2\_2d\_grid\_W\_0005.nc & 4416 & 1972 & 56\%\\ 
    1131 ORCA2\_2d\_grid\_W\_0006.nc & 4416 & 2028 & 55\%\\ 
    1132 ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\%\\ 
     1108\ifile{ORCA2\_restart\_0000} & 16420 & 8860 & 47\%\\ 
     1109\ifile{ORCA2\_restart\_0001} & 16064 & 11456 & 29\%\\ 
     1110\ifile{ORCA2\_restart\_0002} & 16064 & 9744 & 40\%\\ 
     1111\ifile{ORCA2\_restart\_0003} & 16420 & 9404 & 43\%\\ 
     1112\ifile{ORCA2\_restart\_0004} & 16200 & 5844 & 64\%\\ 
     1113\ifile{ORCA2\_restart\_0005} & 15848 & 8172 & 49\%\\ 
     1114\ifile{ORCA2\_restart\_0006} & 15848 & 8012 & 50\%\\ 
     1115\ifile{ORCA2\_restart\_0007} & 16200 & 5148 & 69\%\\ 
     1116\ifile{ORCA2\_2d\_grid\_T\_0000} & 2200 & 1504 & 32\%\\ 
     1117\ifile{ORCA2\_2d\_grid\_T\_0001} & 2200 & 1748 & 21\%\\ 
     1118\ifile{ORCA2\_2d\_grid\_T\_0002} & 2200 & 1592 & 28\%\\ 
     1119\ifile{ORCA2\_2d\_grid\_T\_0003} & 2200 & 1540 & 30\%\\ 
     1120\ifile{ORCA2\_2d\_grid\_T\_0004} & 2200 & 1204 & 46\%\\ 
     1121\ifile{ORCA2\_2d\_grid\_T\_0005} & 2200 & 1444 & 35\%\\ 
     1122\ifile{ORCA2\_2d\_grid\_T\_0006} & 2200 & 1428 & 36\%\\ 
     1123\ifile{ORCA2\_2d\_grid\_T\_0007} & 2200 & 1148 & 48\%\\ 
     1124            ...         & ...  &  ... & ...  \\ 
     1125\ifile{ORCA2\_2d\_grid\_W\_0000} & 4416 & 2240 & 50\%\\ 
     1126\ifile{ORCA2\_2d\_grid\_W\_0001} & 4416 & 2924 & 34\%\\ 
     1127\ifile{ORCA2\_2d\_grid\_W\_0002} & 4416 & 2512 & 44\%\\ 
     1128\ifile{ORCA2\_2d\_grid\_W\_0003} & 4416 & 2368 & 47\%\\ 
     1129\ifile{ORCA2\_2d\_grid\_W\_0004} & 4416 & 1432 & 68\%\\ 
     1130\ifile{ORCA2\_2d\_grid\_W\_0005} & 4416 & 1972 & 56\%\\ 
     1131\ifile{ORCA2\_2d\_grid\_W\_0006} & 4416 & 2028 & 55\%\\ 
     1132\ifile{ORCA2\_2d\_grid\_W\_0007} & 4416 & 1368 & 70\%\\ 
    11331133\end{tabular} 
    11341134\caption{   \protect\label{Tab_NC4}  
     
    11381138 
    11391139When \key{iomput} is activated with \key{netcdf4} chunking and 
    1140 compression parameters for fields produced via \np{iom\_put} calls are 
     1140compression parameters for fields produced via \np{iom_put} calls are 
    11411141set via an equivalent and identically named namelist to \textit{namnc4}  
    11421142in \np{xmlio\_server.def}. Typically this namelist serves the mean files 
     
    11671167What is done depends on the \ngn{namtrd} logical set to \textit{true}: 
    11681168\begin{description} 
    1169 \item[\np{ln\_glo\_trd}] : at each \np{nn\_trd} time-step a check of the basin averaged properties  
     1169\item[\np{ln_glo_trd}] : at each \np{nn_trd} time-step a check of the basin averaged properties  
    11701170of the momentum and tracer equations is performed. This also includes a check of $T^2$, $S^2$,  
    11711171$\tfrac{1}{2} (u^2+v2)$, and potential energy time evolution equations properties ;  
    1172 \item[\np{ln\_dyn\_trd}] : each 3D trend of the evolution of the two momentum components is output ;  
    1173 \item[\np{ln\_dyn\_mxl}] : each 3D trend of the evolution of the two momentum components averaged  
     1172\item[\np{ln_dyn_trd}] : each 3D trend of the evolution of the two momentum components is output ;  
     1173\item[\np{ln_dyn_mxl}] : each 3D trend of the evolution of the two momentum components averaged  
    11741174                           over the mixed layer is output  ;  
    1175 \item[\np{ln\_vor\_trd}] : a vertical summation of the moment tendencies is performed,  
     1175\item[\np{ln_vor_trd}] : a vertical summation of the moment tendencies is performed,  
    11761176                           then the curl is computed to obtain the barotropic vorticity tendencies which are output ; 
    1177 \item[\np{ln\_KE\_trd}]  : each 3D trend of the Kinetic Energy equation is output ; 
    1178 \item[\np{ln\_tra\_trd}] : each 3D trend of the evolution of temperature and salinity is output ; 
    1179 \item[\np{ln\_tra\_mxl}] : each 2D trend of the evolution of temperature and salinity averaged  
     1177\item[\np{ln_KE_trd}]  : each 3D trend of the Kinetic Energy equation is output ; 
     1178\item[\np{ln_tra_trd}] : each 3D trend of the evolution of temperature and salinity is output ; 
     1179\item[\np{ln_tra_mxl}] : each 2D trend of the evolution of temperature and salinity averaged  
    11801180                           over the mixed layer is output ; 
    11811181\end{description} 
     
    11851185 
    11861186\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested.  
    1187 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl}  
     1187In particular, options associated with \np{ln_dyn_mxl}, \np{ln_vor_trd}, and \np{ln_tra_mxl}  
    11881188are not working, and none of the option have been tested with variable volume ($i.e.$ \key{vvl} defined). 
    11891189 
     
    12031203namelis variables. The algorithm used is based  
    12041204either on the work of \cite{Blanke_Raynaud_JPO97} (default option), or on a $4^th$ 
    1205 Runge-Hutta algorithm (\np{ln\_flork4}=true). Note that the \cite{Blanke_Raynaud_JPO97}  
     1205Runge-Hutta algorithm (\forcode{ln_flork4 = .true.}). Note that the \cite{Blanke_Raynaud_JPO97}  
    12061206algorithm have the advantage of providing trajectories which are consistent with the  
    12071207numeric of the code, so that the trajectories never intercept the bathymetry.  
     
    12091209\subsubsection{ Input data: initial coordinates } 
    12101210 
    1211 Initial coordinates can be given with Ariane Tools convention ( IJK coordinates ,(\np{ln\_ariane}=true) ) 
     1211Initial coordinates can be given with Ariane Tools convention ( IJK coordinates ,(\forcode{ln_ariane = .true.}) ) 
    12121212or with longitude and latitude. 
    12131213 
    12141214 
    1215 In case of Ariane convention, input filename is \np{init\_float\_ariane}. Its format is: 
     1215In case of Ariane convention, input filename is \np{init_float_ariane}. Its format is: 
    12161216 
    12171217\texttt{ I J K nisobfl itrash itrash } 
     
    12581258 
    12591259\np{jpnfl} is the total number of floats during the run. 
    1260 When initial positions are read in a restart file ( \np{ln\_rstflo}= .TRUE. ),  \np{jpnflnewflo} 
     1260When initial positions are read in a restart file ( \np{ln_rstflo}= .TRUE. ),  \np{jpnflnewflo} 
    12611261can be added in the initialization file.  
    12621262 
    12631263\subsubsection{ Output data } 
    12641264 
    1265 \np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl}  
     1265\np{nn_writefl} is the frequency of writing in float output file and \np{nn_stockfl}  
    12661266is the frequency of creation of the float restart file. 
    12671267 
    1268 Output data can be written in ascii files (\np{ln\_flo\_ascii} = .TRUE. ). In that case,  
     1268Output data can be written in ascii files (\np{ln_flo_ascii} = .TRUE. ). In that case,  
    12691269output filename is trajec\_float. 
    12701270 
    1271 Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii} = .FALSE. ). There are 2 possibilities: 
     1271Another possiblity of writing format is Netcdf (\np{ln_flo_ascii} = .FALSE. ). There are 2 possibilities: 
    12721272 
    12731273 - if (\key{iomput}) is used, outputs are selected in  iodef.xml. Here it is an example of specification  
     
    12751275 
    12761276\vspace{-30pt} 
    1277 \begin{xmlcode} 
     1277\begin{xmllines} 
    12781278     <group id="1d\_grid\_T" name="auto" description="ocean T grid variables" >   } 
    12791279       <file id="floats"  description="floats variables"> }\\ 
     
    12871287       </file>} 
    12881288  </group>} 
    1289 \end{xmlcode} 
    1290  
    1291  
    1292  -  if (\key{iomput}) is not used, a file called trajec\_float.nc will be created by IOIPSL library. 
     1289\end{xmllines} 
     1290 
     1291 
     1292 -  if (\key{iomput}) is not used, a file called \ifile{trajec\_float} will be created by IOIPSL library. 
    12931293 
    12941294 
     
    13121312Some parameters are available in namelist \ngn{namdia\_harm} : 
    13131313 
    1314 - \np{nit000\_han} is the first time step used for harmonic analysis 
    1315  
    1316 - \np{nitend\_han} is the last time step used for harmonic analysis 
    1317  
    1318 - \np{nstep\_han} is the time step frequency for harmonic analysis 
    1319  
    1320 - \np{nb\_ana} is the number of harmonics to analyse 
     1314- \np{nit000_han} is the first time step used for harmonic analysis 
     1315 
     1316- \np{nitend_han} is the last time step used for harmonic analysis 
     1317 
     1318- \np{nstep_han} is the time step frequency for harmonic analysis 
     1319 
     1320- \np{nb_ana} is the number of harmonics to analyse 
    13211321 
    13221322- \np{tname} is an array with names of tidal constituents to analyse 
    13231323 
    1324 \np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
     1324\np{nit000_han} and \np{nitend_han} must be between \np{nit000} and \np{nitend} of the simulation. 
    13251325The restart capability is not implemented. 
    13261326 
     
    13691369and the time scales over which they are averaged, as well as the level of output for debugging: 
    13701370 
    1371 \np{nn\_dct}: frequency of instantaneous transports computing 
    1372  
    1373 \np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
    1374  
    1375 \np{nn\_debug}: debugging of the section 
     1371\np{nn_dct}: frequency of instantaneous transports computing 
     1372 
     1373\np{nn_dctwri}: frequency of writing ( mean of instantaneous transports ) 
     1374 
     1375\np{nn_debug}: debugging of the section 
    13761376 
    13771377\subsubsection{ Creating a binary file containing the pathway of each section } 
     
    16811681The poleward heat and salt transports, their advective and diffusive component, and  
    16821682the meriodional stream function can be computed on-line in \mdl{diaptr}  
    1683 \np{ln\_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
    1684 When \np{ln\_subbas}~=~true, transports and stream function are computed  
     1683\np{ln_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
     1684When \np{ln_subbas}~=~true, transports and stream function are computed  
    16851685for the Atlantic, Indian, Pacific and Indo-Pacific Oceans (defined north of 30\deg S)  
    16861686as well as for the World Ocean. The sub-basin decomposition requires an input file  
     
    17561756in the zonal, meridional and vertical directions respectively. The vertical component is included although it is not strictly valid as the vertical velocity is calculated from the continuity equation rather than as a prognostic variable. Physically this represents the rate at which information is propogated across a grid cell. Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    17571757 
    1758 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of where the maximum value occurs. At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is printed along with the coordinates of each. The maximum values from the run are also copied to the ocean.output file.  
     1758The variables can be activated by setting the \np{nn_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of where the maximum value occurs. At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is printed along with the coordinates of each. The maximum values from the run are also copied to the ocean.output file.  
    17591759 
    17601760 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex

    r9389 r9392  
    3737This namelist contains only two variables: 
    3838\begin{description} 
    39 \item[\np{ln\_diurnal}] A logical switch for turning on/off both the cool skin and warm layer. 
    40 \item[\np{ln\_diurnal\_only}] A logical switch which if .TRUE. will run the diurnal model 
     39\item[\np{ln_diurnal}] A logical switch for turning on/off both the cool skin and warm layer. 
     40\item[\np{ln_diurnal_only}] A logical switch which if .TRUE. will run the diurnal model 
    4141without the other dynamical parts of NEMO.   
    42 \np{ln\_diurnal\_only} must be .FALSE. if \np{ln\_diurnal} is .FALSE. 
     42\np{ln_diurnal_only} must be .FALSE. if \np{ln_diurnal} is .FALSE. 
    4343\end{description} 
    4444 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex

    r9389 r9392  
    454454(d) hybrid $s-z$ coordinate,  
    455455(e) hybrid $s-z$ coordinate with partial step, and  
    456 (f) same as (e) but in the non-linear free surface (\protect\np{ln_linssh}=false).  
     456(f) same as (e) but in the non-linear free surface (\protect\forcode{ln_linssh = .false.}).  
    457457Note that the non-linear free surface can be used with any of the  
    4584585 coordinates (a) to (e).} 
     
    469469(Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). By default a non-linear free surface is used: 
    470470the coordinate follow the time-variation of the free surface so that the transformation is time dependent:  
    471 $z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln_linssh}=true),  
     471$z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\forcode{ln_linssh = .true.}),  
    472472the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface  
    473473(in other words, the top of the ocean in not a rigid-lid).  
     
    503503%%% 
    504504 
    505 Unless a linear free surface is used (\np{ln_linssh}=false), the arrays describing  
     505Unless a linear free surface is used (\forcode{ln_linssh = .false.}), the arrays describing  
    506506the grid point depths and vertical scale factors are three set of three dimensional arrays $(i,j,k)$  
    507507defined at \textit{before}, \textit{now} and \textit{after} time step. The time at which they are 
    508508defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. They are updated at each model time step 
    509509using a fixed reference coordinate system which computer names have a $\_0$ suffix.  
    510 When the linear free surface option is used (\np{ln_linssh}=true), \textit{before}, \textit{now}  
     510When the linear free surface option is used (\forcode{ln_linssh = .true.}), \textit{before}, \textit{now}  
    511511and \textit{after} arrays are simply set one for all to their reference counterpart.  
    512512 
     
    551551% ------------------------------------------------------------------------------------------------------------- 
    552552\subsection[$z$-coordinate (\protect\np{ln_zco}] 
    553         {$z$-coordinate (\protect\np{ln_zco}=true) and reference coordinate} 
     553        {$z$-coordinate (\protect\forcode{ln_zco = .true.}) and reference coordinate} 
    554554\label{DOM_zco} 
    555555 
     
    629629Rather than entering parameters $h_{sur}$, $h_{0}$, and $h_{1}$ directly, it is  
    630630possible to recalculate them. In that case the user sets  
    631 \np{ppsur}=\np{ppa0}=\np{ppa1}=999999., in \ngn{namcfg} namelist,  
     631\np{ppsur}=\np{ppa0}=\forcode{ppa1 = 999999}., in \ngn{namcfg} namelist,  
    632632and specifies instead the four following parameters: 
    633633\begin{itemize} 
     
    640640\end{itemize} 
    641641As an example, for the $45$ layers used in the DRAKKAR configuration those  
    642 parameters are: \jp{jpk}=46, \np{ppacr}=9, \np{ppkth}=23.563, \np{ppdzmin}=6m,  
    643 \np{pphmax}=5750m. 
     642parameters are: \jp{jpk}=46, \forcode{ppacr = 9}, \forcode{ppkth = 23}.563, \forcode{ppdzmin = 6}m,  
     643\forcode{pphmax = 5750}m. 
    644644 
    645645%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    722722% ------------------------------------------------------------------------------------------------------------- 
    723723\subsection   [$s$-coordinate (\protect\np{ln_sco})] 
    724            {$s$-coordinate (\protect\np{ln_sco}=true)} 
     724           {$s$-coordinate (\protect\forcode{ln_sco = .true.})} 
    725725\label{DOM_sco} 
    726726%------------------------------------------nam_zgr_sco--------------------------------------------------- 
     
    850850%        z*- or s*-coordinate 
    851851% ------------------------------------------------------------------------------------------------------------- 
    852 \subsection{$z^*$- or $s^*$-coordinate (\protect\np{ln_linssh}=false) } 
     852\subsection{$z^*$- or $s^*$-coordinate (\protect\forcode{ln_linssh = .false.}) } 
    853853\label{DOM_zgr_star} 
    854854 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex

    r9389 r9392  
    200200%                 enstrophy conserving scheme 
    201201%------------------------------------------------------------- 
    202 \subsubsection{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}=true)} 
     202\subsubsection{Enstrophy conserving scheme (\protect\forcode{ln_dynvor_ens = .true.})} 
    203203\label{DYN_vor_ens} 
    204204 
     
    221221%                 energy conserving scheme 
    222222%------------------------------------------------------------- 
    223 \subsubsection{Energy conserving scheme (\protect\np{ln\_dynvor\_ene}=true)} 
     223\subsubsection{Energy conserving scheme (\protect\forcode{ln_dynvor_ene = .true.})} 
    224224\label{DYN_vor_ene} 
    225225 
     
    238238%                 mix energy/enstrophy conserving scheme 
    239239%------------------------------------------------------------- 
    240 \subsubsection{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}=true) } 
     240\subsubsection{Mixed energy/enstrophy conserving scheme (\protect\forcode{ln_dynvor_mix = .true.}) } 
    241241\label{DYN_vor_mix} 
    242242 
     
    261261%                 energy and enstrophy conserving scheme 
    262262%------------------------------------------------------------- 
    263 \subsubsection{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}=true) } 
     263\subsubsection{Energy and enstrophy conserving scheme (\protect\forcode{ln_dynvor_een = .true.}) } 
    264264\label{DYN_vor_een} 
    265265 
     
    305305A key point in \eqref{Eq_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
    306306It uses the sum of masked t-point vertical scale factor divided either  
    307 by the sum of the four t-point masks (\np{nn\_een\_e3f}~=~1),  
    308 or  just by $4$ (\np{nn\_een\_e3f}~=~true). 
     307by the sum of the four t-point masks (\np{nn_een_e3f}~=~1),  
     308or  just by $4$ (\np{nn_een_e3f}~=~true). 
    309309The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$  
    310310tends to zero and extends by continuity the value of $e_{3f}$ into the land areas.  
     
    377377\end{aligned}         \right. 
    378378\end{equation}  
    379 When \np{ln\_dynzad\_zts}~=~\textit{true}, a split-explicit time stepping with 5 sub-timesteps is used  
     379When \np{ln_dynzad_zts}~=~\textit{true}, a split-explicit time stepping with 5 sub-timesteps is used  
    380380on the vertical advection term. 
    381381This option can be useful when the value of the timestep is limited by vertical advection \citep{Lemarie_OM2015}.  
    382382Note that in this case, a similar split-explicit time stepping should be used on  
    383383vertical advection of tracer to ensure a better stability,  
    384 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \S\ref{TRA_adv_tvd}). 
     384an option which is only available with a TVD scheme (see \np{ln_traadv_tvd_zts} in \S\ref{TRA_adv_tvd}). 
    385385 
    386386 
     
    451451difference scheme, CEN2, or a $3^{rd}$ order upstream biased scheme, UBS.  
    452452The latter is described in \citet{Shchepetkin_McWilliams_OM05}. The schemes are  
    453 selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}.  
     453selected using the namelist logicals \np{ln_dynadv_cen2} and \np{ln_dynadv_ubs}.  
    454454In flux form, the schemes differ by the choice of a space and time interpolation to  
    455455define the value of $u$ and $v$ at the centre of each face of $u$- and $v$-cells,  
     
    460460%                 2nd order centred scheme 
    461461%------------------------------------------------------------- 
    462 \subsubsection{$2^{nd}$ order centred scheme (cen2) (\protect\np{ln\_dynadv\_cen2}=true)} 
     462\subsubsection{$2^{nd}$ order centred scheme (cen2) (\protect\forcode{ln_dynadv_cen2 = .true.})} 
    463463\label{DYN_adv_cen2} 
    464464 
     
    481481%                 UBS scheme 
    482482%------------------------------------------------------------- 
    483 \subsubsection{Upstream Biased Scheme (UBS) (\protect\np{ln\_dynadv\_ubs}=true)} 
     483\subsubsection{Upstream Biased Scheme (UBS) (\protect\forcode{ln_dynadv_ubs = .true.})} 
    484484\label{DYN_adv_ubs} 
    485485 
     
    501501those in the centred second order method. As the scheme already includes  
    502502a diffusion component, it can be used without explicit  lateral diffusion on momentum  
    503 ($i.e.$ \np{ln\_dynldf\_lap}=\np{ln\_dynldf\_bilap}=false), and it is recommended to do so. 
     503($i.e.$ \np{ln_dynldf_lap}=\forcode{ln_dynldf_bilap = .false.}), and it is recommended to do so. 
    504504 
    505505The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$  
     
    554554%           z-coordinate with full step 
    555555%-------------------------------------------------------------------------------------------------------------- 
    556 \subsection   [$z$-coordinate with full step (\protect\np{ln\_dynhpg\_zco}) ] 
    557          {$z$-coordinate with full step (\protect\np{ln\_dynhpg\_zco}=true)} 
     556\subsection   [$z$-coordinate with full step (\protect\np{ln_dynhpg_zco}) ] 
     557         {$z$-coordinate with full step (\protect\forcode{ln_dynhpg_zco = .true.})} 
    558558\label{DYN_hpg_zco} 
    559559 
     
    595595%           z-coordinate with partial step 
    596596%-------------------------------------------------------------------------------------------------------------- 
    597 \subsection   [$z$-coordinate with partial step (\protect\np{ln\_dynhpg\_zps})] 
    598          {$z$-coordinate with partial step (\protect\np{ln\_dynhpg\_zps}=true)} 
     597\subsection   [$z$-coordinate with partial step (\protect\np{ln_dynhpg_zps})] 
     598         {$z$-coordinate with partial step (\protect\forcode{ln_dynhpg_zps = .true.})} 
    599599\label{DYN_hpg_zps} 
    600600 
     
    624624cubic polynomial method is currently disabled whilst known bugs are under investigation. 
    625625 
    626 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}=true) 
     626$\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\forcode{ln_dynhpg_sco = .true.}) 
    627627\begin{equation} \label{Eq_dynhpg_sco} 
    628628\left\{ \begin{aligned} 
     
    639639($e_{3w}$). 
    640640  
    641 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}=true). 
    642 This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}=true). 
    643  
    644 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}=true) 
     641$\bullet$ Traditional coding with adaptation for ice shelf cavities (\forcode{ln_dynhpg_isf = .true.}). 
     642This scheme need the activation of ice shelf cavities (\forcode{ln_isfcav = .true.}). 
     643 
     644$\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\forcode{ln_dynhpg_prj = .true.}) 
    645645 
    646646$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{Shchepetkin_McWilliams_OM05}  
    647 (\np{ln\_dynhpg\_djc}=true) (currently disabled; under development) 
     647(\forcode{ln_dynhpg_djc = .true.}) (currently disabled; under development) 
    648648 
    649649Note that expression \eqref{Eq_dynhpg_sco} is commonly used when the variable volume formulation is 
    650650activated (\key{vvl}) because in that case, even with a flat bottom, the coordinate surfaces are not 
    651651horizontal but follow the free surface \citep{Levier2007}. The pressure jacobian scheme 
    652 (\np{ln\_dynhpg\_prj}=true) is available as an improved option to \np{ln\_dynhpg\_sco}=true when 
     652(\forcode{ln_dynhpg_prj = .true.}) is available as an improved option to \forcode{ln_dynhpg_sco = .true.} when 
    653653\key{vvl} is active.  The pressure Jacobian scheme uses a constrained cubic spline to reconstruct 
    654654the density profile across the water column. This method maintains the monotonicity between the 
     
    660660\label{DYN_hpg_isf} 
    661661Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 
    662  the pressure gradient due to the ocean load. If cavity opened (\np{ln\_isfcav}~=~true) these 2 terms can be 
    663  calculated by setting \np{ln\_dynhpg\_isf}~=~true. No other scheme are working with the ice shelf.\\ 
     662 the pressure gradient due to the ocean load. If cavity opened (\np{ln_isfcav}~=~true) these 2 terms can be 
     663 calculated by setting \np{ln_dynhpg_isf}~=~true. No other scheme are working with the ice shelf.\\ 
    664664 
    665665$\bullet$ The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. 
     
    673673%           Time-scheme 
    674674%-------------------------------------------------------------------------------------------------------------- 
    675 \subsection   [Time-scheme (\protect\np{ln\_dynhpg\_imp}) ] 
    676          {Time-scheme (\protect\np{ln\_dynhpg\_imp}= true/false)} 
     675\subsection   [Time-scheme (\protect\np{ln_dynhpg_imp}) ] 
     676         {Time-scheme (\protect\np{ln_dynhpg_imp}= true/false)} 
    677677\label{DYN_hpg_imp} 
    678678 
     
    689689time level $t$ only, as in the standard leapfrog scheme.  
    690690 
    691 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}=true): 
     691$\bullet$ leapfrog scheme (\forcode{ln_dynhpg_imp = .true.}): 
    692692 
    693693\begin{equation} \label{Eq_dynhpg_lf} 
     
    696696\end{equation} 
    697697 
    698 $\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}=true): 
     698$\bullet$ semi-implicit scheme (\forcode{ln_dynhpg_imp = .true.}): 
    699699\begin{equation} \label{Eq_dynhpg_imp} 
    700700\frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
     
    713713the stability limits associated with advection or diffusion. 
    714714 
    715 In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}=true.  
     715In practice, the semi-implicit scheme is used when \forcode{ln_dynhpg_imp = .true.}.  
    716716In this case, we choose to apply the time filter to temperature and salinity used in  
    717717the equation of state, instead of applying it to the hydrostatic pressure or to the  
     
    727727Note that in the semi-implicit case, it is necessary to save the filtered density, an  
    728728extra three-dimensional field, in the restart file to restart the model with exact  
    729 reproducibility. This option is controlled by  \np{nn\_dynhpg\_rst}, a namelist parameter. 
     729reproducibility. This option is controlled by  \np{nn_dynhpg_rst}, a namelist parameter. 
    730730 
    731731% ================================================================ 
     
    806806variables (Fig.~\ref{Fig_DYN_dynspg_ts}).  
    807807The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) 
    808  is provided through the \np{nn\_baro} namelist parameter as:  
    809 $\rdt_e = \rdt / nn\_baro$. This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}=true)  
     808 is provided through the \np{nn_baro} namelist parameter as:  
     809$\rdt_e = \rdt / nn\_baro$. This parameter can be optionally defined automatically (\forcode{ln_bt_nn_auto = .true.})  
    810810considering that the stability of the barotropic system is essentially controled by external waves propagation.  
    811811Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. 
    812 Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. 
     812Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn_bt_cmax}. 
    813813 
    814814%%% 
     
    839839The former are used to obtain time filtered quantities at $t+\rdt$ while the latter are used to obtain time averaged  
    840840transports to advect tracers. 
    841 a) Forward time integration: \protect\np{ln\_bt\_fw}=true,  \protect\np{ln\_bt\_av}=true.  
    842 b) Centred time integration: \protect\np{ln\_bt\_fw}=false, \protect\np{ln\_bt\_av}=true.  
    843 c) Forward time integration with no time filtering (POM-like scheme): \protect\np{ln\_bt\_fw}=true, \protect\np{ln\_bt\_av}=false. } 
     841a) Forward time integration: \protect\forcode{ln_bt_fw = .true.},  \protect\forcode{ln_bt_av = .true.}.  
     842b) Centred time integration: \protect\forcode{ln_bt_fw = .false.}, \protect\forcode{ln_bt_av = .true.}.  
     843c) Forward time integration with no time filtering (POM-like scheme): \protect\forcode{ln_bt_fw = .true.}, \protect\forcode{ln_bt_av = .false.}. } 
    844844\end{center}    \end{figure} 
    845845%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    846846 
    847 In the default case (\np{ln\_bt\_fw}=true), the external mode is integrated  
     847In the default case (\forcode{ln_bt_fw = .true.}), the external mode is integrated  
    848848between \textit{now} and  \textit{after} baroclinic time-steps (Fig.~\ref{Fig_DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic  
    849 quantities (\np{ln\_bt\_av}=true). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
     849quantities (\forcode{ln_bt_av = .true.}). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
    850850These are used for the subsequent initialization of the barotropic mode in the following baroclinic step.  
    851851Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme,  
    852852asselin filtering is not applied to barotropic quantities. \\ 
    853853Alternatively, one can choose to integrate barotropic equations starting  
    854 from \textit{before} time step (\np{ln\_bt\_fw}=false). Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary), the baroclinic to barotropic forcing term given at \textit{now} time step  
     854from \textit{before} time step (\forcode{ln_bt_fw = .false.}). Although more computationaly expensive ( \np{nn_baro} additional iterations are indeed necessary), the baroclinic to barotropic forcing term given at \textit{now} time step  
    855855become centred in the middle of the integration window. It can easily be shown that this property  
    856856removes part of splitting errors between modes, which increases the overall numerical robustness. 
     
    868868%%% 
    869869 
    870 One can eventually choose to feedback instantaneous values by not using any time filter (\np{ln\_bt\_av}=false).  
     870One can eventually choose to feedback instantaneous values by not using any time filter (\forcode{ln_bt_av = .false.}).  
    871871In that case, external mode equations are continuous in time, ie they are not re-initialized when starting a new  
    872872sub-stepping sequence. This is the method used so far in the POM model, the stability being maintained by refreshing at (almost)  
     
    10361036 
    10371037% ================================================================ 
    1038 \subsection   [Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}) ] 
    1039          {Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}=true)} 
     1038\subsection   [Iso-level laplacian operator (\protect\np{ln_dynldf_lap}) ] 
     1039         {Iso-level laplacian operator (\protect\forcode{ln_dynldf_lap = .true.})} 
    10401040\label{DYN_ldf_lap} 
    10411041 
     
    10601060%           Rotated laplacian operator 
    10611061%-------------------------------------------------------------------------------------------------------------- 
    1062 \subsection   [Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}) ] 
    1063          {Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}=true)} 
     1062\subsection   [Rotated laplacian operator (\protect\np{ln_dynldf_iso}) ] 
     1063         {Rotated laplacian operator (\protect\forcode{ln_dynldf_iso = .true.})} 
    10641064\label{DYN_ldf_iso} 
    10651065 
    10661066A rotation of the lateral momentum diffusion operator is needed in several cases:  
    1067 for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}=true) and for  
    1068 either iso-neutral (\np{ln\_dynldf\_iso}=true) or geopotential  
    1069 (\np{ln\_dynldf\_hor}=true) diffusion in the $s$-coordinate. In the partial step  
     1067for iso-neutral diffusion in the $z$-coordinate (\forcode{ln_dynldf_iso = .true.}) and for  
     1068either iso-neutral (\forcode{ln_dynldf_iso = .true.}) or geopotential  
     1069(\forcode{ln_dynldf_hor = .true.}) diffusion in the $s$-coordinate. In the partial step  
    10701070case, coordinates are horizontal except at the deepest level and no  
    1071 rotation is performed when \np{ln\_dynldf\_hor}=true. The diffusion operator  
     1071rotation is performed when \forcode{ln_dynldf_hor = .true.}. The diffusion operator  
    10721072is defined simply as the divergence of down gradient momentum fluxes on each  
    10731073momentum component. It must be emphasized that this formulation ignores  
     
    11291129%           Iso-level bilaplacian operator 
    11301130%-------------------------------------------------------------------------------------------------------------- 
    1131 \subsection   [Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap})] 
    1132          {Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}=true)} 
     1131\subsection   [Iso-level bilaplacian operator (\protect\np{ln_dynldf_bilap})] 
     1132         {Iso-level bilaplacian operator (\protect\forcode{ln_dynldf_bilap = .true.})} 
    11331133\label{DYN_ldf_bilap} 
    11341134 
     
    11571157would be too restrictive a constraint on the time step. Two time stepping schemes  
    11581158can be used for the vertical diffusion term : $(a)$ a forward time differencing  
    1159 scheme (\np{ln\_zdfexp}=true) using a time splitting technique  
    1160 (\np{nn\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme  
    1161 (\np{ln\_zdfexp}=false) (see \S\ref{STP}). Note that namelist variables  
    1162 \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.  
     1159scheme (\forcode{ln_zdfexp = .true.}) using a time splitting technique  
     1160(\np{nn_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme  
     1161(\forcode{ln_zdfexp = .false.}) (see \S\ref{STP}). Note that namelist variables  
     1162\np{ln_zdfexp} and \np{nn_zdfexp} apply to both tracers and dynamics.  
    11631163 
    11641164The formulation of the vertical subgrid scale physics is the same whatever  
     
    12061206may enter the dynamical equations by affecting the surface pressure gradient.  
    12071207 
    1208 (1) When \np{ln\_apr\_dyn}~=~true (see \S\ref{SBC_apr}), the atmospheric pressure is taken  
     1208(1) When \np{ln_apr_dyn}~=~true (see \S\ref{SBC_apr}), the atmospheric pressure is taken  
    12091209into account when computing the surface pressure gradient. 
    12101210 
    1211 (2) When \np{ln\_tide\_pot}~=~true and \np{ln\_tide}~=~true (see \S\ref{SBC_tide}),  
     1211(2) When \np{ln_tide_pot}~=~true and \np{ln_tide}~=~true (see \S\ref{SBC_tide}),  
    12121212the tidal potential is taken into account when computing the surface pressure gradient. 
    12131213 
    1214 (3) When \np{nn\_ice\_embd}~=~2 and LIM or CICE is used ($i.e.$ when the sea-ice is embedded in the ocean),  
     1214(3) When \np{nn_ice_embd}~=~2 and LIM or CICE is used ($i.e.$ when the sea-ice is embedded in the ocean),  
    12151215the snow-ice mass is taken into account when computing the surface pressure gradient. 
    12161216 
     
    12381238weighted velocity (see \S\ref{Apdx_A_momentum})   
    12391239 
    1240 $\bullet$ vector invariant form or linear free surface (\np{ln\_dynhpg\_vec}=true ; \key{vvl} not defined): 
     1240$\bullet$ vector invariant form or linear free surface (\forcode{ln_dynhpg_vec = .true.} ; \key{vvl} not defined): 
    12411241\begin{equation} \label{Eq_dynnxt_vec} 
    12421242\left\{   \begin{aligned} 
     
    12461246\end{equation}  
    12471247 
    1248 $\bullet$ flux form and nonlinear free surface (\np{ln\_dynhpg\_vec}=false ; \key{vvl} defined): 
     1248$\bullet$ flux form and nonlinear free surface (\forcode{ln_dynhpg_vec = .false.} ; \key{vvl} defined): 
    12491249\begin{equation} \label{Eq_dynnxt_flux} 
    12501250\left\{   \begin{aligned} 
     
    12561256where RHS is the right hand side of the momentum equation, the subscript $f$  
    12571257denotes filtered values and $\gamma$ is the Asselin coefficient. $\gamma$ is  
    1258 initialized as \np{nn\_atfp} (namelist parameter). Its default value is \np{nn\_atfp} = $10^{-3}$. 
     1258initialized as \np{nn_atfp} (namelist parameter). Its default value is \np{nn_atfp} = $10^{-3}$. 
    12591259In both cases, the modified Asselin filter is not applied since perfect conservation  
    12601260is not an issue for the momentum equations. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex

    r9389 r9392  
    1717% Boundary Condition at the Coast 
    1818% ================================================================ 
    19 \section{Boundary Condition at the Coast (\protect\np{rn\_shlat})} 
     19\section{Boundary Condition at the Coast (\protect\np{rn_shlat})} 
    2020\label{LBC_coast} 
    2121%--------------------------------------------nam_lbc------------------------------------------------------- 
     
    7272condition influences the relative vorticity and momentum diffusive trends, and is  
    7373required in order to compute the vorticity at the coast. Four different types of  
    74 lateral boundary condition are available, controlled by the value of the \np{rn\_shlat}  
     74lateral boundary condition are available, controlled by the value of the \np{rn_shlat}  
    7575namelist parameter. (The value of the mask$_{f}$ array along the coastline is set  
    7676equal to this parameter.) These are: 
     
    8888\begin{description} 
    8989 
    90 \item[free-slip boundary condition (\np{rn\_shlat}=0): ]  the tangential velocity at the  
     90\item[free-slip boundary condition (\forcode{rn_shlat = 0}): ]  the tangential velocity at the  
    9191coastline is equal to the offshore velocity, $i.e.$ the normal derivative of the  
    9292tangential velocity is zero at the coast, so the vorticity: mask$_{f}$ array is set  
    9393to zero inside the land and just at the coast (Fig.~\ref{Fig_LBC_shlat}-a). 
    9494 
    95 \item[no-slip boundary condition (\np{rn\_shlat}=2): ] the tangential velocity vanishes  
     95\item[no-slip boundary condition (\forcode{rn_shlat = 2}): ] the tangential velocity vanishes  
    9696at the coastline. Assuming that the tangential velocity decreases linearly from  
    9797the closest ocean velocity grid point to the coastline, the normal derivative is  
     
    112112\end{equation} 
    113113 
    114 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2): ] the tangential  
     114\item["partial" free-slip boundary condition (0$<$\np{rn_shlat}$<$2): ] the tangential  
    115115velocity at the coastline is smaller than the offshore velocity, $i.e.$ there is a lateral  
    116116friction but not strong enough to make the tangential velocity at the coast vanish  
     
    118118strictly inbetween $0$ and $2$. 
    119119 
    120 \item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}): ] the viscous boundary  
     120\item["strong" no-slip boundary condition (2$<$\np{rn_shlat}): ] the viscous boundary  
    121121layer is assumed to be smaller than half the grid size (Fig.~\ref{Fig_LBC_shlat}-d).  
    122122The friction is thus larger than in the no-slip case. 
     
    331331the model output files is undefined. Note that this is a problem for the meshmask file  
    332332which requires to be defined over the whole domain. Therefore, user should not eliminate  
    333 land processors when creating a meshmask file ($i.e.$ when setting a non-zero value to \np{nn\_msh}). 
     333land processors when creating a meshmask file ($i.e.$ when setting a non-zero value to \np{nn_msh}). 
    334334 
    335335%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    387387\label{BDY_namelist} 
    388388 
    389 The BDY module is activated by setting \np{ln\_bdy} to true. 
     389The BDY module is activated by setting \np{ln_bdy} to true. 
    390390It is possible to define more than one boundary ``set'' and apply 
    391391different boundary conditions to each set. The number of boundary 
    392 sets is defined by \np{nb\_bdy}.  Each boundary set may be defined 
     392sets is defined by \np{nb_bdy}.  Each boundary set may be defined 
    393393as a set of straight line segments in a namelist 
    394 (\np{ln\_coords\_file}=.false.) or read in from a file 
    395 (\np{ln\_coords\_file}=.true.). If the set is defined in a namelist, 
     394(\np{ln_coords_file}=.false.) or read in from a file 
     395(\np{ln_coords_file}=.true.). If the set is defined in a namelist, 
    396396then the namelists nambdy\_index must be included separately, one for 
    397397each set. If the set is defined by a file, then a 
    398 ``coordinates.bdy.nc'' file must be provided. The coordinates.bdy file 
    399 is analagous to the usual NEMO ``coordinates.nc'' file. In the example 
     398``\ifile{coordinates.bdy}'' file must be provided. The coordinates.bdy file 
     399is analagous to the usual NEMO ``\ifile{coordinates}'' file. In the example 
    400400above, there are two boundary sets, the first of which is defined via 
    401401a file and the second is defined in a namelist. For more details of 
     
    410410(``tra''). For each set of variables there is a choice of algorithm 
    411411and a choice for the data, eg. for the active tracers the algorithm is 
    412 set by \np{nn\_tra} and the choice of data is set by 
    413 \np{nn\_tra\_dta}.  
     412set by \np{nn_tra} and the choice of data is set by 
     413\np{nn_tra_dta}.  
    414414 
    415415The choice of algorithm is currently as follows: 
     
    429429 
    430430The main choice for the boundary data is 
    431 to use initial conditions as boundary data (\np{nn\_tra\_dta}=0) or to 
    432 use external data from a file (\np{nn\_tra\_dta}=1). For the 
     431to use initial conditions as boundary data (\forcode{nn_tra_dta = 0}) or to 
     432use external data from a file (\forcode{nn_tra_dta = 1}). For the 
    433433barotropic solution there is also the option to use tidal 
    434434harmonic forcing either by itself or in addition to other external 
     
    492492\end{equation} 
    493493The width of the FRS zone is specified in the namelist as  
    494 \np{nn\_rimwidth}. This is typically set to a value between 8 and 10.  
     494\np{nn_rimwidth}. This is typically set to a value between 8 and 10.  
    495495 
    496496%---------------------------------------------- 
     
    534534 
    535535The boundary geometry for each set may be defined in a namelist 
    536 nambdy\_index or by reading in a ``coordinates.bdy.nc'' file. The 
     536nambdy\_index or by reading in a ``\ifile{coordinates.bdy}'' file. The 
    537537nambdy\_index namelist defines a series of straight-line segments for 
    538538north, east, south and west boundaries. For the northern boundary, 
     
    546546 
    547547The boundary geometry may also be defined from a 
    548 ``coordinates.bdy.nc'' file. Figure \ref{Fig_LBC_nc_header} 
     548``\ifile{coordinates.bdy}'' file. Figure \ref{Fig_LBC_nc_header} 
    549549gives an example of the header information from such a file. The file 
    550550should contain the index arrays for each of the $T$, $U$ and $V$ 
     
    561561shelf break, then the areas of ocean outside of this boundary will 
    562562need to be masked out. This can be done by reading a mask file defined 
    563 as \np{cn\_mask\_file} in the nam\_bdy namelist. Only one mask file is 
     563as \np{cn_mask_file} in the nam\_bdy namelist. Only one mask file is 
    564564used even if multiple boundary sets are defined. 
    565565 
     
    609609\includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 
    610610\caption {     \protect\label{Fig_LBC_nc_header}  
    611 Example of the header for a coordinates.bdy.nc file} 
     611Example of the header for a \ifile{coordinates.bdy} file} 
    612612\end{center}   \end{figure} 
    613613%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    618618 
    619619There is an option to force the total volume in the regional model to be constant,  
    620 similar to the option in the OBC module. This is controlled  by the \np{nn\_volctl}  
    621 parameter in the namelist. A value of \np{nn\_volctl}~=~0 indicates that this option is not used.  
    622 If  \np{nn\_volctl}~=~1 then a correction is applied to the normal velocities  
     620similar to the option in the OBC module. This is controlled  by the \np{nn_volctl}  
     621parameter in the namelist. A value of \np{nn_volctl}~=~0 indicates that this option is not used.  
     622If  \np{nn_volctl}~=~1 then a correction is applied to the normal velocities  
    623623around the boundary at each timestep to ensure that the integrated volume flow  
    624 through the boundary is zero. If \np{nn\_volctl}~=~2 then the calculation of  
     624through the boundary is zero. If \np{nn_volctl}~=~2 then the calculation of  
    625625the volume change on the timestep includes the change due to the freshwater  
    626626flux across the surface and the correction velocity corrects for this as well. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex

    r9389 r9392  
    2525Note that this chapter describes the standard implementation of iso-neutral 
    2626tracer mixing, and Griffies's implementation, which is used if 
    27 \np{traldf\_grif}=true, is described in Appdx\ref{sec:triad} 
     27\forcode{traldf_grif = .true.}, is described in Appdx\ref{sec:triad} 
    2828 
    2929%-----------------------------------nam_traldf - nam_dynldf-------------------------------------------- 
     
    4646A direction for lateral mixing has to be defined when the desired operator does  
    4747not act along the model levels. This occurs when $(a)$ horizontal mixing is  
    48 required on tracer or momentum (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor})  
     48required on tracer or momentum (\np{ln_traldf_hor} or \np{ln_dynldf_hor})  
    4949in $s$- or mixed $s$-$z$- coordinates, and $(b)$ isoneutral mixing is required  
    5050whatever the vertical coordinate is. This direction of mixing is defined by its  
     
    8888%gm%  caution I'm not sure the simplification was a good idea!  
    8989 
    90 These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}=True,  
    91 and either \np{ln\_traldf\_hor}=True or \np{ln\_dynldf\_hor}=True.  
     90These slopes are computed once in \rou{ldfslp\_init} when \forcode{ln_sco = .true.}rue,  
     91and either \forcode{ln_traldf_hor = .true.}rue or \forcode{ln_dynldf_hor = .true.}rue.  
    9292 
    9393\subsection{Slopes for tracer iso-neutral mixing}\label{LDF_slp_iso} 
     
    147147\item[$s$- or hybrid $s$-$z$- coordinate : ] in the current release of \NEMO,  
    148148iso-neutral mixing is only employed for $s$-coordinates if the 
    149 Griffies scheme is used (\np{traldf\_grif}=true; see Appdx \ref{sec:triad}).  
     149Griffies scheme is used (\forcode{traldf_grif = .true.}; see Appdx \ref{sec:triad}).  
    150150In other words, iso-neutral mixing will only be accurately represented with a  
    151 linear equation of state (\np{nn\_eos}=1 or 2). In the case of a "true" equation  
     151linear equation of state (\forcode{nn_eos = 1} or 2). In the case of a "true" equation  
    152152of state, the evaluation of $i$ and $j$ derivatives in \eqref{Eq_ldfslp_iso}  
    153153will include a pressure dependent part, leading to the wrong evaluation of  
     
    212212ocean model are modified \citep{Weaver_Eby_JPO97, 
    213213  Griffies_al_JPO98}. Griffies's scheme is now available in \NEMO if 
    214 \np{traldf\_grif\_iso} is set true; see Appdx \ref{sec:triad}. Here, 
     214\np{traldf_grif_iso} is set true; see Appdx \ref{sec:triad}. Here, 
    215215another strategy is presented \citep{Lazar_PhD97}: a local 
    216216filtering of the iso-neutral slopes (made on 9 grid-points) prevents 
     
    347347When none of the \textbf{key\_dynldf\_...} and \textbf{key\_traldf\_...} keys are  
    348348defined, a constant value is used over the whole ocean for momentum and  
    349 tracers, which is specified through the \np{rn\_ahm0} and \np{rn\_aht0} namelist  
     349tracers, which is specified through the \np{rn_ahm0} and \np{rn_aht0} namelist  
    350350parameters. 
    351351 
     
    356356mixing coefficients will require 3D arrays. In the 1D option, a hyperbolic variation  
    357357of the lateral mixing coefficient is introduced in which the surface value is  
    358 \np{rn\_aht0} (\np{rn\_ahm0}), the bottom value is 1/4 of the surface value,  
     358\np{rn_aht0} (\np{rn_ahm0}), the bottom value is 1/4 of the surface value,  
    359359and the transition takes place around z=300~m with a width of 300~m  
    360360($i.e.$ both the depth and the width of the inflection point are set to 300~m).  
     
    372372\end{equation} 
    373373where $e_{max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked  
    374 ocean domain, and $A_o^l$ is the \np{rn\_ahm0} (momentum) or \np{rn\_aht0} (tracer)  
     374ocean domain, and $A_o^l$ is the \np{rn_ahm0} (momentum) or \np{rn_aht0} (tracer)  
    375375namelist parameter. This variation is intended to reflect the lesser need for subgrid  
    376376scale eddy mixing where the grid size is smaller in the domain. It was introduced in  
     
    384384Other formulations can be introduced by the user for a given configuration.  
    385385For example, in the ORCA2 global ocean model (see Configurations), the laplacian  
    386 viscosity operator uses \np{rn\_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$  
    387 north and south and decreases linearly to \np{rn\_aht0}~= 2.10$^3$ m$^2$/s  
     386viscosity operator uses \np{rn_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$  
     387north and south and decreases linearly to \np{rn_aht0}~= 2.10$^3$ m$^2$/s  
    388388at the equator \citep{Madec_al_JPO96, Delecluse_Madec_Bk00}. This modification  
    389389can be found in routine \rou{ldf\_dyn\_c2d\_orca} defined in \mdl{ldfdyn\_c2d}.  
     
    423423(3) for isopycnal diffusion on momentum or tracers, an additional purely  
    424424horizontal background diffusion with uniform coefficient can be added by  
    425 setting a non zero value of \np{rn\_ahmb0} or \np{rn\_ahtb0}, a background horizontal  
     425setting a non zero value of \np{rn_ahmb0} or \np{rn_ahtb0}, a background horizontal  
    426426eddy viscosity or diffusivity coefficient (namelist parameters whose default  
    427427values are $0$). However, the technique used to compute the isopycnal  
     
    438438(6) it is possible to use both the laplacian and biharmonic operators concurrently. 
    439439 
    440 (7) it is possible to run without explicit lateral diffusion on momentum (\np{ln\_dynldf\_lap} =  
    441 \np{ln\_dynldf\_bilap} = false). This is recommended when using the UBS advection  
    442 scheme on momentum (\np{ln\_dynadv\_ubs} = true, see \ref{DYN_adv_ubs})  
     440(7) it is possible to run without explicit lateral diffusion on momentum (\np{ln_dynldf_lap} =  
     441\np{ln_dynldf_bilap} = false). This is recommended when using the UBS advection  
     442scheme on momentum (\np{ln_dynadv_ubs} = true, see \ref{DYN_adv_ubs})  
    443443and can be useful for testing purposes. 
    444444 
     
    455455described in \S\ref{LDF_coef}. If none of the keys \key{traldf\_cNd}, 
    456456N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 
    457 GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and 
    458 \np{rn\_aeiv\_0}. If 2D-varying coefficients are set with 
     457GM diffusivity $A_e$ are directly set by \np{rn_aeih_0} and 
     458\np{rn_aeiv_0}. If 2D-varying coefficients are set with 
    459459\key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 
    460460scale factor according to \eqref{Eq_title} \footnote{Except in global ORCA 
     
    467467  case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further 
    468468  reduced by a factor $|f/f_{20}|$, where $f_{20}$ is the value of $f$ 
    469   at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored 
     469  at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn_aeiv_0} is ignored 
    470470unless it is zero. 
    471471} 
     
    485485\end{equation} 
    486486where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set  
    487 through \np{rn\_aeiv}, a \textit{nam\_traldf} namelist parameter.  
     487through \np{rn_aeiv}, a \textit{nam\_traldf} namelist parameter.  
    488488The three components of the eddy induced velocity are computed and add  
    489489to the eulerian velocity in \mdl{traadv\_eiv}. This has been preferred to a  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex

    r9389 r9392  
    2424The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model 
    2525equivalent values for observations on the 0th timestep. The code is then called again after 
    26 each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln\_diaobs} 
     26each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln_diaobs} 
    2727is set to true. 
    2828 
     
    3434Some profile observation types (e.g. tropical moored buoys) are made available as daily averaged quantities. 
    3535The observation operator code can be set-up to calculate the equivalent daily average model temperature fields 
    36 using the \np{nn\_profdavtypes} namelist array. Some SST observations are equivalent to a night-time 
     36using the \np{nn_profdavtypes} namelist array. Some SST observations are equivalent to a night-time 
    3737average value and the observation operator code can calculate equivalent night-time average model SST fields by 
    38 setting the namelist value \np{ln\_sstnight} to true. Otherwise the model value from the nearest timestep to the 
     38setting the namelist value \np{ln_sstnight} to true. Otherwise the model value from the nearest timestep to the 
    3939observation time is used. 
    4040 
     
    8888 
    8989Options are defined through the  \ngn{namobs} namelist variables. 
    90 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity 
     90The options \np{ln_t3d} and \np{ln_s3d} switch on the temperature and salinity 
    9191profile observation operator code. The filename or array of filenames are 
    92 specified using the \np{cn\_profbfiles} variable. The model grid points for a 
     92specified using the \np{cn_profbfiles} variable. The model grid points for a 
    9393particular  observation latitude and longitude are found using the grid 
    9494searching part of the code. This can be expensive, particularly for large 
    95 numbers of observations, setting \np{ln\_grid\_search\_lookup} allows the use of 
     95numbers of observations, setting \np{ln_grid_search_lookup} allows the use of 
    9696a lookup table which is saved into an ``xypos`` file (or files). This will need 
    9797to be generated the first time if it does not exist in the run directory. 
    9898However, once produced it will significantly speed up future grid searches. 
    99 Setting \np{ln\_grid\_global} means that the code distributes the observations 
     99Setting \np{ln_grid_global} means that the code distributes the observations 
    100100evenly between processors. Alternatively each processor will work with 
    101101observations located within the model subdomain (see section~\ref{OBS_parallel}). 
     
    406406The mean dynamic 
    407407topography (MDT) must be provided in a separate file defined on the model grid 
    408  called {\it slaReferenceLevel.nc}. The MDT is required in 
     408 called \ifile{slaReferenceLevel}. The MDT is required in 
    409409order to produce the model equivalent sea level anomaly from the model sea 
    410410surface height. Below is an example header for this file (on the ORCA025 grid). 
     
    556556NEMO therefore has the capability to specify either an interpolation or an averaging (for surface observation types only).  
    557557 
    558 The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. This default option can be set to values from 0 to 6.  
     558The main namelist option associated with the interpolation/averaging is \np{nn_2dint}. This default option can be set to values from 0 to 6.  
    559559Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging. 
    560560\begin{itemize} 
    561 \item \np{nn\_2dint}=0: Distance-weighted interpolation 
    562 \item \np{nn\_2dint}=1: Distance-weighted interpolation (small angle) 
    563 \item \np{nn\_2dint}=2: Bilinear interpolation (geographical grid) 
    564 \item \np{nn\_2dint}=3: Bilinear remapping interpolation (general grid) 
    565 \item \np{nn\_2dint}=4: Polynomial interpolation 
    566 \item \np{nn\_2dint}=5: Radial footprint averaging with diameter specified in the namelist as \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
    567 \item \np{nn\_2dint}=6: Rectangular footprint averaging with E/W and N/S size specified in the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
     561\item \forcode{nn_2dint = 0}: Distance-weighted interpolation 
     562\item \forcode{nn_2dint = 1}: Distance-weighted interpolation (small angle) 
     563\item \forcode{nn_2dint = 2}: Bilinear interpolation (geographical grid) 
     564\item \forcode{nn_2dint = 3}: Bilinear remapping interpolation (general grid) 
     565\item \forcode{nn_2dint = 4}: Polynomial interpolation 
     566\item \forcode{nn_2dint = 5}: Radial footprint averaging with diameter specified in the namelist as \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
     567\item \forcode{nn_2dint = 6}: Rectangular footprint averaging with E/W and N/S size specified in the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
    568568\end{itemize} 
    569569The ??? in the last two options indicate these options should be specified for each observation type for which the averaging is to be performed (see namelist example above). 
    570 The \np{nn\_2dint} default option can be overridden for surface observation types using namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 
     570The \np{nn_2dint} default option can be overridden for surface observation types using namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 
    571571 
    572572Below is some more detail on the various options for interpolation and averaging available in NEMO. 
     
    956956 
    957957The above namelist will result in feedback files whose first 12 hours contain 
    958 the first field of foo.nc and the second 12 hours contain the second field. 
     958the first field of \ifile{foo} and the second 12 hours contain the second field. 
    959959 
    960960%\begin{framed} 
     
    998998\noindent 
    999999\linebreak 
    1000 \textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}.nc} 
     1000\ifile{\textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}}} 
    10011001 
    10021002\noindent 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex

    r9389 r9392  
    2828 
    2929Five different ways to provide the first six fields to the ocean are available which  
    30 are controlled by namelist \ngn{namsbc} variables: an analytical formulation (\np{ln\_ana}~=~true),  
    31 a flux formulation (\np{ln\_flx}~=~true), a bulk formulae formulation (CORE  
    32 (\np{ln\_blk\_core}~=~true), CLIO (\np{ln\_blk\_clio}~=~true) or MFS 
     30are controlled by namelist \ngn{namsbc} variables: an analytical formulation (\np{ln_ana}~=~true),  
     31a flux formulation (\np{ln_flx}~=~true), a bulk formulae formulation (CORE  
     32(\np{ln_blk_core}~=~true), CLIO (\np{ln_blk_clio}~=~true) or MFS 
    3333\footnote { Note that MFS bulk formulae compute fluxes only for the ocean component} 
    34 (\np{ln\_blk\_mfs}~=~true) bulk formulae) and a coupled or mixed forced/coupled formulation  
    35 (exchanges with a atmospheric model via the OASIS coupler) (\np{ln\_cpl} or \np{ln\_mixcpl}~=~true).  
    36 When used ($i.e.$ \np{ln\_apr\_dyn}~=~true), the atmospheric pressure forces both ocean and ice dynamics. 
    37  
    38 The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter.  
     34(\np{ln_blk_mfs}~=~true) bulk formulae) and a coupled or mixed forced/coupled formulation  
     35(exchanges with a atmospheric model via the OASIS coupler) (\np{ln_cpl} or \np{ln_mixcpl}~=~true).  
     36When used ($i.e.$ \np{ln_apr_dyn}~=~true), the atmospheric pressure forces both ocean and ice dynamics. 
     37 
     38The frequency at which the forcing fields have to be updated is given by the \np{nn_fsbc} namelist parameter.  
    3939When the fields are supplied from data files (flux and bulk formulations), the input fields  
    4040need not be supplied on the model grid. Instead a file of coordinates and weights can  
     
    5050\item the rotation of vector components supplied relative to an east-north  
    5151coordinate system onto the local grid directions in the model ;  
    52 \item the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}~=~true) ;  
    53 \item the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) (\np{nn\_ice}~=~0,1, 2 or 3) ;  
    54 \item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}~=~true) ;  
    55 \item the addition of isf melting as lateral inflow (parameterisation) or as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ;  
    56 \item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn\_fwb}~=~0,~1~or~2) ;  
    57 \item the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle (\np{ln\_dm2dc}~=~true) ;  
    58 and a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}~=~true).  
     52\item the addition of a surface restoring term to observed SST and/or SSS (\np{ln_ssr}~=~true) ;  
     53\item the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) (\np{nn_ice}~=~0,1, 2 or 3) ;  
     54\item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln_rnf}~=~true) ;  
     55\item the addition of isf melting as lateral inflow (parameterisation) or as fluxes applied at the land-ice ocean interface (\np{ln_isf}) ;  
     56\item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn_fwb}~=~0,~1~or~2) ;  
     57\item the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle (\np{ln_dm2dc}~=~true) ;  
     58and a neutral drag coefficient can be read from an external wave model (\np{ln_cdgw}~=~true).  
    5959\end{itemize} 
    6060The latter option is possible only in case core or mfs bulk formulas are selected. 
     
    9191and \eqref{Eq_tra_sbc_lin} in \S\ref{TRA_sbc}).  
    9292The latter is the penetrative part of the heat flux. It is applied as a 3D  
    93 trends of the temperature equation (\mdl{traqsr} module) when \np{ln\_traqsr}=\textit{true}. 
     93trends of the temperature equation (\mdl{traqsr} module) when \np{ln_traqsr}=\textit{true}. 
    9494The way the light penetrates inside the water column is generally a sum of decreasing  
    9595exponentials (see \S\ref{TRA_qsr}).  
     
    110110%created!) 
    111111% 
    112 %Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu  
     112%Especially the \np{nn_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu  
    113113%ssv) i.e. information required by flux computation or sea-ice 
    114114% 
     
    130130The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})  
    131131the surface currents, temperature and salinity.   
    132 These variables are averaged over \np{nn\_fsbc} time-step (\ref{Tab_ssm}),  
     132These variables are averaged over \np{nn_fsbc} time-step (\ref{Tab_ssm}),  
    133133and it is these averaged fields which are used to computes the surface fluxes  
    134 at a frequency of \np{nn\_fsbc} time-step. 
     134at a frequency of \np{nn_fsbc} time-step. 
    135135 
    136136 
     
    185185 
    186186Note that when an input data is archived on a disc which is accessible directly  
    187 from the workspace where the code is executed, then the use can set the \np{cn\_dir}  
     187from the workspace where the code is executed, then the use can set the \np{cn_dir}  
    188188to the pathway leading to the data. By default, the data are assumed to have been  
    189189copied so that cn\_dir='./'. 
     
    214214\hline 
    215215                         & daily or weekLLL          & monthly                   &   yearly          \\   \hline 
    216 clim = false   & fn\_yYYYYmMMdDD  &   fn\_yYYYYmMM   &   fn\_yYYYY  \\   \hline 
    217 clim = true       & not possible                  &  fn\_m??.nc             &   fn                \\   \hline 
     216clim = false   & \ifile{fn\_yYYYYmMMdDD}  &   \ifile{fn\_yYYYYmMM}   &   \ifile{fn\_yYYYY}  \\   \hline 
     217clim = true       & not possible                  &  \ifile{fn\_m??}             &   fn                \\   \hline 
    218218\end{tabular} 
    219219\end{center} 
     
    271271a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc. 
    272272However, for forcing data related to the surface module, values are not needed at every  
    273 time-step but at every \np{nn\_fsbc} time-step. For example with \np{nn\_fsbc}~=~3,  
     273time-step but at every \np{nn_fsbc} time-step. For example with \np{nn_fsbc}~=~3,  
    274274the surface module will be called at time-steps 1, 4, 7, etc. The date used for the time interpolation  
    275 is thus redefined to be at the middle of \np{nn\_fsbc} time-step period. In the previous example,  
     275is thus redefined to be at the middle of \np{nn_fsbc} time-step period. In the previous example,  
    276276this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\  
    277277(2) For code readablility and maintenance issues, we don't take into account the NetCDF input file  
     
    438438\item  Development of sea-ice algorithms or parameterizations. 
    439439\item  spinup of the iceberg floats 
    440 \item  ocean/sea-ice simulation with both media running in parallel (\np{ln\_mixcpl}~=~\textit{true}) 
     440\item  ocean/sea-ice simulation with both media running in parallel (\np{ln_mixcpl}~=~\textit{true}) 
    441441\end{itemize} 
    442442 
     
    492492In this case, all the six fluxes needed by the ocean are assumed to  
    493493be uniform in space. They take constant values given in the namelist  
    494 \ngn{namsbc{\_}ana} by the variables \np{rn\_utau0}, \np{rn\_vtau0}, \np{rn\_qns0},  
    495 \np{rn\_qsr0}, and \np{rn\_emp0} ($\textit{emp}=\textit{emp}_S$). The runoff is set to zero.  
     494\ngn{namsbc{\_}ana} by the variables \np{rn_utau0}, \np{rn_vtau0}, \np{rn_qns0},  
     495\np{rn_qsr0}, and \np{rn_emp0} ($\textit{emp}=\textit{emp}_S$). The runoff is set to zero.  
    496496In addition, the wind is allowed to reach its nominal value within a given number  
    497 of time steps (\np{nn\_tau000}). 
     497of time steps (\np{nn_tau000}). 
    498498 
    499499If a user wants to apply a different analytical forcing, the \mdl{sbcana}  
     
    513513%------------------------------------------------------------------------------------------------------------- 
    514514 
    515 In the flux formulation (\np{ln\_flx}=true), the surface boundary  
     515In the flux formulation (\forcode{ln_flx = .true.}), the surface boundary  
    516516condition fields are directly read from input files. The user has to define  
    517517in the namelist \ngn{namsbc{\_}flx} the name of the file, the name of the variable  
     
    537537The atmospheric fields used depend on the bulk formulae used. Three bulk formulations  
    538538are available : the CORE, the CLIO and the MFS bulk formulea. The choice is made by setting to true 
    539 one of the following namelist variable : \np{ln\_core} ; \np{ln\_clio} or  \np{ln\_mfs}. 
     539one of the following namelist variable : \np{ln_core} ; \np{ln_clio} or  \np{ln_mfs}. 
    540540 
    541541Note : in forced mode, when a sea-ice model is used, a bulk formulation (CLIO or CORE) have to be used.  
     
    546546%        CORE Bulk formulea 
    547547% ------------------------------------------------------------------------------------------------------------- 
    548 \subsection    [CORE Bulk formulea (\protect\np{ln\_core}=true)] 
    549             {CORE Bulk formulea (\protect\np{ln\_core}=true, \protect\mdl{sbcblk\_core})} 
     548\subsection    [CORE Bulk formulea (\protect\forcode{ln_core = .true.})] 
     549            {CORE Bulk formulea (\protect\forcode{ln_core = .true.}, \protect\mdl{sbcblk\_core})} 
    550550\label{SBC_blk_core} 
    551551%------------------------------------------namsbc_core---------------------------------------------------- 
     
    592592or larger than the one of the input atmospheric fields. 
    593593 
    594 The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, 
    595 \np{sn\_prec}, \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields  
     594The \np{sn_wndi}, \np{sn_wndj}, \np{sn_qsr}, \np{sn_qlw}, \np{sn_tair}, \np{sn_humi}, 
     595\np{sn_prec}, \np{sn_snow}, \np{sn_tdif} parameters describe the fields  
    596596and the way they have to be used (spatial and temporal interpolations).  
    597597 
    598 \np{cn\_dir} is the directory of location of bulk files 
    599 \np{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
    600 \np{rn\_zqt}: is the height of humidity and temperature measurements (m) 
    601 \np{rn\_zu}: is the height of wind measurements (m) 
     598\np{cn_dir} is the directory of location of bulk files 
     599\np{ln_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
     600\np{rn_zqt}: is the height of humidity and temperature measurements (m) 
     601\np{rn_zu}: is the height of wind measurements (m) 
    602602 
    603603Three multiplicative factors are availables :  
    604 \np{rn\_pfac} and \np{rn\_efac} allows to adjust (if necessary) the global freshwater budget  
     604\np{rn_pfac} and \np{rn_efac} allows to adjust (if necessary) the global freshwater budget  
    605605by increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 
    606 The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account  
     606The third one,\np{rn_vfac}, control to which extend the ice/ocean velocities are taken into account  
    607607in the calculation of surface wind stress. Its range should be between zero and one,  
    608608and it is recommended to set it to 0. 
     
    611611%        CLIO Bulk formulea 
    612612% ------------------------------------------------------------------------------------------------------------- 
    613 \subsection    [CLIO Bulk formulea (\protect\np{ln\_clio}=true)] 
    614             {CLIO Bulk formulea (\protect\np{ln\_clio}=true, \protect\mdl{sbcblk\_clio})} 
     613\subsection    [CLIO Bulk formulea (\protect\forcode{ln_clio = .true.})] 
     614            {CLIO Bulk formulea (\protect\forcode{ln_clio = .true.}, \protect\mdl{sbcblk\_clio})} 
    615615\label{SBC_blk_clio} 
    616616%------------------------------------------namsbc_clio---------------------------------------------------- 
     
    652652%        MFS Bulk formulae 
    653653% ------------------------------------------------------------------------------------------------------------- 
    654 \subsection    [MFS Bulk formulea (\protect\np{ln\_mfs}=true)] 
    655             {MFS Bulk formulea (\protect\np{ln\_mfs}=true, \protect\mdl{sbcblk\_mfs})} 
     654\subsection    [MFS Bulk formulea (\protect\forcode{ln_mfs = .true.})] 
     655            {MFS Bulk formulea (\protect\forcode{ln_mfs = .true.}, \protect\mdl{sbcblk\_mfs})} 
    656656\label{SBC_blk_mfs} 
    657657%------------------------------------------namsbc_mfs---------------------------------------------------- 
     
    679679The required 7 input fields must be provided on the model Grid-T and  are: 
    680680\begin{itemize} 
    681 \item          Zonal Component of the 10m wind ($ms^{-1}$)  (\np{sn\_windi}) 
    682 \item          Meridional Component of the 10m wind ($ms^{-1}$)  (\np{sn\_windj}) 
    683 \item          Total Claud Cover (\%)  (\np{sn\_clc}) 
    684 \item          2m Air Temperature ($K$) (\np{sn\_tair}) 
    685 \item          2m Dew Point Temperature ($K$)  (\np{sn\_rhm}) 
    686 \item          Total Precipitation ${Kg} m^{-2} s^{-1}$ (\np{sn\_prec}) 
    687 \item          Mean Sea Level Pressure (${Pa}$) (\np{sn\_msl}) 
     681\item          Zonal Component of the 10m wind ($ms^{-1}$)  (\np{sn_windi}) 
     682\item          Meridional Component of the 10m wind ($ms^{-1}$)  (\np{sn_windj}) 
     683\item          Total Claud Cover (\%)  (\np{sn_clc}) 
     684\item          2m Air Temperature ($K$) (\np{sn_tair}) 
     685\item          2m Dew Point Temperature ($K$)  (\np{sn_rhm}) 
     686\item          Total Precipitation ${Kg} m^{-2} s^{-1}$ (\np{sn_prec}) 
     687\item          Mean Sea Level Pressure (${Pa}$) (\np{sn_msl}) 
    688688\end{itemize} 
    689689% ------------------------------------------------------------------------------------------------------------- 
     
    709709as well as to \href{http://wrf-model.org/}{WRF} (Weather Research and Forecasting Model). 
    710710 
    711 Note that in addition to the setting of \np{ln\_cpl} to true, the \key{coupled} have to be defined.  
     711Note that in addition to the setting of \np{ln_cpl} to true, the \key{coupled} have to be defined.  
    712712The CPP key is mainly used in sea-ice to ensure that the atmospheric fluxes are  
    713713actually recieved by the ice-ocean system (no calculation of ice sublimation in coupled mode). 
     
    738738 
    739739The optional atmospheric pressure can be used to force ocean and ice dynamics  
    740 (\np{ln\_apr\_dyn}~=~true, \textit{\ngn{namsbc}} namelist ). 
    741 The input atmospheric forcing defined via \np{sn\_apr} structure (\textit{namsbc\_apr} namelist)  
     740(\np{ln_apr_dyn}~=~true, \textit{\ngn{namsbc}} namelist ). 
     741The input atmospheric forcing defined via \np{sn_apr} structure (\textit{namsbc\_apr} namelist)  
    742742can be interpolated in time to the model time step, and even in space when the  
    743743interpolation on-the-fly is used. When used to force the dynamics, the atmospheric  
     
    748748\end{equation} 
    749749where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 
    750 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. In this case $P_o$  
     750A value of $101,000~N/m^2$ is used unless \np{ln_ref_apr} is set to true. In this case $P_o$  
    751751is set to the value of $P_{atm}$ averaged over the ocean domain, $i.e.$ the mean value of  
    752752$\eta_{ib}$ is kept to zero at all time step. 
     
    760760When using time-splitting and BDY package for open boundaries conditions, the equivalent  
    761761inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data:  
    762 \np{ln\_apr\_obc}  might be set to true. 
     762\np{ln_apr_obc}  might be set to true. 
    763763 
    764764% ================================================================ 
     
    774774 
    775775A module is available to compute the tidal potential and use it in the momentum equation. 
    776 This option is activated when \np{ln\_tide} is set to true in \ngn{nam\_tide}. 
     776This option is activated when \np{ln_tide} is set to true in \ngn{nam\_tide}. 
    777777 
    778778Some parameters are available in namelist \ngn{nam\_tide}: 
    779779 
    780 - \np{ln\_tide\_load} activate the load potential forcing and \np{filetide\_load} is  the associated file  
    781  
    782 - \np{ln\_tide\_pot} activate the tidal potential forcing 
    783  
    784 - \np{nb\_harmo} is the number of constituent used 
     780- \np{ln_tide_load} activate the load potential forcing and \np{filetide_load} is  the associated file  
     781 
     782- \np{ln_tide_pot} activate the tidal potential forcing 
     783 
     784- \np{nb_harmo} is the number of constituent used 
    785785 
    786786- \np{clname} is the name of constituent 
     
    863863depth (in metres) which the river should be added to. 
    864864 
    865 Namelist variables in \ngn{namsbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and \np{ln\_rnf\_temp} control whether  
     865Namelist variables in \ngn{namsbc\_rnf}, \np{ln_rnf_depth}, \np{ln_rnf_sal} and \np{ln_rnf_temp} control whether  
    866866the river attributes (depth, salinity and temperature) are read in and used.  If these are set  
    867867as false the river is added to the surface box only, assumed to be fresh (0~psu), and/or  
     
    876876to give the heat and salt content of the river runoff. 
    877877After the user specified depth is read ini, the number of grid boxes this corresponds to is  
    878 calculated and stored in the variable \np{nz\_rnf}. 
     878calculated and stored in the variable \np{nz_rnf}. 
    879879The variable \textit{h\_dep} is then calculated to be the depth (in metres) of the bottom of the  
    880880lowest box the river water is being added to (i.e. the total depth that river water is being added to in the model). 
     
    943943\forfile{../namelists/namsbc_isf} 
    944944%-------------------------------------------------------------------------------------------------------- 
    945 Namelist variable in \ngn{namsbc}, \np{nn\_isf}, controls the ice shelf representation used.  
     945Namelist variable in \ngn{namsbc}, \np{nn_isf}, controls the ice shelf representation used.  
    946946\begin{description} 
    947 \item[\np{nn\_isf}~=~1] 
    948 The ice shelf cavity is represented (\np{ln\_isfcav}~=~true needed). The fwf and heat flux are computed.  
     947\item[\np{nn_isf}~=~1] 
     948The ice shelf cavity is represented (\np{ln_isfcav}~=~true needed). The fwf and heat flux are computed.  
    949949Two different bulk formula are available: 
    950950   \begin{description} 
    951    \item[\np{nn\_isfblk}~=~1] 
     951   \item[\np{nn_isfblk}~=~1] 
    952952   The bulk formula used to compute the melt is based the one described in \citet{Hunter2006}. 
    953953        This formulation is based on a balance between the upward ocean heat flux and the latent heat flux at the ice shelf base. 
    954954 
    955    \item[\np{nn\_isfblk}~=~2]  
     955   \item[\np{nn_isfblk}~=~2]  
    956956   The bulk formula used to compute the melt is based the one described in \citet{Jenkins1991}. 
    957957        This formulation is based on a 3 equations formulation (a heat flux budget, a salt flux budget 
     
    962962   \begin{description} 
    963963        \item[\np{nn\_gammablk~=~0~}] 
    964    The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0} 
     964   The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0} and \np{rn_gammat0} 
    965965 
    966966   \item[\np{nn\_gammablk~=~1~}] 
    967967   The salt and heat exchange coefficients are velocity dependent and defined as $rn\_gammas0 \times u_{*}$ and $rn\_gammat0 \times u_{*}$ 
    968         where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters). 
     968        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl} meters). 
    969969        See \citet{Jenkins2010} for all the details on this formulation. 
    970970    
     
    972972   The salt and heat exchange coefficients are velocity and stability dependent and defined as  
    973973        $\gamma_{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}$ 
    974         where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters),  
     974        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl} meters),  
    975975        $\Gamma_{Turb}$ the contribution of the ocean stability and  
    976976        $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 
     
    978978        \end{description} 
    979979 
    980 \item[\np{nn\_isf}~=~2] 
     980\item[\np{nn_isf}~=~2] 
    981981A parameterisation of isf is used. The ice shelf cavity is not represented.  
    982982The fwf is distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    983 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}~=~3).  
     983(\np{sn_depmax_isf}) and the base of the ice shelf along the calving front (\np{sn_depmin_isf}) as in (\np{nn_isf}~=~3).  
    984984Furthermore the fwf and heat flux are computed using the \citet{Beckmann2003} parameterisation of isf melting.  
    985 The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 
    986  
    987 \item[\np{nn\_isf}~=~3] 
     985The effective melting length (\np{sn_Leff_isf}) is read from a file. 
     986 
     987\item[\np{nn_isf}~=~3] 
    988988A simple parameterisation of isf is used. The ice shelf cavity is not represented.  
    989 The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    990 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}).  
     989The fwf (\np{sn_rnfisf}) is prescribed and distributed along the ice shelf edge between the depth of the average grounding line (GL) 
     990(\np{sn_depmax_isf}) and the base of the ice shelf along the calving front (\np{sn_depmin_isf}).  
    991991The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    992992 
    993 \item[\np{nn\_isf}~=~4] 
    994 The ice shelf cavity is opened (\np{ln\_isfcav}~=~true needed). However, the fwf is not computed but specified from file \np{sn\_fwfisf}).  
     993\item[\np{nn_isf}~=~4] 
     994The ice shelf cavity is opened (\np{ln_isfcav}~=~true needed). However, the fwf is not computed but specified from file \np{sn_fwfisf}).  
    995995The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.\\ 
    996996\end{description} 
    997997 
    998998 
    999 $\bullet$ \np{nn\_isf}~=~1 and \np{nn\_isf}~=~2 compute a melt rate based on the water mass properties, ocean velocities and depth. 
     999$\bullet$ \np{nn_isf}~=~1 and \np{nn_isf}~=~2 compute a melt rate based on the water mass properties, ocean velocities and depth. 
    10001000 This flux is thus highly dependent of the model resolution (horizontal and vertical), realism of the water masses onto the shelf ...\\ 
    10011001 
    10021002 
    1003 $\bullet$ \np{nn\_isf}~=~3 and \np{nn\_isf}~=~4 read the melt rate from a file. You have total control of the fwf forcing. 
     1003$\bullet$ \np{nn_isf}~=~3 and \np{nn_isf}~=~4 read the melt rate from a file. You have total control of the fwf forcing. 
    10041004This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too  
    10051005coarse to have realistic melting or for studies where you need to control your heat and fw input.\\  
    10061006 
    10071007A namelist parameters control over how many meters the heat and fw fluxes are spread.  
    1008 \np{rn\_hisf\_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}.  
    1009 This parameter is only used if \np{nn\_isf}~=~1 or \np{nn\_isf}~=~4 
    1010  
    1011 If \np{rn\_hisf\_tbl} = 0., the fluxes are put in the top level whatever is its tickness.  
    1012  
    1013 If \np{rn\_hisf\_tbl} $>$ 0., the fluxes are spread over the first \np{rn\_hisf\_tbl} m (ie over one or several cells).\\ 
     1008\np{rn_hisf_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}.  
     1009This parameter is only used if \np{nn_isf}~=~1 or \np{nn_isf}~=~4 
     1010 
     1011If \np{rn_hisf_tbl} = 0., the fluxes are put in the top level whatever is its tickness.  
     1012 
     1013If \np{rn_hisf_tbl} $>$ 0., the fluxes are spread over the first \np{rn_hisf_tbl} m (ie over one or several cells).\\ 
    10141014 
    10151015The ice shelf melt is implemented as a volume flux with in the same way as for the runoff. 
     
    10431043   set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. If no neighbour, T/S/U/V and mask set to 0. 
    10441044\end{description} 
    1045 The extrapolation is call \np{nn\_drown} times. It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps, 
     1045The extrapolation is call \np{nn_drown} times. It means that if the grounding line retreat by more than \np{nn_drown} cells between 2 coupling steps, 
    10461046 the code will be unable to fill all the new wet cells properly. The default number is set up for the MISOMIP idealised experiments.\\ 
    10471047This coupling procedure is able to take into account grounding line and calving front migration. However, it is a non-conservative processe.  
     
    10491049 a simple conservation scheme is available with \np{ln\_hsb = ~true}. The heat/salt/vol. gain/loss is diagnose, as well as the location.  
    10501050Based on what is done on sbcrnf to prescribed a source of heat/salt/vol., the heat/salt/vol. gain/loss is removed/added, 
    1051  over a period of \np{rn\_fiscpl} time step, into the system.  
    1052 So after \np{rn\_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\ 
     1051 over a period of \np{rn_fiscpl} time step, into the system.  
     1052So after \np{rn_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\ 
    10531053 
    10541054As the before and now fields are not compatible (modification of the geometry), the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$. 
     
    10681068Icebergs are initially spawned into one of ten classes which have specific mass and thickness as described  
    10691069in the \ngn{namberg} namelist:  
    1070 \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}. 
    1071 Each class has an associated scaling (\np{rn\_mass\_scaling}), which is an integer representing how many icebergs  
     1070\np{rn_initial_mass} and \np{rn_initial_thickness}. 
     1071Each class has an associated scaling (\np{rn_mass_scaling}), which is an integer representing how many icebergs  
    10721072of this class are being described as one lagrangian point (this reduces the numerical problem of tracking every single iceberg). 
    1073 They are enabled by setting \np{ln\_icebergs}~=~true. 
     1073They are enabled by setting \np{ln_icebergs}~=~true. 
    10741074 
    10751075Two initialisation schemes are possible. 
    10761076\begin{description} 
    1077 \item[\np{nn\_test\_icebergs}~$>$~0] 
    1078 In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate  
    1079 (so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each  
     1077\item[\np{nn_test_icebergs}~$>$~0] 
     1078In this scheme, the value of \np{nn_test_icebergs} represents the class of iceberg to generate  
     1079(so between 1 and 10), and \np{nn_test_icebergs} provides a lon/lat box in the domain at each  
    10801080grid point of which an iceberg is generated at the beginning of the run.  
    1081 (Note that this happens each time the timestep equals \np{nn\_nit000}.) 
    1082 \np{nn\_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners  
     1081(Note that this happens each time the timestep equals \np{nn_nit000}.) 
     1082\np{nn_test_icebergs} is defined by four numbers in \np{nn_test_box} representing the corners  
    10831083of the geographical box: lonmin,lonmax,latmin,latmax 
    1084 \item[\np{nn\_test\_icebergs}~=~-1] 
    1085 In this scheme the model reads a calving file supplied in the \np{sn\_icb} parameter. 
     1084\item[\np{nn_test_icebergs}~=~-1] 
     1085In this scheme the model reads a calving file supplied in the \np{sn_icb} parameter. 
    10861086This should be a file with a field on the configuration grid (typically ORCA) representing ice accumulation rate at each model point.  
    10871087These should be ocean points adjacent to land where icebergs are known to calve. 
     
    10951095Icebergs are influenced by wind, waves and currents, bottom melt and erosion. 
    10961096The latter act to disintegrate the iceberg. This is either all melted freshwater, or  
    1097 (if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 
     1097(if \np{rn_bits_erosion_fraction}~$>$~0) into melt and additionally small ice bits 
    10981098which are assumed to propagate with their larger parent and thus delay fluxing into the ocean. 
    10991099Melt water (and other variables on the configuration grid) are written into the main NEMO model output files. 
     
    11011101Extensive diagnostics can be produced. 
    11021102Separate output files are maintained for human-readable iceberg information. 
    1103 A separate file is produced for each processor (independent of \np{ln\_ctl}). 
     1103A separate file is produced for each processor (independent of \np{ln_ctl}). 
    11041104The amount of information is controlled by two integer parameters: 
    11051105\begin{description} 
    1106 \item[\np{nn\_verbose\_level}]  takes a value between one and four and represents  
     1106\item[\np{nn_verbose_level}]  takes a value between one and four and represents  
    11071107an increasing number of points in the code at which variables are written, and an  
    11081108increasing level of obscurity. 
    1109 \item[\np{nn\_verbose\_write}] is the number of timesteps between writes 
     1109\item[\np{nn_verbose_write}] is the number of timesteps between writes 
    11101110\end{description} 
    11111111 
    1112 Iceberg trajectories can also be written out and this is enabled by setting \np{nn\_sample\_rate}~$>$~0. 
     1112Iceberg trajectories can also be written out and this is enabled by setting \np{nn_sample_rate}~$>$~0. 
    11131113A non-zero value represents how many timesteps between writes of information into the output file. 
    11141114These output files are in NETCDF format. 
     
    11551155the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle  
    11561156of incident SWF. The \cite{Bernie_al_CD07} reconstruction algorithm is available 
    1157 in \NEMO by setting \np{ln\_dm2dc}~=~true (a \textit{\ngn{namsbc}} namelist variable) when using  
    1158 CORE bulk formulea (\np{ln\_blk\_core}~=~true) or the flux formulation (\np{ln\_flx}~=~true).  
     1157in \NEMO by setting \np{ln_dm2dc}~=~true (a \textit{\ngn{namsbc}} namelist variable) when using  
     1158CORE bulk formulea (\np{ln_blk_core}~=~true) or the flux formulation (\np{ln_flx}~=~true).  
    11591159The reconstruction is performed in the \mdl{sbcdcy} module. The detail of the algoritm used  
    11601160can be found in the appendix~A of \cite{Bernie_al_CD07}. The algorithm preserve the daily  
     
    11621162of the analytical cycle over this time step (Fig.\ref{Fig_SBC_diurnal}).  
    11631163The use of diurnal cycle reconstruction requires the input SWF to be daily  
    1164 ($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn\_qsr} namelist parameter). 
     1164($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn_qsr} namelist parameter). 
    11651165Furthermore, it is recommended to have a least 8 surface module time step per day, 
    11661166that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$. An example of recontructed SWF  
     
    11891189\label{SBC_rotation} 
    11901190 
    1191 When using a flux (\np{ln\_flx}=true) or bulk (\np{ln\_clio}=true or \np{ln\_core}=true) formulation,  
     1191When using a flux (\forcode{ln_flx = .true.}) or bulk (\forcode{ln_clio = .true.} or \forcode{ln_core = .true.}) formulation,  
    11921192pairs of vector components can be rotated from east-north directions onto the local grid directions.   
    11931193This is particularly useful when interpolation on the fly is used since here any vectors are likely to be defined  
     
    12131213 
    12141214IOptions are defined through the  \ngn{namsbc\_ssr} namelist variables. 
    1215 n forced mode using a flux formulation (\np{ln\_flx}~=~true), a  
     1215n forced mode using a flux formulation (\np{ln_flx}~=~true), a  
    12161216feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 
    12171217\begin{equation} \label{Eq_sbc_dmp_q} 
     
    12511251The presence at the sea surface of an ice covered area modifies all the fluxes  
    12521252transmitted to the ocean. There are several way to handle sea-ice in the system  
    1253 depending on the value of the \np{nn\_ice} namelist parameter found in \ngn{namsbc} namelist.   
     1253depending on the value of the \np{nn_ice} namelist parameter found in \ngn{namsbc} namelist.   
    12541254\begin{description} 
    12551255\item[nn{\_}ice = 0]  there will never be sea-ice in the computational domain.  
     
    12871287\textit{calc\_strair~=~true} and \textit{calc\_Tsfc~=~true} in the CICE name-list), or alternatively when NEMO  
    12881288is coupled to the HadGAM3 atmosphere model (with \textit{calc\_strair~=~false} and \textit{calc\_Tsfc~=~false}). 
    1289 The code is intended to be used with \np{nn\_fsbc} set to 1 (although coupling ocean and ice less frequently  
     1289The code is intended to be used with \np{nn_fsbc} set to 1 (although coupling ocean and ice less frequently  
    12901290should work, it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - the 
    12911291user should check that results are not significantly different to the standard case). 
     
    13111311in the freshwater fluxes. In \NEMO, two way of controlling the the freshwater budget.  
    13121312\begin{description} 
    1313 \item[\np{nn\_fwb}=0]  no control at all. The mean sea level is free to drift, and will  
     1313\item[\forcode{nn_fwb = 0}]  no control at all. The mean sea level is free to drift, and will  
    13141314certainly do so. 
    1315 \item[\np{nn\_fwb}=1]  global mean \textit{emp} set to zero at each model time step.  
     1315\item[\forcode{nn_fwb = 1}]  global mean \textit{emp} set to zero at each model time step.  
    13161316%Note that with a sea-ice model, this technique only control the mean sea level with linear free surface (\key{vvl} not defined) and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling).  
    1317 \item[\np{nn\_fwb}=2]  freshwater budget is adjusted from the previous year annual  
     1317\item[\forcode{nn_fwb = 2}]  freshwater budget is adjusted from the previous year annual  
    13181318mean budget which is read in the \textit{EMPave\_old.dat} file. As the model uses the  
    13191319Boussinesq approximation, the annual mean fresh water budget is simply evaluated  
     
    13331333 
    13341334In order to read a neutral drag coeff, from an external data source ($i.e.$ a wave model), the  
    1335 logical variable \np{ln\_cdgw} in \ngn{namsbc} namelist must be set to \textit{true}.  
    1336 The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the 
     1335logical variable \np{ln_cdgw} in \ngn{namsbc} namelist must be set to \textit{true}.  
     1336The \mdl{sbcwave} module containing the routine \np{sbc_wave} reads the 
    13371337namelist \ngn{namsbc\_wave} (for external data names, locations, frequency, interpolation and all  
    13381338the miscellanous options allowed by Input Data generic Interface see \S\ref{SBC_input})  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex

    r9389 r9392  
    155155Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters: 
    156156\begin{description} 
    157    \item[\np{nn\_sto\_eos}]   : number of independent random walks  
    158    \item[\np{rn\_eos\_stdxy}] : random walk horz. standard deviation (in grid points) 
    159    \item[\np{rn\_eos\_stdz}]  : random walk vert. standard deviation (in grid points) 
    160    \item[\np{rn\_eos\_tcor}]  : random walk time correlation (in timesteps) 
    161    \item[\np{nn\_eos\_ord}]   : order of autoregressive processes 
    162    \item[\np{nn\_eos\_flt}]   : passes of Laplacian filter 
    163    \item[\np{rn\_eos\_lim}]   : limitation factor (default = 3.0) 
     157   \item[\np{nn_sto_eos}]   : number of independent random walks  
     158   \item[\np{rn_eos_stdxy}] : random walk horz. standard deviation (in grid points) 
     159   \item[\np{rn_eos_stdz}]  : random walk vert. standard deviation (in grid points) 
     160   \item[\np{rn_eos_tcor}]  : random walk time correlation (in timesteps) 
     161   \item[\np{nn_eos_ord}]   : order of autoregressive processes 
     162   \item[\np{nn_eos_flt}]   : passes of Laplacian filter 
     163   \item[\np{rn_eos_lim}]   : limitation factor (default = 3.0) 
    164164\end{description} 
    165165This routine also includes the initialization (seeding) of the random number generator. 
    166166 
    167167The third routine (\rou{sto\_rst\_write}) writes a restart file (which suffix name is  
    168 given by \np{cn\_storst\_out} namelist parameter) containing the current value of  
     168given by \np{cn_storst_out} namelist parameter) containing the current value of  
    169169all autoregressive processes to allow restarting a simulation from where it has been interrupted. 
    170170This file also contains the current state of the random number generator. 
    171 When \np{ln\_rststo} is set to \textit{true}), the restart file (which suffix name is  
    172 given by \np{cn\_storst\_in} namelist parameter) is read by the initialization routine  
     171When \np{ln_rststo} is set to \textit{true}), the restart file (which suffix name is  
     172given by \np{cn_storst_in} namelist parameter) is read by the initialization routine  
    173173(\rou{sto\_par\_init}). The simulation will continue exactly as if it was not interrupted 
    174 only  when \np{ln\_rstseed} is set to \textit{true}, $i.e.$ when the state of  
     174only  when \np{ln_rstseed} is set to \textit{true}, $i.e.$ when the state of  
    175175the random number generator is read in the restart file. 
    176176 
  • 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.  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex

    r9389 r9392  
    4242general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively.  
    4343These trends can be computed using either a forward time stepping scheme  
    44 (namelist parameter \np{ln\_zdfexp}=true) or a backward time stepping  
    45 scheme (\np{ln\_zdfexp}=false) depending on the magnitude of the mixing  
     44(namelist parameter \forcode{ln_zdfexp = .true.}) or a backward time stepping  
     45scheme (\forcode{ln_zdfexp = .false.}) depending on the magnitude of the mixing  
    4646coefficients, and thus of the formulation used (see \S\ref{STP}). 
    4747 
     
    6565\end{align*} 
    6666 
    67 These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters.  
     67These values are set through the \np{rn_avm0} and \np{rn_avt0} namelist parameters.  
    6868In all cases, do not use values smaller that those associated with the molecular  
    6969viscosity and diffusivity, that is $\sim10^{-6}~m^2.s^{-1}$ for momentum,  
     
    103103is the maximum value that can be reached by the coefficient when $Ri\leq 0$,  
    104104$a=5$ and $n=2$. The last three values can be modified by setting the  
    105 \np{rn\_avmri}, \np{rn\_alp} and \np{nn\_ric} namelist parameters, respectively. 
     105\np{rn_avmri}, \np{rn_alp} and \np{nn_ric} namelist parameters, respectively. 
    106106 
    107107A simple mixing-layer model to transfer and dissipate the atmospheric 
    108108 forcings (wind-stress and buoyancy fluxes) can be activated setting  
    109 the \np{ln\_mldw} =.true. in the namelist. 
     109the \np{ln_mldw} =.true. in the namelist. 
    110110 
    111111In this case, the local depth of turbulent wind-mixing or "Ekman depth" 
     
    125125 
    126126is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 
    127 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}. 
     127The final $h_{e}$ is further constrained by the adjustable bounds \np{rn_mldmin} and \np{rn_mldmax}. 
    128128Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to  
    129 the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{Lermusiaux2001}. 
     129the empirical values \np{rn_wtmix} and \np{rn_wvmix} \citep{Lermusiaux2001}. 
    130130 
    131131% ------------------------------------------------------------------------------------------------------------- 
     
    170170and diffusivity coefficients. The constants $C_k =  0.1$ and $C_\epsilon = \sqrt {2} /2$   
    171171$\approx 0.7$ are designed to deal with vertical mixing at any depth \citep{Gaspar1990}.  
    172 They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}.  
     172They are set through namelist parameters \np{nn_ediff} and \np{nn_ediss}.  
    173173$P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function  
    174174of the local Richardson number, $R_i$: 
     
    181181\end{align*} 
    182182Options are defined through the  \ngn{namzdfy\_tke} namelist variables. 
    183 The choice of $P_{rt}$ is controlled by the \np{nn\_pdl} namelist variable. 
     183The choice of $P_{rt}$ is controlled by the \np{nn_pdl} namelist variable. 
    184184 
    185185At the sea surface, the value of $\bar{e}$ is prescribed from the wind  
    186 stress field as $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb}  
     186stress field as $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn_ebb}  
    187187namelist parameter. The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}),  
    188188however a much larger value can be used when taking into account the  
     
    191191The time integration of the $\bar{e}$ equation may formally lead to negative values  
    192192because the numerical scheme does not ensure its positivity. To overcome this  
    193 problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin}  
     193problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn_emin}  
    194194namelist parameter). Following \citet{Gaspar1990}, the cut-off value is set  
    195195to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$. This allows the subsequent formulations  
     
    199199instabilities associated with too weak vertical diffusion. They must be  
    200200specified at least larger than the molecular values, and are set through  
    201 \np{rn\_avm0} and \np{rn\_avt0} (namzdf namelist, see \S\ref{ZDF_cst}). 
     201\np{rn_avm0} and \np{rn_avt0} (namzdf namelist, see \S\ref{ZDF_cst}). 
    202202 
    203203\subsubsection{Turbulent length scale} 
    204204For computational efficiency, the original formulation of the turbulent length  
    205205scales proposed by \citet{Gaspar1990} has been simplified. Four formulations  
    206 are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist  
     206are proposed, the choice of which is controlled by the \np{nn_mxl} namelist  
    207207parameter. The first two are based on the following first order approximation  
    208208\citep{Blanke1993}: 
     
    212212which is valid in a stable stratified region with constant values of the Brunt- 
    213213Vais\"{a}l\"{a} frequency. The resulting length scale is bounded by the distance  
    214 to the surface or to the bottom (\np{nn\_mxl} = 0) or by the local vertical scale factor  
    215 (\np{nn\_mxl} = 1). \citet{Blanke1993} notice that this simplification has two major  
     214to the surface or to the bottom (\np{nn_mxl} = 0) or by the local vertical scale factor  
     215(\np{nn_mxl} = 1). \citet{Blanke1993} notice that this simplification has two major  
    216216drawbacks: it makes no sense for locally unstable stratification and the  
    217217computation no longer uses all the information contained in the vertical density  
    218218profile. To overcome these drawbacks, \citet{Madec1998} introduces the  
    219 \np{nn\_mxl} = 2 or 3 cases, which add an extra assumption concerning the vertical  
     219\np{nn_mxl} = 2 or 3 cases, which add an extra assumption concerning the vertical  
    220220gradient of the computed length scale. So, the length scales are first evaluated  
    221221as in \eqref{Eq_tke_mxl0_1} and then bounded such that: 
     
    253253$i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 
    254254 
    255 In the \np{nn\_mxl}~=~2 case, the dissipation and mixing length scales take the same  
     255In the \np{nn_mxl}~=~2 case, the dissipation and mixing length scales take the same  
    256256value: $ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the  
    257 \np{nn\_mxl}~=~3 case, the dissipation and mixing turbulent length scales are give  
     257\np{nn_mxl}~=~3 case, the dissipation and mixing turbulent length scales are give  
    258258as in \citet{Gaspar1990}: 
    259259\begin{equation} \label{Eq_tke_mxl_gaspar} 
     
    264264\end{equation} 
    265265 
    266 At the ocean surface, a non zero length scale is set through the  \np{rn\_mxl0} namelist  
     266At the ocean surface, a non zero length scale is set through the  \np{rn_mxl0} namelist  
    267267parameter. Usually the surface scale is given by $l_o = \kappa \,z_o$  
    268268where $\kappa = 0.4$ is von Karman's constant and $z_o$ the roughness  
    269269parameter of the surface. Assuming $z_o=0.1$~m \citep{Craig_Banner_JPO94}  
    270 leads to a 0.04~m, the default value of \np{rn\_mxl0}. In the ocean interior  
     270leads to a 0.04~m, the default value of \np{rn_mxl0}. In the ocean interior  
    271271a minimum length scale is set to recover the molecular viscosity when $\bar{e}$  
    272272reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 
     
    296296citing observation evidence, and $\alpha_{CB} = 100$ the Craig and Banner's value. 
    297297As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$,  
    298 with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}~=~67.83 corresponds  
    299 to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \eqref{ZDF_Lsbc}  
     298with $e_{bb}$ the \np{rn_ebb} namelist parameter, setting \np{rn_ebb}~=~67.83 corresponds  
     299to $\alpha_{CB} = 100$. Further setting  \np{ln_mxl0} to true applies \eqref{ZDF_Lsbc}  
    300300as surface boundary condition on length scale, with $\beta$ hard coded to the Stacey's value. 
    301 Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters)  
     301Note that a minimal threshold of \np{rn_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters)  
    302302is applied on surface $\bar{e}$ value. 
    303303 
     
    317317of LC in an extra source terms of TKE, $P_{LC}$. 
    318318The presence of $P_{LC}$ in \eqref{Eq_zdftke_e}, the TKE equation, is controlled  
    319 by setting \np{ln\_lc} to \textit{true} in the namtke namelist. 
     319by setting \np{ln_lc} to \textit{true} in the namtke namelist. 
    320320  
    321321By making an analogy with the characteristic convective velocity scale  
     
    343343where $c_{LC} = 0.15$ has been chosen by \citep{Axell_JGR02} as a good compromise  
    344344to fit LES data. The chosen value yields maximum vertical velocities $w_{LC}$ of the order  
    345 of a few centimeters per second. The value of $c_{LC}$ is set through the \np{rn\_lc}  
     345of a few centimeters per second. The value of $c_{LC}$ is set through the \np{rn_lc}  
    346346namelist parameter, having in mind that it should stay between 0.15 and 0.54 \citep{Axell_JGR02}.  
    347347 
     
    366366($i.e.$ near-inertial oscillations and ocean swells and waves). 
    367367 
    368 When using this parameterization ($i.e.$ when \np{nn\_etau}~=~1), the TKE input to the ocean ($S$)  
     368When using this parameterization ($i.e.$ when \np{nn_etau}~=~1), the TKE input to the ocean ($S$)  
    369369imposed by the winds in the form of near-inertial oscillations, swell and waves is parameterized  
    370370by \eqref{ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by: 
     
    379379and $f_i$ is the ice concentration (no penetration if $f_i=1$, that is if the ocean is entirely  
    380380covered by sea-ice). 
    381 The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter.  
    382 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}~=~0)  
     381The value of $f_r$, usually a few percents, is specified through \np{rn_efr} namelist parameter.  
     382The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn_etau}~=~0)  
    383383or a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m  
    384 at high latitudes (\np{nn\_etau}~=~1).  
    385  
    386 Note that two other option existe, \np{nn\_etau}~=~2, or 3. They correspond to applying  
     384at high latitudes (\np{nn_etau}~=~1).  
     385 
     386Note that two other option existe, \np{nn_etau}~=~2, or 3. They correspond to applying  
    387387\eqref{ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part  
    388388of the stress to evaluate the fraction of TKE that penetrate the ocean.  
     
    558558The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$)  
    559559depends of the choice of the turbulence model. Four different turbulent models are pre-defined  
    560 (Tab.\ref{Tab_GLS}). They are made available through the \np{nn\_clo} namelist parameter.  
     560(Tab.\ref{Tab_GLS}). They are made available through the \np{nn_clo} namelist parameter.  
    561561 
    562562%--------------------------------------------------TABLE-------------------------------------------------- 
     
    567567%                        & \citep{Mellor_Yamada_1982} &  \citep{Rodi_1987}       & \citep{Wilcox_1988} &                 \\   
    568568\hline  \hline  
    569 \np{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\   
     569\np{nn_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\   
    570570\hline  
    571571$( p , n , m )$          &   ( 0 , 1 , 1 )   & ( 3 , 1.5 , -1 )   & ( -1 , 0.5 , -1 )    &  ( 2 , 1 , -0.67 )  \\ 
     
    581581\caption{   \protect\label{Tab_GLS}  
    582582Set of predefined GLS parameters, or equivalently predefined turbulence models available  
    583 with \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls} .} 
     583with \protect\key{zdfgls} and controlled by the \protect\np{nn_clos} namelist variable in \protect\ngn{namzdf\_gls} .} 
    584584\end{center}   \end{table} 
    585585%-------------------------------------------------------------------------------------------------------------- 
     
    589589value near physical boundaries (logarithmic boundary layer law). $C_{\mu}$ and $C_{\mu'}$  
    590590are calculated from stability function proposed by \citet{Galperin_al_JAS88}, or by \citet{Kantha_Clayson_1994}  
    591 or one of the two functions suggested by \citet{Canuto_2001}  (\np{nn\_stab\_func} = 0, 1, 2 or 3, resp.).  
     591or one of the two functions suggested by \citet{Canuto_2001}  (\np{nn_stab_func} = 0, 1, 2 or 3, resp.).  
    592592The value of $C_{0\mu}$ depends of the choice of the stability function. 
    593593 
    594594The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated  
    595 thanks to Dirichlet or Neumann condition through \np{nn\_tkebc\_surf} and \np{nn\_tkebc\_bot}, resp.  
    596 As for TKE closure , the wave effect on the mixing is considered when \np{ln\_crban}~=~true 
    597 \citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. The \np{rn\_crban} namelist parameter  
    598 is $\alpha_{CB}$ in \eqref{ZDF_Esbc} and \np{rn\_charn} provides the value of $\beta$ in \eqref{ZDF_Lsbc}.  
     595thanks to Dirichlet or Neumann condition through \np{nn_tkebc_surf} and \np{nn_tkebc_bot}, resp.  
     596As for TKE closure , the wave effect on the mixing is considered when \np{ln_crban}~=~true 
     597\citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. The \np{rn_crban} namelist parameter  
     598is $\alpha_{CB}$ in \eqref{ZDF_Esbc} and \np{rn_charn} provides the value of $\beta$ in \eqref{ZDF_Lsbc}.  
    599599 
    600600The $\psi$ equation is known to fail in stably stratified flows, and for this reason  
     
    606606stably stratified situations, and that its value has to be chosen in accordance  
    607607with the algebraic model for the turbulent fluxes. The clipping is only activated  
    608 if \np{ln\_length\_lim}=true, and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value. 
     608if \forcode{ln_length_lim = .true.}, and the $c_{lim}$ is set to the \np{rn_clim_galp} value. 
    609609 
    610610The time and space discretization of the GLS equations follows the same energetic  
     
    646646%       Non-Penetrative Convective Adjustment  
    647647% ------------------------------------------------------------------------------------------------------------- 
    648 \subsection   [Non-Penetrative Convective Adjustment (\protect\np{ln\_tranpc}) ] 
    649          {Non-Penetrative Convective Adjustment (\protect\np{ln\_tranpc}=.true.) } 
     648\subsection   [Non-Penetrative Convective Adjustment (\protect\np{ln_tranpc}) ] 
     649         {Non-Penetrative Convective Adjustment (\protect\np{ln_tranpc}=.true.) } 
    650650\label{ZDF_npc} 
    651651 
     
    671671 
    672672Options are defined through the  \ngn{namzdf} namelist variables. 
    673 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}~=~\textit{true}.  
    674 It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously  
     673The non-penetrative convective adjustment is used when \np{ln_zdfnpc}~=~\textit{true}.  
     674It is applied at each \np{nn_npc} time step and mixes downwards instantaneously  
    675675the statically unstable portion of the water column, but only until the density  
    676676structure becomes neutrally stable ($i.e.$ until the mixed portion of the water  
     
    713713%       Enhanced Vertical Diffusion  
    714714% ------------------------------------------------------------------------------------------------------------- 
    715 \subsection   [Enhanced Vertical Diffusion (\protect\np{ln\_zdfevd})] 
    716               {Enhanced Vertical Diffusion (\protect\np{ln\_zdfevd}=true)} 
     715\subsection   [Enhanced Vertical Diffusion (\protect\np{ln_zdfevd})] 
     716              {Enhanced Vertical Diffusion (\protect\forcode{ln_zdfevd = .true.})} 
    717717\label{ZDF_evd} 
    718718 
     
    722722 
    723723Options are defined through the  \ngn{namzdf} namelist variables. 
    724 The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}=true.  
     724The enhanced vertical diffusion parameterisation is used when \forcode{ln_zdfevd = .true.}.  
    725725In this case, the vertical eddy mixing coefficients are assigned very large values  
    726726(a typical value is $10\;m^2s^{-1})$ in regions where the stratification is unstable  
    727727($i.e.$ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative)  
    728728\citep{Lazar_PhD97, Lazar_al_JPO99}. This is done either on tracers only  
    729 (\np{nn\_evdm}=0) or on both momentum and tracers (\np{nn\_evdm}=1). 
     729(\forcode{nn_evdm = 0}) or on both momentum and tracers (\forcode{nn_evdm = 1}). 
    730730 
    731731In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and  
    732 if \np{nn\_evdm}=1, the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$  
    733 values also, are set equal to the namelist parameter \np{rn\_avevd}. A typical value  
     732if \forcode{nn_evdm = 1}, the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$  
     733values also, are set equal to the namelist parameter \np{rn_avevd}. A typical value  
    734734for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$. This parameterisation of  
    735735convective processes is less time consuming than the convective adjustment  
    736736algorithm presented above when mixing both tracers and momentum in the  
    737737case of static instabilities. It requires the use of an implicit time stepping on  
    738 vertical diffusion terms (i.e. \np{ln\_zdfexp}=false).  
     738vertical diffusion terms (i.e. \forcode{ln_zdfexp = .false.}).  
    739739 
    740740Note that the stability test is performed on both \textit{before} and \textit{now}  
     
    761761because the mixing length scale is bounded by the distance to the sea surface.  
    762762It can thus be useful to combine the enhanced vertical  
    763 diffusion with the turbulent closure scheme, $i.e.$ setting the \np{ln\_zdfnpc}  
     763diffusion with the turbulent closure scheme, $i.e.$ setting the \np{ln_zdfnpc}  
    764764namelist parameter to true and defining the turbulent closure CPP key all together. 
    765765 
    766766The KPP turbulent closure scheme already includes enhanced vertical diffusion  
    767767in the case of convection, as governed by the variables $bvsqcon$ and $difcon$  
    768 found in \mdl{zdfkpp}, therefore \np{ln\_zdfevd}=false should be used with the KPP  
     768found in \mdl{zdfkpp}, therefore \forcode{ln_zdfevd = .false.} should be used with the KPP  
    769769scheme. %gm%  + one word on non local flux with KPP scheme trakpp.F90 module... 
    770770 
     
    918918%       Linear Bottom Friction 
    919919% ------------------------------------------------------------------------------------------------------------- 
    920 \subsection{Linear Bottom Friction (\protect\np{nn\_botfr} = 0 or 1) } 
     920\subsection{Linear Bottom Friction (\protect\np{nn_botfr} = 0 or 1) } 
    921921\label{ZDF_bfr_linear} 
    922922 
     
    940940$H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$.  
    941941This is the default value used in \NEMO. It corresponds to a decay time scale  
    942 of 115~days. It can be changed by specifying \np{rn\_bfri1} (namelist parameter). 
     942of 115~days. It can be changed by specifying \np{rn_bfri1} (namelist parameter). 
    943943 
    944944For the linear friction case the coefficients defined in the general  
     
    950950\end{split} 
    951951\end{equation} 
    952 When \np{nn\_botfr}=1, the value of $r$ used is \np{rn\_bfri1}.  
    953 Setting \np{nn\_botfr}=0 is equivalent to setting $r=0$ and leads to a free-slip  
     952When \forcode{nn_botfr = 1}, the value of $r$ used is \np{rn_bfri1}.  
     953Setting \forcode{nn_botfr = 0} is equivalent to setting $r=0$ and leads to a free-slip  
    954954bottom boundary condition. These values are assigned in \mdl{zdfbfr}.  
    955955From v3.2 onwards there is support for local enhancement of these values  
    956 via an externally defined 2D mask array (\np{ln\_bfr2d}=true) given 
     956via an externally defined 2D mask array (\forcode{ln_bfr2d = .true.}) given 
    957957in the \ifile{bfr\_coef} input NetCDF file. The mask values should vary from 0 to 1.  
    958958Locations with a non-zero mask value will have the friction coefficient increased  
    959 by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}. 
     959by $mask\_value$*\np{rn_bfrien}*\np{rn_bfri1}. 
    960960 
    961961% ------------------------------------------------------------------------------------------------------------- 
    962962%       Non-Linear Bottom Friction 
    963963% ------------------------------------------------------------------------------------------------------------- 
    964 \subsection{Non-Linear Bottom Friction (\protect\np{nn\_botfr} = 2)} 
     964\subsection{Non-Linear Bottom Friction (\protect\np{nn_botfr} = 2)} 
    965965\label{ZDF_bfr_nonlinear} 
    966966 
     
    977977$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992}  
    978978uses $C_D = 1.4\;10^{-3}$ and $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$.  
    979 The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2}  
     979The CME choices have been set as default values (\np{rn_bfri2} and \np{rn_bfeb2}  
    980980namelist parameters). 
    981981 
     
    993993 
    994994The coefficients that control the strength of the non-linear bottom friction are 
    995 initialised as namelist parameters: $C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}. 
     995initialised as namelist parameters: $C_D$= \np{rn_bfri2}, and $e_b$ =\np{rn_bfeb2}. 
    996996Note for applications which treat tides explicitly a low or even zero value of 
    997 \np{rn\_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$ is possible 
    998 via an externally defined 2D mask array (\np{ln\_bfr2d}=true).  This works in the same way 
     997\np{rn_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$ is possible 
     998via an externally defined 2D mask array (\forcode{ln_bfr2d = .true.}).  This works in the same way 
    999999as for the linear bottom friction case with non-zero masked locations increased by 
    1000 $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri2}. 
     1000$mask\_value$*\np{rn_bfrien}*\np{rn_bfri2}. 
    10011001 
    10021002% ------------------------------------------------------------------------------------------------------------- 
    10031003%       Bottom Friction Log-layer 
    10041004% ------------------------------------------------------------------------------------------------------------- 
    1005 \subsection[Log-layer Bottom Friction enhancement (\protect\np{ln\_loglayer} = .true.)]{Log-layer Bottom Friction enhancement (\protect\np{nn\_botfr} = 2, \protect\np{ln\_loglayer} = .true.)} 
     1005\subsection[Log-layer Bottom Friction enhancement (\protect\np{ln_loglayer} = .true.)]{Log-layer Bottom Friction enhancement (\protect\np{nn_botfr} = 2, \protect\np{ln_loglayer} = .true.)} 
    10061006\label{ZDF_bfr_loglayer} 
    10071007 
    10081008In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally 
    1009 enhanced using a "law of the wall" scaling. If  \np{ln\_loglayer} = .true., $C_D$ is no 
     1009enhanced using a "law of the wall" scaling. If  \np{ln_loglayer} = .true., $C_D$ is no 
    10101010longer constant but is related to the thickness of the last wet layer in each column by: 
    10111011 
     
    10141014\end{equation} 
    10151015 
    1016 \noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness 
     1016\noindent where $\kappa$ is the von-Karman constant and \np{rn_bfrz0} is a roughness 
    10171017length provided via the namelist. 
    10181018 
    10191019For stability, the drag coefficient is bounded such that it is kept greater or equal to 
    1020 the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional 
    1021 namelist parameter: \np{rn\_bfri2\_max}, i.e.: 
     1020the base \np{rn_bfri2} value and it is not allowed to exceed the value of an additional 
     1021namelist parameter: \np{rn_bfri2_max}, i.e.: 
    10221022 
    10231023\begin{equation} 
     
    10261026 
    10271027\noindent Note also that a log-layer enhancement can also be applied to the top boundary 
    1028 friction if under ice-shelf cavities are in use (\np{ln\_isfcav}=.true.).  In this case, the 
    1029 relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} 
    1030 and \np{rn\_tfri2\_max}. 
     1028friction if under ice-shelf cavities are in use (\np{ln_isfcav}=.true.).  In this case, the 
     1029relevant namelist parameters are \np{rn_tfrz0}, \np{rn_tfri2} 
     1030and \np{rn_tfri2_max}. 
    10311031 
    10321032% ------------------------------------------------------------------------------------------------------------- 
     
    10821082%       Implicit Bottom Friction 
    10831083% ------------------------------------------------------------------------------------------------------------- 
    1084 \subsection[Implicit Bottom Friction (\protect\np{ln\_bfrimp})]{Implicit Bottom Friction (\protect\np{ln\_bfrimp}$=$\textit{T})} 
     1084\subsection[Implicit Bottom Friction (\protect\np{ln_bfrimp})]{Implicit Bottom Friction (\protect\np{ln_bfrimp}$=$\textit{T})} 
    10851085\label{ZDF_bfr_imp} 
    10861086 
    10871087An optional implicit form of bottom friction has been implemented to improve 
    10881088model stability. We recommend this option for shelf sea and coastal ocean applications, especially  
    1089 for split-explicit time splitting. This option can be invoked by setting \np{ln\_bfrimp}  
    1090 to \textit{true} in the \textit{nambfr} namelist. This option requires \np{ln\_zdfexp} to be \textit{false}  
     1089for split-explicit time splitting. This option can be invoked by setting \np{ln_bfrimp}  
     1090to \textit{true} in the \textit{nambfr} namelist. This option requires \np{ln_zdfexp} to be \textit{false}  
    10911091in the \textit{namzdf} namelist.  
    10921092 
     
    11351135%       Bottom Friction with split-explicit time splitting 
    11361136% ------------------------------------------------------------------------------------------------------------- 
    1137 \subsection[Bottom Friction with split-explicit time splitting]{Bottom Friction with split-explicit time splitting (\protect\np{ln\_bfrimp})} 
     1137\subsection[Bottom Friction with split-explicit time splitting]{Bottom Friction with split-explicit time splitting (\protect\np{ln_bfrimp})} 
    11381138\label{ZDF_bfr_ts} 
    11391139 
     
    11441144\key{dynspg\_flt}). Extra attention is required, however, when using  
    11451145split-explicit time stepping (\key{dynspg\_ts}). In this case the free surface  
    1146 equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, while the three  
     1146equation is solved with a small time step \np{rn_rdt}/\np{nn_baro}, while the three  
    11471147dimensional prognostic variables are solved with the longer time step  
    1148 of \np{rn\_rdt} seconds. The trend in the barotropic momentum due to bottom  
     1148of \np{rn_rdt} seconds. The trend in the barotropic momentum due to bottom  
    11491149friction appropriate to this method is that given by the selected parameterisation  
    11501150($i.e.$ linear or non-linear bottom friction) computed with the evolving velocities  
     
    11761176limiting is thought to be having a major effect (a more likely prospect in coastal and shelf seas 
    11771177applications) then the fully implicit form of the bottom friction should be used (see \S\ref{ZDF_bfr_imp} )  
    1178 which can be selected by setting \np{ln\_bfrimp} $=$ \textit{true}. 
     1178which can be selected by setting \np{ln_bfrimp} $=$ \textit{true}. 
    11791179 
    11801180Otherwise, the implicit formulation takes the form: 
     
    12201220and $F(z)$ the vertical structure function.  
    12211221 
    1222 The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn\_me} namelist parameter) 
     1222The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn_me} namelist parameter) 
    12231223and is usually taken to be the canonical value of $\Gamma = 0.2$ (Osborn 1980).  
    1224 The tidal dissipation efficiency is given by the parameter $q$ (\np{rn\_tfe} namelist parameter)  
     1224The tidal dissipation efficiency is given by the parameter $q$ (\np{rn_tfe} namelist parameter)  
    12251225represents the part of the internal wave energy flux $E(x, y)$ that is dissipated locally,  
    12261226with the remaining $1-q$ radiating away as low mode internal waves and  
     
    12291229The vertical structure function $F(z)$ models the distribution of the turbulent mixing in the vertical.  
    12301230It is implemented as a simple exponential decaying upward away from the bottom,  
    1231 with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter, with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04},  
     1231with a vertical scale of $h_o$ (\np{rn_htmx} namelist parameter, with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04},  
    12321232\begin{equation} \label{Eq_Fz} 
    12331233F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) } 
     
    12381238diffusivity assuming a Prandtl number of 1, $i.e.$ $A^{vm}_{tides}=A^{vT}_{tides}$.  
    12391239In the limit of $N \rightarrow 0$ (or becoming negative), the vertical diffusivity  
    1240 is capped at $300\,cm^2/s$ and impose a lower limit on $N^2$ of \np{rn\_n2min}  
     1240is capped at $300\,cm^2/s$ and impose a lower limit on $N^2$ of \np{rn_n2min}  
    12411241usually set to $10^{-8} s^{-2}$. These bounds are usually rarely encountered. 
    12421242 
     
    12661266%        Indonesian area specific treatment  
    12671267% ------------------------------------------------------------------------------------------------------------- 
    1268 \subsection{Indonesian area specific treatment (\protect\np{ln\_zdftmx\_itf})} 
     1268\subsection{Indonesian area specific treatment (\protect\np{ln_zdftmx_itf})} 
    12691269\label{ZDF_tmx_itf} 
    12701270 
    12711271When the Indonesian Through Flow (ITF) area is included in the model domain, 
    12721272a specific treatment of tidal induced mixing in this area can be used.  
    1273 It is activated through the namelist logical \np{ln\_tmx\_itf}, and the user must provide 
     1273It is activated through the namelist logical \np{ln_tmx_itf}, and the user must provide 
    12741274an input NetCDF file, \ifile{mask\_itf}, which contains a mask array defining the ITF area 
    12751275where the specific treatment is applied. 
    12761276 
    1277 When \np{ln\_tmx\_itf}=true, the two key parameters $q$ and $F(z)$ are adjusted following  
     1277When \forcode{ln_tmx_itf = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following  
    12781278the parameterisation developed by \citet{Koch-Larrouy_al_GRL07}: 
    12791279 
     
    12851285So it is assumed that $q = 1$, $i.e.$ all the energy generated is available for mixing. 
    12861286Note that for test purposed, the ITF tidal dissipation efficiency is a  
    1287 namelist parameter (\np{rn\_tfe\_itf}). A value of $1$ or close to is 
     1287namelist parameter (\np{rn_tfe_itf}). A value of $1$ or close to is 
    12881288this recommended for this parameter. 
    12891289 
     
    13291329\end{equation} 
    13301330where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution  
    1331 of the energy available for mixing. If the \np{ln\_mevar} namelist parameter is set to false,  
     1331of the energy available for mixing. If the \np{ln_mevar} namelist parameter is set to false,  
    13321332the mixing efficiency is taken as constant and equal to 1/6 \citep{Osborn_JPO80}.  
    13331333In the opposite (recommended) case, $R_f$ is instead a function of the turbulence intensity parameter  
     
    13381338 
    13391339In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary  
    1340 as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to true, a recommended choice).  
     1340as a function of $Re_b$ by setting the \np{ln_tsdiff} parameter to true, a recommended choice).  
    13411341This parameterization of differential mixing, due to \cite{Jackson_Rehmann_JPO2014},  
    13421342is implemented as in \cite{de_lavergne_JPO2016_efficiency}. 
     
    13561356h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz'  } \; , 
    13571357\end{equation*} 
    1358 The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist)  controls the stratification-dependence of the pycnocline-intensified dissipation.  
     1358The $n_p$ parameter (given by \np{nn_zpyc} in \ngn{namzdf\_tmx\_new} namelist)  controls the stratification-dependence of the pycnocline-intensified dissipation.  
    13591359It can take values of 1 (recommended) or 2. 
    13601360Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex

    r9389 r9392  
    100100existing 'zoom' options are overly complex for this task and marked for deletion anyway. 
    101101This alternative subsetting operates for the j-direction only and works by optionally 
    102 looking for and using a global file attribute (named: \np{open\_ocean\_jstart}) to 
     102looking for and using a global file attribute (named: \np{open_ocean_jstart}) to 
    103103determine the starting j-row for input. The use of this option is best explained with an 
    104104example: Consider an ORCA1 configuration using the extended grid bathymetry and coordinate 
    105105files: 
    106106\vspace{-10pt} 
    107 \begin{verbatim} 
    108 eORCA1_bathymetry_v2.nc 
    109 eORCA1_coordinates.nc 
    110 \end{verbatim} 
     107\ifile{eORCA1\_bathymetry\_v2} 
     108\ifile{eORCA1\_coordinates} 
    111109\noindent These files define a horizontal domain of 362x332. Assuming the first row with 
    112110open ocean wet points in the non-isf bathymetry for this set is row 42 (Fortran indexing) 
    113 then the formally correct setting for \np{open\_ocean\_jstart} is 41. Using this value as the 
     111then the formally correct setting for \np{open_ocean_jstart} is 41. Using this value as the 
    114112first row to be read will result in a 362x292 domain which is the same size as the original 
    115113ORCA1 domain. Thus the extended coordinates and bathymetry files can be used with all the 
     
    130128 
    131129\noindent Note the j-size of the global domain is the (extended j-size minus 
    132 \np{open\_ocean\_jstart} + 1 ) and this must match the size of all datasets other than 
     130\np{open_ocean_jstart} + 1 ) and this must match the size of all datasets other than 
    133131bathymetry and coordinates currently. However the option can be extended to any global, 2D 
    134132and 3D, netcdf, input field by adding the: 
     
    137135lrowattr=ln_use_jattr 
    138136\end{forlines} 
    139 optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to the corresponding input files. It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in the \np{namelist\_cfg} file according to their needs. 
     137optional argument to the appropriate \np{iom_get} call and the \np{open_ocean_jstart} attribute to the corresponding input files. It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in the \np{namelist_cfg} file according to their needs. 
    140138 
    141139%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    225223required by each individual for the fold operation. This alternative method should give identical 
    226224results to the default \textsc{ALLGATHER} method and is recommended for large values of \np{jpni}. 
    227 The new method is activated by setting \np{ln\_nnogather} to be true ({\bf nammpp}). The 
     225The new method is activated by setting \np{ln_nnogather} to be true ({\bf nammpp}). The 
    228226reproducibility of results using the two methods should be confirmed for each new, non-reference 
    229227configuration. 
     
    253251$\bullet$ Control print %: describe here 4 things: 
    254252 
    255 1- \np{ln\_ctl} : compute and print the trends averaged over the interior domain  
     2531- \np{ln_ctl} : compute and print the trends averaged over the interior domain  
    256254in all TRA, DYN, LDF and ZDF modules. This option is very helpful when  
    257255diagnosing the origin of an undesired change in model results.  
    258256 
    259 2- also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check  
     2572- also \np{ln_ctl} but using the nictl and njctl namelist parameters to check  
    260258the source of differences between mono and multi processor runs. 
    261259 
    262260%%gm   to be removed both here and in the code 
    263 3- last digit comparison (\np{nn\_bit\_cmp}). In an MPP simulation, the computation of  
     2613- last digit comparison (\np{nn_bit_cmp}). In an MPP simulation, the computation of  
    264262a sum over the whole domain is performed as the summation over all processors of  
    265263each of their sums over their interior domains. This double sum never gives exactly  
     
    271269%%gm end 
    272270 
    273 $\bullet$  Benchmark (\np{nn\_bench}). This option defines a benchmark run based on  
     271$\bullet$  Benchmark (\np{nn_bench}). This option defines a benchmark run based on  
    274272a GYRE configuration (see \S\ref{CFG_gyre}) in which the resolution remains the same  
    275273whatever the domain size. This allows a very large model domain to be used, just by  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex

    r9389 r9392  
    247247documented in \S\ref{MISC}. The amplitude of the extra term is given by the namelist variable \np{rnu}. The default value is 1, as recommended by \citet{Roullet2000} 
    248248 
    249 \colorbox{red}{\np{rnu}=1 to be suppressed from namelist !} 
     249\colorbox{red}{\forcode{rnu = 1} to be suppressed from namelist !} 
    250250 
    251251%------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex

    r9389 r9392  
    9191\end{equation}  
    9292where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin  
    93 coefficient. $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter).  
    94 Its default value is \np{rn\_atfp}=$10^{-3}$ (see \S~\ref{STP_mLF}),  
     93coefficient. $\gamma$ is initialized as \np{rn_atfp} (namelist parameter).  
     94Its default value is \np{rn_atfp}=$10^{-3}$ (see \S~\ref{STP_mLF}),  
    9595causing only a weak dissipation of high frequency motions (\citep{Farge1987}).  
    9696The addition of a time filter degrades the accuracy of the  
     
    141141constraint on the time step. Two solutions are available in \NEMO to overcome  
    142142the stability constraint: $(a)$ a forward time differencing scheme using a  
    143 time splitting technique (\np{ln\_zdfexp} = true) or $(b)$ a backward (or implicit)  
    144 time differencing scheme (\np{ln\_zdfexp} = false). In $(a)$, the master  
     143time splitting technique (\np{ln_zdfexp} = true) or $(b)$ a backward (or implicit)  
     144time differencing scheme (\np{ln_zdfexp} = false). In $(a)$, the master  
    145145time step $\Delta $t is cut into $N$ fractional time steps so that the  
    146146stability criterion is reduced by a factor of $N$. The computation is performed as  
     
    156156\end{equation} 
    157157with DF a vertical diffusion term. The number of fractional time steps, $N$, is given  
    158 by setting \np{nn\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
     158by setting \np{nn_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
    159159stable but diffusive. It can be written as follows: 
    160160\begin{equation} \label{Eq_STP_imp} 
     
    309309gradient (see \S\ref{DYN_hpg_imp}), an extra three-dimensional field has to be  
    310310added to the restart file to ensure an exact restartability. This is done optionally  
    311 via the  \np{nn\_dynhpg\_rst} namelist parameter, so that the size of the 
     311via the  \np{nn_dynhpg_rst} namelist parameter, so that the size of the 
    312312restart file can be reduced when restartability is not a key issue (operational  
    313313oceanography or in ensemble simulations for seasonal forecasting). 
Note: See TracChangeset for help on using the changeset viewer.