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

Changeset 3940


Ignore:
Timestamp:
2013-06-26T10:10:12+02:00 (11 years ago)
Author:
smasson
Message:

trunk: upgrade XIOS inteface, see #1122

Location:
trunk
Files:
10 edited

Legend:

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

    r3764 r3940  
    3131"\textit{grep -i numout}" in the source code directory. 
    3232 
    33 In the standard configuration, the user will find the model results in  
    34 NetCDF files containing mean values (or instantaneous values if  
    35 \key{diainstant} is defined) for every time-step where output is demanded. 
    36 These outputs are defined in the \mdl{diawri} module.  
    37 When defining \key{dimgout}, the output are written in DIMG format, 
    38 an IEEE output format. 
    39  
    40 Since version 3.2, an I/O server has been added which provides more 
    41 flexibility in the choice of the fields to be output as well as how the  
    42 writing work is distributed over the processors in massively parallel 
    43 computing. It is presented in next section.  
    44  
     33By default, outpout files are written in NetCDF format but an IEEE output format, called DIMG, can be choosen when defining \key{dimgout}. 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 outputted 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 next section. If neither \key{iomput} nor \key{dimgout} are defined, NEMO is producing NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation, but it is quite inefficient on parrallel machines. If \key{iomput} is not defined, output files are defined in the \mdl{diawri} module and containing mean (or instantaneous if \key{diainstant} is defined) values over a period of nn\_write time-step (namelist parameter).  
    4534 
    4635%\gmcomment{                    % start of gmcomment 
     
    5342 
    5443 
    55 Since version 3.2, iom\_put is the NEMO output interface. It was designed to be simple to use,  
    56 flexible and efficient. Two main functionalities are covered by iom\_put:  
    57 (1) the control of the output files through an external xml file defined by the user ;  
    58 (2) the distribution (or not) of all task related to output files on dedicated processors. 
    59 The first functionality allows the user to specify, without touching anything into the code,  
    60 the way he want to output data: \\ 
     44Since version 3.2, iomput is the NEMO output interface. It was designed to be simple to use, flexible and efficient. The two main purposes of iomput are: \\ 
     45(1) the complete and flexible control of the output files through an external xml file defined by the user \\ 
     46(2) to achieve high performance outputs through the distribution (or not) of all tasks related to output files on dedicated processes. \\ 
     47The first functionality allows the user to specify, without touching anything into the code, the way he want to output data: \\ 
    6148- choice of output frequencies that can be different for each file (including real months and years) \\ 
    62 - choice of file contents: decide which data will be written in which file (the same data can be  
    63 outputted in different files) \\ 
    64 - possibility to extract a subdomain (for example all TAO-PIRATA-RAMA moorings are already defined)  \\ 
    65 - choice of the temporal operation to perform: mean, instantaneous, min, max  \\ 
     49- choice of file contents: decide which data will be written in which file (the same data can be outputted in different files)  \\ 
     50- possibility to split output files at a choosen frequency \\ 
     51- possibility to extract a vertical or an horizontal subdomain  \\ 
     52- choice of the temporal operation to perform: average, accumulate, instantaneous, min, max and once  \\ 
    6653- extremely large choice of data available   \\ 
    6754- redefine variables name and long\_name  \\ 
    68 In addition, iom\_put allows the user to output any variable (scalar, 2D or 3D) in the code  
    69 in a very easy way. All details of iom\_put functionalities are listed in the following subsections. 
    70 An example of the iodef.xml file that control the outputs can be found here:  
    71 NEMOGCM/CONFIG/ORCA2\_LIM/EXP00/iodef.xml 
    72  
    73 The second functionality targets outputs performances when running on a very large number of processes.  
    74 The idea is to dedicate N specific processes to write the outputs, where N is defined by the user.  
    75 In the current version, this functionality is technically working however, its performance are usually poor  
    76 (for known reasons). Users can therefore test this functionality but they must be aware that expected  
    77 performance improvement will not be achieved before the release 3.4. 
    78 An example of xmlio\_server.def NEMOGCM/CONFIG/ORCA2\_LIM/EXP00/xmlio\_server.def 
    79   
     55In addition, iomput allows the user to output any variable (scalar, 2D or 3D) in the code in a very easy way. All details of iomput functionalities are listed in the following subsections. Example of the iodef.xml files that control the outputs can be found here: NEMOGCM/CONFIG/ORCA2\_LIM/EXP00/iodef*.xml 
     56 
     57The second functionality targets outputs performances when running on a very large number of processes. First, iomput provides the possibility to dedicate N specific processes (in addition to NEMO processes) to write the outputs, where N is big enough (and defined by the user) to suppress the bottle neck associated with the the writing of the output files. Since version 3.5, this interface depends on an external code called \href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}. This new IO server takes advantage of the new functionalitiy of NetCDF4 that allows the user to write files in parallel and therefore to bypass the rebuilding phase. Note that writting 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 trough xios are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    8058 
    8159\subsection{Basic knowledge} 
     
    9371\subsubsection{Structure of the xml file used in NEMO} 
    9472 
    95 The xml file is split into 3 parts: 
     73The 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): 
    9674\begin{description} 
    97 \item[field definition]: define all variables that can be output \\ 
    98 all lines in between the following two tags\\ 
    99 \verb?   <field\_definition ...> ?  \\ 
    100 \verb?   </field\_definition ...> ?  
     75\item[root]: declaration of the root element that can contain element groups or elements, for example : $<$file\_definition ...$/>$ \\ 
     76\item[group]: declaration of a group element that can contain element groups or elements, for example : $<$file\_group ...$/>$ \\ 
     77\item[element]: declaration of an element that can contain elements, for example : $<$file ...$/>$  \\ 
     78\end{description} 
     79 
     80Each 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. 
     81 
     82The 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): 
     83\begin{description} 
     84\item[contex xios]: context containing informations for XIOS \\ 
     85\verb?   <context id="xios" ... ?  
     86\item[context nemo]: contex containing IO informations for NEMO (mother grid when using AGRIF) \\ 
     87\verb?   <context id="nemo" ... ?  
     88\item[context 1\_nemo]: contex containing IO informations for NEMO child grid 1 (when using AGRIF) \\ 
     89\verb?   <context id="1_nemo" ... ?   
     90\item[context n\_nemo]: contex containing IO informations for NEMO child grid n (when using AGRIF) \\ 
     91\verb?   <context id="n_nemo" ... ? 
     92\end{description} 
     93 
     94Each context tag related to NEMO (mother or child grids) is divided into 5 parts (that can be defined in any order): 
     95\begin{description} 
     96\item[field definition]: define all variables that can potentially be outputted \\ 
     97\verb?   <field_definition ... ? 
    10198\item[file definition]: define the netcdf files to be created and the variables they will contain \\ 
    102 all lines in between the following two tags \\ 
    103 \verb?   <field\_definition> ?  \\ 
    104 \verb?   </field\_definition> ? 
    105 \item[axis and grid definitions]: define the horizontal and vertical grids \\ 
    106 all lines in between the following two set of two tags\\ 
    107 \verb?   <axis\_definition ...> ?  \\ 
    108 \verb?   </axis\_definition ...> ? 
    109 and \\ 
    110 \verb?   <grid\_definition ...> ?  \\ 
    111 \verb?   </grid\_definition ...> ? 
     99\verb?   <file_definition ... ?  
     100\item[axis definitions]: define vertical axis \\ 
     101\verb?   <axis_definition ... ? 
     102\item[domain definitions]: define the horizontal grids \\ 
     103\verb?   <domain_definition ... ? 
     104\item[grid definitions]: define the 2D and 3D grids (association of an axis and a domain) \\ 
     105\verb?   <grid_definition ... ?  
    112106\end{description} 
    113107 
    114 \subsubsection{Inheritance and group } 
    115  
    116  Xml extensively uses the concept of inheritance. \\ 
     108the xios context contains only 1 tag: 
     109\begin{description} 
     110\item[variable definition]: define variables needed by xios. This can be seen as a kind of namelist for xios. \\ 
     111\verb?   <variable_definition ... ?  
     112\end{description} 
     113 
     114The XML file can be split in different parts to improve its readability and facilitate its use. The inclusing of XML files into the main XML file can be done through the attribute src: \\ 
     115\verb?   <context src="./nemo_def.xml" /> ?  
     116In NEMO, by default, the field and domain définition is done in 2 séparate files: \\ 
     117NEMOGCM/CONFIG/SHARED/field\_def.xml and \\ 
     118NEMOGCM/CONFIG/SHARED/domain\_def.xml that are included in the main iodef.xml file through the following commands: \\ 
     119\verb?   <field_definition src="./field_def.xml" /> ? \\ 
     120\verb?   <domain_definition src="./domain_def.xml" /> ?  
     121 
     122 
     123\subsubsection{Use of inheritance} 
     124 
     125XML extensively uses the concept of inheritance. XML has a based tree 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.  \\ 
    117126\\ 
    118 example 1: \\ 
    119 \vspace{-30pt} 
     127example 1: Direct inheritance. \\ 
    120128\begin{alltt}  {{\scriptsize     
    121129\begin{verbatim} 
    122    <field_definition operation="ave(X)" > 
     130   <field_definition operation="average" > 
    123131      <field id="sst"                    />   <!-- averaged      sst -->  
    124       <field id="sss" operation="inst(X)"/>   <!-- instantaneous sss -->  
     132      <field id="sss" operation="instant"/>   <!-- instantaneous sss -->  
    125133   </field_definition>  
    126134\end{verbatim} 
    127135}}\end{alltt}  
    128136 
    129 The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''ave(X)''  
    130 of the attribute ''operation'' from its parent ''field definition''. Note that a child can overwrite  
     137The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''average''  
     138of the attribute ''operation'' from its parent. Note that a child can overwrite  
    131139the attribute definition inherited from its parents. In the example above, the field ''sss'' will  
    132 therefore output instantaneous values instead of average values. 
    133  
    134 example 2: Use (or overwrite) attributes value of a field when listing the variables included in a file 
    135 \vspace{-20pt} 
     140for example output instantaneous values instead of average values. \\ 
     141\\ 
     142example 2: Inheritance by reference. \\ 
    136143\begin{alltt}  {{\scriptsize 
    137144\begin{verbatim} 
    138145   <field_definition> 
    139       <field id="sst" description="sea surface temperature" />    
    140       <field id="sss" description="sea surface salinity"    />   
     146      <field id="sst" long_name="sea surface temperature" />    
     147      <field id="sss" long_name="sea surface salinity"    />   
    141148   </field_definition>       
    142149 
    143150   <file_definition> 
    144       <file id="file_1" />    
    145             <field ref="sst"                              />  <!-- default def --> 
    146             <field ref="sss" description="my description" />  <!-- overwrite   --> 
     151      <file id="myfile" output_freq="1d" />    
     152            <field field_ref="sst"                            />  <!-- default def --> 
     153            <field field_ref="sss" long_name="my description" />  <!-- overwrite   --> 
    147154      </file>    
    148155   </file_definition>  
    149156\end{verbatim} 
    150157}}\end{alltt}  
    151  
    152 With the help of the inheritance, the concept of group allow to define a set of attributes  
    153 for several fields or files.  
    154  
    155 example 3, group of fields: define a group ''T\_grid\_variables'' identified with the name  
    156 ''grid\_T''. By default variables of this group have no vertical axis but, following inheritance  
    157 rules, ''axis\_ref'' can be redefined for the field ''toce'' that is a 3D variable. 
    158 \vspace{-30pt} 
    159 \begin{alltt}  {{\scriptsize 
    160 \begin{verbatim} 
    161    <field_definition> 
    162       <group id="grid_T" axis_ref="none" grid_ref="T_grid_variables"> 
    163             <field id="sst"/>   
    164             <field id="sss"/>   
    165             <field id="toce" axis_ref="deptht"/>  <!-- overwrite axis def --> 
    166       </group> 
    167    </field_definition>  
    168 \end{verbatim} 
    169 }}\end{alltt}  
    170  
    171 example 4, group of files: define a group of file with the attribute output\_freq equal to 432000 (5 days) 
    172 \vspace{-30pt} 
    173 \begin{alltt}  {{\scriptsize 
    174 \begin{verbatim} 
    175    <file_definition> 
    176       <group id="5d" output_freq="432000">    <!-- 5d files --> 
    177          <file id="5d_grid_T" name="auto">   <!-- T grid file --> 
     158Inherite (and overwrite, if needed) the attributes of a tag you are refering to. 
     159 
     160\subsubsection{Use of Group} 
     161 
     162Groups can be used fort 2 purposes. \\ 
     163 
     164First, the group can be used to define common attributes to be shared by the elements of the group through the 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''. 
     165\begin{alltt}  {{\scriptsize 
     166\begin{verbatim} 
     167   <field_group id="grid_T" grid_ref="grid_T_2D"> 
     168      <field id="toce" long_name="temperature"             unit="degC" grid_ref="grid_T_3D"/> 
     169      <field id="sst"  long_name="sea surface temperature" unit="degC"                     /> 
     170      <field id="sss"  long_name="sea surface salinity"    unit="psu"                      /> 
     171      <field id="ssh"  long_name="sea surface height"      unit="m"                        /> 
    178172         ... 
    179          </file> 
    180          <file id="5d_grid_U" name="auto">   <!-- U grid file --> 
     173\end{verbatim} 
     174}}\end{alltt}  
     175 
     176Second, 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 \\ 
     177NEMOGCM/CONFIG/SHARED/field\_def.xml. For example, a short list of usual variables related to the U grid: 
     178\begin{alltt}  {{\scriptsize 
     179\begin{verbatim} 
     180   <field_group id="groupU" > 
     181      <field field_ref="uoce"  /> 
     182      <field field_ref="suoce" /> 
     183      <field field_ref="utau"  /> 
     184   </field_group> 
     185\end{verbatim} 
     186}}\end{alltt}  
     187that can be directly include in a file through the following syntaxe: 
     188\begin{alltt}  {{\scriptsize 
     189\begin{verbatim} 
     190   <file id="myfile_U" output_freq="1d" />    
     191      <field_group group_ref="groupU"/>   
     192      <field field_ref="uocetr_eff"  />  <!-- add another field --> 
     193   </file>    
     194\end{verbatim} 
     195}}\end{alltt}  
     196 
     197\subsection{Detailed functionalities } 
     198 
     199The file NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml provides several examples of the use of the new functionalities offered by the XML interface of XIOS.  
     200 
     201\subsubsection{Define horizontal subdomains} 
     202Horizontal 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 NEMOGCM/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). 
     203\begin{alltt}  {{\scriptsize 
     204\begin{verbatim} 
     205   <domain_group id="grid_T"> 
     206      <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 
     207\end{verbatim} 
     208}}\end{alltt}  
     209The use of this subdomain is done through the redefinition of the attribute domain\_ref of the tag family field. For example: 
     210\begin{alltt}  {{\scriptsize 
     211\begin{verbatim} 
     212   <file id="myfile_vzoom" output_freq="1d" > 
     213      <field field_ref="toce" domain_ref="myzoom"/> 
     214   </file> 
     215\end{verbatim} 
     216}}\end{alltt}  
     217Moorings 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'' ...) 
     218\begin{alltt}  {{\scriptsize 
     219\begin{verbatim} 
     220   <file id="myfile_vzoom" output_freq="1d" > 
     221      <field field_ref="toce" domain_ref="0n180wT"/> 
     222   </file> 
     223\end{verbatim} 
     224}}\end{alltt}  
     225Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if you use the ''multiple\_file'' type for your output files, you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, \href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). We are therefore advising to use the ''one\_file'' type in this case. 
     226 
     227\subsubsection{Define vertical zooms} 
     228Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. It must therefore be done in the axis part of the XML file. For example, in NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml, we provide the following example: 
     229\begin{alltt}  {{\scriptsize 
     230\begin{verbatim} 
     231   <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 
     232      <axis id="deptht" /> 
     233      <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 
     234\end{verbatim} 
     235}}\end{alltt}  
     236The use of this vertical zoom is done through the redefinition of the attribute axis\_ref of the tag family field. For example: 
     237\begin{alltt}  {{\scriptsize 
     238\begin{verbatim} 
     239   <file id="myfile_hzoom" output_freq="1d" > 
     240      <field field_ref="toce" axis_ref="deptht_myzoom"/> 
     241   </file> 
     242\end{verbatim} 
     243}}\end{alltt}  
     244 
     245\subsubsection{Control of the output file names} 
     246 
     247The output file names are defined by the attributs ''name'' and ''name\_suffix'' of the tag family file. for example: 
     248\begin{alltt}  {{\scriptsize 
     249\begin{verbatim} 
     250   <file_group id="1d" output_freq="1d" name="myfile_1d" >  
     251      <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA"  --> 
    181252         ... 
    182          </file> 
    183       </group> 
    184    </file_definition>  
    185 \end{verbatim} 
    186 }}\end{alltt}  
    187  
    188 \subsubsection{Control of the xml attributes from NEMO} 
    189  
    190 The values of some attributes are automatically defined by NEMO (and any definition  
    191 given in the xml file is overwritten). By convention, these attributes are defined to ''auto''  
    192 (for string) or ''0000'' (for integer) in the xml file (but this is not necessary).  
     253      </file> 
     254      <file id="myfileB" name_suffix="_BBB" > <!-- will create file "myfile_1d_BBB" --> 
     255         ... 
     256      </file> 
     257   </file_group> 
     258\end{verbatim} 
     259}}\end{alltt}  
     260However it is also often very convienent to define the file name with the name of the experience, the output file frequency and the date of the beginning and the end of the simulation (which are informations stored either in the namelist or in the XML file). To do so, we added the following rule: if the id of the tag file is ''fileN''(where N = 1 to 99) or one of the predefined section or mooring (see next subsection), the following part of the name and the name\_suffix (that can be inherited) will be automatically replaced by: \\ 
     261\\ 
     262\begin{tabular}{|p{4cm}|p{8cm}|} 
     263   \hline 
     264   \centering part of the name automatically to be replaced & 
     265   by \\ 
     266   \hline 
     267   \hline 
     268   \centering @expname@ & 
     269   the experience name (from cn\_exp in the namelist) \\ 
     270   \hline 
     271   \centering @freq@ & 
     272   output frequency (from attribute output\_freq) \\ 
     273   \hline 
     274   \centering @startdate@  & 
     275   starting date of the simulation (from nn\_date0 in the restart or the namelist). \verb?yyyymmdd? format \\ 
     276   \hline 
     277   \centering @startdatefull@  &  
     278   starting date of the simulation (from nn\_date0 in the restart or the namelist). \verb?yyyymmdd_hh:mm:ss? format \\ 
     279   \hline 
     280   \centering @enddate@  & 
     281   ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). \verb?yyyymmdd? format \\ 
     282   \hline 
     283   \centering @enddatefull@  &  
     284   ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). \verb?yyyymmdd_hh:mm:ss? format \\ 
     285   \hline 
     286\end{tabular} 
     287\\ 
     288 
     289For example,  
     290 
     291\begin{alltt}  {{\scriptsize 
     292\begin{verbatim} 
     293   <file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" > 
     294\end{verbatim} 
     295}}\end{alltt}  
     296 
     297With, in the namelist: 
     298 
     299\begin{alltt}  {{\scriptsize 
     300\begin{verbatim} 
     301   cn_exp      =  "ORCA2" 
     302   nn_date0    =  19891231 
     303   ln_rstart   = .false. 
     304\end{verbatim} 
     305}}\end{alltt}  
     306 
     307will give the following file name radical: 
     308 
     309\begin{alltt}  {{\scriptsize 
     310\begin{verbatim} 
     311   myfile_ORCA2_19891231_freq1d  
     312\end{verbatim} 
     313}}\end{alltt}  
     314 
     315 
     316\subsubsection{Other controls of the xml attributes from NEMO} 
     317 
     318The values of some attributes are automatically defined by NEMO (and any definition given in the xml file is overwritten). By convention, these attributes are defined to ''auto'' (for string) or ''0000'' (for integer) in the xml file (but this is not necessary).  
    193319 
    194320Here is the list of these attributes: \\ 
     
    202328    \multicolumn{2}{|c|}{field\_definition} & freq\_op & \np{rn\_rdt} \\ 
    203329   \hline 
    204     \multicolumn{2}{|c|}{SBC}                  & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_fsbc} \\ 
    205    \hline 
    206     1h, 2h, 3h, 4h, 6h, 12h & \_grid\_T, \_grid\_U,  &  name & filename defined by   \\ 
    207     1d, 3d, 5d                     & \_grid\_V, \_grid\_W, &            & a call to rou{dia\_nam}  \\ 
    208     1m, 2m, 3m, 4m, 6m    & \_icemod, \_ptrc\_T,  &            & following NEMO \\ 
    209     1y, 2y, 5y, 10y               &  \_diad\_T, \_scalar   &            & nomenclature \\ 
     330    \multicolumn{2}{|c|}{SBC}               & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\ 
     331   \hline 
     332    \multicolumn{2}{|c|}{ptrc\_T}           & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     333   \hline 
     334    \multicolumn{2}{|c|}{diad\_T}           & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
    210335   \hline 
    211336    \multicolumn{2}{|c|}{EqT, EqU, EqW} & jbegin, ni,      & according to the grid    \\ 
    212337    \multicolumn{2}{|c|}{                         } & name\_suffix &                                      \\ 
    213338   \hline 
    214     \multicolumn{2}{|c|}{TAO, RAMA and PIRATA moorings} & ibegin, jbegin,      & according to the grid    \\ 
     339   \multicolumn{2}{|c|}{TAO, RAMA and PIRATA moorings} & zoom\_ibegin, zoom\_jbegin, & according to the grid    \\ 
    215340    \multicolumn{2}{|c|}{                                                       } & name\_suffix &                                      \\ 
    216341   \hline 
     
    218343 
    219344 
    220 \subsection{ Detailed functionalities } 
    221  
    222345\subsubsection{Tag list} 
    223346 
    224 \begin{description} 
    225  
    226 \item[context]: define the model using the xml file. Id is the only attribute accepted.  
    227 Its value must be ''nemo'' or ''n\_nemo'' for the nth AGRIF zoom. Child of simulation tag. 
    228  
    229 \item[field]: define the field to be output. Accepted attributes are axis\_ref, description, enable,  
    230 freq\_op, grid\_ref, id (if child of field\_definition), level, operation, name, ref (if child of file),  
    231 unit, zoom\_ref. Child of field\_definition, file or group of fields tag. 
    232  
    233 \item[field\_definition]: definition of the part of the xml file corresponding to the field definition.  
    234 Accept the same attributes as field tag. Child of context tag. 
    235  
    236 \item[group]: define a group of file or field. Accept the same attributes as file or field. 
    237  
    238 \item[file]: define the output file's characteristics. Accepted attributes are description, enable,  
    239 output\_freq, output\_level, id, name, name\_suffix. Child of file\_definition or group of files tag. 
    240  
    241 \item[file\_definition]: definition of the part of the xml file corresponding to the file definition.  
    242 Accept the same attributes as file tag. Child of context tag. 
    243  
    244 \item[axis]: definition of the vertical axis. Accepted attributes are description, id, positive, size, unit.  
    245 Child of axis\_definition tag. 
    246  
    247 \item[axis\_definition]: definition of the part of the xml file corresponding to the vertical axis definition.  
    248 Accept the same attributes as axis tag. Child of context tag 
    249  
    250 \item[grid]: definition of the horizontal grid. Accepted attributes are description and id.  
    251 Child of axis\_definition tag. 
    252  
    253 \item[grid\_definition]: definition of the part of the xml file corresponding to the horizontal grid definition.  
    254 Accept the same attributes as grid tag. Child of context tag 
    255  
    256 \item[zoom]: definition of a subdomain of an horizontal grid. Accepted attributes are description, id,  
    257 i/jbegin, ni/j. Child of grid tag. 
    258  
    259 \end{description} 
     347 
     348\begin{tabular}{|p{2cm}|p{2.5cm}|p{3.5cm}|p{2cm}|p{2cm}|} 
     349   \hline 
     350   tag name &  
     351   description &  
     352   accepted attribute &  
     353   child of & 
     354   parent of \\ 
     355   \hline    
     356   \hline    
     357   simulation &  
     358   this tag is the root tag which encapsulates all the content of the xml file & 
     359   none & 
     360   none & 
     361   context \\ 
     362   \hline    
     363   context & 
     364   encapsulates parts of the xml file dédicated to different codes or different parts of a code & 
     365   id (''xios'', ''nemo'' or ''n\_nemo'' for the nth AGRIF zoom), src, time\_origin & 
     366   simulation & 
     367   all root tags: ...\_definition \\ 
     368   \hline    
     369   \hline    
     370   field\_definition & 
     371   encapsulates the definition of all the fields that can potentially be outputted & 
     372   axis\_ref, default\_value, domain\_ref, enabled, grid\_ref, level, operation, prec, src & 
     373   context & 
     374   field or field\_group \\ 
     375   \hline    
     376   field\_group & 
     377   encapsulates a group of fields & 
     378   axis\_ref, default\_value, domain\_ref, enabled, group\_ref, grid\_ref, id, level, operation, prec, src & 
     379   field\_definition, field\_group, file & 
     380   field or field\_group \\ 
     381   \hline    
     382   field & 
     383   define a specific field & 
     384   axis\_ref, default\_value, domain\_ref, enabled, field\_ref, grid\_ref, id, level, long\_name, name, operation, prec, standard\_name, unit & 
     385   field\_definition, field\_group, file & 
     386   none \\ 
     387   \hline    
     388   \hline    
     389   file\_definition &  
     390   encapsulates the definition of all the files that will be outputted & 
     391   enabled, min\_digits, name, name\_suffix, output\_level, split\_format, split\_freq, sync\_freq, type, src & 
     392   context &  
     393   file or file\_group \\ 
     394   \hline    
     395   file\_group &  
     396   encapsulates a group of files that will be outputted & 
     397   enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, split\_format, split\_freq, sync\_freq, type, src & 
     398   file\_definition, file\_group &  
     399   file or file\_group \\ 
     400   \hline    
     401   file &  
     402   defile the contentof a file to be outputted & 
     403   enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, split\_format, split\_freq, sync\_freq, type, src & 
     404   file\_definition, file\_group &  
     405   field \\ 
     406   \hline    
     407\end{tabular} 
     408\begin{tabular}{|p{2cm}|p{2.5cm}|p{3.5cm}|p{2cm}|p{2cm}|} 
     409   \hline 
     410   tag name &  
     411   description &  
     412   accepted attribute &  
     413   child of & 
     414   parent of \\ 
     415   \hline    
     416   \hline    
     417   axis\_definition &  
     418   define all the vertical axis potentially used by the variables & 
     419   src & 
     420   context &   
     421   axis\_group, axis \\ 
     422   \hline    
     423   axis\_group &  
     424   encapsulates a group of vertical axis & 
     425   id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 
     426   axis\_definition, axis\_group &  
     427   axis\_group, axis \\ 
     428   \hline    
     429   axis &  
     430   define a vertical axis & 
     431   id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 
     432   axis\_definition, axis\_group  &  
     433   none \\ 
     434   \hline    
     435   \hline    
     436   domain\_definition &  
     437   define all the horizontal domains potentially used by the variables & 
     438   src & 
     439   context &  
     440   domain\_group, domain \\ 
     441   \hline    
     442   domain\_group &  
     443   encapsulates a group of horizontal domains & 
     444   id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 
     445   domain\_definition, domain\_group &  
     446   domain\_group, domain \\ 
     447   \hline    
     448   domain &  
     449   define an horizontal domain & 
     450   id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 
     451   domain\_definition, domain\_group &  
     452   none \\ 
     453   \hline    
     454   \hline    
     455   grid\_definition &  
     456   define all the grid (association of a domain and/or an axis) potentially used by the variables & 
     457   src & 
     458   context &  
     459   grid\_group, grid \\ 
     460   \hline    
     461   grid\_group &  
     462   encapsulates a group of grids & 
     463   id, domain\_ref, axis\_ref & 
     464   grid\_definition, grid\_group &  
     465   grid\_group, grid \\ 
     466   \hline    
     467   grid &  
     468   define a grid & 
     469   id, domain\_ref, axis\_ref & 
     470   grid\_definition, grid\_group &  
     471   none \\ 
     472   \hline    
     473\end{tabular} 
    260474 
    261475 
    262476\subsubsection{Attributes list} 
    263477 
    264 Applied to a tag or a group of tags. 
    265  
    266 % table to be added ? 
    267 Another table, perhaps? 
    268  
    269 %%%% 
    270  
    271 Attribute 
    272 Applied to? 
    273 Definition 
    274 Comment 
    275 axis\_ref 
    276 field 
    277 String defining the vertical axis of the variable. It refers to the id of the vertical axis defined in the axis tag. 
    278 Use ''non'' if the variable has no vertical axis 
    279  
    280 %%%%%% 
    281  
    282 \begin{description} 
    283  
    284 \item[axis\_ref]: field attribute. String defining the vertical axis of the variable.  
    285 It refers to the id of the vertical axis defined in the axis tag.  
    286 Use ''none'' if the variable has no vertical axis 
    287  
    288 \item[description]: this attribute can be applied to all tags but it is used only with the field tag.  
    289 In this case, the value of description will be used to define, in the output netcdf file,  
    290 the attributes long\_name and standard\_name of the variable. 
    291  
    292 \item[enabled]: field and file attribute. Logical to switch on/off the output of a field or a file.  
    293  
    294 \item[freq\_op]: field attribute (automatically defined, see part 1.4 (''control of the xml attributes'')).  
    295 An integer defining the frequency in seconds at which NEMO is calling iom\_put for this variable.  
    296 It corresponds to the model time step (rn\_rdt in the namelist) except for the variables computed  
    297 at the frequency of the surface boundary condition (rn\_rdt ? nn\_fsbc in the namelist).    
    298  
    299 \item[grid\_ref]: field attribute. String defining the horizontal grid of the variable.  
    300 It refers to the id of the grid tag. 
    301  
    302 \item[ibegin]: zoom attribute. Integer defining the zoom starting point along x direction.  
    303 Automatically defined for TAO/RAMA/PIRATA moorings (see part 1.4).   
    304  
    305 \item[id]: exists for all tag. This is a string defining the name to a specific tag that will be used  
    306 later to refer to this tag. Tags of the same category must have different ids. 
    307  
    308 \item[jbegin]: zoom attribute. Integer defining the zoom starting point along y direction.  
    309 Automatically defined for TAO/RAMA/PIRATA moorings and equatorial section (see part 1.4).  
    310  
    311 \item[level]: field attribute. Integer from 0 to 10 defining the output priority of a field.  
    312 See output\_level attribute definition 
    313  
    314 \item[operation]: field attribute. String defining the type of temporal operation to perform on a variable.  
    315 Possible choices are ''ave(X)'' for temporal mean, ''inst(X)'' for instantaneous, ''t\_min(X)'' for temporal min  
    316 and ''t\_max(X)'' for temporal max. 
    317  
    318 \item[output\_freq]: file attribute. Integer defining the operation frequency in seconds.  
    319 For example 86400 for daily mean. 
    320  
    321 \item[output\_level]: file attribute. Integer from 0 to 10 defining the output priority of variables in a file:  
    322 all variables listed in the file with a level smaller or equal to output\_level will be output.  
    323 Other variables won't be output even if they are listed in the file.   
    324  
    325 \item[positive]: axis attribute (always .FALSE.). Logical defining the vertical axis convention used  
    326 in \NEMO (positive downward). Define the attribute positive of the variable in the netcdf output file. 
    327  
    328 \item[prec]: field attribute. Integer defining the output precision.  
    329 Not implemented, we always output real4 arrays.  
    330  
    331 \item[name]: field or file attribute. String defining the name of a variable or a file.  
    332 If the name of a file is undefined, its id is used as a name. 2 files must have different names.  
    333 Files with specific ids will have their name automatically defined (see part 1.4).  
    334 Note that is name will be automatically completed by the cpu number (if needed) and ''.nc'' 
    335  
    336 \item[name\_suffix]: file attribute. String defining a suffix to be inserted after the name  
    337 and before the cpu number and the ''.nc'' termination. Files with specific ids have an  
    338 automatic definition of their suffix (see part 1.4). 
    339  
    340 \item[ni]: zoom attribute. Integer defining the zoom extent along x direction.  
    341 Automatically defined for equatorial sections (see part 1.4).   
    342  
    343 \item[nj]: zoom attribute. Integer defining the zoom extent along x direction.  
    344  
    345 \item[ref]: field attribute. String referring to the id of the field we want to add in a file. 
    346  
    347 \item[size]: axis attribute. use unknown... 
    348  
    349 \item[unit]: field attribute. String defining the unit of a variable and the associated  
    350 attribute in the netcdf output file. 
    351  
    352 \item[zoom\_ref]: field attribute. String defining the subdomain of data on which  
    353 the file should be written (to ouput data only in a limited area).  
    354 It refers to the id of a zoom defined in the zoom tag. 
    355 \end{description} 
    356  
    357  
    358 \subsection{IO\_SERVER} 
     478\begin{tabular}{|p{2cm}|p{4cm}|p{4cm}|p{2cm}|} 
     479   \hline 
     480   attribute name &  
     481   description &  
     482   example &  
     483   accepted by \\  
     484   \hline    
     485   \hline    
     486   axis\_ref &  
     487   refers to the id of a vertical axis &  
     488   axis\_ref="deptht" &  
     489   field, grid families \\  
     490   \hline    
     491   enabled &  
     492   switch on/off the output of a field or a file &  
     493   enabled=".TRUE." &  
     494   field, file families \\  
     495   \hline    
     496   default\_value &  
     497   missing\_value definition &  
     498   default\_value="1.e20" &  
     499   field family \\  
     500   \hline    
     501   description &  
     502   just for information, not used &  
     503   description="ocean T grid variables" &  
     504   all tags \\  
     505   \hline    
     506   domain\_ref &  
     507   refers to the id of a domain &  
     508   domain\_ref="grid\_T" &  
     509   field or grid families \\  
     510   \hline    
     511   field\_ref= &  
     512   id of the field we want to add in a file &  
     513   field\_ref="toce" &  
     514   field \\  
     515   \hline    
     516   grid\_ref &  
     517   refers to the id of a grid &  
     518   grid\_ref="grid\_T\_2D" &  
     519   field family \\  
     520   \hline    
     521   group\_ref &  
     522   refer to a group of variables &  
     523   group\_ref="mooring" &  
     524   field\_group \\  
     525   \hline    
     526   id &  
     527   allow to identify a tag &  
     528   id="nemo" & 
     529   accepted by all tags except simulation \\  
     530   \hline    
     531   level &  
     532   output priority of a field: 0 (high) to 10 (low)&  
     533   level="1" &  
     534   field family \\  
     535   \hline    
     536   long\_name &  
     537   define the long\_name attribute in the NetCDF file &  
     538   long\_name="Vertical T levels" &  
     539   field \\  
     540   \hline    
     541   min\_digits &  
     542   specify the minimum of digits used in the core number in the name of the NetCDF file &  
     543   min\_digits="4" &  
     544   file family \\  
     545   \hline    
     546   name &  
     547   name of a variable or a file. If the name of a file is undefined, its id is used as a name &  
     548   name="tos" &  
     549   field or file families \\  
     550   \hline    
     551   name\_suffix &  
     552   suffix to be inserted after the name and before the cpu number and the ''.nc'' termination of a file &  
     553   name\_suffix="\_myzoom" &  
     554   file family \\  
     555   \hline    
     556\end{tabular} 
     557\begin{tabular}{|p{2cm}|p{4cm}|p{4cm}|p{2cm}|} 
     558   \hline 
     559   attribute name &  
     560   description &  
     561   example &  
     562   accepted by \\  
     563   \hline    
     564   \hline    
     565   operation &  
     566   type of temporal operation: average, accumulate, instantaneous, min, max and once &  
     567   operation="average" &  
     568   field family \\  
     569   \hline    
     570   output\_freq &  
     571   operation frequency. units can be ts (timestep), y, mo, d, h, mi, s. &  
     572   output\_freq="1d12h" &  
     573   field family \\  
     574   \hline    
     575   output\_level &  
     576   output priority of variables in a file: 0 (high) to 10 (low). All variables listed in the file with a level smaller or equal to output\_level will be output. Other variables won't be output even if they are listed in the file. &   
     577   output\_level="10"&  
     578   file family \\  
     579   \hline    
     580   positive &  
     581   convention used for the orientation of vertival axis (positive downward in \NEMO). &  
     582   positive="down" &  
     583   axis family \\  
     584   \hline    
     585   prec &  
     586   output precision: real 4 or real 8 &  
     587   prec="4" &  
     588   field family \\  
     589   \hline    
     590   split\_format &  
     591   date format used in the name of splitted output files. can be spécified using the following syntaxe: \%y, \%mo, \%d, \%h \%mi and \%s &  
     592   split\_format="\%yy\%mom\%dd" &  
     593   file family \\  
     594   \hline    
     595   split\_freq &  
     596   split output files frequency. units can be ts (timestep), y, mo, d, h, mi, s. &  
     597   split\_freq="1mo" &  
     598   file family \\  
     599   \hline    
     600   src &  
     601   allow to include a file &  
     602   src="./field\_def.xml" &  
     603   accepted by all tags except simulation \\  
     604   \hline    
     605   standard\_name &  
     606   define the standard\_name attribute in the NetCDF file &  
     607   standard\_name="Eastward\_Sea\_Ice\_Transport" &  
     608   field \\  
     609   \hline    
     610   sync\_freq &  
     611   NetCDF file synchronization frequency (update of the time\_counter). units can be ts (timestep), y, mo, d, h, mi, s. &  
     612   sync\_freq="10d" &  
     613   file family \\  
     614   \hline    
     615\end{tabular} 
     616\begin{tabular}{|p{2cm}|p{4cm}|p{4cm}|p{2cm}|} 
     617   \hline 
     618   attribute name &  
     619   description &  
     620   example &  
     621   accepted by \\  
     622   \hline    
     623   \hline    
     624   time\_origin &  
     625   specify the origin of the time counter &  
     626   time\_origin="1900-01-01 00:00:00"&  
     627   context \\  
     628   \hline    
     629   type (1)&  
     630   specify if the output files must be splitted (multiple\_file) or not (one\_file) &  
     631   type="multiple\_file" &  
     632   file familly \\  
     633   \hline    
     634   type (2)&  
     635   define the type of a variable tag &  
     636   type="boolean" &  
     637   variable \\  
     638   \hline    
     639   unit &  
     640   unit of a variable or the vertical axis &  
     641   unit="m" &  
     642   field and axis families \\  
     643   \hline    
     644   zoom\_ibegin &  
     645   starting point along x direction of the zoom. Automatically defined for TAO/RAMA/PIRATA moorings &  
     646   zoom\_ibegin="1" &  
     647   domain family \\  
     648   \hline    
     649   zoom\_jbegin &  
     650   starting point along y direction of the zoom. Automatically defined for TAO/RAMA/PIRATA moorings &  
     651   zoom\_jbegin="1" &  
     652   domain family \\  
     653   \hline    
     654   zoom\_ni &  
     655   zoom extent along x direction &  
     656   zoom\_ni="1" &  
     657   domain family \\  
     658   \hline    
     659   zoom\_nj &  
     660   zoom extent along y direction &  
     661   zoom\_nj="1" &  
     662   domain family \\  
     663   \hline    
     664\end{tabular} 
     665 
     666\subsection{XIOS: the IO\_SERVER} 
    359667 
    360668\subsubsection{Attached or detached mode?} 
    361669 
    362 Iom\_put is based on the io\_server developed by Yann Meurdesoif from IPSL  
    363 (see \href{http://forge.ipsl.jussieu.fr/ioserver/browser}{here} for the source code or  
    364 see its copy in NEMOGCM/EXTERNAL directory).  
    365 This server can be used in ''attached mode'' (as a library) or in ''detached mode''  
    366 (as an external executable on n cpus). In attached mode, each cpu of NEMO will output  
    367 its own subdomain. In detached mode, the io\_server will gather data from NEMO  
    368 and output them split over n files with n the number of cpu dedicated to the io\_server. 
    369  
    370 \subsubsection{Control the io\_server: the namelist file xmlio\_server.def} 
    371  
    372 % 
    373 %Again, a small table might be more readable? 
    374 %Name 
    375 %Type 
    376 %Description 
    377 %Comment 
    378 %Using_server 
    379 %Logical  
    380 %Switch to use the server in attached or detached mode 
    381 %(.TRUE. corresponding to detached mode). 
    382  
    383 The control of the use of the io\_server is done through the namelist file of the io\_server  
    384 called xmlio\_server.def. 
    385  
    386 \textbf{using\_server}: logical, switch to use the server in attached or detached mode  
    387 (.TRUE. corresponding to detached mode). 
    388  
    389 \textbf{using\_oasis}: logical, set to .TRUE. if NEMO is used in coupled mode. 
    390  
    391 \textbf{client\_id} = ''oceanx'' : character, used only in coupled mode.  
    392 Specify the id used in OASIS to refer to NEMO. The same id must be used to refer to NEMO  
    393 in the \$NBMODEL part of OASIS namcouple in the call of prim\_init\_comp\_proto in cpl\_oasis3f90 
    394  
    395 \textbf{server\_id} = ''ionemo'' : character, used only in coupled mode.  
    396 Specify the id used in OASIS to refer to the IO\_SERVER when used in detached mode.  
    397 Use the same id to refer to the io\_server in the \$NBMODEL part of OASIS namcouple. 
    398  
    399 \textbf{global\_mpi\_buffer\_size}: integer; define the size in Mb of the MPI buffer used by the io\_server. 
    400  
    401 \subsubsection{Number of cpu used by the io\_server in detached mode} 
    402  
    403 The number of cpu used by the io\_server is specified only when launching the model. 
    404 Here is an example of 2 cpus for the io\_server and 6 cpu for opa using mpirun: 
    405  
    406 \texttt{ -p 2 -e ./ioserver} 
    407  
    408 \texttt{ -p 6 -e ./opa } 
    409  
     670Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS}, the io\_server developed by Yann Meurdesoif from IPSL. This server can be used in ''attached mode'' (as a library) or in ''detached mode'' (as an external executable on n cpus). The ''attached mode'' is simpler to use but much less efficient. If the type of file is ''multiple\_file'', then in attached(detached) mode, each NEMO(XIOS) process will output its own subdomain: if NEMO(XIOS) is runnning on N cores, the ouput files will be splitted into N files. If the type of file is ''one\_file'', the output files will be directly recombined into one unique file either in ''detached mode'' or ''attached mode''.   
     671 
     672\subsubsection{Control of xios: the xios context in iodef.xml} 
     673 
     674The control of the use of xios is done through the xios context in iodef.xml. 
     675 
     676\begin{tabular}{|p{3cm}|p{6.5cm}|p{2.5cm}|} 
     677   \hline 
     678   variable name &  
     679   description &  
     680   example \\  
     681   \hline    
     682   \hline 
     683   buffer\_size &  
     684   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 &  
     685   25000000 \\  
     686   \hline    
     687   buffer\_server\_factor\_size &  
     688   ratio between NEMO and XIOS buffer size. Should be 2. &  
     689   2 \\  
     690   \hline 
     691   info\_level &  
     692   verbosity level (0 to 100) &  
     693   0 \\  
     694   \hline 
     695   using\_server &  
     696   activate attached(false) or detached(true) mode &  
     697   true \\  
     698   \hline 
     699   using\_oasis &  
     700   xios is used with OASIS(true) or not (false) &  
     701   false \\  
     702   \hline 
     703   oasis\_codes\_id &  
     704   when using oasis, define the identifier of NEMO in the namcouple. Not that the identifier of XIOS is xios.x &  
     705   oceanx \\  
     706   \hline    
     707\end{tabular} 
     708 
     709\subsubsection{Number of cpu used by XIOS in detached mode} 
     710 
     711The number of cores used by the xios is specified only when launching the model. The number or cores dedicated to XIOS should be from ~1/10 to ~1/50 of the number or cores dedicated to NEMO (according of the amount of data to be created). Here is an example of 2 cpus for the io\_server and 62 cpu for opa using mpirun: 
     712 
     713\texttt{ mpirun -np 2 ./nemo.exe : -np 62 ./xios\_server.exe } 
    410714 
    411715\subsection{Practical issues} 
     
    413717\subsubsection{Add your own outputs} 
    414718 
    415 It is very easy to add you own outputs with iom\_put. 4 points must be followed. 
     719It is very easy to add you own outputs with iomput. 4 points must be followed. 
    416720\begin{description} 
    417721\item[1-] in NEMO code, add a \\ 
     
    429733   <field_definition> 
    430734      ... 
    431       <field id="identifier" description="blabla" />    
     735      <field id="identifier" long_name="blabla" ... />    
    432736      ... 
    433737   </field_definition>  
    434738\end{verbatim} 
    435739}}\end{alltt}  
    436 attributes axis\_ref and grid\_ref must be consistent with the size of the array to pass to iom\_put. 
     740attributes axis\_ref and grid\_ref must be consistent with the size of the array to pass to iomput. 
    437741if your array is computed within the surface module each nn\_fsbc time\_step,  
    438742add the field definition within the group defined with the id ''SBC'': $<$group id=''SBC''...$>$ 
     
    442746\begin{alltt}  {{\scriptsize 
    443747\begin{verbatim} 
    444    <file id="file_1" .../>    
     748   <file id="file1" .../>    
    445749      ... 
    446750      <field ref="identifier" />    
     
    451755 
    452756\end{description} 
    453  
    454 \subsubsection{Several time axes in the output file} 
    455  
    456 If your output file contains variables with different operations (see operation definition),  
    457 IOIPSL will create one specific time axis for each operation. Note that inst(X) will have  
    458 a time axis corresponding to the end each output period whereas all other operators  
    459 will have a time axis centred in the middle of the output periods. 
    460  
    461 \subsubsection{Error/bug messages from IOIPSL} 
    462  
    463 If you get the following error in the standard output file: 
    464 \vspace{-20pt} 
    465 \begin{alltt}  {{\scriptsize 
    466 \begin{verbatim} 
    467 FATAL ERROR FROM ROUTINE flio_dom_set 
    468  --> too many domains simultaneously defined  
    469  --> please unset useless domains  
    470  --> by calling flio_dom_unset  
    471 \end{verbatim} 
    472 }}\end{alltt}  
    473  
    474 You must increase the value of dom\_max\_nb in fliocom.f90 (multiply it by 10 for example).  
    475  
    476 If you mix, in the same file, variables with different freq\_op (see definition above),  
    477 like for example variables from the surface module with other variables,  
    478 IOIPSL will print in the standard output file warning messages saying there may be a bug.  
    479 \vspace{-20pt} 
    480 \begin{alltt}  {{\scriptsize 
    481 \begin{verbatim} 
    482 WARNING FROM ROUTINE histvar_seq    
    483  --> There were 10 errors in the learned sequence of variables   
    484  --> for file   4  
    485  --> This looks like a bug, please report it. 
    486 \end{verbatim} 
    487 }}\end{alltt}  
    488  
    489 Don't worry, there is no bug, everything is properly working! 
    490  
    491  %    }      %end  \gmcomment 
    492757 
    493758 
  • trunk/NEMOGCM/CONFIG/AMM12/EXP00/iodef.xml

    r3771 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 
    2424     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     26 
    2527      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
    2628      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
  • trunk/NEMOGCM/CONFIG/GYRE/EXP00/iodef.xml

    r3866 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4"> 
    2424     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     26 
    2527      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
    2628      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
     
    3335      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
    3436  
    35         <file id="5d_grid_T" name="auto" description="ocean T grid variables" > 
     37   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    3638     <field field_ref="toce"         name="votemper"  /> 
    3739     <field field_ref="soce"         name="vosaline"  /> 
     
    4749        </file> 
    4850    
    49         <file id="5d_grid_U" name="auto" description="ocean U grid variables" > 
     51   <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
    5052          <field field_ref="uoce"         name="vozocrtx"  /> 
    5153          <field field_ref="utau"         name="sozotaux"  /> 
    5254        </file> 
    5355    
    54         <file id="5d_grid_V" name="auto" description="ocean V grid variables" > 
     56   <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 
    5557          <field field_ref="voce"         name="vomecrty"  />  
    5658          <field field_ref="vtau"         name="sometauy"  />  
    5759        </file> 
    5860    
    59         <file id="5d_grid_W" name="auto" description="ocean W grid variables" > 
     61   <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 
    6062          <field field_ref="woce"         name="vovecrtz" /> 
    6163          <field field_ref="avt"          name="votkeavt" /> 
  • trunk/NEMOGCM/CONFIG/GYRE_BFM/EXP00/iodef.xml

    r3771 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 
    2424     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     26 
    2527      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
    2628      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
  • trunk/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/iodef.xml

    r3771 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 
    2424     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     26 
    2527      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
    2628      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
     
    3335      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->    
    3436  
    35         <file id="5d_grid_T" name="auto" description="ocean T grid variables" > 
     37        <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    3638     <field field_ref="toce"         name="votemper"  /> 
    3739     <field field_ref="soce"         name="vosaline"  /> 
     
    4749        </file> 
    4850    
    49         <file id="5d_grid_U" name="auto" description="ocean U grid variables" > 
     51        <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
    5052          <field field_ref="uoce"         name="vozocrtx"  /> 
    5153          <field field_ref="utau"         name="sozotaux"  /> 
    5254        </file> 
    5355    
    54         <file id="5d_grid_V" name="auto" description="ocean V grid variables" > 
     56        <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 
    5557          <field field_ref="voce"         name="vomecrty"  />  
    5658          <field field_ref="vtau"         name="sometauy"  />  
    5759        </file> 
    5860    
    59         <file id="5d_grid_W" name="auto" description="ocean W grid variables" > 
     61        <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 
    6062          <field field_ref="woce"         name="vovecrtz" /> 
    6163          <field field_ref="avt"          name="votkeavt" /> 
     
    6365        </file> 
    6466 
    65    <file id="5d_ptrc_T" name="auto" description="lobster sms variables" > 
     67   <file id="file5" name="_ptrc_T" description="lobster sms variables" > 
    6668          <field field_ref="DET"      /> 
    6769          <field field_ref="ZOO"      /> 
     
    8284      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 
    8385 
    84    <file id="1y_diad_T" name="auto" description="additional lobster diagnostics" >   
     86   <file id="file6" name_suffix="_diad_T" description="additional lobster diagnostics" >   
    8587          <field field_ref="FNO3PHY"   />  
    8688          <field field_ref="FNH4PHY"   />  
  • trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_ar5.xml

    r3771 r3940  
    2626    --> 
    2727     
    28     <file_definition type="multiple_file" output_level="10" sync_freq="1d" min_digits="4"> 
     28    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" output_level="10" sync_freq="2mo" min_digits="4"> 
    2929      <!-- 
    3030+++++++++++++++++++++++++++++++++++++++++++++++   daily   ++++++++++++++++++++++++++++++++++++++++++++++++++ 
    3131        --> 
    3232      <file_group id="1d" output_freq="1d"  enabled=".TRUE.">                      <!-- 1d files --> 
    33    <file id="1d_grid_T" name="auto" name_suffix="_table2.2" >         <!-- grid T  --> 
     33   <file id="file1" name_suffix="_grid_T_table2.2" >         <!-- grid T  --> 
    3434     <field field_ref="sst"          name='tos'      long_name="sea_surface_temperature"                              level="2"                      /> 
    3535     <field field_ref="sst2"         name='tossq'    long_name="square_of_sea_surface_temperature"                    level="2"                      /> 
     
    4343   <!-- 
    4444..............................................    grid T   ................................................. 
    45      --> 
    46    <file_group id="1m_grid_T" name="auto" >                                                        <!-- grid T --> 
    47       
    48      <file id="1m grid_T table 2.2" name_suffix="_table2.2" > 
    49        <field field_ref="botpres"      name="pbo"      long_name="sea_water_pressure_at_sea_floor"                               /> 
    50        <!-- pso : sea_water_pressure_at_sea_water_surface = 0 --> 
    51        <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 /> 
    52        <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" /> 
    53        <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0                                          no time changes --> 
    54        <field field_ref="cellthc"      name="thkcello" long_name="cell_thickness"                                                 /> <!-- no time changes --> 
    55        <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                                /> 
    56        <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" /> 
    57        <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"                    level="2" /> 
    58        <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                             /> 
    59        <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" /> 
    60        <field field_ref="rhop"         name="rhopoto"  long_name="sea_water_potential_density"                          level="2" /> 
    61        <!-- no agessc : sea_water_age_since_surface_contact --> 
    62        <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water --> 
    63        <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline --> 
    64        <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 
    65        <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 
    66        <field field_ref="mldkz5"       name='omlmax'   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" /> 
    67      </file>    
    68       
    69      <file id="1m grid_T table 2.5" name_suffix="_table2.5" > 
    70        <field field_ref="rain"         name="pr"       long_name="rainfall_flux"                                           level="1" /> 
    71        <field field_ref="snow_ao_cea"  name="prsn"     long_name="snowfall_flux"                                           level="1" /> 
    72        <field field_ref="evap_ao_cea"  name="evs"      long_name="water_evaporation_flux"                                  level="1" /> 
    73        <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" /> 
    74        <field field_ref="calving"      name="ficeberg" long_name="water_flux_into_sea_water_from_icebergs"                 level="1" /> 
    75        <field field_ref="isnwmlt_cea"  name="fsitherm" long_name="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 
    76        <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" /> 
    77        <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->   
    78        <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 --> 
    79      </file>    
    80       
    81      <file id="1m grid_T table 2.6" name_suffix="_table2.6" > 
    82        <!-- vsfpr    : virtual_salt_flux_into_sea_water_due_to_rainfall    = 0 -->  
    83        <!-- vsfevap  : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 -->  
    84        <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers        = 0 -->     
    85        <field field_ref="fsal_virt_cea" name="vsfsit" long_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 
    86        <!-- vsf      : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real --> 
    87        <!-- wfcorr   : virtual_salt_flux_correction                        = 0 -->  
    88        <field field_ref="fsal_virt_cea" name="sfdsi"  long_name="downward_sea_ice_basal_salt_flux"                               level="1" /> 
    89        <!-- sfriver  : salt_flux_into_sea_water_from_rivers                = 0 -->  
    90      </file>    
    91       
    92      <file id="1m grid_T table 2.7" name_suffix="_table2.7" > 
    93        <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 --> 
    94        <field field_ref="hflx_rain_cea" name="hfrainds"    long_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"      level="1" /> 
    95        <field field_ref="hflx_evap_cea" name="hfevapds"    long_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" level="1" /> 
    96        <field field_ref="hflx_rnf_cea"  name="hfrunoffds"  long_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"        level="1" /> 
    97        <field field_ref="hflx_snow_cea" name="hfsnthermds" long_name="heat_flux_into_sea_water_due_to_snow_thermodynamics"                         level="1" /> 
    98        <field field_ref="hflx_ice_cea"  name="hfsithermds" long_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                      level="1" /> 
    99        <field field_ref="hflx_cal_cea"  name="hfibthermds" long_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics"                      level="1" /> 
    100        <!-- rlds   : surface_net_downward_longwave_flux : not available --> 
    101        <!-- hfls   : surface_downward_latent_heat_flux  : not available --> 
    102        <!-- hfss   : surface_downward_sensible_heat_flux: not available --> 
    103        <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" /> 
    104        <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" /> 
    105        <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" /> 
    106        <field field_ref="qrp"           name="hfcorr"      long_name="heat_flux_correction"                                                        level="1" /> 
    107      </file>    
    108    </file_group> 
     45     -->    
     46   <file id="file2" name_suffix="_grid_T_table2.2" > 
     47     <field field_ref="botpres"      name="pbo"      long_name="sea_water_pressure_at_sea_floor"                               /> 
     48     <!-- pso : sea_water_pressure_at_sea_water_surface = 0 --> 
     49     <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 /> 
     50     <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" /> 
     51     <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0                                          no time changes --> 
     52     <field field_ref="cellthc"      name="thkcello" long_name="cell_thickness"                                                 /> <!-- no time changes --> 
     53     <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                                /> 
     54     <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" /> 
     55     <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"                    level="2" /> 
     56     <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                             /> 
     57     <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" /> 
     58     <field field_ref="rhop"         name="rhopoto"  long_name="sea_water_potential_density"                          level="2" /> 
     59     <!-- no agessc : sea_water_age_since_surface_contact --> 
     60     <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water --> 
     61     <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline --> 
     62     <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 
     63     <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 
     64     <field field_ref="mldkz5"       name='omlmax'   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" /> 
     65   </file>    
     66    
     67   <file id="file3" name_suffix="_grid_T_table2.5" > 
     68     <field field_ref="rain"         name="pr"       long_name="rainfall_flux"                                           level="1" /> 
     69     <field field_ref="snow_ao_cea"  name="prsn"     long_name="snowfall_flux"                                           level="1" /> 
     70     <field field_ref="evap_ao_cea"  name="evs"      long_name="water_evaporation_flux"                                  level="1" /> 
     71     <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" /> 
     72     <field field_ref="calving"      name="ficeberg" long_name="water_flux_into_sea_water_from_icebergs"                 level="1" /> 
     73     <field field_ref="isnwmlt_cea"  name="fsitherm" long_name="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 
     74     <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" /> 
     75     <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->   
     76     <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 --> 
     77   </file>    
     78    
     79   <file id="file4" name_suffix="_grid_T_table2.6" > 
     80     <!-- vsfpr    : virtual_salt_flux_into_sea_water_due_to_rainfall    = 0 -->  
     81     <!-- vsfevap  : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 -->  
     82     <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers        = 0 -->       
     83     <field field_ref="fsal_virt_cea" name="vsfsit" long_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 
     84     <!-- vsf      : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real --> 
     85     <!-- wfcorr   : virtual_salt_flux_correction                        = 0 -->  
     86     <field field_ref="fsal_virt_cea" name="sfdsi"  long_name="downward_sea_ice_basal_salt_flux"                               level="1" /> 
     87     <!-- sfriver  : salt_flux_into_sea_water_from_rivers                = 0 -->  
     88   </file>    
     89    
     90   <file id="file5" name_suffix="_grid_T_table2.7" > 
     91     <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 --> 
     92     <field field_ref="hflx_rain_cea" name="hfrainds"    long_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"      level="1" /> 
     93     <field field_ref="hflx_evap_cea" name="hfevapds"    long_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" level="1" /> 
     94     <field field_ref="hflx_rnf_cea"  name="hfrunoffds"  long_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"        level="1" /> 
     95     <field field_ref="hflx_snow_cea" name="hfsnthermds" long_name="heat_flux_into_sea_water_due_to_snow_thermodynamics"                         level="1" /> 
     96     <field field_ref="hflx_ice_cea"  name="hfsithermds" long_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                      level="1" /> 
     97     <field field_ref="hflx_cal_cea"  name="hfibthermds" long_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics"                      level="1" /> 
     98     <!-- rlds   : surface_net_downward_longwave_flux : not available --> 
     99     <!-- hfls   : surface_downward_latent_heat_flux  : not available --> 
     100     <!-- hfss   : surface_downward_sensible_heat_flux: not available --> 
     101     <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" /> 
     102     <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" /> 
     103     <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" /> 
     104     <field field_ref="qrp"           name="hfcorr"      long_name="heat_flux_correction"                                                        level="1" /> 
     105   </file>    
    109106   <!-- 
    110107..............................................    grid U   ................................................. 
    111      --> 
    112    <file_group id="1m_grid_U" name="auto" >                                                        <!-- grid U --> 
    113  
    114      <file id="1m grid_U table 2.3" name_suffix="_table2.3" > 
    115        <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"                                       /> 
    116        <field field_ref="u_masstr"     name="umo"     long_name="ocean_mass_x_transport"                           level="1" /> 
    117        <field field_ref="u_heattr"     name="hfx"     long_name="ocean_heat_x_transport"                           level="1" /> 
    118        <field field_ref="ueiv_heattr"  name="hfxba"   long_name="ocean_heat_x_transport_due_to_bolus_advection"    level="2" /> 
    119        <field field_ref="udiff_heattr" name="hfxdiff" long_name="ocean_heat_x_transport_due_to_diffusion"          level="2" /> 
    120      </file>    
    121  
    122      <file id="1m grid_U table 2.8" name_suffix="_table2.8" > 
    123        <field field_ref="utau"         name="tauuo" long_name="surface_downward_x_stress"                          level="1" /> 
    124        <!-- tauucorr : surface_downward_x_stress_correction = 0 --> 
    125      </file>    
    126  
    127    </file_group> 
     108   --> 
     109   <file id="file6" name_suffix="_grid_U_table2.3" > 
     110     <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"                                       /> 
     111     <field field_ref="u_masstr"     name="umo"     long_name="ocean_mass_x_transport"                           level="1" /> 
     112     <field field_ref="u_heattr"     name="hfx"     long_name="ocean_heat_x_transport"                           level="1" /> 
     113     <field field_ref="ueiv_heattr"  name="hfxba"   long_name="ocean_heat_x_transport_due_to_bolus_advection"    level="2" /> 
     114     <field field_ref="udiff_heattr" name="hfxdiff" long_name="ocean_heat_x_transport_due_to_diffusion"          level="2" /> 
     115   </file>    
     116    
     117   <file id="file7" name_suffix="_grid_U_table2.8" > 
     118     <field field_ref="utau"         name="tauuo" long_name="surface_downward_x_stress"                          level="1" /> 
     119     <!-- tauucorr : surface_downward_x_stress_correction = 0 --> 
     120   </file>    
    128121   <!-- 
    129122..............................................    grid V   ................................................. 
    130      --> 
    131    <file_group id="1m_grid_V" name="auto" >                                                        <!-- grid V --> 
    132  
    133      <file id="1m grid_V table 2.3" name_suffix="_table2.3" > 
    134        <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"                                       /> 
    135        <field field_ref="v_masstr"     name="vmo"     long_name="ocean_mass_y_transport"                           level="1" /> 
    136        <field field_ref="v_heattr"     name="hfy"     long_name="ocean_heat_y_transport"                           level="1" /> 
    137        <field field_ref="veiv_heattr"  name="hfyba"   long_name="ocean_heat_y_transport_due_to_bolus_advection"    level="2" /> 
    138        <field field_ref="vdiff_heattr" name="hfydiff" long_name="ocean_heat_y_transport_due_to_diffusion"          level="2" /> 
    139      </file>    
    140  
    141      <file id="1m grid_V table 2.8" name_suffix="_table2.8" > 
    142        <field field_ref="vtau"         name="tauvo" long_name="surface_downward_y_stress"                          level="1" /> 
    143        <!-- tauvcorr : surface_downward_y_stress_correction = 0 --> 
    144      </file>    
    145  
    146    </file_group> 
     123   --> 
     124   <file id="file8" name_suffix="_grid_V_table2.3" > 
     125     <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"                                       /> 
     126     <field field_ref="v_masstr"     name="vmo"     long_name="ocean_mass_y_transport"                           level="1" /> 
     127     <field field_ref="v_heattr"     name="hfy"     long_name="ocean_heat_y_transport"                           level="1" /> 
     128     <field field_ref="veiv_heattr"  name="hfyba"   long_name="ocean_heat_y_transport_due_to_bolus_advection"    level="2" /> 
     129     <field field_ref="vdiff_heattr" name="hfydiff" long_name="ocean_heat_y_transport_due_to_diffusion"          level="2" /> 
     130   </file>    
     131    
     132   <file id="file9" name_suffix="_grid_V_table2.8" > 
     133     <field field_ref="vtau"         name="tauvo" long_name="surface_downward_y_stress"                          level="1" /> 
     134     <!-- tauvcorr : surface_downward_y_stress_correction = 0 --> 
     135   </file>    
    147136   <!-- 
    148137..............................................    grid W   ................................................. 
    149      --> 
    150    <file_group id="1m_grid_W" name="auto" >                                                        <!-- grid W --> 
    151       
    152      <file id="1m grid_W table 2.3" name_suffix="_table2.3" > 
    153        <field field_ref="w_masstr"   name="wmo"   long_name="upward_ocean_mass_transport"                                    /> 
    154        <field field_ref="w_masstr2"  name="wmosq" long_name="square_pf_upward_ocean_mass_transport"                          /> 
    155      </file>    
    156       
    157      <file id="1m grid_W table 2.9" name_suffix="_table2.9" > 
    158        <field field_ref="avt"     name="difvho"   long_name="ocean_vertical_heat_diffusivity"                  level="2" /> 
    159        <field field_ref="avs"     name="difvso"   long_name="ocean_vertical_salt_diffusivity"                  level="2" /> 
    160        <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and  nn_havtb --> 
    161        <field field_ref="av_tide" name="difvtrto" long_name="ocean_vertical_tracer_diffusivity_due_to_tides"   level="2" /> 
    162        <!-- tnpeo     : tendency_of_ocean_potential_energy_content                   : not available --> 
    163        <!-- tnpeot    : tendency_of_ocean_potential_energy_content_due_to_tides      : not available --> 
    164        <!-- tnpeotb   : tendency_of_ocean_potential_energy_content_due_to_background : not available --> 
    165        <field field_ref="avm"     name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"              level="2" /> 
    166        <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb --> 
    167        <field field_ref="av_tide" name="difvmto"  long_name="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer --> 
    168        <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? --> 
    169        <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available --> 
    170      </file> 
    171  
    172      <file id="1m grid_W table 2.10" name_suffix="_table2.10" > 
    173        <!-- if ln_traldf_lap    =  .true. --> 
    174        <field field_ref="aht2d_eiv" name="diftrblo" long_name="ocean_tracer_bolus_laplacian_diffusivity"                     level="2" /> 
    175        <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso --> 
    176        <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time --> 
    177        <!-- if ln_traldf_bilap  =  .true. --> 
    178        <!-- field field_ref="diftrbbo" name="aht2d_eiv" long_name="ocean_tracer_bolus_biharmonic_diffusivity"                    level="2" /--> 
    179        <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso --> 
    180        <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time --> 
    181        <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available --> 
    182        <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap --> 
    183        <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap --> 
    184        <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available --> 
    185      </file>    
    186  
    187    </file_group> 
     138   --> 
     139   <file id="file10" name_suffix="_grid_W_table2.3" > 
     140     <field field_ref="w_masstr"   name="wmo"   long_name="upward_ocean_mass_transport"                                    /> 
     141     <field field_ref="w_masstr2"  name="wmosq" long_name="square_pf_upward_ocean_mass_transport"                          /> 
     142   </file>    
     143    
     144   <file id="file11" name_suffix="_grid_W_table2.9" > 
     145     <field field_ref="avt"     name="difvho"   long_name="ocean_vertical_heat_diffusivity"                  level="2" /> 
     146     <field field_ref="avs"     name="difvso"   long_name="ocean_vertical_salt_diffusivity"                  level="2" /> 
     147     <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and  nn_havtb --> 
     148     <field field_ref="av_tide" name="difvtrto" long_name="ocean_vertical_tracer_diffusivity_due_to_tides"   level="2" /> 
     149     <!-- tnpeo     : tendency_of_ocean_potential_energy_content                   : not available --> 
     150     <!-- tnpeot    : tendency_of_ocean_potential_energy_content_due_to_tides      : not available --> 
     151     <!-- tnpeotb   : tendency_of_ocean_potential_energy_content_due_to_background : not available --> 
     152     <field field_ref="avm"     name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"              level="2" /> 
     153     <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb --> 
     154     <field field_ref="av_tide" name="difvmto"  long_name="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer --> 
     155     <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? --> 
     156     <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available --> 
     157   </file> 
     158    
     159   <file id="file12" name_suffix="_grid_W_table2.10" > 
     160     <!-- if ln_traldf_lap    =  .true. --> 
     161     <field field_ref="aht2d_eiv" name="diftrblo" long_name="ocean_tracer_bolus_laplacian_diffusivity"                     level="2" /> 
     162     <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso --> 
     163     <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time --> 
     164     <!-- if ln_traldf_bilap  =  .true. --> 
     165     <!-- field field_ref="diftrbbo" name="aht2d_eiv" long_name="ocean_tracer_bolus_biharmonic_diffusivity"                    level="2" /--> 
     166     <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso --> 
     167     <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time --> 
     168     <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available --> 
     169     <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap --> 
     170     <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap --> 
     171     <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available --> 
     172   </file>    
    188173   <!-- 
    189174..............................................    scalar   ................................................. 
    190      --> 
    191    <file id="1m_scalar" name="auto" name_suffix="_table2.2" >         <!-- scalar --> 
     175   --> 
     176   <file id="file13" name_suffix="_scalar_table2.2" >         <!-- scalar --> 
    192177     <field field_ref="masstot"    name="masso"    long_name="sea_water_mass"                                /> 
    193178     <field field_ref="voltot"     name="volo"     long_name="sea_water_volume"                              /> 
     
    200185   <!-- 
    201186..............................................    icemod   ................................................. 
    202      --> 
    203    <file id="1m_icemod" name="auto" name_suffix="_table2.2" >         <!-- scalar --> 
     187   --> 
     188   <file id="file14" name_suffix="_icemod_table2.2" >         <!-- scalar --> 
    204189     <field field_ref="ice_pres"                     /> 
    205190     <field field_ref="ice_cover"    name="sic"        long_name="sea_ice_area_fraction"                            /> 
  • trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_default.xml

    r3771 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 
    2424     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     26 
    2527      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
    2628      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
     
    3133      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files --> 
    3234 
    33    <file id="1d_grid_T" name="auto" description="ocean T grid variables" > 
     35   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    3436     <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       /> 
    3537     <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          /> 
     
    3739   </file> 
    3840 
    39    <file id="1d_grid_U" name="auto" description="ocean U grid variables" > 
     41   <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
    4042     <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    /> 
    4143   </file> 
    4244    
    43    <file id="1d_grid_V" name="auto" description="ocean V grid variables" > 
     45   <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 
    4446     <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    /> 
    4547   </file> 
    4648    
    4749      </file_group> 
     50 
    4851      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->     
    4952 
    5053      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->    
    5154 
    52    <file id="5d_grid_T" name="auto" description="ocean T grid variables" > 
     55   <file id="file4" name_suffix="_grid_T" description="ocean T grid variables" > 
    5356     <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               /> 
    5457     <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            /> 
     
    6669   </file> 
    6770    
    68    <file id="5d_grid_U" name="auto" description="ocean U grid variables" > 
     71   <file id="file5" name_suffix="_grid_U" description="ocean U grid variables" > 
    6972     <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      /> 
    7073     <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    /> 
     
    7275   </file> 
    7376    
    74    <file id="5d_grid_V" name="auto" description="ocean V grid variables" > 
     77   <file id="file6" name_suffix="_grid_V" description="ocean V grid variables" > 
    7578     <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      /> 
    7679     <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    /> 
     
    7881   </file> 
    7982    
    80    <file id="5d_grid_W" name="auto" description="ocean W grid variables" > 
     83   <file id="file7" name_suffix="_grid_W" description="ocean W grid variables" > 
    8184     <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         /> 
    8285     <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" /> 
    8386   </file> 
    8487    
    85    <file id="5d_icemod" name="auto" description="ice variables" > 
     88   <file id="file8" name_suffix="_icemod" description="ice variables" > 
    8689     <field field_ref="ice_pres"                     /> 
    8790     <field field_ref="snowthic_cea" name="snd"     long_name="surface_snow_thickness"   /> 
  • trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_demo.xml

    r3771 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4"> 
    2424     
    2525      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."> <!-- 1h files --> 
    26    <file id="1h_grid_T" name="auto" description="ocean T grid variables" > 
     26   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    2727     <field field_ref="sst"  /> 
    2828     <field field_ref="qsr"  /> 
     
    3232      
    3333      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files --> 
    34  
    35    <file_group id="1d_grid_T" name="auto" description="ocean T grid variables" > 
    36  
    37      <!-- example of "hand made" zoom  --> 
    38      <file id="blabla_1" name_suffix="_myzoom" > 
    39        <!-- group of variables sharing the same zoom. see zoom definition in domain_def.xml --> 
    40        <field_group id="blabla" domain_ref="myzoom" >     
    41          <field field_ref="toce" /> 
    42          <field field_ref="soce" /> 
    43        </field_group> 
    44      </file> 
    45  
    46      <!-- mooring: automatic definition of the file name suffix based on id="0n180wT"  --> 
    47      <!-- include a group of variables. see field_def.xml for mooring variables definition  --> 
    48      <file id="0n180wT" name_suffix="auto" > 
    49          <field_group group_ref="mooring"/>   
    50      </file> 
    51  
    52      <!-- Equatorial section: automatic definition of the file name suffix based on id="EqT" --> 
    53      <!-- Zoom over vertical axis. def of axis_ref in the axis_definition bellow --> 
    54      <file id="EqT" name_suffix="auto" > 
    55        <field_group id="EqT" domain_ref="EqT" > 
    56          <field field_ref="toce" name="votemper" axis_ref="deptht_zoom"  /> 
    57        </field_group> 
    58      </file> 
    59  
    60      <!-- global file with different operations on data   --> 
    61      <file id="blabla_2" > 
    62        <field field_ref="toce"   default_value="-10" />    <!-- redefine the missing value --> 
    63        <field field_ref="sst"    name="sstmooring1" domain_ref="0n180wT"  />   <!-- include a mooring --> 
    64        <field field_ref="sst"    name="sst_1d_ave"  />                         <!-- mean --> 
    65        <field field_ref="sst"    name="sst_1d_inst" operation="instant" />     <!-- instant value --> 
    66        <field field_ref="sst"    name="sst_1d_max"  operation="maximum" />     <!-- max --> 
    67        <field field_ref="suoce"  />   <!-- include a U-grid variable in the list --> 
    68      </file> 
    69  
    70    </file_group> 
     34    
     35   <!-- example of "hand made" zoom  --> 
     36   <file id="file2" name_suffix="_grid_T_myzoom" > 
     37     <!-- group of variables sharing the same zoom. see zoom definition in domain_def.xml --> 
     38     <field_group id="blabla" domain_ref="myzoom" >     
     39       <field field_ref="toce" /> 
     40       <field field_ref="soce" /> 
     41     </field_group> 
     42   </file> 
     43    
     44   <!-- mooring: automatic definition of the file name suffix based on id="0n180wT"  --> 
     45   <!-- include a group of variables. see field_def.xml for mooring variables definition  --> 
     46   <file id="0n180wT" > 
     47     <field_group group_ref="mooring"/>   
     48   </file> 
     49    
     50   <!-- Equatorial section: automatic definition of the file name suffix based on id="EqT" --> 
     51   <!-- Zoom over vertical axis. def of axis_ref in the axis_definition bellow --> 
     52   <file id="EqT" > 
     53     <field_group id="EqT" domain_ref="EqT" > 
     54       <field field_ref="toce" name="votemper" axis_ref="deptht_myzoom"  /> 
     55     </field_group> 
     56   </file> 
     57    
     58   <!-- global file with different operations on data   --> 
     59   <file id="file3" > 
     60     <field field_ref="toce"   default_value="-10" />    <!-- redefine the missing value --> 
     61     <field field_ref="sst"    name="sstmooring1" domain_ref="0n180wT"  />   <!-- include a mooring --> 
     62     <field field_ref="sst"    name="sst_1d_ave"  />                         <!-- mean --> 
     63     <field field_ref="sst"    name="sst_1d_inst" operation="instant" />     <!-- instant value --> 
     64     <field field_ref="sst"    name="sst_1d_max"  operation="maximum" />     <!-- max --> 
     65     <field field_ref="suoce"  />   <!-- include a U-grid variable in the list --> 
     66   </file> 
     67    
    7168      </file_group> 
    72  
    73    </file_definition> 
     69       
     70    </file_definition> 
    7471     
    7572    <!--  
     
    8279     <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 
    8380       <axis id="deptht" /> 
    84        <axis id="deptht_zoom" zoom_begin="1" zoom_end="10" /> 
     81       <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 
    8582     </axis_group> 
    8683      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> 
  • trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_oldstyle.xml

    r3771 r3940  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" sync_freq="1d" min_digits="4"> 
     23    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4"> 
    2424     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     26 
    2527      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
    2628      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
     
    3335      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->    
    3436 
    35    <file id="5d_grid_T" name="auto" description="ocean T grid variables" > 
     37   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    3638     <field field_ref="toce"         name="votemper"  /> 
    3739     <field field_ref="soce"         name="vosaline"  /> 
     
    5254   </file> 
    5355    
    54    <file id="5d_grid_U" name="auto" description="ocean U grid variables" > 
     56   <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
    5557     <field field_ref="uoce"         name="vozocrtx"  /> 
    5658     <field field_ref="uoce_eiv"     name="vozoeivu"  /> 
     
    5860   </file> 
    5961    
    60    <file id="5d_grid_V" name="auto" description="ocean V grid variables" > 
     62   <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 
    6163     <field field_ref="voce"         name="vomecrty"  /> 
    6264     <field field_ref="voce_eiv"     name="vomeeivv"  /> 
     
    6466   </file> 
    6567    
    66    <file id="5d_grid_W" name="auto" description="ocean W grid variables" > 
     68   <file id="file4" name_suffix="_grid_W" description="ocean V grid variables" > 
    6769     <field field_ref="woce"         name="vovecrtz" /> 
    6870     <field field_ref="avt"          name="votkeavt" /> 
     
    7173   </file> 
    7274    
    73    <file id="5d_icemod" name="auto" description="ice variables" > 
     75   <file id="file5" name_suffix="_icemod" description="ocean V grid variables" > 
    7476     <field field_ref="ice_pres"                     /> 
    7577     <field field_ref="snowthic_cea" name="isnowthi" /> 
  • trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r3907 r3940  
    3636   USE xios 
    3737# endif 
     38   USE ioipsl, ONLY :  ju2ymds    ! for calendar 
    3839 
    3940   IMPLICIT NONE 
     
    5253   PRIVATE iom_p1d, iom_p2d, iom_p3d 
    5354#if defined key_iomput 
    54    PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_set_grid_attr 
    55    PRIVATE set_grid, set_scalar, set_xmlatt, set_mooring 
     55   PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 
     56   PRIVATE set_grid, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 
    5657# endif 
    5758 
     
    130131 
    131132      ! end file definition 
    132        dtime%second=rdt 
    133        CALL xios_set_timestep(dtime) 
    134        CALL xios_close_context_definition() 
    135  
    136        CALL xios_update_calendar(0) 
     133      dtime%second = rdt 
     134      CALL xios_set_timestep(dtime) 
     135      CALL xios_close_context_definition() 
     136       
     137      CALL xios_update_calendar(0) 
    137138#endif 
    138  
     139       
    139140   END SUBROUTINE iom_init 
    140141 
     
    174175      LOGICAL         , INTENT(in   ), OPTIONAL ::   ldiof    ! Interp On the Fly, needed for AGRIF (default = .FALSE.) 
    175176 
    176       CHARACTER(LEN=100)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu] 
    177       CHARACTER(LEN=100)    ::   cltmpn    ! tempory name to store clname (in writting mode) 
     177      CHARACTER(LEN=256)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu] 
     178      CHARACTER(LEN=256)    ::   cltmpn    ! tempory name to store clname (in writting mode) 
    178179      CHARACTER(LEN=10)     ::   clsuffix  ! ".nc" or ".dimg" 
    179180      CHARACTER(LEN=15)     ::   clcpu     ! the cpu number (max jpmax_digits digits) 
    180       CHARACTER(LEN=100)    ::   clinfo    ! info character 
     181      CHARACTER(LEN=256)    ::   clinfo    ! info character 
    181182      LOGICAL               ::   llok      ! check the existence  
    182183      LOGICAL               ::   llwrt     ! local definition of ldwrt 
     
    561562      REAL(wp)                       ::   zscf, zofs  ! sacle_factor and add_offset 
    562563      INTEGER                        ::   itmp        ! temporary integer 
    563       CHARACTER(LEN=100)             ::   clinfo      ! info character 
    564       CHARACTER(LEN=100)             ::   clname      ! file name 
     564      CHARACTER(LEN=256)             ::   clinfo      ! info character 
     565      CHARACTER(LEN=256)             ::   clname      ! file name 
    565566      CHARACTER(LEN=1)               ::   clrankpv, cldmspc      !  
    566567      !--------------------------------------------------------------------- 
     
    10101011   !!---------------------------------------------------------------------- 
    10111012 
    1012  
    10131013#if defined key_iomput 
    10141014 
    1015    SUBROUTINE iom_set_domain_attr( cdname, ni_glo, nj_glo, ibegin, jbegin, ni, nj, zoom_ibegin, zoom_jbegin, zoom_ni, zoom_nj,   & 
     1015   SUBROUTINE iom_set_domain_attr( cdid, ni_glo, nj_glo, ibegin, jbegin, ni, nj, zoom_ibegin, zoom_jbegin, zoom_ni, zoom_nj,   & 
    10161016      &                                    data_dim, data_ibegin, data_ni, data_jbegin, data_nj, lonvalue, latvalue, mask ) 
    1017       CHARACTER(LEN=*)                 , INTENT(in) ::   cdname 
     1017      CHARACTER(LEN=*)                 , INTENT(in) ::   cdid 
    10181018      INTEGER                , OPTIONAL, INTENT(in) ::   ni_glo, nj_glo, ibegin, jbegin, ni, nj 
    10191019      INTEGER                , OPTIONAL, INTENT(in) ::   data_dim, data_ibegin, data_ni, data_jbegin, data_nj 
     
    10221022      LOGICAL, DIMENSION(:,:), OPTIONAL, INTENT(in) ::   mask 
    10231023 
    1024       IF ( xios_is_valid_domain     (cdname) ) THEN 
    1025          CALL xios_set_domain_attr     ( cdname, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj,   & 
    1026             &    data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj   ,   & 
    1027             &    zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj,                         & 
     1024      IF ( xios_is_valid_domain     (cdid) ) THEN 
     1025         CALL xios_set_domain_attr     ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj,   & 
     1026            &    data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj ,   & 
     1027            &    zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj,                       & 
    10281028            &    lonvalue=lonvalue, latvalue=latvalue,mask=mask ) 
    10291029      ENDIF 
    10301030 
    1031       IF ( xios_is_valid_domaingroup(cdname) ) THEN 
    1032          CALL xios_set_domaingroup_attr( cdname, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj,   & 
    1033             &    data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj   ,   & 
    1034             &    zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj,                         & 
     1031      IF ( xios_is_valid_domaingroup(cdid) ) THEN 
     1032         CALL xios_set_domaingroup_attr( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj,   & 
     1033            &    data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj ,   & 
     1034            &    zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj,                       & 
    10351035            &    lonvalue=lonvalue, latvalue=latvalue,mask=mask ) 
    10361036      ENDIF 
     1037      CALL xios_solve_inheritance() 
    10371038 
    10381039   END SUBROUTINE iom_set_domain_attr 
    10391040 
    10401041 
    1041    SUBROUTINE iom_set_axis_attr( cdname, paxis ) 
    1042       CHARACTER(LEN=*)      , INTENT(in) ::   cdname 
     1042   SUBROUTINE iom_set_axis_attr( cdid, paxis ) 
     1043      CHARACTER(LEN=*)      , INTENT(in) ::   cdid 
    10431044      REAL(wp), DIMENSION(:), INTENT(in) ::   paxis 
    1044       IF ( xios_is_valid_axis     (cdname) )   CALL xios_set_axis_attr     ( cdname, size=size(paxis),value=paxis ) 
    1045       IF ( xios_is_valid_axisgroup(cdname) )   CALL xios_set_axisgroup_attr( cdname, size=size(paxis),value=paxis ) 
     1045      IF ( xios_is_valid_axis     (cdid) )   CALL xios_set_axis_attr     ( cdid, size=size(paxis),value=paxis ) 
     1046      IF ( xios_is_valid_axisgroup(cdid) )   CALL xios_set_axisgroup_attr( cdid, size=size(paxis),value=paxis ) 
     1047      CALL xios_solve_inheritance() 
    10461048   END SUBROUTINE iom_set_axis_attr 
    10471049 
    10481050 
    1049    SUBROUTINE iom_set_field_attr( cdname, freq_op) 
    1050       CHARACTER(LEN=*)          , INTENT(in) ::   cdname 
     1051   SUBROUTINE iom_set_field_attr( cdid, freq_op, freq_offset ) 
     1052      CHARACTER(LEN=*)          , INTENT(in) ::   cdid 
    10511053      CHARACTER(LEN=*),OPTIONAL , INTENT(in) ::   freq_op 
    1052       IF ( xios_is_valid_field     (cdname) )   CALL xios_set_field_attr     ( cdname, freq_op=freq_op ) 
    1053       IF ( xios_is_valid_fieldgroup(cdname) )   CALL xios_set_fieldgroup_attr( cdname, freq_op=freq_op ) 
     1054      CHARACTER(LEN=*),OPTIONAL , INTENT(in) ::   freq_offset 
     1055      IF ( xios_is_valid_field     (cdid) )   CALL xios_set_field_attr     ( cdid, freq_op=freq_op, freq_offset=freq_offset ) 
     1056      IF ( xios_is_valid_fieldgroup(cdid) )   CALL xios_set_fieldgroup_attr( cdid, freq_op=freq_op, freq_offset=freq_offset ) 
     1057      CALL xios_solve_inheritance() 
    10541058   END SUBROUTINE iom_set_field_attr 
    10551059 
    10561060 
    1057    SUBROUTINE iom_set_file_attr( cdname, name, name_suffix ) 
    1058       CHARACTER(LEN=*)          , INTENT(in) ::   cdname 
     1061   SUBROUTINE iom_set_file_attr( cdid, name, name_suffix ) 
     1062      CHARACTER(LEN=*)          , INTENT(in) ::   cdid 
    10591063      CHARACTER(LEN=*),OPTIONAL , INTENT(in) ::   name, name_suffix 
    1060       IF ( xios_is_valid_file     (cdname) )   CALL xios_set_file_attr     ( cdname, name=name, name_suffix=name_suffix ) 
    1061       IF ( xios_is_valid_filegroup(cdname) )   CALL xios_set_filegroup_attr( cdname, name=name, name_suffix=name_suffix ) 
     1064      IF ( xios_is_valid_file     (cdid) )   CALL xios_set_file_attr     ( cdid, name=name, name_suffix=name_suffix ) 
     1065      IF ( xios_is_valid_filegroup(cdid) )   CALL xios_set_filegroup_attr( cdid, name=name, name_suffix=name_suffix ) 
     1066      CALL xios_solve_inheritance() 
    10621067   END SUBROUTINE iom_set_file_attr 
    10631068 
    10641069 
    1065    SUBROUTINE iom_set_grid_attr( cdname, mask ) 
    1066       CHARACTER(LEN=*)                   , INTENT(in) ::   cdname 
     1070   SUBROUTINE iom_get_file_attr( cdid, name, name_suffix, output_freq ) 
     1071      CHARACTER(LEN=*)          , INTENT(in ) ::   cdid 
     1072      CHARACTER(LEN=*),OPTIONAL , INTENT(out) ::   name, name_suffix, output_freq 
     1073      LOGICAL                                 ::   llexist1,llexist2,llexist3 
     1074      !--------------------------------------------------------------------- 
     1075      IF( PRESENT( name        ) )   name = ''          ! default values 
     1076      IF( PRESENT( name_suffix ) )   name_suffix = '' 
     1077      IF( PRESENT( output_freq ) )   output_freq = '' 
     1078      IF ( xios_is_valid_file     (cdid) ) THEN 
     1079         CALL xios_solve_inheritance() 
     1080         CALL xios_is_defined_file_attr     ( cdid, name = llexist1, name_suffix = llexist2, output_freq = llexist3) 
     1081         IF(llexist1)   CALL xios_get_file_attr     ( cdid, name = name ) 
     1082         IF(llexist2)   CALL xios_get_file_attr     ( cdid, name_suffix = name_suffix ) 
     1083         IF(llexist3)   CALL xios_get_file_attr     ( cdid, output_freq = output_freq ) 
     1084      ENDIF 
     1085      IF ( xios_is_valid_filegroup(cdid) ) THEN 
     1086         CALL xios_solve_inheritance() 
     1087         CALL xios_is_defined_filegroup_attr( cdid, name = llexist1, name_suffix = llexist2, output_freq = llexist3) 
     1088         IF(llexist1)   CALL xios_get_filegroup_attr( cdid, name = name ) 
     1089         IF(llexist2)   CALL xios_get_filegroup_attr( cdid, name_suffix = name_suffix ) 
     1090         IF(llexist3)   CALL xios_get_filegroup_attr( cdid, output_freq = output_freq ) 
     1091      ENDIF 
     1092   END SUBROUTINE iom_get_file_attr 
     1093 
     1094 
     1095   SUBROUTINE iom_set_grid_attr( cdid, mask ) 
     1096      CHARACTER(LEN=*)                   , INTENT(in) ::   cdid 
    10671097      LOGICAL, DIMENSION(:,:,:), OPTIONAL, INTENT(in) ::   mask 
    1068       IF ( xios_is_valid_grid     (cdname) )   CALL xios_set_grid_attr     ( cdname, mask=mask ) 
    1069       IF ( xios_is_valid_gridgroup(cdname) )   CALL xios_set_gridgroup_attr( cdname, mask=mask ) 
     1098      IF ( xios_is_valid_grid     (cdid) )   CALL xios_set_grid_attr     ( cdid, mask=mask ) 
     1099      IF ( xios_is_valid_gridgroup(cdid) )   CALL xios_set_gridgroup_attr( cdid, mask=mask ) 
     1100      CALL xios_solve_inheritance() 
    10701101   END SUBROUTINE iom_set_grid_attr 
    10711102 
     
    10731104   SUBROUTINE set_grid( cdgrd, plon, plat ) 
    10741105      !!---------------------------------------------------------------------- 
    1075       !!                     ***  ROUTINE   *** 
     1106      !!                     ***  ROUTINE set_grid  *** 
    10761107      !! 
    10771108      !! ** Purpose :   define horizontal grids 
     
    11101141   SUBROUTINE set_scalar 
    11111142      !!---------------------------------------------------------------------- 
    1112       !!                     ***  ROUTINE   *** 
     1143      !!                     ***  ROUTINE set_scalar  *** 
    11131144      !! 
    11141145      !! ** Purpose :   define fake grids for scalar point 
     
    11261157   SUBROUTINE set_xmlatt 
    11271158      !!---------------------------------------------------------------------- 
    1128       !!                     ***  ROUTINE   *** 
     1159      !!                     ***  ROUTINE set_xmlatt  *** 
    11291160      !! 
    11301161      !! ** Purpose :   automatic definitions of some of the xml attributs... 
    11311162      !! 
    11321163      !!---------------------------------------------------------------------- 
    1133       CHARACTER(len=6),DIMENSION( 8) ::   clsuff                   ! suffix name 
    11341164      CHARACTER(len=1),DIMENSION( 3) ::   clgrd                    ! suffix name 
    1135       CHARACTER(len=50)              ::   clname                   ! file name 
     1165      CHARACTER(len=256)             ::   clsuff                   ! suffix name 
    11361166      CHARACTER(len=1)               ::   cl1                      ! 1 character 
    11371167      CHARACTER(len=2)               ::   cl2                      ! 1 character 
    1138       CHARACTER(len=255)             ::   tfo 
    1139       INTEGER                        ::   idt                      ! time-step in seconds 
    1140       INTEGER                        ::   iddss, ihhss             ! number of seconds in 1 day, 1 hour and 1 year 
    1141       INTEGER                        ::   iyymo                    ! number of months in 1 year 
    1142       INTEGER                        ::   jg, jh, jd, jm, jy       ! loop counters 
     1168      INTEGER                        ::   ji, jg                   ! loop counters 
    11431169      INTEGER                        ::   ix, iy                   ! i-,j- index 
    11441170      REAL(wp)        ,DIMENSION(11) ::   zlontao                  ! longitudes of tao    moorings 
     
    11501176      !!---------------------------------------------------------------------- 
    11511177      !  
    1152       idt   = NINT( rdttra(1)     ) 
    1153       iddss = NINT( rday          )                                         ! number of seconds in 1 day 
    1154       ihhss = NINT( rmmss * rhhmm )                                         ! number of seconds in 1 hour 
    1155       iyymo = NINT( raamo         )                                         ! number of months in 1 year 
    1156  
    11571178      ! frequency of the call of iom_put (attribut: freq_op) 
    1158       tfo = TRIM(i2str(idt))//'s' 
    1159       CALL iom_set_field_attr('field_definition', freq_op=tfo) 
    1160       CALL iom_set_field_attr('SBC'   , freq_op=TRIM(i2str(idt* nn_fsbc ))//'s') 
    1161       CALL iom_set_field_attr('ptrc_T', freq_op=TRIM(i2str(idt* nn_dttrc))//'s') 
    1162       CALL iom_set_field_attr('diad_T', freq_op=TRIM(i2str(idt* nn_dttrc))//'s') 
     1179      WRITE(cl1,'(i1)')        1   ;   CALL iom_set_field_attr('field_definition', freq_op = cl1//'ts', freq_offset='0ts') 
     1180      WRITE(cl1,'(i1)')  nn_fsbc   ;   CALL iom_set_field_attr('SBC'             , freq_op = cl1//'ts', freq_offset='0ts') 
     1181      WRITE(cl1,'(i1)') nn_dttrc   ;   CALL iom_set_field_attr('ptrc_T'          , freq_op = cl1//'ts', freq_offset='0ts') 
     1182      WRITE(cl1,'(i1)') nn_dttrc   ;   CALL iom_set_field_attr('diad_T'          , freq_op = cl1//'ts', freq_offset='0ts') 
    11631183        
    11641184      ! output file names (attribut: name) 
    1165       clsuff(:) = (/ 'grid_T', 'grid_U', 'grid_V', 'grid_W', 'icemod', 'ptrc_T', 'diad_T', 'scalar' /)       
    1166       DO jg = 1, SIZE(clsuff)                                                                  ! grid type 
    1167          DO jh = 1, 24                                                                         ! 1-24 hours 
    1168             WRITE(cl2,'(i2)') jh  
    1169             CALL dia_nam( clname, jh * ihhss, clsuff(jg), ldfsec = .TRUE. ) 
    1170             CALL iom_set_file_attr(TRIM(ADJUSTL(cl2))//'h_'//clsuff(jg), name=TRIM(clname)) 
    1171          END DO 
    1172          DO jd = 1, 30                                                                         ! 1-30 days 
    1173             WRITE(cl1,'(i1)') jd  
    1174             CALL dia_nam( clname, jd * iddss, clsuff(jg), ldfsec = .TRUE. ) 
    1175             CALL iom_set_file_attr(cl1//'d_'//clsuff(jg), name=TRIM(clname)) 
    1176          END DO 
    1177          DO jm = 1, 11                                                                         ! 1-11 months 
    1178             WRITE(cl1,'(i1)') jm  
    1179             CALL dia_nam( clname, -jm, clsuff(jg) ) 
    1180             CALL iom_set_file_attr(cl1//'m_'//clsuff(jg), name=TRIM(clname)) 
    1181          END DO 
    1182          DO jy = 1, 50                                                                         ! 1-50 years   
    1183             WRITE(cl2,'(i2)') jy  
    1184             CALL dia_nam( clname, -jy * iyymo, clsuff(jg) ) 
    1185             CALL iom_set_file_attr(TRIM(ADJUSTL(cl2))//'y_'//clsuff(jg), name=TRIM(clname)) 
    1186          END DO 
     1185      DO ji = 1, 9 
     1186         WRITE(cl1,'(i1)') ji  
     1187         CALL iom_update_file_name('file'//cl1) 
     1188      END DO 
     1189      DO ji = 1, 99 
     1190         WRITE(cl2,'(i2.2)') ji  
     1191         CALL iom_update_file_name('file'//cl2) 
    11871192      END DO 
    11881193 
     
    11931198         ! Equatorial section (attributs: jbegin, ni, name_suffix) 
    11941199         CALL dom_ngb( 0., 0., ix, iy, cl1 ) 
    1195          CALL iom_set_domain_attr('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 
    1196          CALL iom_set_file_attr('Eq'//cl1, name_suffix= '_Eq') 
     1200         CALL iom_set_domain_attr ('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 
     1201         CALL iom_get_file_attr   ('Eq'//cl1, name_suffix = clsuff             ) 
     1202         CALL iom_set_file_attr   ('Eq'//cl1, name_suffix = TRIM(clsuff)//'_Eq') 
     1203         CALL iom_update_file_name('Eq'//cl1) 
    11971204      END DO 
    11981205      ! TAO moorings (attributs: ibegin, jbegin, name_suffix) 
     
    12141221   SUBROUTINE set_mooring( plon, plat) 
    12151222      !!---------------------------------------------------------------------- 
    1216       !!                     ***  ROUTINE   *** 
     1223      !!                     ***  ROUTINE set_mooring  *** 
    12171224      !! 
    12181225      !! ** Purpose :   automatic definitions of moorings xml attributs... 
     
    12231230!!$      CHARACTER(len=1),DIMENSION(4) ::   clgrd = (/ 'T', 'U', 'V', 'W' /)   ! suffix name 
    12241231      CHARACTER(len=1),DIMENSION(1) ::   clgrd = (/ 'T' /)        ! suffix name 
    1225       CHARACTER(len=50)             ::   clname                   ! file name 
     1232      CHARACTER(len=256)            ::   clname                   ! file name 
     1233      CHARACTER(len=256)            ::   clsuff                   ! suffix name 
    12261234      CHARACTER(len=1)              ::   cl1                      ! 1 character 
    12271235      CHARACTER(len=6)              ::   clon,clat                ! name of longitude, latitude 
     
    12691277               ENDIF 
    12701278               clname = TRIM(ADJUSTL(clat))//TRIM(ADJUSTL(clon)) 
    1271                CALL iom_set_domain_attr(TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 
    1272                CALL iom_set_file_attr(TRIM(clname)//cl1, name_suffix= '_'//TRIM(clname)) 
     1279               CALL iom_set_domain_attr (TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 
     1280               CALL iom_get_file_attr   (TRIM(clname)//cl1, name_suffix = clsuff                         ) 
     1281               CALL iom_set_file_attr   (TRIM(clname)//cl1, name_suffix = TRIM(clsuff)//'_'//TRIM(clname)) 
     1282               CALL iom_update_file_name(TRIM(clname)//cl1) 
    12731283            END DO 
    12741284         END DO 
     
    12771287   END SUBROUTINE set_mooring 
    12781288 
     1289    
     1290   SUBROUTINE iom_update_file_name( cdid ) 
     1291      !!---------------------------------------------------------------------- 
     1292      !!                     ***  ROUTINE iom_update_file_name  *** 
     1293      !! 
     1294      !! ** Purpose :    
     1295      !! 
     1296      !!---------------------------------------------------------------------- 
     1297      CHARACTER(LEN=*)          , INTENT(in) ::   cdid 
     1298      ! 
     1299      CHARACTER(LEN=256) ::   clname 
     1300      CHARACTER(LEN=20)  ::   clfreq 
     1301      CHARACTER(LEN=20)  ::   cldate 
     1302      INTEGER            ::   idx 
     1303      INTEGER            ::   jn 
     1304      INTEGER            ::   itrlen 
     1305      INTEGER            ::   iyear, imonth, iday, isec 
     1306      REAL(wp)           ::   zsec 
     1307      LOGICAL            ::   llexist 
     1308      !!---------------------------------------------------------------------- 
     1309 
     1310      DO jn = 1,2 
     1311 
     1312         IF( jn == 1 )   CALL iom_get_file_attr( cdid, name        = clname, output_freq = clfreq ) 
     1313         IF( jn == 2 )   CALL iom_get_file_attr( cdid, name_suffix = clname ) 
     1314 
     1315         IF ( TRIM(clname) /= '' ) THEN  
     1316 
     1317            idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 
     1318            DO WHILE ( idx /= 0 )  
     1319               clname = clname(1:idx-1)//TRIM(cexper)//clname(idx+9:LEN_TRIM(clname)) 
     1320               idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 
     1321            END DO 
     1322 
     1323            idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 
     1324            DO WHILE ( idx /= 0 )  
     1325               IF ( TRIM(clfreq) /= '' ) THEN 
     1326                  itrlen = LEN_TRIM(clfreq) 
     1327                  IF ( clfreq(itrlen-1:itrlen) == 'mo' ) clfreq = clfreq(1:itrlen-1) 
     1328                  clname = clname(1:idx-1)//TRIM(clfreq)//clname(idx+6:LEN_TRIM(clname)) 
     1329               ELSE 
     1330                  CALL ctl_stop('error in the name of file id '//TRIM(cdid),   & 
     1331                     & ' attribute output_freq is undefined -> cannot replace @freq@ in '//TRIM(clname) ) 
     1332               ENDIF 
     1333               idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 
     1334            END DO 
     1335 
     1336            idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
     1337            DO WHILE ( idx /= 0 )  
     1338               cldate = iom_sdate( fjulday - rdttra(1) / rday ) 
     1339               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 
     1340               idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
     1341            END DO 
     1342 
     1343            idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
     1344            DO WHILE ( idx /= 0 )  
     1345               cldate = iom_sdate( fjulday - rdttra(1) / rday, ldfull = .TRUE. ) 
     1346               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 
     1347               idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
     1348            END DO 
     1349 
     1350            idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
     1351            DO WHILE ( idx /= 0 )  
     1352               cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 
     1353               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 
     1354               idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
     1355            END DO 
     1356 
     1357            idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
     1358            DO WHILE ( idx /= 0 )  
     1359               cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 
     1360               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 
     1361               idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
     1362            END DO 
     1363 
     1364            IF( jn == 1 )   CALL iom_set_file_attr( cdid, name        = clname ) 
     1365            IF( jn == 2 )   CALL iom_set_file_attr( cdid, name_suffix = clname ) 
     1366 
     1367         ENDIF 
     1368 
     1369      END DO 
     1370 
     1371   END SUBROUTINE iom_update_file_name 
     1372 
     1373 
     1374   FUNCTION iom_sdate( pjday, ld24, ldfull ) 
     1375      !!---------------------------------------------------------------------- 
     1376      !!                     ***  ROUTINE iom_sdate  *** 
     1377      !! 
     1378      !! ** Purpose :   send back the date corresponding to the given julian day 
     1379      !! 
     1380      !!---------------------------------------------------------------------- 
     1381      REAL(wp), INTENT(in   )           ::   pjday         ! julian day 
     1382      LOGICAL , INTENT(in   ), OPTIONAL ::   ld24          ! true to force 24:00 instead of 00:00 
     1383      LOGICAL , INTENT(in   ), OPTIONAL ::   ldfull        ! true to get the compleate date: yyyymmdd_hh:mm:ss 
     1384      ! 
     1385      CHARACTER(LEN=20) ::   iom_sdate 
     1386      CHARACTER(LEN=50) ::   clfmt                         !  format used to write the date  
     1387      INTEGER           ::   iyear, imonth, iday, ihour, iminute, isec 
     1388      REAL(wp)          ::   zsec 
     1389      LOGICAL           ::   ll24, llfull 
     1390      ! 
     1391      IF( PRESENT(ld24) ) THEN   ;   ll24 = ld24 
     1392      ELSE                       ;   ll24 = .FALSE. 
     1393      ENDIF 
     1394 
     1395      IF( PRESENT(ldfull) ) THEN   ;   llfull = ldfull 
     1396      ELSE                         ;   llfull = .FALSE. 
     1397      ENDIF 
     1398 
     1399      CALL ju2ymds( pjday, iyear, imonth, iday, zsec ) 
     1400      isec = NINT(zsec) 
     1401 
     1402      IF ( ll24 .AND. isec == 0 ) THEN   ! 00:00 of the next day -> move to 24:00 of the current day 
     1403         CALL ju2ymds( pjday - 1., iyear, imonth, iday, zsec ) 
     1404         isec = 86400 
     1405      ENDIF 
     1406 
     1407      IF( iyear < 10000 ) THEN   ;   clfmt = "i4.4,2i2.2"                ! format used to write the date  
     1408      ELSE                       ;   WRITE(clfmt, "('i',i1,',2i2.2')") INT(LOG10(REAL(iyear,wp))) + 1 
     1409      ENDIF 
     1410       
     1411      IF( llfull ) THEN  
     1412         clfmt = TRIM(clfmt)//",'_',i2.2,':',i2.2,':',i2.2" 
     1413         ihour   = isec / 3600 
     1414         isec    = MOD(isec, 3600) 
     1415         iminute = isec / 60 
     1416         isec    = MOD(isec, 60) 
     1417         WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday, ihour, iminute, isec    ! date of the end of run 
     1418      ELSE 
     1419         WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday                          ! date of the end of run 
     1420      ENDIF 
     1421 
     1422   END FUNCTION iom_sdate 
     1423 
    12791424#else 
    12801425 
     
    12851430 
    12861431#endif 
    1287  
    1288    FUNCTION i2str(int) 
    1289    IMPLICIT NONE 
    1290       INTEGER, INTENT(IN) :: int 
    1291       CHARACTER(LEN=255) :: i2str 
    1292  
    1293       WRITE(i2str,*) int 
    1294        
    1295    END FUNCTION i2str   
    12961432    
    12971433   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.