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 11435 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex – NEMO

Ignore:
Timestamp:
2019-08-14T14:45:08+02:00 (5 years ago)
Author:
nicolasmartin
Message:

Various corrections on chapters

Cleaning the indexes by fixing/removing wrong entries (or appending a ? to unknown items) and
improve the classification with new index definitions for CPP keys and namelist blocks:

  • from \key{...} cmd, key_ prefix no longer precedes the index entry
  • namelist block declaration moves from \ngn{nam...} to \nam{...} (i.e. \ngn{namtra\_ldf} -> \nam{tra\_ldf}) The expected prefix nam is added to the printed word but not the index entry.

Now we have indexes with a better sorting instead of all CPP keys under 'K' and namelists blocks under 'N'.

Fix missing space issues with alias commands by adding a trailing backslash (\NEMO\, \ie\, \eg\, ...).
There is no perfect solution for this, and I prefer not using a particular package to solve it.

Review the initial LaTeX code snippet for the historic changes in chapters

Finally, for readability and future diff visualisations, please avoid writing paragraphs with continuous lines.
Break the lines around 80 to 100 characters long

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex

    r11346 r11435  
    88\label{chap:DIA} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\vfill 
     
    1818    {\em }      & {\em Dorotea Iovino, Nicolas Martin} & {\em }  \\ 
    1919    {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em }  \\ 
    20     {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\  
    21     {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\  
     20    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\ 
     21    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\ 
    2222\end{tabular} 
    23 \end{figure}  
     23\end{figure} 
    2424 
    2525\newpage 
    2626 
    2727% ================================================================ 
    28 %       Old Model Output  
     28%       Old Model Output 
    2929% ================================================================ 
    3030\section{Model output} 
     
    4141 
    4242The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 
    43 The output listing is stored in the $ocean.output$ file. 
    44 The information is printed from within the code on the logical unit $numout$. 
     43The output listing is stored in the \textit{ocean.output} file. 
     44The information is printed from within the code on the logical unit \texttt{numout}. 
    4545To locate these prints, use the UNIX command "\textit{grep -i numout}" in the source code directory. 
    4646 
     
    5959\label{sec:DIA_iom} 
    6060 
    61 Since version 3.2, iomput is the NEMO output interface of choice. 
     61Since version 3.2, iomput is the \NEMO\ output interface of choice. 
    6262It has been designed to be simple to use, flexible and efficient. 
    63 The two main purposes of iomput are:  
     63The two main purposes of iomput are: 
    6464 
    6565\begin{enumerate} 
     
    7272\end{enumerate} 
    7373 
    74 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, 
    7575aspects of the diagnostic output stream, such as: 
    7676 
     
    9494in a very easy way. 
    9595All details of iomput functionalities are listed in the following subsections. 
    96 Examples of the XML files that control the outputs can be found in:  
     96Examples of the XML files that control the outputs can be found in: 
    9797\path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml}, 
    9898\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     
    101101 
    102102The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 
    103 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) 
     103Iomput provides the possibility to specify N dedicated I/O processes (in addition to the \NEMO\ processes) 
    104104to collect and write the outputs. 
    105105With an appropriate choice of N by the user, the bottleneck associated with the writing of 
    106106the output files can be greatly reduced. 
    107107 
    108 In version 3.6, the iom\_put interface depends on 
    109 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5}  
    110 (use of revision 618 or higher is required). 
     108In version 3.6, the \rou{iom\_put} interface depends on 
     109an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 
     110%(use of revision 618 or higher is required). 
    111111This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 
    112112create a single output file and therefore to bypass the rebuilding phase. 
    113113Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to 
    114 an HDF5 library that has been correctly compiled (\ie with the configure option $--$enable-parallel). 
     114an HDF5 library that has been correctly compiled (\ie\ with the configure option $--$enable-parallel). 
    115115Note that the files created by iomput through XIOS are incompatible with NetCDF3. 
    116116All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    117117 
    118118Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 
    119 where N is typically much less than the number of NEMO processors, will reduce the number of output files created. 
    120 This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. 
     119where N is typically much less than the number of \NEMO\ processors, will reduce the number of output files created. 
     120This can greatly reduce the post-processing burden usually associated with using large numbers of \NEMO\ processors. 
    121121Note that for smaller configurations, the rebuilding phase can be avoided, 
    122122even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
     
    124124\subsection{XIOS: Reading and writing restart file} 
    125125 
    126 XIOS may be used to read single file restart produced by NEMO. Currently only the variables written to  
     126XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 
    127127file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{ = .true. } 
    128 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default NEMO  
    129 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read  
    130 restart, all definitions are done within the NEMO code. For high resolution configuration, however,  
     128in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 
     129functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 
     130restart, all definitions are done within the \NEMO\ code. For high resolution configuration, however, 
    131131there may be a need to add the following line in iodef.xml (xios context): 
    132132 
     
    135135\end{xmllines} 
    136136 
    137 This variable sets timeout for reading.  
    138  
    139 If XIOS is to be used to read restart from file generated with an earlier NEMO version (3.6 for instance), 
     137This variable sets timeout for reading. 
     138 
     139If XIOS is to be used to read restart from file generated with an earlier \NEMO\ version (3.6 for instance), 
    140140dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 
    141141 
    142 XIOS can also be used to write NEMO restart. A namelist parameter \np{nn\_wxios} is used to determine the  
    143 type of restart NEMO will write. If it is set to 0, default NEMO functionality will be used - each  
    144 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file;  
    145 for \np{nn\_wxios = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.  
    146 Note, however, that \textbf{NEMO will not read restart generated by XIOS when \np{nn\_wxios = 2}}. The restart will  
    147 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by NEMO only,  
    148 and may be useful when there is a need to change number of processors used to run simulation.  
     142XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn\_wxios} is used to determine the 
     143type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 
     144processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 
     145for \np{nn\_wxios}\forcode{ = 2} the restart will be written by XIOS into multiple files, one for each XIOS server. 
     146Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn\_wxios}\forcode{ = 2}}. The restart will 
     147have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 
     148and may be useful when there is a need to change number of processors used to run simulation. 
    149149 
    150150If an additional variable must be written to a restart file, the following steps are needed: 
    151151\begin{description} 
    152    \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and  
    153 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} -  
     152   \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 
     153define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 
    1541541D variable, \forcode{grid_scalar} - scalar), 
    155    \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine  
    156 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable  
    157 as an argument. This convention follows approach for writing restart using iom, where variables are  
     155   \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine 
     156\rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 
     157as an argument. This convention follows approach for writing restart using iom, where variables are 
    158158written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines. 
    159159\end{description} 
     
    181181 
    182182In \textit{attached mode} and if the type of file is ''multiple\_file'', 
    183 then each NEMO process will also act as an IO server and produce its own set of output files. 
     183then each \NEMO\ process will also act as an IO server and produce its own set of output files. 
    184184Superficially, this emulates the standard behaviour in previous versions. 
    185185However, the subdomain written out by each process does not correspond to 
     
    193193write to its own set of output files. 
    194194If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 
    195 write (in parallel) to a single output file.  
     195write (in parallel) to a single output file. 
    196196Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. 
    197197The following subsection provides a typical example but the syntax will vary in different MPP environments. 
     
    200200 
    201201The number of cores used by the XIOS is specified when launching the model. 
    202 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of  
    203 cores dedicated to NEMO. 
     202The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 
     203cores dedicated to \NEMO. 
    204204Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 
    205 this is a general recommendation and not specific to NEMO. 
     205this is a general recommendation and not specific to \NEMO. 
    206206It is difficult to provide precise recommendations because the optimal choice will depend on 
    207 the particular hardware properties of the target system  
     207the particular hardware properties of the target system 
    208208(parallel filesystem performance, available memory, memory bandwidth etc.) 
    209209and the volume and frequency of data to be created. 
     
    213213\subsubsection{Control of XIOS: the context in iodef.xml} 
    214214 
    215 As well as the {\ttfamily using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. 
     215As well as the \texttt{using\_server} flag, other controls on the use of XIOS are set in 
     216the XIOS context in \textit{iodef.xml}. 
    216217See the XML basics section below for more details on XML syntax and rules. 
    217218 
     
    226227    \hline 
    227228    buffer\_size                                                            & 
    228     buffer size used by XIOS to send data from NEMO to XIOS. 
     229    buffer size used by XIOS to send data from \NEMO\ to XIOS. 
    229230    Larger is more efficient. 
    230231    Note that needed/used buffer sizes are summarized at the end of the job & 
     
    232233    \hline 
    233234    buffer\_server\_factor\_size                                            & 
    234     ratio between NEMO and XIOS buffer size. 
     235    ratio between \NEMO\ and XIOS buffer size. 
    235236    Should be 2.                                                            & 
    236237    2        \\ 
     
    249250    \hline 
    250251    oasis\_codes\_id                                                        & 
    251     when using oasis, define the identifier of NEMO in the namcouple. 
     252    when using oasis, define the identifier of \NEMO\ in the namcouple. 
    252253    Note that the identifier of XIOS is xios.x                              & 
    253254    oceanx   \\ 
     
    260261\subsubsection{Installation} 
    261262 
    262 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. 
    263264See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 
    264 NEMO will need to link to the compiled XIOS library. 
     265\NEMO\ will need to link to the compiled XIOS library. 
    265266The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios} 
    266267{Extract and install XIOS} guide provides an example illustration of how this can be achieved. 
     
    275276\begin{enumerate} 
    276277\item[1.] 
    277   in NEMO code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
     278  in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
    278279\item[2.] 
    279280  If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 
     
    288289   <field_group id="grid_T" grid_ref="grid_T_3D"> <!-- T grid --> 
    289290   ... 
    290       <field id="identifier" long_name="blabla" ... />    
     291      <field id="identifier" long_name="blabla" ... /> 
    291292      ... 
    292 </field_definition>  
     293</field_definition> 
    293294\end{xmllines} 
    294295 
     
    313314 
    314315\begin{xmllines} 
    315 <file id="file1" .../>    
     316<file id="file1" .../> 
    316317... 
    317    <field field_ref="identifier" />    
     318   <field field_ref="identifier" /> 
    318319   ... 
    319 </file>    
     320</file> 
    320321\end{xmllines} 
    321322 
     
    333334See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 
    334335 
    335 \subsubsection{Structure of the XML file used in NEMO} 
     336\subsubsection{Structure of the XML file used in \NEMO} 
    336337 
    337338The XML file used in XIOS is structured by 7 families of tags: 
     
    382383                                                                                                     \xmlcode{<context id="xios" ... >}   \\ 
    383384    \hline 
    384     context nemo    &   context containing IO information for NEMO (mother grid when using AGRIF)  &  
     385    context nemo    &   context containing IO information for \NEMO\ (mother grid when using AGRIF)  & 
    385386                                                                                                     \xmlcode{<context id="nemo" ... >}   \\ 
    386387    \hline 
    387     context 1\_nemo &   context containing IO information for NEMO child grid 1 (when using AGRIF) &  
     388    context 1\_nemo &   context containing IO information for \NEMO\ child grid 1 (when using AGRIF) & 
    388389                                                                                                     \xmlcode{<context id="1_nemo" ... >} \\ 
    389390    \hline 
    390     context n\_nemo &   context containing IO information for NEMO child grid n (when using AGRIF) &  
     391    context n\_nemo &   context containing IO information for \NEMO\ child grid n (when using AGRIF) & 
    391392                                                                                                     \xmlcode{<context id="n_nemo" ... >} \\ 
    392393    \hline 
     
    413414\end{table} 
    414415 
    415 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts  
     416\noindent Each context tag related to \NEMO\ (mother or child grids) is divided into 5 parts 
    416417(that can be defined in any order): 
    417418 
     
    447448The inclusion of XML files into the main XML file can be done through the attribute src: 
    448449\xmlline|<context src="./nemo_def.xml" />| 
    449   
    450 \noindent In NEMO, by default, the field definition is done in 3 separate files ( 
     450 
     451\noindent In \NEMO, by default, the field definition is done in 3 separate files ( 
    451452\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
    452453\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     
    455456are included in the main iodef.xml file through the following commands: 
    456457\begin{xmllines} 
    457 <context id="nemo" src="./context_nemo.xml"/>  
     458<context id="nemo" src="./context_nemo.xml"/> 
    458459\end{xmllines} 
    459460 
     
    470471\begin{xmllines} 
    471472<field_definition operation="average" > 
    472    <field id="sst"                    />   <!-- averaged      sst -->  
    473    <field id="sss" operation="instant"/>   <!-- instantaneous sss -->  
    474 </field_definition>  
     473   <field id="sst"                    />   <!-- averaged      sst --> 
     474   <field id="sss" operation="instant"/>   <!-- instantaneous sss --> 
     475</field_definition> 
    475476\end{xmllines} 
    476477 
     
    489490</field_definition> 
    490491<file_definition> 
    491    <file id="myfile" output_freq="1d" />    
     492   <file id="myfile" output_freq="1d" /> 
    492493      <field field_ref="sst"                            />  <!-- default def --> 
    493494      <field field_ref="sss" long_name="my description" />  <!-- overwrite   --> 
    494495   </file> 
    495 </file_definition>  
     496</file_definition> 
    496497\end{xmllines} 
    497498 
     
    536537   <field_group group_ref="groupU" /> 
    537538   <field field_ref="uocetr_eff"   />  <!-- add another field --> 
    538 </file>    
     539</file> 
    539540\end{xmllines} 
    540541 
     
    548549Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 
    549550the tag family domain. 
    550 It must therefore be done in the domain part of the XML file.  
    551 For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of  
     551It must therefore be done in the domain part of the XML file. 
     552For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 
    552553a 5 by 5 box with the bottom left corner at point (10,10). 
    553554 
     
    566567\end{xmllines} 
    567568 
    568 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
     569Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 
    569570The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and 
    570571can therefore be outputted without taking care of their (i,j) position in the grid. 
     
    579580\end{xmllines} 
    580581 
    581 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if  
    582 you use the ''multiple\_file'' type for your output files,  
    583 you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat,  
     582Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 
     583you use the ''multiple\_file'' type for your output files, 
     584you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 
    584585\href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). 
    585586We are therefore advising to use the ''one\_file'' type in this case. 
     
    614615 
    615616\begin{xmllines} 
    616 <file_group id="1d" output_freq="1d" name="myfile_1d" >  
     617<file_group id="1d" output_freq="1d" name="myfile_1d" > 
    617618   <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA"  --> 
    618619      ... 
     
    669670\end{table} 
    670671 
    671 \noindent For example,  
     672\noindent For example, 
    672673\xmlline|<file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" >| 
    673674 
     
    681682\noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 
    682683 
    683 \subsubsection{Other controls of the XML attributes from NEMO} 
    684  
    685 The values of some attributes are defined by subroutine calls within NEMO  
     684\subsubsection{Other controls of the XML attributes from \NEMO} 
     685 
     686The values of some attributes are defined by subroutine calls within \NEMO 
    686687(calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 
    687688Any definition given in the XML file will be overwritten. 
     
    778779\end{xmllines} 
    779780 
    780 Note that, then the code is crashing, writting real4 variables forces a numerical conversion from  
     781Note that, then the code is crashing, writting real4 variables forces a numerical conversion from 
    781782real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. 
    782783Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 
     
    786787 
    787788\begin{xmllines} 
    788 <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files -->  
     789<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 
    789790   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    790791      <field field_ref="sst" name="tos" > 
     
    795796      <variable id="my_global_attribute" type="string" > blabla_global </variable> 
    796797   </file> 
    797 </file_group>  
     798</file_group> 
    798799\end{xmllines} 
    799800 
     
    810811 
    811812\begin{xmllines} 
    812 <file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->   
     813<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files --> 
    813814   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    814815      <field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 
    815816   </file> 
    816 </file_group>  
     817</file_group> 
    817818\end{xmllines} 
    818819 
     
    839840 
    840841\begin{xmllines} 
    841 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     842<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    842843   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    843       <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation"  
     844      <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 
    844845      operation="instant" freq_op="1m" > 
    845846         sqrt( @ssh2 - @ssh * @ssh ) 
    846847      </field> 
    847848   </file> 
    848 </file_group>  
     849</file_group> 
    849850\end{xmllines} 
    850851 
     
    853854here we use the default, average. 
    854855So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. 
    855 Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'':  
     856Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 
    856857here the temporal average is alreday done by the ``@'' function so we just use instant. 
    857858field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. 
     
    871872 
    872873\begin{xmllines} 
    873 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     874<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    874875   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    875876      <field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > 
     
    877878      </field> 
    878879   </file> 
    879 </file_group>  
     880</file_group> 
    880881\end{xmllines} 
    881882 
     
    13311332\subsection{CF metadata standard compliance} 
    13321333 
    1333 Output from the XIOS IO server is compliant with  
     1334Output from the XIOS IO server is compliant with 
    13341335\href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 
    1335 the CF metadata standard.  
     1336the CF metadata standard. 
    13361337Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of 
    13371338section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
    13381339 
    13391340Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 
    1340 the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. 
     1341the namelist parameter \np{ln\_cfmeta} in the \nam{run} namelist. 
    13411342This must be set to true if these metadata are to be included in the output files. 
    13421343 
     
    13601361Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but 
    13611362most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 
    1362 NEMO executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
    1363 setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4} namelist: 
     1363\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
     1364setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 
    13641365 
    13651366%------------------------------------------namnc4---------------------------------------------------- 
     
    14041405 
    14051406\noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\ttfamily 46x38x1} respectively in 
    1406 the mono-processor case (\ie global domain of {\small\ttfamily 182x149x31}). 
    1407 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in  
     1407the mono-processor case (\ie\ global domain of {\small\ttfamily 182x149x31}). 
     1408An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 
    14081409table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 
    14091410a 4x2 mpi partitioning. 
     
    14531454 
    14541455When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via 
    1455 \np{iom\_put} calls are set via an equivalent and identically named namelist to \textit{namnc4} in 
    1456 \np{xmlio\_server.def}. 
    1457 Typically this namelist serves the mean files whilst the \ngn{ namnc4} in the main namelist file continues to 
     1456\rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4} in 
     1457\textit{xmlio\_server.def}. 
     1458Typically this namelist serves the mean files whilst the \nam{nc4} in the main namelist file continues to 
    14581459serve the restart files. 
    14591460This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 
    14601461the individual files produced by the io\_server processes may be different to those produced by 
    14611462the invidual processing regions and different chunking choices may be desired. 
    1462   
     1463 
    14631464% ------------------------------------------------------------------------------------------------------------- 
    14641465%       Tracer/Dynamics Trends 
    14651466% ------------------------------------------------------------------------------------------------------------- 
    14661467\section[Tracer/Dynamics trends (\texttt{namtrd})] 
    1467 {Tracer/Dynamics trends (\protect\ngn{namtrd})} 
     1468{Tracer/Dynamics trends (\protect\nam{trd})} 
    14681469\label{sec:DIA_trd} 
    14691470 
    14701471%------------------------------------------namtrd---------------------------------------------------- 
    14711472 
    1472 \nlst{namtrd}  
     1473\nlst{namtrd} 
    14731474%------------------------------------------------------------------------------------------------------------- 
    14741475 
    14751476Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 
    14761477\mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation 
    1477 (\ie at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). 
    1478 This capability is controlled by options offered in \ngn{namtrd} namelist. 
     1478(\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines). 
     1479This capability is controlled by options offered in \nam{trd} namelist. 
    14791480Note that the output are done with XIOS, and therefore the \key{iomput} is required. 
    14801481 
    1481 What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}: 
     1482What is done depends on the \nam{trd} logical set to \forcode{.true.}: 
    14821483 
    14831484\begin{description} 
     
    15021503\end{description} 
    15031504 
    1504 Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via  
     1505Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 
    15051506the \key{trdtrc} and \key{trdmxl\_trc} CPP keys. 
    15061507 
    15071508\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 
    15081509In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 
    1509 and none of the options have been tested with variable volume (\ie \np{ln\_linssh}\forcode{ = .true.}). 
     1510and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{ = .true.}). 
    15101511 
    15111512% ------------------------------------------------------------------------------------------------------------- 
     
    15171518%--------------------------------------------namflo------------------------------------------------------- 
    15181519 
    1519 \nlst{namflo}  
     1520\nlst{namflo} 
    15201521%-------------------------------------------------------------------------------------------------------------- 
    15211522 
    15221523The on-line computation of floats advected either by the three dimensional velocity field or constraint to 
    15231524remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 
    1524 Options are defined by \ngn{namflo} namelist variables. 
     1525Options are defined by \nam{flo} namelist variables. 
    15251526The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 
    15261527or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). 
     
    15331534(IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude. 
    15341535 
    1535 In case of Ariane convention, input filename is \np{init\_float\_ariane}. 
     1536In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 
    15361537Its format is: \\ 
    15371538{\scriptsize \texttt{I J K nisobfl itrash}} 
     
    15411542 - I,J,K  : indexes of initial position 
    15421543 
    1543  - nisobfl: 0 for an isobar float, 1 for a float following the w velocity   
     1544 - nisobfl: 0 for an isobar float, 1 for a float following the w velocity 
    15441545 
    15451546 - itrash : set to zero; it is a dummy variable to respect Ariane Tools convention 
     
    16271628This on-line Harmonic analysis is actived with \key{diaharm}. 
    16281629 
    1629 Some parameters are available in namelist \ngn{nam\_diaharm}: 
     1630Some parameters are available in namelist \nam{\_diaharm}: 
    16301631 
    16311632 - \np{nit000\_han} is the first time step used for harmonic analysis 
     
    16351636 - \np{nstep\_han}  is the  time step frequency for harmonic analysis 
    16361637 
    1637  - \np{nb\_ana}     is the number of harmonics to analyse 
     1638% - \np{nb\_ana}     is the number of harmonics to analyse 
    16381639 
    16391640 - \np{tname}       is an array with names of tidal constituents to analyse 
     
    16781679The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT} 
    16791680and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by 
    1680 NEMO to compute on-line transports. 
     1681\NEMO\ to compute on-line transports. 
    16811682 
    16821683The on-line transports module creates three output ascii files: 
     
    16881689- \texttt{salt\_transport}   for   salt transports (unit: $10^{9}Kg s^{-1}$) \\ 
    16891690 
    1690 Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over which 
     1691Namelist variables in \nam{dct} control how frequently the flows are summed and the time scales over which 
    16911692they are averaged, as well as the level of output for debugging: 
    16921693\np{nn\_dct}   : frequency of instantaneous transports computing 
     
    17101711 - \texttt{long2 lat2}, coordinates of the second extremity of the section; 
    17111712 
    1712  - \texttt{nclass}    the number of bounds of your classes (\eg bounds for 2 classes); 
     1713 - \texttt{nclass}    the number of bounds of your classes (\eg\ bounds for 2 classes); 
    17131714 
    17141715 - \texttt{okstrpond} to compute    heat and       salt transports, \texttt{nostrpond} if no; 
     
    17431744 
    17441745 - \texttt{zsigp} for potential density classes \\ 
    1745    
     1746 
    17461747 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 
    1747  \texttt{section\_ijglobal.diadct} which is read by NEMO. \\ 
     1748 \texttt{section\_ijglobal.diadct} which is read by \NEMO. \\ 
    17481749 
    17491750 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 
     
    18311832 
    18321833Let denote 
    1833 $\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$),  
    1834 $\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$),  
    1835 $\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$),  
    1836 $\bar{\rho}$ the global mean  seawater (\textit{in situ}) density  
     1834$\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 
     1835$\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$), 
     1836$\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$), 
     1837$\bar{\rho}$ the global mean  seawater (\textit{in situ}) density 
    18371838($\bar{\rho} = 1/\mathcal{V} \int_D \rho \,dv$), and 
    1838 $\bar{\eta}$ the global mean sea level  
     1839$\bar{\eta}$ the global mean sea level 
    18391840($\bar{\eta} = 1/\mathcal{A} \int_S \eta \,ds$). 
    18401841 
     
    18591860where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of 
    18601861the Earth system (atmosphere, sea-ice, land). 
    1861 Its global averaged leads to the total mass change  
     1862Its global averaged leads to the total mass change 
    18621863 
    18631864\begin{equation} 
     
    18761877\end{equation} 
    18771878 
    1878 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean.  
    1879 The second term arises from temporal changes in the global mean density; \ie from steric effects. 
     1879The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 
     1880The second term arises from temporal changes in the global mean density; \ie\ from steric effects. 
    18801881 
    18811882In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 
    1882 the gravity (\ie in the hydrostatic balance of the primitive Equations). 
     1883the gravity (\ie\ in the hydrostatic balance of the primitive Equations). 
    18831884In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 
    18841885 
     
    19011902 
    19021903Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 
    1903 considering the mass budget of the ocean.  
     1904considering the mass budget of the ocean. 
    19041905The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux 
    19051906must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean 
     
    19171918is converted into a mean change in sea level. 
    19181919Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 
    1919 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) 
     1920where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) 
    19201921in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 
    19211922 
     
    19271928The above formulation of the steric height of a Boussinesq ocean requires four remarks. 
    19281929First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$, 
    1929 \ie set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
     1930\ie\ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
    19301931We do not recommend that. 
    19311932Indeed, in this case $\rho_o$ depends on the initial state of the ocean. 
     
    19411942does not change when the sea level is changing as it is the case in all global ocean GCMs 
    19421943(wetting and drying of grid point is not allowed). 
    1943    
     1944 
    19441945Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 
    1945 In the non linear free surface case, \ie \np{ln\_linssh}\forcode{ = .true.}, it is given by 
     1946In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{ = .true.}, it is given by 
    19461947 
    19471948\[ 
     
    19661967so that there are no associated ocean currents. 
    19671968Hence, the dynamically relevant sea level is the effective sea level, 
    1968 \ie the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
    1969 However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between 
     1969\ie\ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
     1970However, in the current version of \NEMO\ the sea-ice is levitating above the ocean without mass exchanges between 
    19701971ice and ocean. 
    19711972Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present. 
     
    20212022    } 
    20222023  \end{center} 
    2023 \end{figure}   
     2024\end{figure} 
    20242025%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    20252026 
    20262027% ----------------------------------------------------------- 
    2027 %       CMIP specific diagnostics  
     2028%       CMIP specific diagnostics 
    20282029% ----------------------------------------------------------- 
    20292030\subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})] 
     
    20332034In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5) 
    20342035(see also \autoref{sec:DIA_steric} for one of them). 
    2035 The module \mdl{diaar5} is active when one of the following outputs is required : global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
    2036  
    2037 In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.}  
    2038 (see the \textit{\ngn{namptr} } namelist below) can be computed on-line the poleward heat and salt transports, their advective and diffusive component, and the meriodional stream function . 
     2036The module \mdl{diaar5} is active when one of the following outputs is required : 
     2037global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), 
     2038global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), 
     2039sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
     2040 
     2041In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.} 
     2042(see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 
     2043their advective and diffusive component, and the meriodional stream function . 
    20392044When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 
    20402045Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 
     
    20442049%------------------------------------------namptr----------------------------------------- 
    20452050 
    2046 \nlst{namptr}  
     2051\nlst{namptr} 
    20472052%----------------------------------------------------------------------------------------- 
    20482053 
    20492054% ----------------------------------------------------------- 
    2050 %       25 hour mean and hourly Surface, Mid and Bed  
     2055%       25 hour mean and hourly Surface, Mid and Bed 
    20512056% ----------------------------------------------------------- 
    20522057\subsection{25 hour mean output for tidal models} 
     
    20972102Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    20982103 
    2099 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. 
     2104The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} namelist. 
    21002105The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 
    21012106In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of 
     
    21032108At 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 
    21042109with the coordinates of each. 
    2105 The maximum values from the run are also copied to the ocean.output file.  
     2110The maximum values from the run are also copied to the ocean.output file. 
    21062111 
    21072112% ================================================================ 
Note: See TracChangeset for help on using the changeset viewer.