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 11573 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/doc/latex/NEMO/subfiles/chap_DIA.tex – NEMO

Ignore:
Timestamp:
2019-09-19T11:18:03+02:00 (5 years ago)
Author:
jchanut
Message:

#2222, merged with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/doc/latex/NEMO/subfiles/chap_DIA.tex

    r11218 r11573  
    88\label{chap:DIA} 
    99 
    10 \minitoc 
     10\chaptertoc 
     11 
     12\vfill 
     13\begin{figure}[b] 
     14\subsubsection*{Changes record} 
     15\begin{tabular}{l||l|m{0.65\linewidth}} 
     16    Release   & Author        & Modifications \\ 
     17    {\em 4.0} & {\em Mirek Andrejczuk, Massimiliano Drudi} & {\em }  \\ 
     18    {\em }      & {\em Dorotea Iovino, Nicolas Martin} & {\em }  \\ 
     19    {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em }  \\ 
     20    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\ 
     21    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\ 
     22\end{tabular} 
     23\end{figure} 
    1124 
    1225\newpage 
    1326 
    1427% ================================================================ 
    15 %       Old Model Output  
     28%       Old Model Output 
    1629% ================================================================ 
    17 \section{Old model output (default)} 
     30\section{Model output} 
    1831\label{sec:DIA_io_old} 
    1932 
     
    2841 
    2942The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 
    30 The output listing is stored in the $ocean.output$ file. 
    31 The information is printed from within the code on the logical unit $numout$. 
     43The output listing is stored in the \textit{ocean.output} file. 
     44The information is printed from within the code on the logical unit \texttt{numout}. 
    3245To locate these prints, use the UNIX command "\textit{grep -i numout}" in the source code directory. 
    3346 
     
    4659\label{sec:DIA_iom} 
    4760 
    48 Since version 3.2, iomput is the NEMO output interface of choice. 
     61Since version 3.2, iomput is the \NEMO\ output interface of choice. 
    4962It has been designed to be simple to use, flexible and efficient. 
    50 The two main purposes of iomput are:  
     63The two main purposes of iomput are: 
    5164 
    5265\begin{enumerate} 
     
    5972\end{enumerate} 
    6073 
    61 The first functionality allows the user to specify, without code changes or recompilation,  
     74The first functionality allows the user to specify, without code changes or recompilation, 
    6275aspects of the diagnostic output stream, such as: 
    6376 
     
    8194in a very easy way. 
    8295All details of iomput functionalities are listed in the following subsections. 
    83 Examples of the XML files that control the outputs can be found in:  
     96Examples of the XML files that control the outputs can be found in: 
    8497\path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml}, 
    8598\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     
    88101 
    89102The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 
    90 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) 
     103Iomput provides the possibility to specify N dedicated I/O processes (in addition to the \NEMO\ processes) 
    91104to collect and write the outputs. 
    92105With an appropriate choice of N by the user, the bottleneck associated with the writing of 
    93106the output files can be greatly reduced. 
    94107 
    95 In version 3.6, the iom\_put interface depends on 
    96 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5}  
    97 (use of revision 618 or higher is required). 
     108In version 3.6, the \rou{iom\_put} interface depends on 
     109an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 
     110%(use of revision 618 or higher is required). 
    98111This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 
    99112create a single output file and therefore to bypass the rebuilding phase. 
    100113Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to 
    101 an HDF5 library that has been correctly compiled (\ie with the configure option $--$enable-parallel). 
     114an HDF5 library that has been correctly compiled (\ie\ with the configure option $--$enable-parallel). 
    102115Note that the files created by iomput through XIOS are incompatible with NetCDF3. 
    103116All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    104117 
    105118Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 
    106 where N is typically much less than the number of NEMO processors, will reduce the number of output files created. 
    107 This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. 
     119where N is typically much less than the number of \NEMO\ processors, will reduce the number of output files created. 
     120This can greatly reduce the post-processing burden usually associated with using large numbers of \NEMO\ processors. 
    108121Note that for smaller configurations, the rebuilding phase can be avoided, 
    109122even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
     
    111124\subsection{XIOS: Reading and writing restart file} 
    112125 
    113 XIOS may be used to read single file restart produced by NEMO. Currently only the variables written to  
    114 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{ = .true. } 
    115 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default NEMO  
    116 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read  
    117 restart, all definitions are done within the NEMO code. For high resolution configuration, however,  
     126XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 
     127file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{=.true. } 
     128in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 
     129functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 
     130restart, all definitions are done within the \NEMO\ code. For high resolution configuration, however, 
    118131there may be a need to add the following line in iodef.xml (xios context): 
    119132 
     
    122135\end{xmllines} 
    123136 
    124 This variable sets timeout for reading.  
    125  
    126 If XIOS is to be used to read restart from file generated with an earlier NEMO version (3.6 for instance), 
     137This variable sets timeout for reading. 
     138 
     139If XIOS is to be used to read restart from file generated with an earlier \NEMO\ version (3.6 for instance), 
    127140dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 
    128141 
    129 XIOS can also be used to write NEMO restart. A namelist parameter \np{nn\_wxios} is used to determine the  
    130 type of restart NEMO will write. If it is set to 0, default NEMO functionality will be used - each  
    131 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file;  
    132 for \np{nn\_wxios = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.  
    133 Note, however, that \textbf{NEMO will not read restart generated by XIOS when \np{nn\_wxios = 2}}. The restart will  
    134 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by NEMO only,  
    135 and may be useful when there is a need to change number of processors used to run simulation.  
     142XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn\_wxios} is used to determine the 
     143type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 
     144processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 
     145for \np{nn\_wxios}\forcode{=2} the restart will be written by XIOS into multiple files, one for each XIOS server. 
     146Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn\_wxios}\forcode{=2}}. The restart will 
     147have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 
     148and may be useful when there is a need to change number of processors used to run simulation. 
    136149 
    137150If an additional variable must be written to a restart file, the following steps are needed: 
    138151\begin{description} 
    139    \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and  
    140 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} -  
     152   \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 
     153define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 
    1411541D variable, \forcode{grid_scalar} - scalar), 
    142    \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine  
    143 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable  
    144 as an argument. This convention follows approach for writing restart using iom, where variables are  
     155   \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine 
     156\rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 
     157as an argument. This convention follows approach for writing restart using iom, where variables are 
    145158written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines. 
    146159\end{description} 
     
    161174\xmlline|<variable id="using_server" type="bool"></variable>| 
    162175 
    163 The {\ttfamily using\_server} setting determines whether or not the server will be used in \textit{attached mode} 
    164 (as a library) [{\ttfamily> false <}] or in \textit{detached mode} 
    165 (as an external executable on N additional, dedicated cpus) [{\ttfamily > true <}]. 
    166 The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications. 
     176The \texttt{using\_server} setting determines whether or not the server will be used in 
     177\textit{attached mode} 
     178(as a library) [\texttt{> false <}] or in \textit{detached mode} 
     179(as an external executable on N additional, dedicated cpus) [\texttt{ > true <}]. 
     180The \textit{attached mode} is simpler to use but much less efficient for 
     181massively parallel applications. 
    167182The type of each file can be either ''multiple\_file'' or ''one\_file''. 
    168183 
    169184In \textit{attached mode} and if the type of file is ''multiple\_file'', 
    170 then each NEMO process will also act as an IO server and produce its own set of output files. 
     185then each \NEMO\ process will also act as an IO server and produce its own set of output files. 
    171186Superficially, this emulates the standard behaviour in previous versions. 
    172187However, the subdomain written out by each process does not correspond to 
     
    180195write to its own set of output files. 
    181196If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 
    182 write (in parallel) to a single output file.  
     197write (in parallel) to a single output file. 
    183198Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. 
    184199The following subsection provides a typical example but the syntax will vary in different MPP environments. 
     
    187202 
    188203The number of cores used by the XIOS is specified when launching the model. 
    189 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of  
    190 cores dedicated to NEMO. 
     204The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 
     205cores dedicated to \NEMO. 
    191206Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 
    192 this is a general recommendation and not specific to NEMO. 
     207this is a general recommendation and not specific to \NEMO. 
    193208It is difficult to provide precise recommendations because the optimal choice will depend on 
    194 the particular hardware properties of the target system  
     209the particular hardware properties of the target system 
    195210(parallel filesystem performance, available memory, memory bandwidth etc.) 
    196211and the volume and frequency of data to be created. 
     
    200215\subsubsection{Control of XIOS: the context in iodef.xml} 
    201216 
    202 As well as the {\ttfamily using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. 
     217As well as the \texttt{using\_server} flag, other controls on the use of XIOS are set in 
     218the XIOS context in \textit{iodef.xml}. 
    203219See the XML basics section below for more details on XML syntax and rules. 
    204220 
    205221\begin{table} 
    206   \scriptsize 
    207222  \begin{tabularx}{\textwidth}{|lXl|} 
    208223    \hline 
     
    213228    \hline 
    214229    buffer\_size                                                            & 
    215     buffer size used by XIOS to send data from NEMO to XIOS. 
     230    buffer size used by XIOS to send data from \NEMO\ to XIOS. 
    216231    Larger is more efficient. 
    217232    Note that needed/used buffer sizes are summarized at the end of the job & 
     
    219234    \hline 
    220235    buffer\_server\_factor\_size                                            & 
    221     ratio between NEMO and XIOS buffer size. 
     236    ratio between \NEMO\ and XIOS buffer size. 
    222237    Should be 2.                                                            & 
    223238    2        \\ 
     
    236251    \hline 
    237252    oasis\_codes\_id                                                        & 
    238     when using oasis, define the identifier of NEMO in the namcouple. 
     253    when using oasis, define the identifier of \NEMO\ in the namcouple. 
    239254    Note that the identifier of XIOS is xios.x                              & 
    240255    oceanx   \\ 
     
    247262\subsubsection{Installation} 
    248263 
    249 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO. 
     264As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with \NEMO. 
    250265See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 
    251 NEMO will need to link to the compiled XIOS library. 
     266\NEMO\ will need to link to the compiled XIOS library. 
    252267The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios} 
    253268{Extract and install XIOS} guide provides an example illustration of how this can be achieved. 
     
    262277\begin{enumerate} 
    263278\item[1.] 
    264   in NEMO code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
     279  in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
    265280\item[2.] 
    266281  If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 
     
    275290   <field_group id="grid_T" grid_ref="grid_T_3D"> <!-- T grid --> 
    276291   ... 
    277       <field id="identifier" long_name="blabla" ... />    
     292      <field id="identifier" long_name="blabla" ... /> 
    278293      ... 
    279 </field_definition>  
     294</field_definition> 
    280295\end{xmllines} 
    281296 
     
    300315 
    301316\begin{xmllines} 
    302 <file id="file1" .../>    
     317<file id="file1" .../> 
    303318... 
    304    <field field_ref="identifier" />    
     319   <field field_ref="identifier" /> 
    305320   ... 
    306 </file>    
     321</file> 
    307322\end{xmllines} 
    308323 
     
    320335See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 
    321336 
    322 \subsubsection{Structure of the XML file used in NEMO} 
     337\subsubsection{Structure of the XML file used in \NEMO} 
    323338 
    324339The XML file used in XIOS is structured by 7 families of tags: 
     
    327342 
    328343\begin{table} 
    329   \scriptsize 
    330344  \begin{tabular*}{\textwidth}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    331345    \hline 
     
    359373 
    360374\begin{table} 
    361   \scriptsize 
    362375  \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    363376    \hline 
     
    369382                                                                                                     \xmlcode{<context id="xios" ... >}   \\ 
    370383    \hline 
    371     context nemo    &   context containing IO information for NEMO (mother grid when using AGRIF)  &  
     384    context nemo    &   context containing IO information for \NEMO\ (mother grid when using AGRIF)  & 
    372385                                                                                                     \xmlcode{<context id="nemo" ... >}   \\ 
    373386    \hline 
    374     context 1\_nemo &   context containing IO information for NEMO child grid 1 (when using AGRIF) &  
     387    context 1\_nemo &   context containing IO information for \NEMO\ child grid 1 (when using AGRIF) & 
    375388                                                                                                     \xmlcode{<context id="1_nemo" ... >} \\ 
    376389    \hline 
    377     context n\_nemo &   context containing IO information for NEMO child grid n (when using AGRIF) &  
     390    context n\_nemo &   context containing IO information for \NEMO\ child grid n (when using AGRIF) & 
    378391                                                                                                     \xmlcode{<context id="n_nemo" ... >} \\ 
    379392    \hline 
     
    384397 
    385398\begin{table} 
    386   \scriptsize 
    387399  \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    388400    \hline 
     
    400412\end{table} 
    401413 
    402 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts  
     414\noindent Each context tag related to \NEMO\ (mother or child grids) is divided into 5 parts 
    403415(that can be defined in any order): 
    404416 
    405417\begin{table} 
    406   \scriptsize 
    407418  \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    408419    \hline 
     
    434445The inclusion of XML files into the main XML file can be done through the attribute src: 
    435446\xmlline|<context src="./nemo_def.xml" />| 
    436   
    437 \noindent In NEMO, by default, the field definition is done in 3 separate files ( 
     447 
     448\noindent In \NEMO, by default, the field definition is done in 3 separate files ( 
    438449\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
    439450\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     
    442453are included in the main iodef.xml file through the following commands: 
    443454\begin{xmllines} 
    444 <context id="nemo" src="./context_nemo.xml"/>  
     455<context id="nemo" src="./context_nemo.xml"/> 
    445456\end{xmllines} 
    446457 
     
    457468\begin{xmllines} 
    458469<field_definition operation="average" > 
    459    <field id="sst"                    />   <!-- averaged      sst -->  
    460    <field id="sss" operation="instant"/>   <!-- instantaneous sss -->  
    461 </field_definition>  
     470   <field id="sst"                    />   <!-- averaged      sst --> 
     471   <field id="sss" operation="instant"/>   <!-- instantaneous sss --> 
     472</field_definition> 
    462473\end{xmllines} 
    463474 
     
    476487</field_definition> 
    477488<file_definition> 
    478    <file id="myfile" output_freq="1d" />    
     489   <file id="myfile" output_freq="1d" /> 
    479490      <field field_ref="sst"                            />  <!-- default def --> 
    480491      <field field_ref="sss" long_name="my description" />  <!-- overwrite   --> 
    481492   </file> 
    482 </file_definition>  
     493</file_definition> 
    483494\end{xmllines} 
    484495 
     
    523534   <field_group group_ref="groupU" /> 
    524535   <field field_ref="uocetr_eff"   />  <!-- add another field --> 
    525 </file>    
     536</file> 
    526537\end{xmllines} 
    527538 
     
    535546Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 
    536547the tag family domain. 
    537 It must therefore be done in the domain part of the XML file.  
    538 For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of  
     548It must therefore be done in the domain part of the XML file. 
     549For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 
    539550a 5 by 5 box with the bottom left corner at point (10,10). 
    540551 
     
    553564\end{xmllines} 
    554565 
    555 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
     566Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 
    556567The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and 
    557568can therefore be outputted without taking care of their (i,j) position in the grid. 
     
    566577\end{xmllines} 
    567578 
    568 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if  
    569 you use the ''multiple\_file'' type for your output files,  
    570 you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat,  
     579Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 
     580you use the ''multiple\_file'' type for your output files, 
     581you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 
    571582\href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). 
    572583We are therefore advising to use the ''one\_file'' type in this case. 
     
    601612 
    602613\begin{xmllines} 
    603 <file_group id="1d" output_freq="1d" name="myfile_1d" >  
     614<file_group id="1d" output_freq="1d" name="myfile_1d" > 
    604615   <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA"  --> 
    605616      ... 
     
    620631 
    621632\begin{table} 
    622   \scriptsize 
    623633  \begin{tabularx}{\textwidth}{|lX|} 
    624634    \hline 
     
    656666\end{table} 
    657667 
    658 \noindent For example,  
     668\noindent For example, 
    659669\xmlline|<file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" >| 
    660670 
     
    668678\noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 
    669679 
    670 \subsubsection{Other controls of the XML attributes from NEMO} 
    671  
    672 The values of some attributes are defined by subroutine calls within NEMO  
     680\subsubsection{Other controls of the XML attributes from \NEMO} 
     681 
     682The values of some attributes are defined by subroutine calls within \NEMO 
    673683(calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 
    674684Any definition given in the XML file will be overwritten. 
     
    681691 
    682692\begin{table} 
    683   \scriptsize 
    684   \begin{tabularx}{\textwidth}{|X|c|c|c|} 
     693  \begin{tabular}{|l|c|c|} 
    685694    \hline 
    686695    tag ids affected by automatic definition of some of their attributes & 
    687696    name attribute                                                       & 
    688     attribute value                      \\ 
     697    attribute value                                                      \\ 
    689698    \hline 
    690699    \hline 
    691700    field\_definition                                                    & 
    692701    freq\_op                                                             & 
    693     \np{rn\_rdt}                         \\ 
     702    \np{rn\_rdt}                                                         \\ 
    694703    \hline 
    695704    SBC                                                                  & 
    696705    freq\_op                                                             & 
    697     \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\ 
     706    \np{rn\_rdt} $\times$ \np{nn\_fsbc}                                  \\ 
    698707    \hline 
    699708    ptrc\_T                                                              & 
    700709    freq\_op                                                             & 
    701     \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     710    \np{rn\_rdt} $\times$ \np{nn\_dttrc}                                 \\ 
    702711    \hline 
    703712    diad\_T                                                              & 
    704713    freq\_op                                                             & 
    705     \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     714    \np{rn\_rdt} $\times$ \np{nn\_dttrc}                                 \\ 
    706715    \hline 
    707716    EqT, EqU, EqW                                                        & 
    708717    jbegin, ni,                                                          & 
    709     according to the grid                \\ 
    710     & 
     718    according to the grid                                                \\ 
     719                                                                         & 
    711720    name\_suffix                                                         & 
    712     \\ 
     721                                                                         \\ 
    713722    \hline 
    714723    TAO, RAMA and PIRATA moorings                                        & 
    715724    zoom\_ibegin, zoom\_jbegin,                                          & 
    716     according to the grid                \\ 
    717     & 
     725    according to the grid                                                \\ 
     726                                                                         & 
    718727    name\_suffix                                                         & 
    719     \\ 
    720     \hline 
    721   \end{tabularx} 
     728                                                                         \\ 
     729    \hline 
     730  \end{tabular} 
    722731\end{table} 
    723732 
     
    725734 
    726735\subsection{XML reference tables} 
    727 \label{subsec:IOM_xmlref} 
     736\label{subsec:DIA_IOM_xmlref} 
    728737 
    729738\begin{enumerate} 
     
    765774\end{xmllines} 
    766775 
    767 Note that, then the code is crashing, writting real4 variables forces a numerical conversion from  
     776Note that, then the code is crashing, writting real4 variables forces a numerical conversion from 
    768777real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. 
    769778Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 
     
    773782 
    774783\begin{xmllines} 
    775 <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files -->  
     784<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 
    776785   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    777786      <field field_ref="sst" name="tos" > 
     
    782791      <variable id="my_global_attribute" type="string" > blabla_global </variable> 
    783792   </file> 
    784 </file_group>  
     793</file_group> 
    785794\end{xmllines} 
    786795 
     
    797806 
    798807\begin{xmllines} 
    799 <file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->   
     808<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files --> 
    800809   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    801810      <field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 
    802811   </file> 
    803 </file_group>  
     812</file_group> 
    804813\end{xmllines} 
    805814 
     
    826835 
    827836\begin{xmllines} 
    828 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     837<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    829838   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    830       <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation"  
     839      <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 
    831840      operation="instant" freq_op="1m" > 
    832841         sqrt( @ssh2 - @ssh * @ssh ) 
    833842      </field> 
    834843   </file> 
    835 </file_group>  
     844</file_group> 
    836845\end{xmllines} 
    837846 
     
    840849here we use the default, average. 
    841850So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. 
    842 Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'':  
     851Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 
    843852here the temporal average is alreday done by the ``@'' function so we just use instant. 
    844853field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. 
     
    858867 
    859868\begin{xmllines} 
    860 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     869<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    861870   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    862871      <field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > 
     
    864873      </field> 
    865874   </file> 
    866 </file_group>  
     875</file_group> 
    867876\end{xmllines} 
    868877 
     
    880889 
    881890\begin{table} 
    882   \scriptsize 
    883891  \begin{tabularx}{\textwidth}{|l|X|X|l|X|} 
    884892    \hline 
     
    903911    \hline 
    904912  \end{tabularx} 
    905   \caption{Context tags} 
     913  \caption{XIOS: context tags} 
    906914\end{table} 
    907915 
    908916\begin{table} 
    909   \scriptsize 
    910917  \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 
    911918    \hline 
     
    938945    \hline 
    939946  \end{tabularx} 
    940   \caption{Field tags ("\ttfamily{field\_*}")} 
     947  \caption{XIOS: field tags ("\texttt{field\_*}")} 
    941948\end{table} 
    942949 
    943950\begin{table} 
    944   \scriptsize 
    945951  \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 
    946952    \hline 
     
    974980    \hline 
    975981  \end{tabularx} 
    976   \caption{File tags ("\ttfamily{file\_*}")} 
     982  \caption{XIOS: file tags ("\texttt{file\_*}")} 
    977983\end{table} 
    978984 
    979985\begin{table} 
    980   \scriptsize 
    981986  \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 
    982987    \hline 
     
    10071012    \hline 
    10081013  \end{tabularx} 
    1009   \caption{Axis tags ("\ttfamily{axis\_*}")} 
     1014  \caption{XIOS: axis tags ("\texttt{axis\_*}")} 
    10101015\end{table} 
    10111016 
    10121017\begin{table} 
    1013   \scriptsize 
    10141018  \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 
    10151019    \hline 
     
    10401044    \hline 
    10411045  \end{tabularx} 
    1042   \caption{Domain tags ("\ttfamily{domain\_*)}"} 
     1046  \caption{XIOS: domain tags ("\texttt{domain\_*)}"} 
    10431047\end{table} 
    10441048 
    10451049\begin{table} 
    1046   \scriptsize 
    10471050  \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 
    10481051    \hline 
     
    10731076    \hline 
    10741077  \end{tabularx} 
    1075   \caption{Grid tags ("\ttfamily{grid\_*}")} 
     1078  \caption{XIOS: grid tags ("\texttt{grid\_*}")} 
    10761079\end{table} 
    10771080 
     
    10791082 
    10801083\begin{table} 
    1081   \scriptsize 
    10821084  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    10831085    \hline 
     
    11141116    \hline 
    11151117  \end{tabularx} 
    1116   \caption{Reference attributes ("\ttfamily{*\_ref}")} 
     1118  \caption{XIOS: reference attributes ("\texttt{*\_ref}")} 
    11171119\end{table} 
    11181120 
    11191121\begin{table} 
    1120   \scriptsize 
    11211122  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    11221123    \hline 
     
    11501151    \hline 
    11511152  \end{tabularx} 
    1152   \caption{Domain attributes ("\ttfamily{zoom\_*}")} 
     1153  \caption{XIOS: domain attributes ("\texttt{zoom\_*}")} 
    11531154\end{table} 
    11541155 
    11551156\begin{table} 
    1156   \scriptsize 
    11571157  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    11581158    \hline 
     
    12051205    \hline 
    12061206  \end{tabularx} 
    1207   \caption{File attributes} 
     1207  \caption{XIOS: file attributes} 
    12081208\end{table} 
    12091209 
    12101210\begin{table} 
    1211   \scriptsize 
    12121211  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    12131212    \hline 
     
    12541253    \hline 
    12551254  \end{tabularx} 
    1256   \caption{Field attributes} 
     1255  \caption{XIOS: field attributes} 
    12571256\end{table} 
    12581257 
    12591258\begin{table} 
    1260   \scriptsize 
    12611259  \begin{tabularx}{\textwidth}{|l|X|X|X|} 
    12621260    \hline 
     
    13131311    \hline 
    13141312  \end{tabularx} 
    1315   \caption{Miscellaneous attributes} 
     1313  \caption{XIOS: miscellaneous attributes} 
    13161314\end{table} 
    13171315 
    13181316\subsection{CF metadata standard compliance} 
    13191317 
    1320 Output from the XIOS IO server is compliant with  
     1318Output from the XIOS IO server is compliant with 
    13211319\href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 
    1322 the CF metadata standard.  
     1320the CF metadata standard. 
    13231321Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of 
    1324 section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
     1322section \autoref{subsec:DIA_IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
    13251323 
    13261324Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 
    1327 the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. 
     1325the namelist parameter \np{ln\_cfmeta} in the \nam{run} namelist. 
    13281326This must be set to true if these metadata are to be included in the output files. 
    13291327 
     
    13321330%       NetCDF4 support 
    13331331% ================================================================ 
    1334 \section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})] 
    1335 {NetCDF4 support (\protect\key{netcdf4})} 
     1332\section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})]{NetCDF4 support (\protect\key{netcdf4})} 
    13361333\label{sec:DIA_nc4} 
    13371334 
     
    13471344Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but 
    13481345most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 
    1349 NEMO executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
    1350 setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4} namelist: 
     1346\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
     1347setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 
    13511348 
    13521349%------------------------------------------namnc4---------------------------------------------------- 
    13531350 
    1354 \nlst{namnc4} 
     1351\begin{listing} 
     1352  \nlst{namnc4} 
     1353  \caption{\forcode{&namnc4}} 
     1354  \label{lst:namnc4} 
     1355\end{listing} 
    13551356%------------------------------------------------------------------------------------------------------------- 
    13561357 
     
    13901391\end{forlines} 
    13911392 
    1392 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\ttfamily 46x38x1} respectively in 
    1393 the mono-processor case (\ie global domain of {\small\ttfamily 182x149x31}). 
    1394 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in  
    1395 table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 
     1393\noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\texttt 46x38x1} respectively in 
     1394the mono-processor case (\ie\ global domain of {\small\texttt 182x149x31}). 
     1395An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 
     1396table \autoref{tab:DIA_NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 
    13961397a 4x2 mpi partitioning. 
    13971398Note the variation in the compression ratio achieved which reflects chiefly the dry to wet volume ratio of 
     
    14001401%------------------------------------------TABLE---------------------------------------------------- 
    14011402\begin{table} 
    1402   \scriptsize 
    14031403  \centering 
    14041404  \begin{tabular}{lrrr} 
     
    14321432    ORCA2\_2d\_grid\_W\_0007.nc & 4416    & 1368     & 70\%      \\ 
    14331433  \end{tabular} 
    1434   \caption{ 
    1435     \protect\label{tab:NC4} 
    1436     Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression 
    1437   } 
     1434  \caption{Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression} 
     1435  \label{tab:DIA_NC4} 
    14381436\end{table} 
    14391437%---------------------------------------------------------------------------------------------------- 
    14401438 
    14411439When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via 
    1442 \np{iom\_put} calls are set via an equivalent and identically named namelist to \textit{namnc4} in 
    1443 \np{xmlio\_server.def}. 
    1444 Typically this namelist serves the mean files whilst the \ngn{ namnc4} in the main namelist file continues to 
     1440\rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4} in 
     1441\textit{xmlio\_server.def}. 
     1442Typically this namelist serves the mean files whilst the \nam{nc4} in the main namelist file continues to 
    14451443serve the restart files. 
    14461444This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 
    14471445the individual files produced by the io\_server processes may be different to those produced by 
    14481446the invidual processing regions and different chunking choices may be desired. 
    1449   
     1447 
    14501448% ------------------------------------------------------------------------------------------------------------- 
    14511449%       Tracer/Dynamics Trends 
    14521450% ------------------------------------------------------------------------------------------------------------- 
    1453 \section[Tracer/Dynamics trends (\texttt{namtrd})] 
    1454 {Tracer/Dynamics trends (\protect\ngn{namtrd})} 
     1451\section[Tracer/Dynamics trends (\forcode{&namtrd})]{Tracer/Dynamics trends (\protect\nam{trd})} 
    14551452\label{sec:DIA_trd} 
    14561453 
    14571454%------------------------------------------namtrd---------------------------------------------------- 
    14581455 
    1459 \nlst{namtrd}  
     1456\begin{listing} 
     1457  \nlst{namtrd} 
     1458  \caption{\forcode{&namtrd}} 
     1459  \label{lst:namtrd} 
     1460\end{listing} 
    14601461%------------------------------------------------------------------------------------------------------------- 
    14611462 
    14621463Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 
    14631464\mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation 
    1464 (\ie at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). 
    1465 This capability is controlled by options offered in \ngn{namtrd} namelist. 
     1465(\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines). 
     1466This capability is controlled by options offered in \nam{trd} namelist. 
    14661467Note that the output are done with XIOS, and therefore the \key{iomput} is required. 
    14671468 
    1468 What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}: 
     1469What is done depends on the \nam{trd} logical set to \forcode{.true.}: 
    14691470 
    14701471\begin{description} 
     
    14891490\end{description} 
    14901491 
    1491 Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via  
     1492Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 
    14921493the \key{trdtrc} and \key{trdmxl\_trc} CPP keys. 
    14931494 
    14941495\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 
    14951496In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 
    1496 and none of the options have been tested with variable volume (\ie \key{vvl} defined). 
     1497and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{=.true.}). 
    14971498 
    14981499% ------------------------------------------------------------------------------------------------------------- 
    14991500%       On-line Floats trajectories 
    15001501% ------------------------------------------------------------------------------------------------------------- 
    1501 \section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})] 
    1502 {FLO: On-Line Floats trajectories (\protect\key{floats})} 
    1503 \label{sec:FLO} 
     1502\section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})]{FLO: On-Line Floats trajectories (\protect\key{floats})} 
     1503\label{sec:DIA_FLO} 
    15041504%--------------------------------------------namflo------------------------------------------------------- 
    15051505 
    1506 \nlst{namflo}  
     1506\begin{listing} 
     1507  \nlst{namflo} 
     1508  \caption{\forcode{&namflo}} 
     1509  \label{lst:namflo} 
     1510\end{listing} 
    15071511%-------------------------------------------------------------------------------------------------------------- 
    15081512 
    15091513The on-line computation of floats advected either by the three dimensional velocity field or constraint to 
    15101514remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 
    1511 Options are defined by \ngn{namflo} namelist variables. 
     1515Options are defined by \nam{flo} namelist variables. 
    15121516The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 
    1513 or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). 
     1517or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{=.true.}). 
    15141518Note that the \cite{blanke.raynaud_JPO97} algorithm have the advantage of providing trajectories which 
    15151519are consistent with the numeric of the code, so that the trajectories never intercept the bathymetry. 
     
    15181522 
    15191523Initial coordinates can be given with Ariane Tools convention 
    1520 (IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude. 
    1521  
    1522 In case of Ariane convention, input filename is \np{init\_float\_ariane}. 
     1524(IJK coordinates, (\np{ln\_ariane}\forcode{=.true.}) ) or with longitude and latitude. 
     1525 
     1526In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 
    15231527Its format is: \\ 
    1524 {\scriptsize \texttt{I J K nisobfl itrash}} 
     1528{ \texttt{I J K nisobfl itrash}} 
    15251529 
    15261530\noindent with: 
     
    15281532 - I,J,K  : indexes of initial position 
    15291533 
    1530  - nisobfl: 0 for an isobar float, 1 for a float following the w velocity   
     1534 - nisobfl: 0 for an isobar float, 1 for a float following the w velocity 
    15311535 
    15321536 - itrash : set to zero; it is a dummy variable to respect Ariane Tools convention 
     
    15341538\noindent Example: \\ 
    15351539\noindent 
    1536 {\scriptsize 
     1540{ 
    15371541  \texttt{ 
    15381542    100.00000  90.00000  -1.50000 1.00000   0.00000   \\ 
     
    15451549In the other case (longitude and latitude), input filename is init\_float. 
    15461550Its format is: \\ 
    1547 {\scriptsize \texttt{Long Lat depth nisobfl ngrpfl itrash}} 
     1551{ \texttt{Long Lat depth nisobfl ngrpfl itrash}} 
    15481552 
    15491553\noindent with: 
     
    15591563\noindent Example: \\ 
    15601564\noindent 
    1561 {\scriptsize 
     1565{ 
    15621566  \texttt{ 
    15631567    20.0 0.0 0.0 0 1 1    \\ 
     
    15691573 
    15701574\np{jpnfl} is the total number of floats during the run. 
    1571 When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{ = .true.} ), 
     1575When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{=.true.} ), 
    15721576\np{jpnflnewflo} can be added in the initialization file. 
    15731577 
     
    15771581creation of the float restart file. 
    15781582 
    1579 Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{ = .true.}). 
     1583Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{=.true.}). 
    15801584In that case, output filename is trajec\_float. 
    15811585 
    1582 Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{ = .false.}) with 
     1586Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{=.false.}) with 
    15831587\key{iomput} and outputs selected in iodef.xml. 
    15841588Here it is an example of specification to put in files description section: 
     
    16021606%       Harmonic analysis of tidal constituents 
    16031607% ------------------------------------------------------------------------------------------------------------- 
    1604 \section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})] 
    1605 {Harmonic analysis of tidal constituents (\protect\key{diaharm})} 
     1608\section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})]{Harmonic analysis of tidal constituents (\protect\key{diaharm})} 
    16061609\label{sec:DIA_diag_harm} 
    16071610 
    16081611%------------------------------------------nam_diaharm---------------------------------------------------- 
    16091612% 
    1610 \nlst{nam_diaharm} 
     1613\begin{listing} 
     1614  \nlst{nam_diaharm} 
     1615  \caption{\forcode{&nam_diaharm}} 
     1616  \label{lst:nam_diaharm} 
     1617\end{listing} 
    16111618%---------------------------------------------------------------------------------------------------------- 
    16121619 
     
    16141621This on-line Harmonic analysis is actived with \key{diaharm}. 
    16151622 
    1616 Some parameters are available in namelist \ngn{nam\_diaharm}: 
     1623Some parameters are available in namelist \nam{\_diaharm}: 
    16171624 
    16181625 - \np{nit000\_han} is the first time step used for harmonic analysis 
     
    16221629 - \np{nstep\_han}  is the  time step frequency for harmonic analysis 
    16231630 
    1624  - \np{nb\_ana}     is the number of harmonics to analyse 
     1631% - \np{nb\_ana}     is the number of harmonics to analyse 
    16251632 
    16261633 - \np{tname}       is an array with names of tidal constituents to analyse 
     
    16501657%       Sections transports 
    16511658% ------------------------------------------------------------------------------------------------------------- 
    1652 \section[Transports across sections (\texttt{\textbf{key\_diadct}})] 
    1653 {Transports across sections (\protect\key{diadct})} 
     1659\section[Transports across sections (\texttt{\textbf{key\_diadct}})]{Transports across sections (\protect\key{diadct})} 
    16541660\label{sec:DIA_diag_dct} 
    16551661 
    1656 %------------------------------------------namdct---------------------------------------------------- 
    1657  
    1658 \nlst{namdct} 
     1662%------------------------------------------nam_diadct---------------------------------------------------- 
     1663 
     1664\begin{listing} 
     1665  \nlst{nam_diadct} 
     1666  \caption{\forcode{&nam_diadct}} 
     1667  \label{lst:nam_diadct} 
     1668\end{listing} 
    16591669%------------------------------------------------------------------------------------------------------------- 
    16601670 
     
    16651675The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT} 
    16661676and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by 
    1667 NEMO to compute on-line transports. 
     1677\NEMO\ to compute on-line transports. 
    16681678 
    16691679The on-line transports module creates three output ascii files: 
     
    16751685- \texttt{salt\_transport}   for   salt transports (unit: $10^{9}Kg s^{-1}$) \\ 
    16761686 
    1677 Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over which 
     1687Namelist variables in \nam{\_diadct} control how frequently the flows are summed and the time scales over which 
    16781688they are averaged, as well as the level of output for debugging: 
    16791689\np{nn\_dct}   : frequency of instantaneous transports computing 
     
    16901700 
    16911701Each section is defined by: \\ 
    1692 \noindent {\scriptsize \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\ 
     1702\noindent { \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\ 
    16931703with: 
    16941704 
     
    16971707 - \texttt{long2 lat2}, coordinates of the second extremity of the section; 
    16981708 
    1699  - \texttt{nclass}    the number of bounds of your classes (\eg bounds for 2 classes); 
     1709 - \texttt{nclass}    the number of bounds of your classes (\eg\ bounds for 2 classes); 
    17001710 
    17011711 - \texttt{okstrpond} to compute    heat and       salt transports, \texttt{nostrpond} if no; 
     
    17071717 
    17081718\noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\ 
    1709 {\scriptsize 
     1719{ 
    17101720  \texttt{ 
    17111721    long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\ 
     
    17301740 
    17311741 - \texttt{zsigp} for potential density classes \\ 
    1732    
     1742 
    17331743 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 
    1734  \texttt{section\_ijglobal.diadct} which is read by NEMO. \\ 
     1744 \texttt{section\_ijglobal.diadct} which is read by \NEMO. \\ 
    17351745 
    17361746 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 
     
    17401750 and the ATL\_Cuba\_Florida with 4 temperature clases (5 class bounds), are shown: \\ 
    17411751 \noindent 
    1742  {\scriptsize 
     1752 { 
    17431753   \texttt{ 
    17441754     -68.    -54.5   -60.    -64.7  00 okstrpond noice ACC\_Drake\_Passage \\ 
     
    17551765 
    17561766The output format is: \\ 
    1757 {\scriptsize 
     1767{ 
    17581768  \texttt{ 
    17591769    date, time-step number, section number,                \\ 
     
    17771787 
    17781788\begin{table} 
    1779   \scriptsize 
    17801789  \begin{tabular}{|l|l|l|l|l|} 
    17811790    \hline 
     
    18181827 
    18191828Let denote 
    1820 $\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$),  
    1821 $\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$),  
    1822 $\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$),  
    1823 $\bar{\rho}$ the global mean  seawater (\textit{in situ}) density  
     1829$\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 
     1830$\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$), 
     1831$\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$), 
     1832$\bar{\rho}$ the global mean  seawater (\textit{in situ}) density 
    18241833($\bar{\rho} = 1/\mathcal{V} \int_D \rho \,dv$), and 
    1825 $\bar{\eta}$ the global mean sea level  
     1834$\bar{\eta}$ the global mean sea level 
    18261835($\bar{\eta} = 1/\mathcal{A} \int_S \eta \,ds$). 
    18271836 
     
    18331842    \mathcal{V} &=  \mathcal{A}  \;\bar{\eta} 
    18341843  \end{split} 
    1835   \label{eq:MV_nBq} 
     1844  \label{eq:DIA_MV_nBq} 
    18361845\end{equation} 
    18371846 
     
    18411850  \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) 
    18421851  = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 
    1843   \label{eq:Co_nBq} 
     1852  \label{eq:DIA_Co_nBq} 
    18441853\end{equation} 
    18451854 
    18461855where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of 
    18471856the Earth system (atmosphere, sea-ice, land). 
    1848 Its global averaged leads to the total mass change  
     1857Its global averaged leads to the total mass change 
    18491858 
    18501859\begin{equation} 
    18511860  \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 
    1852   \label{eq:Mass_nBq} 
     1861  \label{eq:DIA_Mass_nBq} 
    18531862\end{equation} 
    18541863 
    18551864where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface. 
    1856 Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to 
     1865Bringing \autoref{eq:DIA_Mass_nBq} and the time derivative of \autoref{eq:DIA_MV_nBq} together leads to 
    18571866the evolution equation of the mean sea level 
    18581867 
     
    18601869  \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} 
    18611870  - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 
    1862   \label{eq:ssh_nBq} 
     1871  \label{eq:DIA_ssh_nBq} 
    18631872\end{equation} 
    18641873 
    1865 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean.  
    1866 The second term arises from temporal changes in the global mean density; \ie from steric effects. 
     1874The first term in equation \autoref{eq:DIA_ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 
     1875The second term arises from temporal changes in the global mean density; \ie\ from steric effects. 
    18671876 
    18681877In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 
    1869 the gravity (\ie in the hydrostatic balance of the primitive Equations). 
    1870 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 
     1878the gravity (\ie\ in the hydrostatic balance of the primitive Equations). 
     1879In particular, the mass conservation equation, \autoref{eq:DIA_Co_nBq}, degenerates into the incompressibility equation: 
    18711880 
    18721881\[ 
    18731882  \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 
    1874   % \label{eq:Co_Bq} 
     1883  % \label{eq:DIA_Co_Bq} 
    18751884\] 
    18761885 
     
    18791888\[ 
    18801889  \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 
    1881   % \label{eq:V_Bq} 
     1890  % \label{eq:DIA_V_Bq} 
    18821891\] 
    18831892 
     
    18881897 
    18891898Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 
    1890 considering the mass budget of the ocean.  
     1899considering the mass budget of the ocean. 
    18911900The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux 
    18921901must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean 
     
    18981907\begin{equation} 
    18991908  \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 
    1900   \label{eq:M_Bq} 
     1909  \label{eq:DIA_M_Bq} 
    19011910\end{equation} 
    19021911 
     
    19041913is converted into a mean change in sea level. 
    19051914Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 
    1906 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) 
    1907 in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 
     1915where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) 
     1916in \autoref{eq:DIA_M_Bq} leads to a very simple form for the steric height: 
    19081917 
    19091918\begin{equation} 
    19101919  \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 
    1911   \label{eq:steric_Bq} 
     1920  \label{eq:DIA_steric_Bq} 
    19121921\end{equation} 
    19131922 
    19141923The above formulation of the steric height of a Boussinesq ocean requires four remarks. 
    19151924First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$, 
    1916 \ie set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
     1925\ie\ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
    19171926We do not recommend that. 
    19181927Indeed, in this case $\rho_o$ depends on the initial state of the ocean. 
     
    19281937does not change when the sea level is changing as it is the case in all global ocean GCMs 
    19291938(wetting and drying of grid point is not allowed). 
    1930    
    1931 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 
    1932 In the non linear free surface case, \ie \key{vvl} defined, it is given by 
     1939 
     1940Third, the discretisation of \autoref{eq:DIA_steric_Bq} depends on the type of free surface which is considered. 
     1941In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{=.true.}, it is given by 
    19331942 
    19341943\[ 
    19351944  \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} }{ \sum_{i,\,j,\,k}       e_{1t} e_{2t} e_{3t} } 
    1936   % \label{eq:discrete_steric_Bq_nfs} 
     1945  % \label{eq:DIA_discrete_steric_Bq_nfs} 
    19371946\] 
    19381947 
     
    19441953  \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta } 
    19451954                  { \sum_{i,\,j,\,k}       e_{1t}e_{2t}e_{3t} + \sum_{i,\,j}       e_{1t}e_{2t} \eta } 
    1946   % \label{eq:discrete_steric_Bq_fs} 
     1955  % \label{eq:DIA_discrete_steric_Bq_fs} 
    19471956\] 
    19481957 
     
    19531962so that there are no associated ocean currents. 
    19541963Hence, the dynamically relevant sea level is the effective sea level, 
    1955 \ie the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
    1956 However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between 
     1964\ie\ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
     1965However, in the current version of \NEMO\ the sea-ice is levitating above the ocean without mass exchanges between 
    19571966ice and ocean. 
    19581967Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present. 
     
    19641973\[ 
    19651974  \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 
    1966   % \label{eq:thermosteric_Bq} 
     1975  % \label{eq:DIA_thermosteric_Bq} 
    19671976\] 
    19681977 
    19691978where $S_o$ and $p_o$ are the initial salinity and pressure, respectively. 
    19701979 
    1971 Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs the \key{diaar5} defined to 
    1972 be called. 
     1980Both steric and thermosteric sea level are computed in \mdl{diaar5}. 
    19731981 
    19741982% ------------------------------------------------------------------------------------------------------------- 
    19751983%       Other Diagnostics 
    19761984% ------------------------------------------------------------------------------------------------------------- 
    1977 \section[Other diagnostics (\texttt{\textbf{key\_diahth}}, \texttt{\textbf{key\_diaar5}})] 
    1978 {Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})} 
     1985\section{Other diagnostics} 
    19791986\label{sec:DIA_diag_others} 
    19801987 
     
    19821989The available ready-to-add diagnostics modules can be found in directory DIA. 
    19831990 
    1984 \subsection[Depth of various quantities (\textit{diahth.F90})] 
    1985 {Depth of various quantities (\protect\mdl{diahth})} 
     1991\subsection[Depth of various quantities (\textit{diahth.F90})]{Depth of various quantities (\protect\mdl{diahth})} 
    19861992 
    19871993Among the available diagnostics the following ones are obtained when defining the \key{diahth} CPP key: 
     
    19952001- the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 
    19962002 
     2003 
     2004%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     2005\begin{figure}[!t] 
     2006  \centering 
     2007  \includegraphics[width=0.66\textwidth]{Fig_mask_subasins} 
     2008  \caption[Decomposition of the World Ocean to compute transports as well as 
     2009  the meridional stream-function]{ 
     2010    Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 
     2011    compute the heat and salt transports as well as the meridional stream-function: 
     2012    Atlantic basin (red), Pacific basin (green), 
     2013    Indian basin (blue), Indo-Pacific basin (blue+green). 
     2014    Note that semi-enclosed seas (Red, Med and Baltic seas) as well as 
     2015    Hudson Bay are removed from the sub-basins. 
     2016    Note also that the Arctic Ocean has been split into Atlantic and 
     2017    Pacific basins along the North fold line. 
     2018  } 
     2019  \label{fig:DIA_mask_subasins} 
     2020\end{figure} 
     2021%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     2022 
    19972023% ----------------------------------------------------------- 
    1998 %     Poleward heat and salt transports 
     2024%       CMIP specific diagnostics 
    19992025% ----------------------------------------------------------- 
    2000  
    2001 \subsection[Poleward heat and salt transports (\textit{diaptr.F90})] 
    2002 {Poleward heat and salt transports (\protect\mdl{diaptr})} 
    2003  
    2004 %------------------------------------------namptr----------------------------------------- 
    2005  
    2006 \nlst{namptr}  
    2007 %----------------------------------------------------------------------------------------- 
    2008  
    2009 The poleward heat and salt transports, their advective and diffusive component, 
    2010 and the meriodional stream function can be computed on-line in \mdl{diaptr} \np{ln\_diaptr} to true 
    2011 (see the \textit{\ngn{namptr} } namelist below). 
    2012 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 
     2026\subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})]{CMIP specific diagnostics (\protect\mdl{diaar5})} 
     2027 
     2028A series of diagnostics has been added in the \mdl{diaar5} and \mdl{diaptr}. 
     2029In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5) 
     2030(see also \autoref{sec:DIA_steric} for one of them). 
     2031The module \mdl{diaar5} is active when one of the following outputs is required : 
     2032global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), 
     2033global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), 
     2034sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
     2035 
     2036In \mdl{diaptr} when \np{ln\_diaptr}\forcode{=.true.} 
     2037(see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 
     2038their advective and diffusive component, and the meriodional stream function . 
     2039When \np{ln\_subbas}\forcode{=.true.}, transports and stream function are computed for the Atlantic, Indian, 
    20132040Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 
    20142041The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 
    2015 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). 
    2016  
    2017 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    2018 \begin{figure}[!t] 
    2019   \begin{center} 
    2020     \includegraphics[width=\textwidth]{Fig_mask_subasins} 
    2021     \caption{ 
    2022       \protect\label{fig:mask_subasins} 
    2023       Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 
    2024       compute the heat and salt transports as well as the meridional stream-function: 
    2025       Atlantic basin (red), Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green). 
    2026       Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from the sub-basins. 
    2027       Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line. 
    2028     } 
    2029   \end{center} 
    2030 \end{figure}   
    2031 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     2042the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}). 
     2043 
     2044%------------------------------------------namptr----------------------------------------- 
     2045 
     2046\begin{listing} 
     2047  \nlst{namptr} 
     2048  \caption{\forcode{&namptr}} 
     2049  \label{lst:namptr} 
     2050\end{listing} 
     2051%----------------------------------------------------------------------------------------- 
    20322052 
    20332053% ----------------------------------------------------------- 
    2034 %       CMIP specific diagnostics  
    2035 % ----------------------------------------------------------- 
    2036 \subsection[CMIP specific diagnostics (\textit{diaar5.F90})] 
    2037 {CMIP specific diagnostics (\protect\mdl{diaar5})} 
    2038  
    2039 A series of diagnostics has been added in the \mdl{diaar5}. 
    2040 They corresponds to outputs that are required for AR5 simulations (CMIP5) 
    2041 (see also \autoref{sec:DIA_steric} for one of them). 
    2042 Activating those outputs requires to define the \key{diaar5} CPP key. 
    2043  
    2044 % ----------------------------------------------------------- 
    2045 %       25 hour mean and hourly Surface, Mid and Bed  
     2054%       25 hour mean and hourly Surface, Mid and Bed 
    20462055% ----------------------------------------------------------- 
    20472056\subsection{25 hour mean output for tidal models} 
     
    20492058%------------------------------------------nam_dia25h------------------------------------- 
    20502059 
    2051 \nlst{nam_dia25h} 
     2060\begin{listing} 
     2061  \nlst{nam_dia25h} 
     2062  \caption{\forcode{&nam_dia25h}} 
     2063  \label{lst:nam_dia25h} 
     2064\end{listing} 
    20522065%----------------------------------------------------------------------------------------- 
    20532066 
     
    20642077%------------------------------------------nam_diatmb----------------------------------------------------- 
    20652078 
    2066 \nlst{nam_diatmb} 
     2079\begin{listing} 
     2080  \nlst{nam_diatmb} 
     2081  \caption{\forcode{&nam_diatmb}} 
     2082  \label{lst:nam_diatmb} 
     2083\end{listing} 
    20672084%---------------------------------------------------------------------------------------------------------- 
    20682085 
     
    20832100\[ 
    20842101  C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 
    2085   % \label{eq:CFL} 
     2102  % \label{eq:DIA_CFL} 
    20862103\] 
    20872104 
     
    20922109Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    20932110 
    2094 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. 
     2111The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} namelist. 
    20952112The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 
    20962113In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of 
     
    20982115At 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 
    20992116with the coordinates of each. 
    2100 The maximum values from the run are also copied to the ocean.output file.  
     2117The maximum values from the run are also copied to the ocean.output file. 
    21012118 
    21022119% ================================================================ 
Note: See TracChangeset for help on using the changeset viewer.