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 12149 for NEMO/branches/2019/ENHANCE-03_closea/doc/latex/NEMO/subfiles/chap_DIA.tex – NEMO

Ignore:
Timestamp:
2019-12-10T15:03:24+01:00 (4 years ago)
Author:
ayoung
Message:

Updated trunk to 12072

Location:
NEMO/branches/2019/ENHANCE-03_closea/doc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-03_closea/doc

    • Property svn:externals set to
      ^/utils/badges badges
      ^/utils/logos logos
  • NEMO/branches/2019/ENHANCE-03_closea/doc/latex

    • Property svn:ignore deleted
  • NEMO/branches/2019/ENHANCE-03_closea/doc/latex/NEMO

    • Property svn:externals set to
      ^/utils/figures/NEMO figures
  • NEMO/branches/2019/ENHANCE-03_closea/doc/latex/NEMO/subfiles

    • Property svn:ignore
      •  

        old new  
        1 *.aux 
        2 *.bbl 
        3 *.blg 
        4 *.dvi 
        5 *.fdb* 
        6 *.fls 
        7 *.idx 
         1*.ind 
        82*.ilg 
        9 *.ind 
        10 *.log 
        11 *.maf 
        12 *.mtc* 
        13 *.out 
        14 *.pdf 
        15 *.toc 
        16 _minted-* 
  • NEMO/branches/2019/ENHANCE-03_closea/doc/latex/NEMO/subfiles/chap_DIA.tex

    r11179 r12149  
    22 
    33\begin{document} 
    4 % ================================================================ 
    5 % Chapter I/O & Diagnostics 
    6 % ================================================================ 
     4 
    75\chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)} 
    86\label{chap:DIA} 
    97 
    10 \minitoc 
    11  
    12 \newpage 
    13  
    14 % ================================================================ 
    15 %       Old Model Output  
    16 % ================================================================ 
    17 \section{Old model output (default)} 
     8%    {\em 4.0} & {\em Mirek Andrejczuk, Massimiliano Drudi} & {\em }  \\ 
     9%    {\em }      & {\em Dorotea Iovino, Nicolas Martin} & {\em }  \\ 
     10%    {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em }  \\ 
     11%    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\ 
     12%    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\ 
     13 
     14\thispagestyle{plain} 
     15 
     16\chaptertoc 
     17 
     18\paragraph{Changes record} ~\\ 
     19 
     20{\footnotesize 
     21  \begin{tabularx}{\textwidth}{l||X|X} 
     22    Release & Author(s) & Modifications \\ 
     23    \hline 
     24    {\em   4.0} & {\em ...} & {\em ...} \\ 
     25    {\em   3.6} & {\em ...} & {\em ...} \\ 
     26    {\em   3.4} & {\em ...} & {\em ...} \\ 
     27    {\em <=3.4} & {\em ...} & {\em ...} 
     28  \end{tabularx} 
     29} 
     30 
     31\clearpage 
     32 
     33%% ================================================================================================= 
     34\section{Model output} 
    1835\label{sec:DIA_io_old} 
    1936 
     
    2542the same run performed in one step. 
    2643It should be noted that this requires that the restart file contains two consecutive time steps for 
    27 all the prognostic variables, and that it is saved in the same binary format as the one used by the computer that 
    28 is to read it (in particular, 32 bits binary IEEE format must not be used for this file). 
     44all the prognostic variables. 
    2945 
    3046The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 
    31 The output listing is stored in the $ocean.output$ file. 
    32 The information is printed from within the code on the logical unit $numout$. 
     47The output listing is stored in the \textit{ocean.output} file. 
     48The information is printed from within the code on the logical unit \texttt{numout}. 
    3349To locate these prints, use the UNIX command "\textit{grep -i numout}" in the source code directory. 
    3450 
     
    3955A complete description of the use of this I/O server is presented in the next section. 
    4056 
    41 By default, \key{iomput} is not defined, 
    42 NEMO produces NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation. 
    43 However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2, 
    44 many diagnostic options have been added presuming the use of \key{iomput}. 
    45 The usefulness of the default IOIPSL-based option is expected to reduce with each new release. 
    46 If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and 
    47 contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of 
    48 nn\_write time-steps (namelist parameter).  
    49  
    50 %\gmcomment{                    % start of gmcomment 
    51  
    52 % ================================================================ 
    53 % Diagnostics 
    54 % ================================================================ 
     57%\cmtgm{                    % start of gmcomment 
     58 
     59%% ================================================================================================= 
    5560\section{Standard model output (IOM)} 
    5661\label{sec:DIA_iom} 
    5762 
    58 Since version 3.2, iomput is the NEMO output interface of choice. 
     63Since version 3.2, iomput is the \NEMO\ output interface of choice. 
    5964It has been designed to be simple to use, flexible and efficient. 
    60 The two main purposes of iomput are:  
     65The two main purposes of iomput are: 
    6166 
    6267\begin{enumerate} 
    63 \item 
    64   The complete and flexible control of the output files through external XML files adapted by 
     68\item The complete and flexible control of the output files through external XML files adapted by 
    6569  the user from standard templates. 
    66 \item 
    67   To achieve high performance and scalable output through the optional distribution of 
     70\item To achieve high performance and scalable output through the optional distribution of 
    6871  all diagnostic output related tasks to dedicated processes. 
    6972\end{enumerate} 
    7073 
    71 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, 
    7275aspects of the diagnostic output stream, such as: 
    7376 
    7477\begin{itemize} 
    75 \item 
    76   The choice of output frequencies that can be different for each file (including real months and years). 
    77 \item 
    78   The choice of file contents; includes complete flexibility over which data are written in which files 
     78\item The choice of output frequencies that can be different for each file (including real months and years). 
     79\item The choice of file contents; includes complete flexibility over which data are written in which files 
    7980  (the same data can be written in different files). 
    80 \item 
    81   The possibility to split output files at a chosen frequency. 
    82 \item 
    83   The possibility to extract a vertical or an horizontal subdomain. 
    84 \item 
    85   The choice of the temporal operation to perform, \eg: average, accumulate, instantaneous, min, max and once. 
    86 \item 
    87   Control over metadata via a large XML "database" of possible output fields. 
     81\item The possibility to split output files at a chosen frequency. 
     82\item The possibility to extract a vertical or an horizontal subdomain. 
     83\item The choice of the temporal operation to perform, \eg: average, accumulate, instantaneous, min, max and once. 
     84\item Control over metadata via a large XML "database" of possible output fields. 
    8885\end{itemize} 
    8986 
     
    9188in a very easy way. 
    9289All details of iomput functionalities are listed in the following subsections. 
    93 Examples of the XML files that control the outputs can be found in: \path{NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml}, 
    94 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml}. \\ 
     90Examples of the XML files that control the outputs can be found in: 
     91\path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml}, 
     92\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     93\path{cfgs/SHARED/field_def_nemo-pisces.xml}, 
     94\path{cfgs/SHARED/field_def_nemo-ice.xml} and \path{cfgs/SHARED/domain_def_nemo.xml}. \\ 
    9595 
    9696The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 
    97 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) 
     97Iomput provides the possibility to specify N dedicated I/O processes (in addition to the \NEMO\ processes) 
    9898to collect and write the outputs. 
    9999With an appropriate choice of N by the user, the bottleneck associated with the writing of 
    100100the output files can be greatly reduced. 
    101101 
    102 In version 3.6, the iom\_put interface depends on 
    103 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}  
    104 (use of revision 618 or higher is required). 
     102In version 3.6, the \rou{iom\_put} interface depends on 
     103an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 
     104%(use of revision 618 or higher is required). 
    105105This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 
    106106create a single output file and therefore to bypass the rebuilding phase. 
    107107Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to 
    108 an HDF5 library that has been correctly compiled (\ie with the configure option $--$enable-parallel). 
     108an HDF5 library that has been correctly compiled (\ie\ with the configure option $--$enable-parallel). 
    109109Note that the files created by iomput through XIOS are incompatible with NetCDF3. 
    110110All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    111111 
    112112Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 
    113 where N is typically much less than the number of NEMO processors, will reduce the number of output files created. 
    114 This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. 
     113where N is typically much less than the number of \NEMO\ processors, will reduce the number of output files created. 
     114This can greatly reduce the post-processing burden usually associated with using large numbers of \NEMO\ processors. 
    115115Note that for smaller configurations, the rebuilding phase can be avoided, 
    116116even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
    117117 
     118%% ================================================================================================= 
    118119\subsection{XIOS: Reading and writing restart file} 
    119120 
    120 XIOS may be used to read single file restart produced by NEMO. Currently only the variables written to  
    121 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{ = .true. } 
    122 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default NEMO  
    123 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read  
    124 restart, all definitions are done within the NEMO code. For high resolution configuration, however,  
     121XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 
     122file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np[=.true. ]{ln_xios_read}{ln\_xios\_read} 
     123in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 
     124functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 
     125restart, all definitions are done within the \NEMO\ code. For high resolution configuration, however, 
    125126there may be a need to add the following line in iodef.xml (xios context): 
    126127 
     
    129130\end{xmllines} 
    130131 
    131 This variable sets timeout for reading.  
    132  
    133 If XIOS is to be used to read restart from file generated with an earlier NEMO version (3.6 for instance), 
     132This variable sets timeout for reading. 
     133 
     134If XIOS is to be used to read restart from file generated with an earlier \NEMO\ version (3.6 for instance), 
    134135dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 
    135136 
    136 XIOS can also be used to write NEMO restart. A namelist parameter \np{nn\_wxios} is used to determine the  
    137 type of restart NEMO will write. If it is set to 0, default NEMO functionality will be used - each  
    138 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file;  
    139 for \np{nn\_wxios = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.  
    140 Note, however, that \textbf{NEMO will not read restart generated by XIOS when \np{nn\_wxios = 2}}. The restart will  
    141 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by NEMO only,  
    142 and may be useful when there is a need to change number of processors used to run simulation.  
     137XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn_wxios}{nn\_wxios} is used to determine the 
     138type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 
     139processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 
     140for \np[=2]{nn_wxios}{nn\_wxios} the restart will be written by XIOS into multiple files, one for each XIOS server. 
     141Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np[=2]{nn_wxios}{nn\_wxios}}. The restart will 
     142have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 
     143and may be useful when there is a need to change number of processors used to run simulation. 
    143144 
    144145If an additional variable must be written to a restart file, the following steps are needed: 
    145 \begin{description} 
    146    \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and  
    147 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} -  
     146\begin{enumerate} 
     147\item Add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 
     148define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 
    1481491D variable, \forcode{grid_scalar} - scalar), 
    149    \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine  
    150 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable  
    151 as an argument. This convention follows approach for writing restart using iom, where variables are  
     150\item Add variable to the list of fields written by restart.  This can be done either in subroutine 
     151\rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 
     152as an argument. This convention follows approach for writing restart using iom, where variables are 
    152153written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines. 
    153 \end{description} 
    154  
     154\end{enumerate} 
    155155 
    156156An older versions of XIOS do not support reading functionality. It's recommended to use at least XIOS2@1451. 
    157157 
    158  
     158%% ================================================================================================= 
    159159\subsection{XIOS: XML Inputs-Outputs Server} 
    160160 
     161%% ================================================================================================= 
    161162\subsubsection{Attached or detached mode?} 
    162163 
     
    168169\xmlline|<variable id="using_server" type="bool"></variable>| 
    169170 
    170 The {\ttfamily using\_server} setting determines whether or not the server will be used in \textit{attached mode} 
    171 (as a library) [{\ttfamily> false <}] or in \textit{detached mode} 
    172 (as an external executable on N additional, dedicated cpus) [{\ttfamily > true <}]. 
    173 The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications. 
     171The \texttt{using\_server} setting determines whether or not the server will be used in 
     172\textit{attached mode} 
     173(as a library) [\texttt{> false <}] or in \textit{detached mode} 
     174(as an external executable on N additional, dedicated cpus) [\texttt{ > true <}]. 
     175The \textit{attached mode} is simpler to use but much less efficient for 
     176massively parallel applications. 
    174177The type of each file can be either ''multiple\_file'' or ''one\_file''. 
    175178 
    176179In \textit{attached mode} and if the type of file is ''multiple\_file'', 
    177 then each NEMO process will also act as an IO server and produce its own set of output files. 
     180then each \NEMO\ process will also act as an IO server and produce its own set of output files. 
    178181Superficially, this emulates the standard behaviour in previous versions. 
    179182However, the subdomain written out by each process does not correspond to 
     
    187190write to its own set of output files. 
    188191If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 
    189 write (in parallel) to a single output file.  
     192write (in parallel) to a single output file. 
    190193Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. 
    191194The following subsection provides a typical example but the syntax will vary in different MPP environments. 
    192195 
     196%% ================================================================================================= 
    193197\subsubsection{Number of cpu used by XIOS in detached mode} 
    194198 
    195199The number of cores used by the XIOS is specified when launching the model. 
    196 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of  
    197 cores dedicated to NEMO. 
     200The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 
     201cores dedicated to \NEMO. 
    198202Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 
    199 this is a general recommendation and not specific to NEMO. 
     203this is a general recommendation and not specific to \NEMO. 
    200204It is difficult to provide precise recommendations because the optimal choice will depend on 
    201 the particular hardware properties of the target system  
     205the particular hardware properties of the target system 
    202206(parallel filesystem performance, available memory, memory bandwidth etc.) 
    203207and the volume and frequency of data to be created. 
     
    205209\cmd|mpirun -np 62 ./nemo.exe : -np 2 ./xios_server.exe| 
    206210 
     211%% ================================================================================================= 
    207212\subsubsection{Control of XIOS: the context in iodef.xml} 
    208213 
    209 As well as the {\ttfamily using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. 
     214As well as the \texttt{using\_server} flag, other controls on the use of XIOS are set in 
     215the XIOS context in \textit{iodef.xml}. 
    210216See the XML basics section below for more details on XML syntax and rules. 
    211217 
    212218\begin{table} 
    213   \scriptsize 
    214219  \begin{tabularx}{\textwidth}{|lXl|} 
    215220    \hline 
     
    220225    \hline 
    221226    buffer\_size                                                            & 
    222     buffer size used by XIOS to send data from NEMO to XIOS. 
     227    buffer size used by XIOS to send data from \NEMO\ to XIOS. 
    223228    Larger is more efficient. 
    224229    Note that needed/used buffer sizes are summarized at the end of the job & 
     
    226231    \hline 
    227232    buffer\_server\_factor\_size                                            & 
    228     ratio between NEMO and XIOS buffer size. 
     233    ratio between \NEMO\ and XIOS buffer size. 
    229234    Should be 2.                                                            & 
    230235    2        \\ 
     
    243248    \hline 
    244249    oasis\_codes\_id                                                        & 
    245     when using oasis, define the identifier of NEMO in the namcouple. 
     250    when using oasis, define the identifier of \NEMO\ in the namcouple. 
    246251    Note that the identifier of XIOS is xios.x                              & 
    247252    oceanx   \\ 
     
    250255\end{table} 
    251256 
     257%% ================================================================================================= 
    252258\subsection{Practical issues} 
    253259 
     260%% ================================================================================================= 
    254261\subsubsection{Installation} 
    255262 
    256 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO. 
     263As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with \NEMO. 
    257264See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 
    258 NEMO will need to link to the compiled XIOS library. 
    259 The \href{https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ModelInterfacing/InputsOutputs#Inputs-OutputsusingXIOS} 
    260 {XIOS with NEMO} guide provides an example illustration of how this can be achieved. 
    261  
     265\NEMO\ will need to link to the compiled XIOS library. 
     266The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios} 
     267{Extract and install XIOS} guide provides an example illustration of how this can be achieved. 
     268 
     269%% ================================================================================================= 
    262270\subsubsection{Add your own outputs} 
    263271 
     
    268276 
    269277\begin{enumerate} 
    270 \item[1.] 
    271   in NEMO code, add a \forcode{CALL iom\_put( 'identifier', array )} where you want to output a 2D or 3D array. 
    272 \item[2.] 
    273   If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 
     278\item in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
     279\item If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 
    274280  the upper part of your module. 
    275 \item[3.] 
    276   in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code 
     281\item in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code 
    277282  (see subsequent sections for a details of the XML syntax and rules). 
    278283  For example: 
    279  
    280284\begin{xmllines} 
    281285<field_definition> 
    282286   <field_group id="grid_T" grid_ref="grid_T_3D"> <!-- T grid --> 
    283287   ... 
    284       <field id="identifier" long_name="blabla" ... />    
     288      <field id="identifier" long_name="blabla" ... /> 
    285289      ... 
    286 </field_definition>  
    287 \end{xmllines} 
    288  
     290</field_definition> 
     291\end{xmllines} 
    289292Note your definition must be added to the field\_group whose reference grid is consistent with the size of 
    290293the array passed to iomput. 
     
    293296(iom\_set\_domain\_attr and iom\_set\_axis\_attr in \mdl{iom}) or defined in the domain\_def.xml file. 
    294297\eg: 
    295  
    296298\begin{xmllines} 
    297299<grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/> 
    298300\end{xmllines} 
    299  
    300 Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step, 
     301Note, if your array is computed within the surface module each \np{nn_fsbc}{nn\_fsbc} time\_step, 
    301302add the field definition within the field\_group defined with the id "SBC": 
    302303\xmlcode{<field_group id="SBC" ...>} which has been defined with the correct frequency of operations 
    303304(iom\_set\_field\_attr in \mdl{iom}) 
    304 \item[4.] 
    305   add your field in one of the output files defined in iodef.xml 
     305\item add your field in one of the output files defined in iodef.xml 
    306306  (again see subsequent sections for syntax and rules) 
    307  
    308 \begin{xmllines} 
    309 <file id="file1" .../>    
     307\begin{xmllines} 
     308<file id="file1" .../> 
    310309... 
    311    <field field_ref="identifier" />    
     310   <field field_ref="identifier" /> 
    312311   ... 
    313 </file>    
    314 \end{xmllines} 
    315  
     312</file> 
     313\end{xmllines} 
    316314\end{enumerate} 
    317315 
     316%% ================================================================================================= 
    318317\subsection{XML fundamentals} 
    319318 
     319%% ================================================================================================= 
    320320\subsubsection{ XML basic rules} 
    321321 
     
    327327See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 
    328328 
    329 \subsubsection{Structure of the XML file used in NEMO} 
     329%% ================================================================================================= 
     330\subsubsection{Structure of the XML file used in \NEMO} 
    330331 
    331332The XML file used in XIOS is structured by 7 families of tags: 
     
    334335 
    335336\begin{table} 
    336   \scriptsize 
    337337  \begin{tabular*}{\textwidth}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    338338    \hline 
     
    366366 
    367367\begin{table} 
    368   \scriptsize 
    369368  \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    370369    \hline 
     
    376375                                                                                                     \xmlcode{<context id="xios" ... >}   \\ 
    377376    \hline 
    378     context nemo    &   context containing IO information for NEMO (mother grid when using AGRIF)  &  
     377    context nemo    &   context containing IO information for \NEMO\ (mother grid when using AGRIF)  & 
    379378                                                                                                     \xmlcode{<context id="nemo" ... >}   \\ 
    380379    \hline 
    381     context 1\_nemo &   context containing IO information for NEMO child grid 1 (when using AGRIF) &  
     380    context 1\_nemo &   context containing IO information for \NEMO\ child grid 1 (when using AGRIF) & 
    382381                                                                                                     \xmlcode{<context id="1_nemo" ... >} \\ 
    383382    \hline 
    384     context n\_nemo &   context containing IO information for NEMO child grid n (when using AGRIF) &  
     383    context n\_nemo &   context containing IO information for \NEMO\ child grid n (when using AGRIF) & 
    385384                                                                                                     \xmlcode{<context id="n_nemo" ... >} \\ 
    386385    \hline 
     
    391390 
    392391\begin{table} 
    393   \scriptsize 
    394392  \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    395393    \hline 
     
    407405\end{table} 
    408406 
    409 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts  
     407\noindent Each context tag related to \NEMO\ (mother or child grids) is divided into 5 parts 
    410408(that can be defined in any order): 
    411409 
    412410\begin{table} 
    413   \scriptsize 
    414411  \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|} 
    415412    \hline 
     
    436433\end{table} 
    437434 
     435%% ================================================================================================= 
    438436\subsubsection{Nesting XML files} 
    439437 
     
    441439The inclusion of XML files into the main XML file can be done through the attribute src: 
    442440\xmlline|<context src="./nemo_def.xml" />| 
    443   
    444 \noindent In NEMO, by default, the field and domain definition is done in 2 separate files: 
    445 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml} that 
     441 
     442\noindent In \NEMO, by default, the field definition is done in 3 separate files ( 
     443\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     444\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     445\path{cfgs/SHARED/field_def_nemo-ice.xml} ) and the  domain definition is done in another file ( \path{cfgs/SHARED/domain_def_nemo.xml} ) 
     446that 
    446447are included in the main iodef.xml file through the following commands: 
    447448\begin{xmllines} 
    448 <field_definition src="./field_def.xml" /> 
    449 <domain_definition src="./domain_def.xml" /> 
    450 \end{xmllines} 
    451  
     449<context id="nemo" src="./context_nemo.xml"/> 
     450\end{xmllines} 
     451 
     452%% ================================================================================================= 
    452453\subsubsection{Use of inheritance} 
    453454 
     
    462463\begin{xmllines} 
    463464<field_definition operation="average" > 
    464    <field id="sst"                    />   <!-- averaged      sst -->  
    465    <field id="sss" operation="instant"/>   <!-- instantaneous sss -->  
    466 </field_definition>  
     465   <field id="sst"                    />   <!-- averaged      sst --> 
     466   <field id="sss" operation="instant"/>   <!-- instantaneous sss --> 
     467</field_definition> 
    467468\end{xmllines} 
    468469 
     
    481482</field_definition> 
    482483<file_definition> 
    483    <file id="myfile" output_freq="1d" />    
     484   <file id="myfile" output_freq="1d" /> 
    484485      <field field_ref="sst"                            />  <!-- default def --> 
    485486      <field field_ref="sss" long_name="my description" />  <!-- overwrite   --> 
    486487   </file> 
    487 </file_definition>  
     488</file_definition> 
    488489\end{xmllines} 
    489490 
    490491Inherit (and overwrite, if needed) the attributes of a tag you are refering to. 
    491492 
     493%% ================================================================================================= 
    492494\subsubsection{Use of groups} 
    493495 
     
    508510 
    509511Secondly, the group can be used to replace a list of elements. 
    510 Several examples of groups of fields are proposed at the end of the file \path{CONFIG/SHARED/field_def.xml}. 
     512Several examples of groups of fields are proposed at the end of the XML field files ( 
     513\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     514\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     515\path{cfgs/SHARED/field_def_nemo-ice.xml} ) . 
    511516For example, a short list of the usual variables related to the U grid: 
    512517 
     
    514519<field_group id="groupU" > 
    515520   <field field_ref="uoce"  /> 
    516    <field field_ref="suoce" /> 
     521   <field field_ref="ssu" /> 
    517522   <field field_ref="utau"  /> 
    518523</field_group> 
     
    525530   <field_group group_ref="groupU" /> 
    526531   <field field_ref="uocetr_eff"   />  <!-- add another field --> 
    527 </file>    
    528 \end{xmllines} 
    529  
     532</file> 
     533\end{xmllines} 
     534 
     535%% ================================================================================================= 
    530536\subsection{Detailed functionalities} 
    531537 
     
    533539the new functionalities offered by the XML interface of XIOS. 
    534540 
     541%% ================================================================================================= 
    535542\subsubsection{Define horizontal subdomains} 
    536543 
    537544Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 
    538545the tag family domain. 
    539 It must therefore be done in the domain part of the XML file.  
    540 For example, in \path{CONFIG/SHARED/domain_def.xml}, we provide the following example of a definition of  
     546It must therefore be done in the domain part of the XML file. 
     547For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 
    541548a 5 by 5 box with the bottom left corner at point (10,10). 
    542549 
    543550\begin{xmllines} 
    544 <domain_group id="grid_T"> 
    545    <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 
     551<domain id="myzoomT" domain_ref="grid_T"> 
     552   <zoom_domain ibegin="10" jbegin="10" ni="5" nj="5" /> 
    546553\end{xmllines} 
    547554 
     
    551558\begin{xmllines} 
    552559<file id="myfile_vzoom" output_freq="1d" > 
    553    <field field_ref="toce" domain_ref="myzoom"/> 
     560   <field field_ref="toce" domain_ref="myzoomT"/> 
    554561</file> 
    555562\end{xmllines} 
    556563 
    557 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
     564Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 
    558565The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and 
    559566can therefore be outputted without taking care of their (i,j) position in the grid. 
     
    568575\end{xmllines} 
    569576 
    570 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if  
    571 you use the ''multiple\_file'' type for your output files,  
    572 you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat,  
     577Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 
     578you use the ''multiple\_file'' type for your output files, 
     579you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 
    573580\href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). 
    574581We are therefore advising to use the ''one\_file'' type in this case. 
    575582 
     583%% ================================================================================================= 
    576584\subsubsection{Define vertical zooms} 
    577585 
    578 Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. 
     586Vertical zooms are defined through the attributs zoom\_begin and zoom\_n of the tag family axis. 
    579587It must therefore be done in the axis part of the XML file. 
    580 For example, in \path{NEMOGCM/CONFIG/ORCA2_LIM/iodef_demo.xml}, we provide the following example: 
    581  
    582 \begin{xmllines} 
    583 <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 
    584    <axis id="deptht" /> 
    585    <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 
     588For example, in \path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef_demo.xml}, we provide the following example: 
     589 
     590\begin{xmllines} 
     591<axis_definition> 
     592   <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
     593   <axis id="deptht_zoom" azix_ref="deptht" > 
     594      <zoom_axis zoom_begin="1" zoom_n="10" /> 
     595   </axis> 
    586596\end{xmllines} 
    587597 
     
    595605\end{xmllines} 
    596606 
     607%% ================================================================================================= 
    597608\subsubsection{Control of the output file names} 
    598609 
     
    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%% ================================================================================================= 
     681\subsubsection{Other controls of the XML attributes from \NEMO} 
     682 
     683The values of some attributes are defined by subroutine calls within \NEMO 
    673684(calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 
    674685Any definition given in the XML file will be overwritten. 
     
    681692 
    682693\begin{table} 
    683   \scriptsize 
    684   \begin{tabularx}{\textwidth}{|X|c|c|c|} 
     694  \begin{tabular}{|l|c|c|} 
    685695    \hline 
    686696    tag ids affected by automatic definition of some of their attributes & 
    687697    name attribute                                                       & 
    688     attribute value                      \\ 
     698    attribute value                                                      \\ 
    689699    \hline 
    690700    \hline 
    691701    field\_definition                                                    & 
    692702    freq\_op                                                             & 
    693     \np{rn\_rdt}                         \\ 
     703    \np{rn_rdt}{rn\_rdt}                                                         \\ 
    694704    \hline 
    695705    SBC                                                                  & 
    696706    freq\_op                                                             & 
    697     \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\ 
     707    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_fsbc}{nn\_fsbc}                                  \\ 
    698708    \hline 
    699709    ptrc\_T                                                              & 
    700710    freq\_op                                                             & 
    701     \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     711    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc}                                \\ 
    702712    \hline 
    703713    diad\_T                                                              & 
    704714    freq\_op                                                             & 
    705     \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     715    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc}                                \\ 
    706716    \hline 
    707717    EqT, EqU, EqW                                                        & 
    708718    jbegin, ni,                                                          & 
    709     according to the grid                \\ 
    710     & 
     719    according to the grid                                                \\ 
     720                                                                         & 
    711721    name\_suffix                                                         & 
    712     \\ 
     722                                                                         \\ 
    713723    \hline 
    714724    TAO, RAMA and PIRATA moorings                                        & 
    715725    zoom\_ibegin, zoom\_jbegin,                                          & 
    716     according to the grid                \\ 
    717     & 
     726    according to the grid                                                \\ 
     727                                                                         & 
    718728    name\_suffix                                                         & 
    719     \\ 
    720     \hline 
    721   \end{tabularx} 
     729                                                                         \\ 
     730    \hline 
     731  \end{tabular} 
    722732\end{table} 
    723733 
     734%% ================================================================================================= 
    724735\subsubsection{Advanced use of XIOS functionalities} 
    725736 
     737%% ================================================================================================= 
    726738\subsection{XML reference tables} 
    727 \label{subsec:IOM_xmlref} 
     739\label{subsec:DIA_IOM_xmlref} 
    728740 
    729741\begin{enumerate} 
    730 \item 
    731   Simple computation: directly define the computation when refering to the variable in the file definition. 
     742\item Simple computation: directly define the computation when refering to the variable in the file definition. 
    732743 
    733744\begin{xmllines} 
     
    737748\end{xmllines} 
    738749 
    739 \item 
    740   Simple computation: define a new variable and use it in the file definition. 
     750\item Simple computation: define a new variable and use it in the file definition. 
    741751 
    742752in field\_definition: 
     
    755765sst2 won't be evaluated. 
    756766 
    757 \item 
    758   Change of variable precision: 
     767\item Change of variable precision: 
    759768 
    760769\begin{xmllines} 
     
    765774\end{xmllines} 
    766775 
    767 Note that, then the code is crashing, writting real4 variables forces a numerical convection 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. 
    770779 
    771 \item 
    772   add user defined attributes: 
    773  
    774 \begin{xmllines} 
    775 <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files -->  
     780\item add user defined attributes: 
     781 
     782\begin{xmllines} 
     783<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 
    776784   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    777785      <field field_ref="sst" name="tos" > 
     
    782790      <variable id="my_global_attribute" type="string" > blabla_global </variable> 
    783791   </file> 
    784 </file_group>  
    785 \end{xmllines} 
    786  
    787 \item 
    788   use of the ``@'' function: example 1, weighted temporal average 
     792</file_group> 
     793\end{xmllines} 
     794 
     795\item use of the ``@'' function: example 1, weighted temporal average 
    789796 
    790797 - define a new variable in field\_definition 
     
    797804 
    798805\begin{xmllines} 
    799 <file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->   
     806<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files --> 
    800807   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    801808      <field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 
    802809   </file> 
    803 </file_group>  
     810</file_group> 
    804811\end{xmllines} 
    805812 
     
    814821Note that in this case, freq\_op must be equal to the file output\_freq. 
    815822 
    816 \item 
    817   use of the ``@'' function: example 2, monthly SSH standard deviation 
     823\item use of the ``@'' function: example 2, monthly SSH standard deviation 
    818824 
    819825 - define a new variable in field\_definition 
     
    826832 
    827833\begin{xmllines} 
    828 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     834<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    829835   <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"  
     836      <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 
    831837      operation="instant" freq_op="1m" > 
    832838         sqrt( @ssh2 - @ssh * @ssh ) 
    833839      </field> 
    834840   </file> 
    835 </file_group>  
     841</file_group> 
    836842\end{xmllines} 
    837843 
     
    840846here we use the default, average. 
    841847So, 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 )'':  
     848Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 
    843849here the temporal average is alreday done by the ``@'' function so we just use instant. 
    844850field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. 
    845851Note that in this case, freq\_op must be equal to the file output\_freq. 
    846852 
    847 \item 
    848   use of the ``@'' function: example 3, monthly average of SST diurnal cycle 
     853\item use of the ``@'' function: example 3, monthly average of SST diurnal cycle 
    849854 
    850855 - define 2 new variables in field\_definition 
     
    858863 
    859864\begin{xmllines} 
    860 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     865<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    861866   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    862867      <field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > 
     
    864869      </field> 
    865870   </file> 
    866 </file_group>  
     871</file_group> 
    867872\end{xmllines} 
    868873 
     
    877882field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field. 
    878883 
     884%% ================================================================================================= 
    879885\subsubsection{Tag list per family} 
    880886 
    881887\begin{table} 
    882   \scriptsize 
    883888  \begin{tabularx}{\textwidth}{|l|X|X|l|X|} 
    884889    \hline 
     
    903908    \hline 
    904909  \end{tabularx} 
    905   \caption{Context tags} 
     910  \caption{XIOS: context tags} 
    906911\end{table} 
    907912 
    908913\begin{table} 
    909   \scriptsize 
    910914  \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 
    911915    \hline 
     
    938942    \hline 
    939943  \end{tabularx} 
    940   \caption{Field tags ("\ttfamily{field\_*}")} 
     944  \caption{XIOS: field tags ("\texttt{field\_*}")} 
    941945\end{table} 
    942946 
    943947\begin{table} 
    944   \scriptsize 
    945948  \begin{tabularx}{\textwidth}{|l|X|X|X|l|} 
    946949    \hline 
     
    974977    \hline 
    975978  \end{tabularx} 
    976   \caption{File tags ("\ttfamily{file\_*}")} 
     979  \caption{XIOS: file tags ("\texttt{file\_*}")} 
    977980\end{table} 
    978981 
    979982\begin{table} 
    980   \scriptsize 
    981983  \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 
    982984    \hline 
     
    10071009    \hline 
    10081010  \end{tabularx} 
    1009   \caption{Axis tags ("\ttfamily{axis\_*}")} 
     1011  \caption{XIOS: axis tags ("\texttt{axis\_*}")} 
    10101012\end{table} 
    10111013 
    10121014\begin{table} 
    1013   \scriptsize 
    10141015  \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 
    10151016    \hline 
     
    10401041    \hline 
    10411042  \end{tabularx} 
    1042   \caption{Domain tags ("\ttfamily{domain\_*)}"} 
     1043  \caption{XIOS: domain tags ("\texttt{domain\_*)}"} 
    10431044\end{table} 
    10441045 
    10451046\begin{table} 
    1046   \scriptsize 
    10471047  \begin{tabularx}{\textwidth}{|l|X|X|X|X|} 
    10481048    \hline 
     
    10731073    \hline 
    10741074  \end{tabularx} 
    1075   \caption{Grid tags ("\ttfamily{grid\_*}")} 
     1075  \caption{XIOS: grid tags ("\texttt{grid\_*}")} 
    10761076\end{table} 
    10771077 
     1078%% ================================================================================================= 
    10781079\subsubsection{Attributes list per family} 
    10791080 
    10801081\begin{table} 
    1081   \scriptsize 
    10821082  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    10831083    \hline 
     
    11141114    \hline 
    11151115  \end{tabularx} 
    1116   \caption{Reference attributes ("\ttfamily{*\_ref}")} 
     1116  \caption{XIOS: reference attributes ("\texttt{*\_ref}")} 
    11171117\end{table} 
    11181118 
    11191119\begin{table} 
    1120   \scriptsize 
    11211120  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    11221121    \hline 
     
    11501149    \hline 
    11511150  \end{tabularx} 
    1152   \caption{Domain attributes ("\ttfamily{zoom\_*}")} 
     1151  \caption{XIOS: domain attributes ("\texttt{zoom\_*}")} 
    11531152\end{table} 
    11541153 
    11551154\begin{table} 
    1156   \scriptsize 
    11571155  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    11581156    \hline 
     
    12051203    \hline 
    12061204  \end{tabularx} 
    1207   \caption{File attributes} 
     1205  \caption{XIOS: file attributes} 
    12081206\end{table} 
    12091207 
    12101208\begin{table} 
    1211   \scriptsize 
    12121209  \begin{tabularx}{\textwidth}{|l|X|l|l|} 
    12131210    \hline 
     
    12541251    \hline 
    12551252  \end{tabularx} 
    1256   \caption{Field attributes} 
     1253  \caption{XIOS: field attributes} 
    12571254\end{table} 
    12581255 
    12591256\begin{table} 
    1260   \scriptsize 
    12611257  \begin{tabularx}{\textwidth}{|l|X|X|X|} 
    12621258    \hline 
     
    13131309    \hline 
    13141310  \end{tabularx} 
    1315   \caption{Miscellaneous attributes} 
     1311  \caption{XIOS: miscellaneous attributes} 
    13161312\end{table} 
    13171313 
     1314%% ================================================================================================= 
    13181315\subsection{CF metadata standard compliance} 
    13191316 
    1320 Output from the XIOS-1.0 IO server is compliant with  
     1317Output from the XIOS IO server is compliant with 
    13211318\href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 
    1322 the CF metadata standard.  
     1319the CF metadata standard. 
    13231320Therefore 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. 
     1321section \autoref{subsec:DIA_IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
    13251322 
    13261323Some 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. 
     1324the namelist parameter \np{ln_cfmeta}{ln\_cfmeta} in the \nam{run}{run} namelist. 
    13281325This must be set to true if these metadata are to be included in the output files. 
    13291326 
    1330  
    1331 % ================================================================ 
    1332 %       NetCDF4 support 
    1333 % ================================================================ 
    1334 \section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})] 
    1335 {NetCDF4 support (\protect\key{netcdf4})} 
     1327%% ================================================================================================= 
     1328\section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})]{NetCDF4 support (\protect\key{netcdf4})} 
    13361329\label{sec:DIA_nc4} 
    13371330 
     
    13411334Chunking and compression can lead to significant reductions in file sizes for a small runtime overhead. 
    13421335For a fuller discussion on chunking and other performance issues the reader is referred to 
    1343 the NetCDF4 documentation found \href{http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Chunking}{here}. 
     1336the NetCDF4 documentation found \href{https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_perf_chunking.html}{here}. 
    13441337 
    13451338The new features are only available when the code has been linked with a NetCDF4 library 
     
    13471340Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but 
    13481341most 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: 
    1351  
    1352 %------------------------------------------namnc4---------------------------------------------------- 
    1353  
    1354 \nlst{namnc4} 
    1355 %------------------------------------------------------------------------------------------------------------- 
     1342\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
     1343setting the \np{ln_nc4zip}{ln\_nc4zip} logical to false in the \nam{nc4}{nc4} namelist: 
     1344 
     1345\begin{listing} 
     1346  \nlst{namnc4} 
     1347  \caption{\forcode{&namnc4}} 
     1348  \label{lst:namnc4} 
     1349\end{listing} 
    13561350 
    13571351If \key{netcdf4} has not been defined, these namelist parameters are not read. 
    1358 In this case, \np{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined. 
     1352In this case, \np{ln_nc4zip}{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined. 
    13591353These functions will not be used but need to be included so that compilation is possible with NetCDF3 libraries. 
    13601354 
     
    13901384\end{forlines} 
    13911385 
    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 
     1386\noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\texttt 46x38x1} respectively in 
     1387the mono-processor case (\ie\ global domain of {\small\texttt 182x149x31}). 
     1388An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 
     1389table \autoref{tab:DIA_NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 
    13961390a 4x2 mpi partitioning. 
    13971391Note the variation in the compression ratio achieved which reflects chiefly the dry to wet volume ratio of 
    13981392each processing region. 
    13991393 
    1400 %------------------------------------------TABLE---------------------------------------------------- 
    14011394\begin{table} 
    1402   \scriptsize 
    14031395  \centering 
    14041396  \begin{tabular}{lrrr} 
     
    14321424    ORCA2\_2d\_grid\_W\_0007.nc & 4416    & 1368     & 70\%      \\ 
    14331425  \end{tabular} 
    1434   \caption{ 
    1435     \protect\label{tab:NC4} 
    1436     Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression 
    1437   } 
     1426  \caption{Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression} 
     1427  \label{tab:DIA_NC4} 
    14381428\end{table} 
    1439 %---------------------------------------------------------------------------------------------------- 
    14401429 
    14411430When \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 
     1431\rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4}{nc4} in 
     1432\textit{xmlio\_server.def}. 
     1433Typically this namelist serves the mean files whilst the \nam{nc4}{nc4} in the main namelist file continues to 
    14451434serve the restart files. 
    14461435This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 
    14471436the individual files produced by the io\_server processes may be different to those produced by 
    14481437the invidual processing regions and different chunking choices may be desired. 
    1449   
    1450 % ------------------------------------------------------------------------------------------------------------- 
    1451 %       Tracer/Dynamics Trends 
    1452 % ------------------------------------------------------------------------------------------------------------- 
    1453 \section[Tracer/Dynamics trends (\texttt{namtrd})] 
    1454 {Tracer/Dynamics trends (\protect\ngn{namtrd})} 
     1438 
     1439%% ================================================================================================= 
     1440\section[Tracer/Dynamics trends (\forcode{&namtrd})]{Tracer/Dynamics trends (\protect\nam{trd}{trd})} 
    14551441\label{sec:DIA_trd} 
    14561442 
    1457 %------------------------------------------namtrd---------------------------------------------------- 
    1458  
    1459 \nlst{namtrd}  
    1460 %------------------------------------------------------------------------------------------------------------- 
     1443\begin{listing} 
     1444  \nlst{namtrd} 
     1445  \caption{\forcode{&namtrd}} 
     1446  \label{lst:namtrd} 
     1447\end{listing} 
    14611448 
    14621449Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 
    14631450\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. 
    1466 Note that the output are done with xIOS, and therefore the \key{IOM} is required. 
    1467  
    1468 What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}: 
     1451(\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines). 
     1452This capability is controlled by options offered in \nam{trd}{trd} namelist. 
     1453Note that the output are done with XIOS, and therefore the \key{iomput} is required. 
     1454 
     1455What is done depends on the \nam{trd}{trd} logical set to \forcode{.true.}: 
    14691456 
    14701457\begin{description} 
    1471 \item[\np{ln\_glo\_trd}]: 
    1472   at each \np{nn\_trd} time-step a check of the basin averaged properties of 
     1458\item [{\np{ln_glo_trd}{ln\_glo\_trd}}]: at each \np{nn_trd}{nn\_trd} time-step a check of the basin averaged properties of 
    14731459  the momentum and tracer equations is performed. 
    14741460  This also includes a check of $T^2$, $S^2$, $\tfrac{1}{2} (u^2+v2)$, 
    14751461  and potential energy time evolution equations properties; 
    1476 \item[\np{ln\_dyn\_trd}]: 
    1477   each 3D trend of the evolution of the two momentum components is output; 
    1478 \item[\np{ln\_dyn\_mxl}]: 
    1479   each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output; 
    1480 \item[\np{ln\_vor\_trd}]: 
    1481   a vertical summation of the moment tendencies is performed, 
     1462\item [{\np{ln_dyn_trd}{ln\_dyn\_trd}}]: each 3D trend of the evolution of the two momentum components is output; 
     1463\item [{\np{ln_dyn_mxl}{ln\_dyn\_mxl}}]: each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output; 
     1464\item [{\np{ln_vor_trd}{ln\_vor\_trd}}]: a vertical summation of the moment tendencies is performed, 
    14821465  then the curl is computed to obtain the barotropic vorticity tendencies which are output; 
    1483 \item[\np{ln\_KE\_trd}] : 
    1484   each 3D trend of the Kinetic Energy equation is output; 
    1485 \item[\np{ln\_tra\_trd}]: 
    1486   each 3D trend of the evolution of temperature and salinity is output; 
    1487 \item[\np{ln\_tra\_mxl}]: 
    1488   each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output; 
     1466\item [{\np{ln_KE_trd}{ln\_KE\_trd}}]  : each 3D trend of the Kinetic Energy equation is output; 
     1467\item [{\np{ln_tra_trd}{ln\_tra\_trd}}]: each 3D trend of the evolution of temperature and salinity is output; 
     1468\item [{\np{ln_tra_mxl}{ln\_tra\_mxl}}]: each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output; 
    14891469\end{description} 
    14901470 
    1491 Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via  
    1492 the \key{trdtrc} and \key{trdmld\_trc} CPP keys. 
     1471Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 
     1472the \key{trdtrc} and \key{trdmxl\_trc} CPP keys. 
    14931473 
    14941474\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 
    1495 In 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). 
    1497  
    1498 % ------------------------------------------------------------------------------------------------------------- 
    1499 %       On-line Floats trajectories 
    1500 % ------------------------------------------------------------------------------------------------------------- 
    1501 \section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})] 
    1502 {FLO: On-Line Floats trajectories (\protect\key{floats})} 
    1503 \label{sec:FLO} 
    1504 %--------------------------------------------namflo------------------------------------------------------- 
    1505  
    1506 \nlst{namflo}  
    1507 %-------------------------------------------------------------------------------------------------------------- 
     1475In particular, options associated with \np{ln_dyn_mxl}{ln\_dyn\_mxl}, \np{ln_vor_trd}{ln\_vor\_trd}, and \np{ln_tra_mxl}{ln\_tra\_mxl} are not working, 
     1476and none of the options have been tested with variable volume (\ie\ \np[=.true.]{ln_linssh}{ln\_linssh}). 
     1477 
     1478%% ================================================================================================= 
     1479\section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})]{FLO: On-Line Floats trajectories (\protect\key{floats})} 
     1480\label{sec:DIA_FLO} 
     1481 
     1482\begin{listing} 
     1483  \nlst{namflo} 
     1484  \caption{\forcode{&namflo}} 
     1485  \label{lst:namflo} 
     1486\end{listing} 
    15081487 
    15091488The on-line computation of floats advected either by the three dimensional velocity field or constraint to 
    15101489remain 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} namelis variables. 
     1490Options are defined by \nam{flo}{flo} namelist variables. 
    15121491The 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.}). 
     1492or on a $4^th$ Runge-Hutta algorithm (\np[=.true.]{ln_flork4}{ln\_flork4}). 
    15141493Note that the \cite{blanke.raynaud_JPO97} algorithm have the advantage of providing trajectories which 
    15151494are consistent with the numeric of the code, so that the trajectories never intercept the bathymetry. 
    15161495 
     1496%% ================================================================================================= 
    15171497\subsubsection{Input data: initial coordinates} 
    15181498 
    15191499Initial 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}. 
     1500(IJK coordinates, (\np[=.true.]{ln_ariane}{ln\_ariane}) ) or with longitude and latitude. 
     1501 
     1502In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 
    15231503Its format is: \\ 
    1524 {\scriptsize \texttt{I J K nisobfl itrash itrash}} 
     1504{ \texttt{I J K nisobfl itrash}} 
    15251505 
    15261506\noindent with: 
     
    15281508 - I,J,K  : indexes of initial position 
    15291509 
    1530  - nisobfl: 0 for an isobar float, 1 for a float following the w velocity   
     1510 - nisobfl: 0 for an isobar float, 1 for a float following the w velocity 
    15311511 
    15321512 - itrash : set to zero; it is a dummy variable to respect Ariane Tools convention 
     
    15341514\noindent Example: \\ 
    15351515\noindent 
    1536 {\scriptsize 
     1516{ 
    15371517  \texttt{ 
    15381518    100.00000  90.00000  -1.50000 1.00000   0.00000   \\ 
     
    15451525In the other case (longitude and latitude), input filename is init\_float. 
    15461526Its format is: \\ 
    1547 {\scriptsize \texttt{Long Lat depth nisobfl ngrpfl itrash}} 
     1527{ \texttt{Long Lat depth nisobfl ngrpfl itrash}} 
    15481528 
    15491529\noindent with: 
     
    15591539\noindent Example: \\ 
    15601540\noindent 
    1561 {\scriptsize 
     1541{ 
    15621542  \texttt{ 
    15631543    20.0 0.0 0.0 0 1 1    \\ 
     
    15681548} \\ 
    15691549 
    1570 \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.} ), 
    1572 \np{jpnflnewflo} can be added in the initialization file. 
    1573  
     1550\np{jpnfl}{jpnfl} is the total number of floats during the run. 
     1551When initial positions are read in a restart file (\np[=.true.]{ln_rstflo}{ln\_rstflo} ), 
     1552\np{jpnflnewflo}{jpnflnewflo} can be added in the initialization file. 
     1553 
     1554%% ================================================================================================= 
    15741555\subsubsection{Output data} 
    15751556 
    1576 \np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl} is the frequency of 
     1557\np{nn_writefl}{nn\_writefl} is the frequency of writing in float output file and \np{nn_stockfl}{nn\_stockfl} is the frequency of 
    15771558creation of the float restart file. 
    15781559 
    1579 Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{ = .true.}). 
     1560Output data can be written in ascii files (\np[=.true.]{ln_flo_ascii}{ln\_flo\_ascii}). 
    15801561In that case, output filename is trajec\_float. 
    15811562 
    1582 Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{ = .false.}). 
    1583 There are 2 possibilities: 
    1584  
    1585 - if (\key{iomput}) is used, outputs are selected in  iodef.xml. 
     1563Another possiblity of writing format is Netcdf (\np[=.false.]{ln_flo_ascii}{ln\_flo\_ascii}) with 
     1564\key{iomput} and outputs selected in iodef.xml. 
    15861565Here it is an example of specification to put in files description section: 
    15871566 
     
    16001579\end{xmllines} 
    16011580 
    1602  -  if (\key{iomput}) is not used, a file called \ifile{trajec\_float} will be created by IOIPSL library. 
    1603  
    1604  See also \href{http://stockage.univ-brest.fr/~grima/Ariane/}{here} the web site describing the off-line use of 
    1605  this marvellous diagnostic tool. 
    1606  
    1607 % ------------------------------------------------------------------------------------------------------------- 
    1608 %       Harmonic analysis of tidal constituents 
    1609 % ------------------------------------------------------------------------------------------------------------- 
    1610 \section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})] 
    1611 {Harmonic analysis of tidal constituents (\protect\key{diaharm})} 
     1581%% ================================================================================================= 
     1582\section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})]{Harmonic analysis of tidal constituents (\protect\key{diaharm})} 
    16121583\label{sec:DIA_diag_harm} 
    16131584 
    1614 %------------------------------------------namdia_harm---------------------------------------------------- 
    1615 % 
    1616 \nlst{nam_diaharm} 
    1617 %---------------------------------------------------------------------------------------------------------- 
     1585\begin{listing} 
     1586  \nlst{nam_diaharm} 
     1587  \caption{\forcode{&nam_diaharm}} 
     1588  \label{lst:nam_diaharm} 
     1589\end{listing} 
    16181590 
    16191591A module is available to compute the amplitude and phase of tidal waves. 
    16201592This on-line Harmonic analysis is actived with \key{diaharm}. 
    16211593 
    1622 Some parameters are available in namelist \ngn{namdia\_harm}: 
    1623  
    1624  - \np{nit000\_han} is the first time step used for harmonic analysis 
    1625  
    1626  - \np{nitend\_han} is the  last time step used for harmonic analysis 
    1627  
    1628  - \np{nstep\_han}  is the  time step frequency for harmonic analysis 
    1629  
    1630  - \np{nb\_ana}     is the number of harmonics to analyse 
    1631  
    1632  - \np{tname}       is an array with names of tidal constituents to analyse 
    1633  
    1634  \np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
     1594Some parameters are available in namelist \nam{_diaharm}{\_diaharm}: 
     1595 
     1596 - \np{nit000_han}{nit000\_han} is the first time step used for harmonic analysis 
     1597 
     1598 - \np{nitend_han}{nitend\_han} is the  last time step used for harmonic analysis 
     1599 
     1600 - \np{nstep_han}{nstep\_han}  is the  time step frequency for harmonic analysis 
     1601 
     1602% - \np{nb_ana}{nb\_ana}     is the number of harmonics to analyse 
     1603 
     1604 - \np{tname}{tname}       is an array with names of tidal constituents to analyse 
     1605 
     1606 \np{nit000_han}{nit000\_han} and \np{nitend_han}{nitend\_han} must be between \np{nit000}{nit000} and \np{nitend}{nitend} of the simulation. 
    16351607 The restart capability is not implemented. 
    16361608 
     
    16531625We obtain in output $C_{j}$ and $S_{j}$ for each tidal wave. 
    16541626 
    1655 % ------------------------------------------------------------------------------------------------------------- 
    1656 %       Sections transports 
    1657 % ------------------------------------------------------------------------------------------------------------- 
    1658 \section[Transports across sections (\texttt{\textbf{key\_diadct}})] 
    1659 {Transports across sections (\protect\key{diadct})} 
     1627%% ================================================================================================= 
     1628\section[Transports across sections (\texttt{\textbf{key\_diadct}})]{Transports across sections (\protect\key{diadct})} 
    16601629\label{sec:DIA_diag_dct} 
    16611630 
    1662 %------------------------------------------namdct---------------------------------------------------- 
    1663  
    1664 \nlst{namdct} 
    1665 %------------------------------------------------------------------------------------------------------------- 
     1631\begin{listing} 
     1632  \nlst{nam_diadct} 
     1633  \caption{\forcode{&nam_diadct}} 
     1634  \label{lst:nam_diadct} 
     1635\end{listing} 
    16661636 
    16671637A module is available to compute the transport of volume, heat and salt through sections. 
     
    16691639 
    16701640Each section is defined by the coordinates of its 2 extremities. 
    1671 The pathways between them are contructed using tools which can be found in \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT} 
    1672 and are written in a binary file \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is later read in by 
    1673 NEMO to compute on-line transports. 
     1641The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT} 
     1642and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by 
     1643\NEMO\ to compute on-line transports. 
    16741644 
    16751645The on-line transports module creates three output ascii files: 
     
    16811651- \texttt{salt\_transport}   for   salt transports (unit: $10^{9}Kg s^{-1}$) \\ 
    16821652 
    1683 Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over which 
     1653Namelist variables in \nam{_diadct}{\_diadct} control how frequently the flows are summed and the time scales over which 
    16841654they are averaged, as well as the level of output for debugging: 
    1685 \np{nn\_dct}   : frequency of instantaneous transports computing 
    1686 \np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
    1687 \np{nn\_debug} : debugging of the section 
    1688  
     1655\np{nn_dct}{nn\_dct}   : frequency of instantaneous transports computing 
     1656\np{nn_dctwri}{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
     1657\np{nn_debug}{nn\_debug} : debugging of the section 
     1658 
     1659%% ================================================================================================= 
    16891660\subsubsection{Creating a binary file containing the pathway of each section} 
    16901661 
    1691 In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, 
     1662In \texttt{tools/SECTIONS\_DIADCT/run}, 
    16921663the file \textit{ {list\_sections.ascii\_global}} contains a list of all the sections that are to be computed 
    16931664(this list of sections is based on MERSEA project metrics). 
     
    16961667 
    16971668Each section is defined by: \\ 
    1698 \noindent {\scriptsize \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\ 
     1669\noindent { \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\ 
    16991670with: 
    17001671 
     
    17031674 - \texttt{long2 lat2}, coordinates of the second extremity of the section; 
    17041675 
    1705  - \texttt{nclass}    the number of bounds of your classes (\eg bounds for 2 classes); 
     1676 - \texttt{nclass}    the number of bounds of your classes (\eg\ bounds for 2 classes); 
    17061677 
    17071678 - \texttt{okstrpond} to compute    heat and       salt transports, \texttt{nostrpond} if no; 
     
    17131684 
    17141685\noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\ 
    1715 {\scriptsize 
     1686{ 
    17161687  \texttt{ 
    17171688    long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\ 
     
    17361707 
    17371708 - \texttt{zsigp} for potential density classes \\ 
    1738    
     1709 
    17391710 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 
    1740  \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is read by NEMO. \\ 
     1711 \texttt{section\_ijglobal.diadct} which is read by \NEMO. \\ 
    17411712 
    17421713 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 
     
    17461717 and the ATL\_Cuba\_Florida with 4 temperature clases (5 class bounds), are shown: \\ 
    17471718 \noindent 
    1748  {\scriptsize 
     1719 { 
    17491720   \texttt{ 
    17501721     -68.    -54.5   -60.    -64.7  00 okstrpond noice ACC\_Drake\_Passage \\ 
     
    17581729 } 
    17591730 
     1731%% ================================================================================================= 
    17601732\subsubsection{To read the output files} 
    17611733 
    17621734The output format is: \\ 
    1763 {\scriptsize 
     1735{ 
    17641736  \texttt{ 
    17651737    date, time-step number, section number,                \\ 
     
    17831755 
    17841756\begin{table} 
    1785   \scriptsize 
    17861757  \begin{tabular}{|l|l|l|l|l|} 
    17871758    \hline 
     
    17971768\end{table} 
    17981769 
    1799 % ================================================================ 
    1800 % Steric effect in sea surface height 
    1801 % ================================================================ 
     1770%% ================================================================================================= 
    18021771\section{Diagnosing the steric effect in sea surface height} 
    18031772\label{sec:DIA_steric} 
    1804  
    18051773 
    18061774Changes in steric sea level are caused when changes in the density of the water column imply an expansion or 
     
    18241792 
    18251793Let denote 
    1826 $\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$),  
    1827 $\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$),  
    1828 $\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$),  
    1829 $\bar{\rho}$ the global mean  seawater (\textit{in situ}) density  
     1794$\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 
     1795$\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$), 
     1796$\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$), 
     1797$\bar{\rho}$ the global mean  seawater (\textit{in situ}) density 
    18301798($\bar{\rho} = 1/\mathcal{V} \int_D \rho \,dv$), and 
    1831 $\bar{\eta}$ the global mean sea level  
     1799$\bar{\eta}$ the global mean sea level 
    18321800($\bar{\eta} = 1/\mathcal{A} \int_S \eta \,ds$). 
    18331801 
     
    18391807    \mathcal{V} &=  \mathcal{A}  \;\bar{\eta} 
    18401808  \end{split} 
    1841   \label{eq:MV_nBq} 
     1809  \label{eq:DIA_MV_nBq} 
    18421810\end{equation} 
    18431811 
     
    18471815  \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) 
    18481816  = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 
    1849   \label{eq:Co_nBq} 
     1817  \label{eq:DIA_Co_nBq} 
    18501818\end{equation} 
    18511819 
    18521820where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of 
    18531821the Earth system (atmosphere, sea-ice, land). 
    1854 Its global averaged leads to the total mass change  
     1822Its global averaged leads to the total mass change 
    18551823 
    18561824\begin{equation} 
    18571825  \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 
    1858   \label{eq:Mass_nBq} 
     1826  \label{eq:DIA_Mass_nBq} 
    18591827\end{equation} 
    18601828 
    18611829where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface. 
    1862 Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to 
     1830Bringing \autoref{eq:DIA_Mass_nBq} and the time derivative of \autoref{eq:DIA_MV_nBq} together leads to 
    18631831the evolution equation of the mean sea level 
    18641832 
     
    18661834  \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}} 
    18671835  - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 
    1868   \label{eq:ssh_nBq} 
     1836  \label{eq:DIA_ssh_nBq} 
    18691837\end{equation} 
    18701838 
    1871 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean.  
    1872 The second term arises from temporal changes in the global mean density; \ie from steric effects. 
     1839The first term in equation \autoref{eq:DIA_ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 
     1840The second term arises from temporal changes in the global mean density; \ie\ from steric effects. 
    18731841 
    18741842In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 
    1875 the gravity (\ie in the hydrostatic balance of the primitive Equations). 
    1876 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 
     1843the gravity (\ie\ in the hydrostatic balance of the primitive Equations). 
     1844In particular, the mass conservation equation, \autoref{eq:DIA_Co_nBq}, degenerates into the incompressibility equation: 
    18771845 
    18781846\[ 
    18791847  \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 
    1880   % \label{eq:Co_Bq} 
     1848  % \label{eq:DIA_Co_Bq} 
    18811849\] 
    18821850 
     
    18851853\[ 
    18861854  \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 
    1887   % \label{eq:V_Bq} 
     1855  % \label{eq:DIA_V_Bq} 
    18881856\] 
    18891857 
     
    18941862 
    18951863Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 
    1896 considering the mass budget of the ocean.  
     1864considering the mass budget of the ocean. 
    18971865The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux 
    18981866must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean 
     
    19041872\begin{equation} 
    19051873  \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 
    1906   \label{eq:M_Bq} 
     1874  \label{eq:DIA_M_Bq} 
    19071875\end{equation} 
    19081876 
     
    19101878is converted into a mean change in sea level. 
    19111879Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 
    1912 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) 
    1913 in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 
     1880where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) 
     1881in \autoref{eq:DIA_M_Bq} leads to a very simple form for the steric height: 
    19141882 
    19151883\begin{equation} 
    19161884  \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 
    1917   \label{eq:steric_Bq} 
     1885  \label{eq:DIA_steric_Bq} 
    19181886\end{equation} 
    19191887 
    19201888The above formulation of the steric height of a Boussinesq ocean requires four remarks. 
    19211889First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$, 
    1922 \ie set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
     1890\ie\ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
    19231891We do not recommend that. 
    19241892Indeed, in this case $\rho_o$ depends on the initial state of the ocean. 
     
    19341902does not change when the sea level is changing as it is the case in all global ocean GCMs 
    19351903(wetting and drying of grid point is not allowed). 
    1936    
    1937 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 
    1938 In the non linear free surface case, \ie \key{vvl} defined, it is given by 
     1904 
     1905Third, the discretisation of \autoref{eq:DIA_steric_Bq} depends on the type of free surface which is considered. 
     1906In the non linear free surface case, \ie\ \np[=.true.]{ln_linssh}{ln\_linssh}, it is given by 
    19391907 
    19401908\[ 
    19411909  \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} } 
    1942   % \label{eq:discrete_steric_Bq_nfs} 
     1910  % \label{eq:DIA_discrete_steric_Bq_nfs} 
    19431911\] 
    19441912 
     
    19501918  \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 } 
    19511919                  { \sum_{i,\,j,\,k}       e_{1t}e_{2t}e_{3t} + \sum_{i,\,j}       e_{1t}e_{2t} \eta } 
    1952   % \label{eq:discrete_steric_Bq_fs} 
     1920  % \label{eq:DIA_discrete_steric_Bq_fs} 
    19531921\] 
    19541922 
     
    19591927so that there are no associated ocean currents. 
    19601928Hence, the dynamically relevant sea level is the effective sea level, 
    1961 \ie the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
    1962 However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between 
     1929\ie\ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
     1930However, in the current version of \NEMO\ the sea-ice is levitating above the ocean without mass exchanges between 
    19631931ice and ocean. 
    19641932Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present. 
     
    19701938\[ 
    19711939  \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 
    1972   % \label{eq:thermosteric_Bq} 
     1940  % \label{eq:DIA_thermosteric_Bq} 
    19731941\] 
    19741942 
    19751943where $S_o$ and $p_o$ are the initial salinity and pressure, respectively. 
    19761944 
    1977 Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs the \key{diaar5} defined to 
    1978 be called. 
    1979  
    1980 % ------------------------------------------------------------------------------------------------------------- 
    1981 %       Other Diagnostics 
    1982 % ------------------------------------------------------------------------------------------------------------- 
    1983 \section[Other diagnostics (\texttt{\textbf{key\_diahth}}, \texttt{\textbf{key\_diaar5}})] 
    1984 {Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})} 
     1945Both steric and thermosteric sea level are computed in \mdl{diaar5}. 
     1946 
     1947%% ================================================================================================= 
     1948\section{Other diagnostics} 
    19851949\label{sec:DIA_diag_others} 
    19861950 
     
    19881952The available ready-to-add diagnostics modules can be found in directory DIA. 
    19891953 
    1990 \subsection[Depth of various quantities (\textit{diahth.F90})] 
    1991 {Depth of various quantities (\protect\mdl{diahth})} 
     1954%% ================================================================================================= 
     1955\subsection[Depth of various quantities (\textit{diahth.F90})]{Depth of various quantities (\protect\mdl{diahth})} 
    19921956 
    19931957Among the available diagnostics the following ones are obtained when defining the \key{diahth} CPP key: 
     
    20011965- the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth}) 
    20021966 
    2003 % ----------------------------------------------------------- 
    2004 %     Poleward heat and salt transports 
    2005 % ----------------------------------------------------------- 
    2006  
    2007 \subsection[Poleward heat and salt transports (\textit{diaptr.F90})] 
    2008 {Poleward heat and salt transports (\protect\mdl{diaptr})} 
    2009  
    2010 %------------------------------------------namptr----------------------------------------- 
    2011  
    2012 \nlst{namptr}  
    2013 %----------------------------------------------------------------------------------------- 
    2014  
    2015 The poleward heat and salt transports, their advective and diffusive component, 
    2016 and the meriodional stream function can be computed on-line in \mdl{diaptr} \np{ln\_diaptr} to true 
    2017 (see the \textit{\ngn{namptr} } namelist below). 
    2018 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 
     1967\begin{figure}[!t] 
     1968  \centering 
     1969  \includegraphics[width=0.66\textwidth]{DIA_mask_subasins} 
     1970  \caption[Decomposition of the World Ocean to compute transports as well as 
     1971  the meridional stream-function]{ 
     1972    Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 
     1973    compute the heat and salt transports as well as the meridional stream-function: 
     1974    Atlantic basin (red), Pacific basin (green), 
     1975    Indian basin (blue), Indo-Pacific basin (blue+green). 
     1976    Note that semi-enclosed seas (Red, Med and Baltic seas) as well as 
     1977    Hudson Bay are removed from the sub-basins. 
     1978    Note also that the Arctic Ocean has been split into Atlantic and 
     1979    Pacific basins along the North fold line. 
     1980  } 
     1981  \label{fig:DIA_mask_subasins} 
     1982\end{figure} 
     1983 
     1984%% ================================================================================================= 
     1985\subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})]{CMIP specific diagnostics (\protect\mdl{diaar5})} 
     1986 
     1987A series of diagnostics has been added in the \mdl{diaar5} and \mdl{diaptr}. 
     1988In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5) 
     1989(see also \autoref{sec:DIA_steric} for one of them). 
     1990The module \mdl{diaar5} is active when one of the following outputs is required : 
     1991global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), 
     1992global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), 
     1993sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
     1994 
     1995In \mdl{diaptr} when \np[=.true.]{ln_diaptr}{ln\_diaptr} 
     1996(see the \nam{ptr}{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 
     1997their advective and diffusive component, and the meriodional stream function . 
     1998When \np[=.true.]{ln_subbas}{ln\_subbas}, transports and stream function are computed for the Atlantic, Indian, 
    20191999Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 
    20202000The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 
    2021 the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}). 
    2022  
    2023 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    2024 \begin{figure}[!t] 
    2025   \begin{center} 
    2026     \includegraphics[width=\textwidth]{Fig_mask_subasins} 
    2027     \caption{ 
    2028       \protect\label{fig:mask_subasins} 
    2029       Decomposition of the World Ocean (here ORCA2) into sub-basin used in to 
    2030       compute the heat and salt transports as well as the meridional stream-function: 
    2031       Atlantic basin (red), Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green). 
    2032       Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from the sub-basins. 
    2033       Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line. 
    2034     } 
    2035   \end{center} 
    2036 \end{figure}   
    2037 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    2038  
    2039 % ----------------------------------------------------------- 
    2040 %       CMIP specific diagnostics  
    2041 % ----------------------------------------------------------- 
    2042 \subsection[CMIP specific diagnostics (\textit{diaar5.F90})] 
    2043 {CMIP specific diagnostics (\protect\mdl{diaar5})} 
    2044  
    2045 A series of diagnostics has been added in the \mdl{diaar5}. 
    2046 They corresponds to outputs that are required for AR5 simulations (CMIP5) 
    2047 (see also \autoref{sec:DIA_steric} for one of them). 
    2048 Activating those outputs requires to define the \key{diaar5} CPP key. 
    2049  
    2050 % ----------------------------------------------------------- 
    2051 %       25 hour mean and hourly Surface, Mid and Bed  
    2052 % ----------------------------------------------------------- 
     2001the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}). 
     2002 
     2003\begin{listing} 
     2004  \nlst{namptr} 
     2005  \caption{\forcode{&namptr}} 
     2006  \label{lst:namptr} 
     2007\end{listing} 
     2008 
     2009%% ================================================================================================= 
    20532010\subsection{25 hour mean output for tidal models} 
    20542011 
    2055 %------------------------------------------nam_dia25h------------------------------------- 
    2056  
    2057 \nlst{nam_dia25h} 
    2058 %----------------------------------------------------------------------------------------- 
     2012\begin{listing} 
     2013  \nlst{nam_dia25h} 
     2014  \caption{\forcode{&nam_dia25h}} 
     2015  \label{lst:nam_dia25h} 
     2016\end{listing} 
    20592017 
    20602018A module is available to compute a crudely detided M2 signal by obtaining a 25 hour mean. 
     
    20632021This diagnostic is actived with the logical $ln\_dia25h$. 
    20642022 
    2065 % ----------------------------------------------------------- 
    2066 %     Top Middle and Bed hourly output 
    2067 % ----------------------------------------------------------- 
     2023%% ================================================================================================= 
    20682024\subsection{Top middle and bed hourly output} 
    20692025 
    2070 %------------------------------------------nam_diatmb----------------------------------------------------- 
    2071  
    2072 \nlst{nam_diatmb} 
    2073 %---------------------------------------------------------------------------------------------------------- 
     2026\begin{listing} 
     2027  \nlst{nam_diatmb} 
     2028  \caption{\forcode{&nam_diatmb}} 
     2029  \label{lst:nam_diatmb} 
     2030\end{listing} 
    20742031 
    20752032A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables. 
     
    20792036This diagnostic is actived with the logical $ln\_diatmb$. 
    20802037 
    2081 % ----------------------------------------------------------- 
    2082 %     Courant numbers 
    2083 % ----------------------------------------------------------- 
     2038%% ================================================================================================= 
    20842039\subsection{Courant numbers} 
    20852040 
     
    20892044\[ 
    20902045  C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}} 
    2091   % \label{eq:CFL} 
     2046  % \label{eq:DIA_CFL} 
    20922047\] 
    20932048 
     
    20982053Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    20992054 
    2100 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. 
     2055The variables can be activated by setting the \np{nn_diacfl}{nn\_diacfl} namelist parameter to 1 in the \nam{ctl}{ctl} namelist. 
    21012056The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 
    21022057In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of 
     
    21042059At 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 
    21052060with the coordinates of each. 
    2106 The maximum values from the run are also copied to the ocean.output file.  
    2107  
    2108 % ================================================================ 
    2109  
    2110 \biblio 
    2111  
    2112 \pindex 
     2061The maximum values from the run are also copied to the ocean.output file. 
     2062 
     2063\subinc{\input{../../global/epilogue}} 
    21132064 
    21142065\end{document} 
Note: See TracChangeset for help on using the changeset viewer.