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 6289 for trunk/DOC/TexFiles/Chapters/Chap_DIA.tex – NEMO

Ignore:
Timestamp:
2016-02-05T00:47:05+01:00 (8 years ago)
Author:
gm
Message:

#1673 DOC of the trunk - Update, see associated wiki page for description

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DOC/TexFiles/Chapters/Chap_DIA.tex

    r6140 r6289  
    1212%       Old Model Output  
    1313% ================================================================ 
    14 \section{Old Model Output (default or \key{dimgout})} 
     14\section{Old Model Output (default)} 
    1515\label{DIA_io_old} 
    1616 
     
    3333"\textit{grep -i numout}" in the source code directory. 
    3434 
    35 By default, diagnostic output files are written in NetCDF format but an IEEE binary output format, called DIMG, can be chosen by defining \key{dimgout}.  
    36  
    37 Since version 3.2, when defining \key{iomput}, an I/O server has been added which provides more flexibility in the choice of the fields to be written as well as how the writing work is distributed over the processors in massively parallel computing. The complete description of the use of this I/O server is presented in the next section.  
    38  
    39 By default, if neither \key{iomput} nor \key{dimgout} are defined, NEMO produces NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation. However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2, many diagnostic options have been added presuming the use of \key{iomput}. The usefulness of the default IOIPSL-based option is expected to reduce with each new release. If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of nn\_write time-steps (namelist parameter).  
     35By default, diagnostic output files are written in NetCDF format.  
     36Since version 3.2, when defining \key{iomput}, an I/O server has been added  
     37which provides more flexibility in the choice of the fields to be written  
     38as well as how the writing work is distributed over the processors in massively parallel computing.  
     39A complete description of the use of this I/O server is presented in the next section.  
     40 
     41By default, \key{iomput} is not defined, NEMO produces NetCDF with the old IOIPSL library  
     42which has been kept for compatibility and its easy installation.  
     43However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2,  
     44many diagnostic options have been added presuming the use of \key{iomput}.  
     45The usefulness of the default IOIPSL-based option is expected to reduce with each new release.  
     46If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module  
     47and contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period  
     48of nn\_write time-steps (namelist parameter).  
    4049 
    4150%\gmcomment{                    % start of gmcomment 
     
    4857 
    4958 
    50 Since version 3.2, iomput is the NEMO output interface of choice. It has been designed to be simple to use, flexible and efficient. The two main purposes of iomput are:  
     59Since version 3.2, iomput is the NEMO output interface of choice.  
     60It has been designed to be simple to use, flexible and efficient.  
     61The two main purposes of iomput are:  
    5162\begin{enumerate} 
    52 \item The complete and flexible control of the output files through external XML files adapted by the user from standard templates.  
    53 \item To achieve high performance and scalable output through the optional distribution of all diagnostic output related tasks to dedicated processes.  
     63\item The complete and flexible control of the output files through external XML files  
     64adapted by the user from standard templates.  
     65\item To achieve high performance and scalable output through the optional distribution  
     66of all diagnostic output related tasks to dedicated processes.  
    5467\end{enumerate} 
    55 The first functionality allows the user to specify, without code changes or recompilation, aspects of the diagnostic output stream, such as: 
     68The first functionality allows the user to specify, without code changes or recompilation,  
     69aspects of the diagnostic output stream, such as: 
    5670\begin{itemize} 
    5771\item The choice of output frequencies that can be different for each file (including real months and years). 
    58 \item The choice of file contents; includes complete flexibility over which data are written in which files (the same data can be written in different files).  
     72\item The choice of file contents; includes complete flexibility over which data are written in which files  
     73(the same data can be written in different files).  
    5974\item The possibility to split output files at a chosen frequency. 
    6075\item The possibility to extract a vertical or an horizontal subdomain. 
     
    6277\item Control over metadata via a large XML "database" of possible output fields. 
    6378\end{itemize} 
    64 In addition, iomput allows the user to add the output of any new variable (scalar, 2D or 3D) in the code in a very easy way. All details of iomput functionalities are listed in the following subsections. Examples of the XML files that control the outputs can be found in: 
     79In addition, iomput allows the user to add in the code the output of any new variable (scalar, 2D or 3D)  
     80in a very easy way. All details of iomput functionalities are listed in the following subsections.  
     81Examples of the XML files that control the outputs can be found in: 
    6582\begin{alltt} 
    6683\begin{verbatim} 
     
    7289\end{alltt} 
    7390 
    74 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) to collect and write the outputs. With an appropriate choice of N by the user, the bottleneck associated with the writing of the output files can be greatly reduced.  
    75  
    76 In version 3.6, the iom\_put interface depends on an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0} (use of revision 618 or higher is required). This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to create a single output file and therefore to bypass the rebuilding phase. Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled (i.e. with the configure option $--$enable-parallel). Note that the files created by iomput through XIOS are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    77  
    78 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, where N is typically much less than the number of NEMO processors, will reduce the number of output files created. This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. Note that for smaller configurations, the rebuilding phase can be avoided, even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
     91The second functionality targets output performance when running in parallel (\key{mpp\_mpi}).  
     92Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes)  
     93to collect and write the outputs. With an appropriate choice of N by the user,  
     94the bottleneck associated with the writing of the output files can be greatly reduced.  
     95 
     96In version 3.6, the iom\_put interface depends on an external code called  
     97\href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}  
     98(use of revision 618 or higher is required). This new IO server can take advantage of  
     99the parallel I/O functionality of NetCDF4 to create a single output file and therefore  
     100to bypass the rebuilding phase. Note that writing in parallel into the same NetCDF files  
     101requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled  
     102($i.e.$ with the configure option $--$enable-parallel).  
     103Note that the files created by iomput through XIOS are incompatible with NetCDF3.  
     104All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
     105 
     106Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers,  
     107where N is typically much less than the number of NEMO processors, will reduce the number of output files created.  
     108This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors.  
     109Note that for smaller configurations, the rebuilding phase can be avoided,  
     110even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
    79111 
    80112\subsection{XIOS: the IO\_SERVER} 
     
    82114\subsubsection{Attached or detached mode?} 
    83115 
    84 Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS}, the io\_server developed by Yann Meurdesoif from IPSL. The behaviour of the io subsystem is controlled by settings in the external XML files listed above. Key settings in the iodef.xml file are {\tt using\_server} and the {\tt type} tag associated with each defined file. The {\tt using\_server} setting determines whether or not the server will be used in ''attached mode'' (as a library) [{\tt false}] or in ''detached mode'' (as an external executable on N additional, dedicated cpus) [{\tt true}]. The ''attached mode'' is simpler to use but much less efficient for massively parallel applications. The type of each file can be either ''multiple\_file'' or ''one\_file''. 
    85  
    86 In attached mode and if the type of file is ''multiple\_file'', then each NEMO process will also act as an IO server and produce its own set of output files. Superficially, this emulates the standard behaviour in previous versions, However, the subdomain written out by each process does not correspond to the {\tt jpi x jpj x jpk} domain actually computed by the process (although it may if {\tt jpni=1}). Instead each process will have collected and written out a number of complete longitudinal strips. If the ''one\_file'' option is chosen then all processes will collect their longitudinal strips and write (in parallel) to a single output file.  
    87  
    88 In detached mode and if the type of file is ''multiple\_file'', then each stand-alone XIOS process will collect data for a range of complete longitudinal strips and write to its own set of output files. If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and write (in parallel) to a single output file. Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. The following subsection provides a typical example but the syntax will vary in different MPP environments. 
     116Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS},  
     117the io\_server developed by Yann Meurdesoif from IPSL.  
     118The behaviour of the I/O subsystem is controlled by settings in the external XML files listed above.  
     119Key settings in the iodef.xml file are {\tt using\_server} and the {\tt type} tag associated with each defined file.  
     120The {\tt using\_server} setting determines whether or not the server will be used in \textit{attached mode} (as a library)  
     121[{\tt false}] or in \textit{detached mode} (as an external executable on N additional, dedicated cpus) [{\tt true}].  
     122The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications.  
     123The type of each file can be either ''multiple\_file'' or ''one\_file''. 
     124 
     125In \textit{attached mode} and if the type of file is ''multiple\_file'',  
     126then each NEMO process will also act as an IO server and produce its own set of output files.  
     127Superficially, this emulates the standard behaviour in previous versions.  
     128However, the subdomain written out by each process does not correspond to the {\tt jpi x jpj x jpk}  
     129domain actually computed by the process (although it may if {\tt jpni=1}).  
     130Instead each process will have collected and written out a number of complete longitudinal strips.  
     131If the ''one\_file'' option is chosen then all processes will collect their longitudinal strips  
     132and write (in parallel) to a single output file.  
     133 
     134In \textit{detached mode} and if the type of file is ''multiple\_file'',  
     135then each stand-alone XIOS process will collect data for a range of complete longitudinal strips  
     136and write to its own set of output files. If the ''one\_file'' option is chosen then  
     137all XIOS processes will collect their longitudinal strips and write (in parallel) to a single output file.  
     138Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job.  
     139The following subsection provides a typical example but the syntax will vary in different MPP environments. 
    89140 
    90141\subsubsection{Number of cpu used by XIOS in detached mode} 
    91142 
    92 The number of cores used by the XIOS is specified when launching the model. The number of cores dedicated to XIOS should be from ~1/10 to ~1/50 of the number or cores dedicated to NEMO. Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but this is a general recommendation and not specific to NEMO. It is difficult to provide precise recommendations because the optimal choice will depend on the particular hardware properties of the target system (parallel filesystem performance, available memory, memory bandwidth etc.) and the volume and frequency of data to be created. Here is an example of 2 cpus for the io\_server and 62 cpu for nemo using mpirun: 
     143The number of cores used by the XIOS is specified when launching the model.  
     144The number of cores dedicated to XIOS should be from ~1/10 to ~1/50 of the number or cores dedicated to NEMO.  
     145Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors  
     146but this is a general recommendation and not specific to NEMO.  
     147It is difficult to provide precise recommendations because the optimal choice will depend on  
     148the particular hardware properties of the target system (parallel filesystem performance, available memory,  
     149memory bandwidth etc.) and the volume and frequency of data to be created.  
     150Here is an example of 2 cpus for the io\_server and 62 cpu for nemo using mpirun: 
    93151 
    94152\texttt{ mpirun -np 62 ./nemo.exe : -np 2 ./xios\_server.exe } 
     
    96154\subsubsection{Control of XIOS: the XIOS context in iodef.xml} 
    97155 
    98 As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. See the XML basics section below for more details on XML syntax and rules. 
     156As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml.  
     157See the XML basics section below for more details on XML syntax and rules. 
    99158 
    100159\begin{tabular}{|p{4cm}|p{6.0cm}|p{2.0cm}|} 
     
    106165   \hline 
    107166   buffer\_size &  
    108    buffer size used by XIOS to send data from NEMO to XIOS. Larger is more efficient. Note that needed/used buffer sizes are summarized at the end of the job &  
     167   buffer size used by XIOS to send data from NEMO to XIOS. Larger is more efficient.  
     168   Note that needed/used buffer sizes are summarized at the end of the job &  
    109169   25000000 \\  
    110170   \hline    
     
    136196\subsubsection{Installation} 
    137197 
    138 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO. See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. NEMO will need to link to the compiled XIOS library. The  
    139 \href{http://www.nemo-ocean.eu/Using-NEMO/User-Guides/Basics/XIOS-IO-server-installation-and-use}{XIOS with NEMO} guide provides an example illustration of how this can be achieved. 
     198As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO.  
     199See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance.  
     200NEMO will need to link to the compiled XIOS library.  
     201The \href{http://www.nemo-ocean.eu/Using-NEMO/User-Guides/Basics/XIOS-IO-server-installation-and-use}{XIOS with NEMO}  
     202guide provides an example illustration of how this can be achieved. 
    140203 
    141204\subsubsection{Add your own outputs} 
    142205 
    143 It is very easy to add your own outputs with iomput. Many standard fields and diagnostics are already prepared (i.e., steps 1 to 3 below have been done) and simply need to be activated by including the required output in a file definition in iodef.xml (step 4). To add new output variables, all 4 of the following steps must be taken. 
     206It is very easy to add your own outputs with iomput.  
     207Many standard fields and diagnostics are already prepared ($i.e.$, steps 1 to 3 below have been done)  
     208and simply need to be activated by including the required output in a file definition in iodef.xml (step 4).  
     209To add new output variables, all 4 of the following steps must be taken. 
    144210\begin{description} 
    145211\item[1.] in NEMO code, add a \\ 
     
    151217to the list of used modules in the upper part of your module.  
    152218 
    153 \item[3.] in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code (see subsequent sections for a details of the XML syntax and rules). For example: 
     219\item[3.] in the field\_def.xml file, add the definition of your variable using the same identifier  
     220you used in the f90 code (see subsequent sections for a details of the XML syntax and rules).  
     221For example: 
    154222\vspace{-20pt} 
    155223\begin{alltt}  {{\scriptsize 
     
    165233\end{verbatim} 
    166234}}\end{alltt}  
    167 Note your definition must be added to the field\_group whose reference grid is consistent with the size of the array passed to iomput. The grid\_ref attribute refers to definitions set in iodef.xml which, in turn, reference grids and axes either defined in the code (iom\_set\_domain\_attr and iom\_set\_axis\_attr in iom.F90) or defined in the domain\_def.xml file. E.g.: 
     235Note your definition must be added to the field\_group whose reference grid is consistent  
     236with the size of the array passed to iomput.  
     237The grid\_ref attribute refers to definitions set in iodef.xml which, in turn, reference grids  
     238and axes either defined in the code (iom\_set\_domain\_attr and iom\_set\_axis\_attr in iom.F90)  
     239or defined in the domain\_def.xml file. $e.g.$: 
    168240\vspace{-20pt} 
    169241\begin{alltt}  {{\scriptsize 
     
    173245}}\end{alltt}  
    174246Note, if your array is computed within the surface module each nn\_fsbc time\_step,  
    175 add the field definition within the field\_group defined with the id ''SBC'': $<$field\_group id=''SBC''...$>$ which has been defined with the correct frequency of operations (iom\_set\_field\_attr in iom.F90) 
     247add the field definition within the field\_group defined with the id ''SBC'': $<$field\_group id=''SBC''...$>$  
     248which has been defined with the correct frequency of operations (iom\_set\_field\_attr in iom.F90) 
    176249 
    177250\item[4.] add your field in one of the output files defined in iodef.xml (again see subsequent sections for syntax and rules)   \\ 
     
    201274\subsubsection{Structure of the xml file used in NEMO} 
    202275 
    203 The XML file used in XIOS is structured by 7 families of tags: context, axis, domain, grid, field, file and variable. Each tag family has hierarchy of three flavors (except for context): 
     276The XML file used in XIOS is structured by 7 families of tags: context, axis, domain, grid, field, file and variable.  
     277Each tag family has hierarchy of three flavors (except for context): 
    204278\\ 
    205279\begin{tabular}{|p{3.0cm}|p{4.5cm}|p{4.5cm}|} 
     
    225299\\ 
    226300 
    227 Each element may have several attributes. Some attributes are mandatory, other are optional but have a default value and other are are completely optional. Id is a special attribute used to identify an element or a group of elements. It must be unique for a kind of element. It is optional, but no reference to the corresponding element can be done if it is not defined. 
    228  
    229 The XML file is split into context tags that are used to isolate IO definition from different codes or different parts of a code. No interference is possible between 2 different contexts. Each context has its own calendar and an associated timestep. In NEMO, we used the following contexts (that can be defined in any order):\\ 
     301Each element may have several attributes.  
     302Some attributes are mandatory, other are optional but have a default value and other are are completely optional.  
     303Id is a special attribute used to identify an element or a group of elements.  
     304It must be unique for a kind of element.  
     305It is optional, but no reference to the corresponding element can be done if it is not defined. 
     306 
     307The XML file is split into context tags that are used to isolate IO definition from different codes  
     308or different parts of a code. No interference is possible between 2 different contexts.  
     309Each context has its own calendar and an associated timestep.  
     310In \NEMO, we used the following contexts (that can be defined in any order):\\ 
    230311\\ 
    231312\begin{tabular}{|p{3.0cm}|p{4.5cm}|p{4.5cm}|} 
     
    271352\\ 
    272353 
    273 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts (that can be defined in any order):\\ 
     354\noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts  
     355(that can be defined in any order):\\ 
    274356\\ 
    275357\begin{tabular}{|p{3.0cm}|p{4.5cm}|p{4.5cm}|} 
     
    305387\subsubsection{Nesting XML files} 
    306388 
    307 The XML file can be split in different parts to improve its readability and facilitate its use. The inclusion of XML files into the main XML file can be done through the attribute src: \\ 
     389The XML file can be split in different parts to improve its readability and facilitate its use.  
     390The inclusion of XML files into the main XML file can be done through the attribute src: \\ 
    308391{\scriptsize \verb? <context src="./nemo_def.xml" /> ?}\\ 
    309392  
     
    323406\subsubsection{Use of inheritance} 
    324407 
    325 XML extensively uses the concept of inheritance. XML has a tree based structure with a parent-child oriented relation: all children inherit attributes from parent, but an attribute defined in a child replace the inherited attribute value. Note that the special attribute ''id'' is never inherited.  \\ 
     408XML extensively uses the concept of inheritance.  
     409XML has a tree based structure with a parent-child oriented relation:  
     410all children inherit attributes from parent, but an attribute defined in a child replace the inherited attribute value.  
     411Note that the special attribute ''id'' is never inherited.  \\ 
    326412\\ 
    327413example 1: Direct inheritance. 
     
    362448\subsubsection{Use of Groups} 
    363449 
    364 Groups can be used for 2 purposes. Firstly, the group can be used to define common attributes to be shared by the elements of the group through inheritance. In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''. Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 
     450Groups can be used for 2 purposes.  
     451Firstly, the group can be used to define common attributes to be shared by the elements of the group through inheritance.  
     452In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''.  
     453Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 
    365454\vspace{-20pt} 
    366455\begin{alltt}  {{\scriptsize 
     
    375464}}\end{alltt}  
    376465 
    377 Secondly, the group can be used to replace a list of elements. Several examples of groups of fields are proposed at the end of the file {\tt CONFIG/SHARED/field\_def.xml}. For example, a short list of the usual variables related to the U grid: 
     466Secondly, the group can be used to replace a list of elements.  
     467Several examples of groups of fields are proposed at the end of the file {\tt CONFIG/SHARED/field\_def.xml}.  
     468For example, a short list of the usual variables related to the U grid: 
    378469\vspace{-20pt} 
    379470\begin{alltt}  {{\scriptsize 
     
    399490\subsection{Detailed functionalities } 
    400491 
    401 The file {\tt NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml} provides several examples of the use of the new functionalities offered by the XML interface of XIOS.  
     492The file {\tt NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml} provides several examples of the use  
     493of the new functionalities offered by the XML interface of XIOS.  
    402494 
    403495\subsubsection{Define horizontal subdomains} 
    404 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of the tag family domain. It must therefore be done in the domain part of the XML file. For example, in {\tt CONFIG/SHARED/domain\_def.xml}, we provide the following example of a definition of a 5 by 5 box with the bottom left corner at point (10,10). 
     496Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of the tag family domain.  
     497It must therefore be done in the domain part of the XML file.  
     498For example, in {\tt CONFIG/SHARED/domain\_def.xml}, we provide the following example of a definition  
     499of a 5 by 5 box with the bottom left corner at point (10,10). 
    405500\vspace{-20pt} 
    406501\begin{alltt}  {{\scriptsize 
     
    419514\end{verbatim} 
    420515}}\end{alltt}  
    421 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. The Equatorial section, the TAO, RAMA and PIRATA moorings are alredy registered in the code and can therefore be outputted without taking care of their (i,j) position in the grid. These predefined domains can be activated by the use of specific domain\_ref: ''EqT'', ''EqU'' or ''EqW'' for the equatorial sections and the mooring position for TAO, RAMA and PIRATA followed by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 
     516Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
     517The Equatorial section, the TAO, RAMA and PIRATA moorings are alredy registered in the code  
     518and can therefore be outputted without taking care of their (i,j) position in the grid.  
     519These predefined domains can be activated by the use of specific domain\_ref: ''EqT'', ''EqU'' or ''EqW''  
     520for the equatorial sections and the mooring position for TAO, RAMA and PIRATA followed  
     521by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 
    422522\vspace{-20pt} 
    423523\begin{alltt}  {{\scriptsize 
     
    11161216% ------------------------------------------------------------------------------------------------------------- 
    11171217\section[Tracer/Dynamics Trends (TRD)] 
    1118                   {Tracer/Dynamics Trends  (\key{trdtra}, \key{trddyn},    \\  
    1119                                                              \key{trddvor}, \key{trdmld})} 
     1218                  {Tracer/Dynamics Trends  (\ngn{namtrd})} 
    11201219\label{DIA_trd} 
    11211220 
     
    11241223%------------------------------------------------------------------------------------------------------------- 
    11251224 
    1126 When \key{trddyn} and/or \key{trddyn} CPP variables are defined, each  
    1127 trend of the dynamics and/or temperature and salinity time evolution equations  
    1128 is stored in three-dimensional arrays just after their computation ($i.e.$ at the end  
    1129 of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). Options are defined by 
    1130 \ngn{namtrd} namelist variables. These trends are then  
    1131 used in \mdl{trdmod} (see TRD directory) every \textit{nn\_trd } time-steps. 
    1132  
    1133 What is done depends on the CPP keys defined: 
     1225Each trend of the dynamics and/or temperature and salinity time evolution equations  
     1226can be send to \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation  
     1227($i.e.$ at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines).  
     1228This capability is controlled by options offered in \ngn{namtrd} namelist.  
     1229Note that the output are done with xIOS, and therefore the \key{IOM} is required. 
     1230 
     1231What is done depends on the \ngn{namtrd} logical set to \textit{true}: 
    11341232\begin{description} 
    1135 \item[\key{trddyn}, \key{trdtra}] : a check of the basin averaged properties of the momentum  
    1136 and/or tracer equations is performed ;  
    1137 \item[\key{trdvor}] : a vertical summation of the moment tendencies is performed,  
    1138 then the curl is computed to obtain the barotropic vorticity tendencies which are output ; 
    1139 \item[\key{trdmld}] : output of the tracer tendencies averaged vertically   
    1140 either over the mixed layer (\np{nn\_ctls}=0),  
    1141 or       over a fixed number of model levels (\np{nn\_ctls}$>$1 provides the number of level),  
    1142 or       over a spatially varying but temporally fixed number of levels (typically the base  
    1143 of the winter mixed layer) read in \ifile{ctlsurf\_idx} (\np{nn\_ctls}=1) ; 
     1233\item[\np{ln\_glo\_trd}] : at each \np{nn\_trd} time-step a check of the basin averaged properties  
     1234of the momentum and tracer equations is performed. This also includes a check of $T^2$, $S^2$,  
     1235$\tfrac{1}{2} (u^2+v2)$, and potential energy time evolution equations properties ;  
     1236\item[\np{ln\_dyn\_trd}] : each 3D trend of the evolution of the two momentum components is output ;  
     1237\item[\np{ln\_dyn\_mxl}] : each 3D trend of the evolution of the two momentum components averaged  
     1238                           over the mixed layer is output  ;  
     1239\item[\np{ln\_vor\_trd}] : a vertical summation of the moment tendencies is performed,  
     1240                           then the curl is computed to obtain the barotropic vorticity tendencies which are output ; 
     1241\item[\np{ln\_KE\_trd}]  : each 3D trend of the Kinetic Energy equation is output ; 
     1242\item[\np{ln\_tra\_trd}] : each 3D trend of the evolution of temperature and salinity is output ; 
     1243\item[\np{ln\_tra\_mxl}] : each 2D trend of the evolution of temperature and salinity averaged  
     1244                           over the mixed layer is output ; 
    11441245\end{description} 
    1145  
    1146 The units in the output file can be changed using the \np{nn\_ucf} namelist parameter.  
    1147 For example, in case of salinity tendency the units are given by PSU/s/\np{nn\_ucf}. 
    1148 Setting \np{nn\_ucf}=86400 ($i.e.$ the number of second in a day) provides the tendencies in PSU/d. 
    1149  
    1150 When \key{trdmld} is defined, two time averaging procedure are proposed. 
    1151 Setting \np{ln\_trdmld\_instant} to \textit{true}, a simple time averaging is performed,  
    1152 so that the resulting tendency is the contribution to the change of a quantity between  
    1153 the two instantaneous values taken at the extremities of the time averaging period. 
    1154 Setting \np{ln\_trdmld\_instant} to \textit{false}, a double time averaging is performed,  
    1155 so that the resulting tendency is the contribution to the change of a quantity between  
    1156 two \textit{time mean} values. The later option requires the use of an extra file, \ifile{restart\_mld}   
    1157 (\np{ln\_trdmld\_restart}=true), to restart a run. 
    1158  
    11591246 
    11601247Note that the mixed layer tendency diagnostic can also be used on biogeochemical models  
    11611248via the \key{trdtrc} and \key{trdmld\_trc} CPP keys. 
     1249 
     1250\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested.  
     1251In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl}  
     1252are not working, and none of the option have been tested with variable volume ($i.e.$ \key{vvl} defined). 
     1253 
    11621254 
    11631255% ------------------------------------------------------------------------------------------------------------- 
     
    12801372\label{DIA_diag_harm} 
    12811373 
    1282 A module is available to compute the amplitude and phase for tidal waves.  
    1283 This diagnostic is actived with \key{diaharm}. 
    1284  
    12851374%------------------------------------------namdia_harm---------------------------------------------------- 
    12861375\namdisplay{namdia_harm} 
    12871376%---------------------------------------------------------------------------------------------------------- 
    12881377 
    1289 Concerning the on-line Harmonic analysis, some parameters are available in namelist 
    1290 \ngn{namdia\_harm} : 
    1291  
    1292 - \texttt{nit000\_han} is the first time step used for harmonic analysis 
    1293  
    1294 - \texttt{nitend\_han} is the last time step used for harmonic analysis 
    1295  
    1296 - \texttt{nstep\_han} is the time step frequency for harmonic analysis 
    1297  
    1298 - \texttt{nb\_ana} is the number of harmonics to analyse 
    1299  
    1300 - \texttt{tname} is an array with names of tidal constituents to analyse 
    1301  
    1302 \texttt{nit000\_han} and \texttt{nitend\_han} must be between \texttt{nit000} and \texttt{nitend} of the simulation. 
     1378A module is available to compute the amplitude and phase of tidal waves.  
     1379This on-line Harmonic analysis is actived with \key{diaharm}. 
     1380Some parameters are available in namelist \ngn{namdia\_harm} : 
     1381 
     1382- \np{nit000\_han} is the first time step used for harmonic analysis 
     1383 
     1384- \np{nitend\_han} is the last time step used for harmonic analysis 
     1385 
     1386- \np{nstep\_han} is the time step frequency for harmonic analysis 
     1387 
     1388- \np{nb\_ana} is the number of harmonics to analyse 
     1389 
     1390- \np{tname} is an array with names of tidal constituents to analyse 
     1391 
     1392\np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
    13031393The restart capability is not implemented. 
    13041394 
    1305 The Harmonic analysis solve this equation: 
     1395The Harmonic analysis solve the following equation: 
    13061396\begin{equation} 
    13071397h_{i} - A_{0} + \sum^{nb\_ana}_{j=1}[A_{j}cos(\nu_{j}t_{j}-\phi_{j})] = e_{i} 
     
    13501440\label{DIA_diag_dct} 
    13511441 
    1352 A module is available to compute the transport of volume, heat and salt through sections. This diagnostic 
    1353 is actived with \key{diadct}. 
     1442A module is available to compute the transport of volume, heat and salt through sections.  
     1443This diagnostic is actived with \key{diadct}. 
    13541444 
    13551445Each section is defined by the coordinates of its 2 extremities. The pathways between them are contructed 
     
    13731463%------------------------------------------------------------------------------------------------------------- 
    13741464 
    1375 \texttt{nn\_dct}: frequency of instantaneous transports computing 
    1376  
    1377 \texttt{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
    1378  
    1379 \texttt{nn\_debug}: debugging of the section 
     1465\np{nn\_dct}: frequency of instantaneous transports computing 
     1466 
     1467\np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
     1468 
     1469\np{nn\_debug}: debugging of the section 
    13801470 
    13811471\subsubsection{ To create a binary file containing the pathway of each section } 
     
    15081598the \key{diahth} CPP key:  
    15091599 
    1510 - the mixed layer depth (based on a density criterion, \citet{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth}) 
     1600- the mixed layer depth (based on a density criterion \citep{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth}) 
    15111601 
    15121602- the turbocline depth (based on a turbulent mixing coefficient criterion) (\mdl{diahth}) 
Note: See TracChangeset for help on using the changeset viewer.