Index: /trunk/DOC/TexFiles/Chapters/Chap_DIA.tex
===================================================================
--- /trunk/DOC/TexFiles/Chapters/Chap_DIA.tex	(revision 5106)
+++ /trunk/DOC/TexFiles/Chapters/Chap_DIA.tex	(revision 5107)
@@ -74,5 +74,5 @@
 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) to collect and write the outputs. With an appropriate choice of N by the user, the bottleneck associated with the writing of the output files can be greatly reduced. 
 
-Since version 3.5, the iom\_put interface depends on an external code called \href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}. This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to create a single output file and therefore to bypass the rebuilding phase. Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled (i.e. with the configure option $--$enable-parallel). Note that the files created by iomput through XIOS are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3.
+In version 3.6, the iom\_put interface depends on an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}. This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to create a single output file and therefore to bypass the rebuilding phase. Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled (i.e. with the configure option $--$enable-parallel). Note that the files created by iomput through XIOS are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3.
 
 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, where N is typically much less than the number of NEMO processors, will reduce the number of output files created. This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. Note that for smaller configurations, the rebuilding phase can be avoided, even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server.
@@ -543,6 +543,136 @@
 \end{tabular}
 
+\subsubsection{Advanced use of XIOS functionalities}
 
 \subsection{XML reference tables}
+
+(1) Simple computation: directly define the computation when refering to the variable in the file definition.
+
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+ <field field\_ref="sst"  name="tosK"  unit="degK" > sst + 273.15 </field>
+ <field field\_ref="taum" name="taum2" unit="N2/m4" long\_name="square of wind stress module" > taum * taum </field>
+ <field field\_ref="qt"   name="stupid\_check" > qt - qsr - qns </field>
+\end{verbatim}
+}}\end{alltt} 
+
+(2) Simple computation: define a new variable and use it in the file definition.
+
+in field\_definition:
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+ <field id="sst2" long\_name="square of sea surface temperature" unit="degC2" >  sst * sst </field >
+\end{verbatim}
+}}\end{alltt} 
+in file\_definition:
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+ <field field\_ref="sst2" > sst2 </field>
+\end{verbatim}
+}}\end{alltt} 
+Note that in this case, the following syntaxe $<$field field\_ref="sst2" /$>$ is not working as sst2 won't be evaluated.
+
+(3) Change of variable precision:
+
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+     <!-- force to keep real 8 -->
+ <field field\_ref="sst" name="tos\_r8" prec="8" />
+      <!-- integer 2  with add\_offset and scale\_factor attributes -->
+ <field field\_ref="sss" name="sos\_i2" prec="2" add\_offset="20." scale\_factor="1.e-3" />
+\end{verbatim}
+}}\end{alltt} 
+Note that, then the code is crashing, writting real4 variables forces a numerical convection from real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem.
+
+(4) add user defined attributes:
+
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+      <file\_group id="1d" output\_freq="1d" output\_level="10" enabled=".TRUE."> <!-- 1d files --> 
+	<file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" >
+	  <field field\_ref="sst" name="tos" >
+	    <variable id="my\_attribute1" type="string"  > blabla </variable>
+	    <variable id="my\_attribute2" type="integer" > 3      </variable>
+	    <variable id="my\_attribute3" type="float"   > 5.0    </variable>
+	  </field>
+	  <variable id="my\_global\_attribute" type="string" > blabla\_global </variable>
+       </file>
+     </file\_group> 
+\end{verbatim}
+}}\end{alltt} 
+
+(5) use of the ``@'' function: example 1, weighted temporal average
+
+ - define a new variable in field\_definition
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+ <field id="toce\_e3t" long\_name="temperature * e3t" unit="degC*m" grid\_ref="grid\_T\_3D" > toce * e3t </field >
+\end{verbatim}
+}}\end{alltt}
+ - use it when defining your file.  
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+<file\_group id="5d" output\_freq="5d"  output\_level="10" enabled=".TRUE." >  <!-- 5d files -->  
+ <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" >
+  <field field\_ref="toce" operation="instant" freq\_op="5d" > @toce\_e3t / @e3t </field>
+ </file>
+</file\_group> 
+\end{verbatim}
+}}\end{alltt}
+The freq\_op="5d" attribute is used to define the operation frequency of the ``@'' function: here 5 day. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @toce\_e3t will do the 5-day mean of toce*e3t. Operation="instant" refers to the temporal operation to be performed on the field''@toce\_e3t / @e3t'': here the temporal average is alreday done by the ``@'' function so we just use instant to do the ratio of the 2 mean values. field\_ref="toce" means that attributes not explicitely defined, are inherited from toce field. Note that in this case, freq\_op must be equal to the file output\_freq.
+
+(6) use of the ``@'' function: example 2, monthly SSH standard deviation
+
+ - define a new variable in field\_definition
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+ <field id="ssh2" long\_name="square of sea surface temperature" unit="degC2" >  ssh * ssh </field >
+\end{verbatim}
+}}\end{alltt} 
+ - use it when defining your file.  
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+<file\_group id="1m" output\_freq="1m"  output\_level="10" enabled=".TRUE." >  <!-- 1m files -->  
+ <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" >
+  <field field\_ref="ssh" name="sshstd" long\_name="sea\_surface\_temperature\_standard\_deviation" operation="instant" freq\_op="1m" > sqrt( @ssh2 - @ssh * @ssh ) </field>
+ </file>
+</file\_group> 
+\end{verbatim}
+}}\end{alltt}
+The freq\_op="1m" attribute is used to define the operation frequency of the ``@'' function: here 1 month. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': here the temporal average is alreday done by the ``@'' function so we just use instant. field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. Note that in this case, freq\_op must be equal to the file output\_freq.
+
+(7) use of the ``@'' function: example 3, monthly average of SST diurnal cycle
+
+ - define 2 new variables in field\_definition
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+ <field id="sstmax" field\_ref="sst" long\_name="max of sea surface temperature" operation="maximum" />
+ <field id="sstmin" field\_ref="sst" long\_name="min of sea surface temperature" operation="minimum" />
+\end{verbatim}
+}}\end{alltt} 
+ - use these 2 new variables when defining your file.  
+\vspace{-20pt}
+\begin{alltt}  {{\scriptsize    
+\begin{verbatim}
+<file\_group id="1m" output\_freq="1m"  output\_level="10" enabled=".TRUE." >  <!-- 1m files -->  
+ <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" >
+  <field field\_ref="sst" name="sstdcy" long\_name="amplitude of sst diurnal cycle" operation="average" freq\_op="1d" > @sstmax - @sstmin </field>
+ </file>
+</file\_group> 
+\end{verbatim}
+}}\end{alltt}
+The freq\_op="1d" attribute is used to define the operation frequency of the ``@'' function: here 1 day. The temporal operation done by the ``@'' is the one defined in the field definition: here maximum for sstmax and minimum for sstmin. So, in the above case, @sstmax will do the daily max and @sstmin the daily min. Operation="average" refers to the temporal operation to be performed on the field ``@sstmax - @sstmin'': here monthly mean (of daily max - daily min of the sst). field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field.
+
+
 
 \subsubsection{Tag list}
Index: /trunk/NEMOGCM/CONFIG/AMM12/EXP00/iodef.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/AMM12/EXP00/iodef.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/AMM12/EXP00/iodef.xml	(revision 5107)
@@ -40,9 +40,9 @@
 
 	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	</file>
 	
 	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	</file>
 	
@@ -70,5 +70,5 @@
 	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
 	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
 	</file>
@@ -76,5 +76,5 @@
 	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
 	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
 	</file>
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml	(revision 5107)
@@ -35,25 +35,30 @@
  
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="e3t"  />
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                    operation="instant" freq_op="5d" > @toce_e3t / @e3t </field>
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                 operation="instant" freq_op="5d" > @soce_e3t / @e3t </field>
 	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
 	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
 	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
-	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
-	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
-	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
-	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+	  <field field_ref="sst"          name="tosstd"   long_name="sea_surface_temperature_standard_deviation"         operation="instant" freq_op="5d" > sqrt( @sst2 - @sst * @sst ) </field>
+	  <field field_ref="ssh"          name="zosstd"   long_name="sea_surface_height_above_geoid_standard_deviation"  operation="instant" freq_op="5d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
+	  <field field_ref="sst"          name="sstdcy"   long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax - @sstmin </field>
 	  <field field_ref="mldkz5"       />
 	  <field field_ref="mldr10_1"     />
+	  <field field_ref="mldr10_1"     name="mldr10_1dcy"  long_name="amplitude of mldr10_1 diurnal cycle" operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min </field>
 	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
 	  <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
 	  <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
-	  <field field_ref="saltflx"      name="sosflxdo"  />
-	  <field field_ref="taum"         name="taum" />
-	  <field field_ref="wspd"         name="sowindsp"  />
+	  <field field_ref="saltflx"      name="sosflxdo" />
+	  <field field_ref="taum"         name="taum"     />
+	  <field field_ref="wspd"         name="sowindsp" />
           <field field_ref="precip"       name="soprecip" />
+	  <field field_ref="sbt"                          />
 	</file>
 
 	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
-	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	  <field field_ref="e3u"  />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity" operation="instant" freq_op="5d" > @uoce_e3u / @e3u </field>
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
           <!-- variables available with MLE
@@ -63,6 +68,7 @@
 	
 	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
-	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	  <field field_ref="e3v"  />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity" operation="instant" freq_op="5d" > @voce_e3v / @e3v </field>
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
           <!-- variables available with MLE
@@ -72,5 +78,6 @@
 	
 	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
-	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+	  <field field_ref="e3w"  />
+	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity" operation="instant" freq_op="5d" > @woce_e3w / @e3w </field>
 	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
 	</file>
@@ -156,5 +163,5 @@
         We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
 -->
-	  <variable id="buffer_size"               type="integer">5000000</variable>
+	  <variable id="buffer_size"               type="integer">50000000</variable>
 	  <variable id="buffer_server_factor_size" type="integer">2</variable>
 	  <variable id="info_level"                type="integer">0</variable>
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_ar5.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_ar5.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_ar5.xml	(revision 5107)
@@ -49,6 +49,6 @@
 	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 />
 	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" />
-	  <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0                                          no time changes -->
-	  <field field_ref="cellthc"      name="thkcello" long_name="cell_thickness"                                                 /> <!-- no time changes -->
+	  <!-- masscello : sea_water_mass_per_unit_area = e3t*rau0                                          no time changes -->
+	  <field field_ref="e3t"          name="thkcello" long_name="cell_thickness"                                                 /> <!-- no time changes -->
 	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                                />
 	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" />
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_crs.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_crs.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_crs.xml	(revision 5107)
@@ -40,9 +40,9 @@
 
 	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	</file>
 	
 	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	</file>
 	
@@ -71,5 +71,5 @@
 	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
 	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
 	</file>
@@ -77,5 +77,5 @@
 	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
 	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
 	</file>
Index: unk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_default.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_default.xml	(revision 5106)
+++ 	(revision )
@@ -1,170 +1,0 @@
-<?xml version="1.0"?>
-<simulation> 
-
- <context id="nemo" time_origin="1950-01-01 00:00:00" >
-    
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.xml"/>
-    <!-- 
-============================================================================================================
-=                                           output files definition                                        =
-=                                            Define your own files                                         =
-=                                         put the variables you want...                                    =
-============================================================================================================
-    -->
-    
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
-    
-      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
-      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
-      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
-      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
-      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
-      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
-
-      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE." >  <!-- 5d files -->  
- 
-	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
-	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
-	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
-	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
-	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
-	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
-	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
-	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
-	  <field field_ref="mldkz5"       />
-	  <field field_ref="mldr10_1"     />
-	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
-	  <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
-	  <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
-	  <field field_ref="saltflx"      name="sosflxdo"  />
-	  <field field_ref="taum"         name="taum" />
-	  <field field_ref="wspd"         name="sowindsp"  />
-          <field field_ref="precip"       name="soprecip" />
-	</file>
-
-	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
-	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
-	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
-          <!-- variables available with MLE
-          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" />
-	  -->
-	</file>
-	
-	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
-	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
-	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
-          <!-- variables available with MLE
-          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" />
-	  -->
-	</file>
-	
-	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
-	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
-	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
-	</file>
-
-	<file id="file6" name_suffix="_icemod" description="ice variables" >
-	  <field field_ref="ice_pres"                     />
-	  <field field_ref="snowthic_cea" name="snd"     long_name="surface_snow_thickness"   />
-	  <field field_ref="icethic_cea"  name="sit"     long_name="sea_ice_thickness"        />
-	  <field field_ref="iceprod_cea"  name="sip"     long_name="sea_ice_thickness"        />
-	  <field field_ref="ist_ipa"      />
-	  <field field_ref="ioceflxb"     />
-	  <field field_ref="uice_ipa"     />
-	  <field field_ref="vice_ipa"     />
-	  <field field_ref="utau_ice"     />
-	  <field field_ref="vtau_ice"     />
-	  <field field_ref="qsr_io_cea"   />
-	  <field field_ref="qns_io_cea"   />
-	  <field field_ref="snowpre"      />
-	</file>
-
-	<!--
-	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
-	  <field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       />
-	  <field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  />
-	  <field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "       />
-	  <field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  />
-	  <field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       />
-	  <field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  />
-	</file>
-	-->
-      </file_group>
-
-
-      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
-
-
-      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
-      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
-      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
-      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
-
-      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
-      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
-      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
-      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
-
-   </file_definition>
-    
-    <!-- 
-============================================================================================================
-= grid definition = = DO NOT CHANGE =
-============================================================================================================
-    -->
-    
-   <axis_definition>  
-      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
-      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
-      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
-      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
-      <axis id="nfloat" long_name="Float number"      unit="-"  />
-      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <grid_definition>    
-     <grid id="grid_T_2D" domain_ref="grid_T"/>
-     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
-     <grid id="grid_U_2D" domain_ref="grid_U"/>
-     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
-     <grid id="grid_V_2D" domain_ref="grid_V"/>
-     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
-     <grid id="grid_W_2D" domain_ref="grid_W"/>
-     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
-    </grid_definition>   
-  </context>
-  
-
-  <context id="xios">
-
-      <variable_definition>
-	
-     <!-- 
-        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
--->
-	  <variable id="buffer_size"               type="integer">5000000</variable>
-	  <variable id="buffer_server_factor_size" type="integer">2</variable>
-	  <variable id="info_level"                type="integer">0</variable>
-	  <variable id="using_server"              type="boolean">false</variable>
-	  <variable id="using_oasis"               type="boolean">false</variable>
-	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
-	
-      </variable_definition>
-               
-  </context>
-  
-</simulation>
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef.xml	(revision 5107)
@@ -38,15 +38,19 @@
 
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="e3t"  />
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                    operation="instant" freq_op="5d" > @toce_e3t / @e3t </field>
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                 operation="instant" freq_op="5d" > @soce_e3t / @e3t </field>
 	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
 	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
 	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
-	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
-	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
-	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
-	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+	  <field field_ref="sst"          name="tosstd"   long_name="sea_surface_temperature_standard_deviation"         operation="instant" freq_op="5d" > sqrt( @sst2 - @sst * @sst ) </field>
+	  <field field_ref="ssh"          name="zosstd"   long_name="sea_surface_height_above_geoid_standard_deviation"  operation="instant" freq_op="5d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
+	  <field field_ref="sst"          name="sstdcy"   long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax - @sstmin </field>
 	  <field field_ref="mldkz5"       />
 	  <field field_ref="mldr10_1"     />
-      <field field_ref="heatc"        name="heatc"    long_name="Heat content vertically integrated"            />
-      <field field_ref="saltc"        name="saltc"    long_name="Salt content vertically integrated"            />
+	  <field field_ref="mldr10_1"     name="mldr10_1dcy"  long_name="amplitude of mldr10_1 diurnal cycle" operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min </field>
+	  <field field_ref="sbt"                          />
+	  <field field_ref="heatc"        name="heatc"    long_name="Heat content vertically integrated"            />
+	  <field field_ref="saltc"        name="saltc"    long_name="Salt content vertically integrated"            />
 	</file>
 
@@ -72,6 +76,7 @@
 
 	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="e3u"  />
 	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
-	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity" operation="instant" freq_op="5d" > @uoce_e3u / @e3u </field>
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
           <!-- available with key_diaar5 -->
@@ -82,6 +87,7 @@
 	
 	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="e3v"  />
 	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
-	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity" operation="instant" freq_op="5d" > @voce_e3v / @e3v </field>
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
           <!-- available with key_diaar5 -->
@@ -92,5 +98,6 @@
 	
 	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
-	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+	  <field field_ref="e3w"  />
+	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity" operation="instant" freq_op="5d" > @woce_e3w / @e3w </field>
 	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
 	  <field field_ref="w_masstr"     name="vovematr"  />
@@ -323,5 +330,5 @@
         We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
 -->
-	  <variable id="buffer_size"               type="integer">5000000</variable>
+	  <variable id="buffer_size"               type="integer">50000000</variable>
 	  <variable id="buffer_server_factor_size" type="integer">2</variable>
 	  <variable id="info_level"                type="integer">0</variable>
Index: unk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_ar5.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_ar5.xml	(revision 5106)
+++ 	(revision )
@@ -1,288 +1,0 @@
-<?xml version="1.0"?>
-<simulation> 
-  
-  <context id="nemo" time_origin="1900-01-01 00:00:00" >
-
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.xml"/>    
-    <!-- 
-============================================================================================================
-=                                                                                                          =
-=                                           output files definition                                        =
-=                                                                                                          =
-=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Oclim                 =
-=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Omon                  =
-=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Oimon                 =              
-=          http://www.clivar.org/organization/wgomd/references/WGOMD_CMIP5_ocean_fields.June2009.pdf       =
-=                                                                                                          =
-============================================================================================================
-    -->
-    
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" output_level="10" sync_freq="2mo" min_digits="4">
-      <!--
-+++++++++++++++++++++++++++++++++++++++++++++++   daily   ++++++++++++++++++++++++++++++++++++++++++++++++++
-        -->
-      <file_group id="1d" output_freq="1d"  enabled=".TRUE.">                      <!-- 1d files -->
-	<file id="file1" name_suffix="_grid_T_table2.2" >         <!-- grid T  -->
-	  <field field_ref="sst"          name='tos'      long_name="sea_surface_temperature"                              level="2"                      />
-	  <field field_ref="sst2"         name='tossq'    long_name="square_of_sea_surface_temperature"                    level="2"                      />
-	  <field field_ref="mldkz5"       name='omldamax' long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
-	</file>   
-      </file_group>
-	<!--
-++++++++++++++++++++++++++++++++++++++++++++++   monthly   +++++++++++++++++++++++++++++++++++++++++++++++++
-	  -->
-      <file_group id="1m" output_freq="1mo"     enabled=".TRUE.">                      <!-- real monthly files -->
-	<!--
-..............................................    grid T   .................................................
-	  -->	  
-	<file id="file2" name_suffix="_grid_T_table2.2" >
-	  <field field_ref="botpres"      name="pbo"      long_name="sea_water_pressure_at_sea_floor"                               />
-	  <!-- pso : sea_water_pressure_at_sea_water_surface = 0 -->
-	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 />
-	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" />
-	  <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0                                          no time changes -->
-	  <field field_ref="cellthc"      name="thkcello" long_name="cell_thickness"                                                 /> <!-- no time changes -->
-	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                                />
-	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" />
-	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"                    level="2" />
-	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                             />
-	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" />
-	  <field field_ref="rhop"         name="rhopoto"  long_name="sea_water_potential_density"                          level="2" />
-	  <!-- no agessc : sea_water_age_since_surface_contact -->
-	  <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water -->
-	  <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline -->
-	  <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
-	  <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
-	  <field field_ref="mldkz5"       name='omlmax'   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
-	</file>   
-	
-	<file id="file3" name_suffix="_grid_T_table2.5" >
-	  <field field_ref="rain"         name="pr"       long_name="rainfall_flux"                                           level="1" />
-	  <field field_ref="snow_ao_cea"  name="prsn"     long_name="snowfall_flux"                                           level="1" />
-	  <field field_ref="evap_ao_cea"  name="evs"      long_name="water_evaporation_flux"                                  level="1" />
-	  <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
-	  <field field_ref="calving"      name="ficeberg" long_name="water_flux_into_sea_water_from_icebergs"                 level="1" />
-	  <field field_ref="isnwmlt_cea"  name="fsitherm" long_name="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" />
-	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" />
-	  <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->  
-	  <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
-	</file>   
-	
-	<file id="file4" name_suffix="_grid_T_table2.6" >
-	  <!-- vsfpr    : virtual_salt_flux_into_sea_water_due_to_rainfall    = 0 --> 
-	  <!-- vsfevap  : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 --> 
-	  <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers        = 0 --> 	  
-	  <field field_ref="fsal_virt_cea" name="vsfsit" long_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" />
-	  <!-- vsf      : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real -->
-	  <!-- wfcorr   : virtual_salt_flux_correction                        = 0 --> 
-	  <field field_ref="fsal_virt_cea" name="sfdsi"  long_name="downward_sea_ice_basal_salt_flux"                               level="1" />
-	  <!-- sfriver  : salt_flux_into_sea_water_from_rivers                = 0 --> 
-	</file>   
-	
-	<file id="file5" name_suffix="_grid_T_table2.7" >
-	  <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 -->
-	  <field field_ref="hflx_rain_cea" name="hfrainds"    long_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"      level="1" />
-	  <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" />
-	  <field field_ref="hflx_rnf_cea"  name="hfrunoffds"  long_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"        level="1" />
-	  <field field_ref="hflx_snow_cea" name="hfsnthermds" long_name="heat_flux_into_sea_water_due_to_snow_thermodynamics"                         level="1" />
-	  <field field_ref="hflx_ice_cea"  name="hfsithermds" long_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                      level="1" />
-	  <field field_ref="hflx_cal_cea"  name="hfibthermds" long_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics"                      level="1" />
-	  <!-- rlds   : surface_net_downward_longwave_flux : not available -->
-	  <!-- hfls   : surface_downward_latent_heat_flux  : not available -->
-	  <!-- hfss   : surface_downward_sensible_heat_flux: not available -->
-	  <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" />
-	  <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" />
-	  <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
-	  <field field_ref="qrp"           name="hfcorr"      long_name="heat_flux_correction"                                                        level="1" />
-	</file>   
-	<!--
-..............................................    grid U   .................................................
-	-->
-	<file id="file6" name_suffix="_grid_U_table2.3" >
-	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"                                       />
-	  <field field_ref="u_masstr"     name="umo"     long_name="ocean_mass_x_transport"                           level="1" />
-	  <field field_ref="u_heattr"     name="hfx"     long_name="ocean_heat_x_transport"                           level="1" />
-	  <field field_ref="ueiv_heattr"  name="hfxba"   long_name="ocean_heat_x_transport_due_to_bolus_advection"    level="2" />
-	  <field field_ref="udiff_heattr" name="hfxdiff" long_name="ocean_heat_x_transport_due_to_diffusion"          level="2" />
-	</file>   
-	
-	<file id="file7" name_suffix="_grid_U_table2.8" >
-	  <field field_ref="utau"         name="tauuo" long_name="surface_downward_x_stress"                          level="1" />
-	  <!-- tauucorr : surface_downward_x_stress_correction = 0 -->
-	</file>   
-	<!--
-..............................................    grid V   .................................................
-	-->
-	<file id="file8" name_suffix="_grid_V_table2.3" >
-	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"                                       />
-	  <field field_ref="v_masstr"     name="vmo"     long_name="ocean_mass_y_transport"                           level="1" />
-	  <field field_ref="v_heattr"     name="hfy"     long_name="ocean_heat_y_transport"                           level="1" />
-	  <field field_ref="veiv_heattr"  name="hfyba"   long_name="ocean_heat_y_transport_due_to_bolus_advection"    level="2" />
-	  <field field_ref="vdiff_heattr" name="hfydiff" long_name="ocean_heat_y_transport_due_to_diffusion"          level="2" />
-	</file>   
-	
-	<file id="file9" name_suffix="_grid_V_table2.8" >
-	  <field field_ref="vtau"         name="tauvo" long_name="surface_downward_y_stress"                          level="1" />
-	  <!-- tauvcorr : surface_downward_y_stress_correction = 0 -->
-	</file>   
-	<!--
-..............................................    grid W   .................................................
-	-->
-	<file id="file10" name_suffix="_grid_W_table2.3" >
-	  <field field_ref="w_masstr"   name="wmo"   long_name="upward_ocean_mass_transport"                                    />
-	  <field field_ref="w_masstr2"  name="wmosq" long_name="square_pf_upward_ocean_mass_transport"                          />
-	</file>   
-	
-	<file id="file11" name_suffix="_grid_W_table2.9" >
-	  <field field_ref="avt"     name="difvho"   long_name="ocean_vertical_heat_diffusivity"                  level="2" />
-	  <field field_ref="avs"     name="difvso"   long_name="ocean_vertical_salt_diffusivity"                  level="2" />
-	  <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and  nn_havtb -->
-	  <field field_ref="av_tide" name="difvtrto" long_name="ocean_vertical_tracer_diffusivity_due_to_tides"   level="2" />
-	  <!-- tnpeo     : tendency_of_ocean_potential_energy_content                   : not available -->
-	  <!-- tnpeot    : tendency_of_ocean_potential_energy_content_due_to_tides      : not available -->
-	  <!-- tnpeotb   : tendency_of_ocean_potential_energy_content_due_to_background : not available -->
-	  <field field_ref="avm"     name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"              level="2" />
-	  <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb -->
-	  <field field_ref="av_tide" name="difvmto"  long_name="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer -->
-	  <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? -->
-	  <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available -->
-	</file>
-	
-	<file id="file12" name_suffix="_grid_W_table2.10" >
-	  <!-- if ln_traldf_lap    =  .true. -->
-	  <field field_ref="aht2d_eiv" name="diftrblo" long_name="ocean_tracer_bolus_laplacian_diffusivity"                     level="2" />
-	  <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso -->
-	  <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time -->
-	  <!-- if ln_traldf_bilap  =  .true. -->
-	  <!-- field field_ref="diftrbbo" name="aht2d_eiv" long_name="ocean_tracer_bolus_biharmonic_diffusivity"                    level="2" /-->
-	  <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso -->
-	  <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time -->
-	  <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available -->
-	  <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap -->
-	  <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap -->
-	  <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available -->
-	</file>   
-	<!--
-..............................................    scalar   .................................................
-	-->
-	<file id="file13" name_suffix="_scalar_table2.2" >         <!-- scalar -->
-	  <field field_ref="masstot"    name="masso"    long_name="sea_water_mass"                                />
-	  <field field_ref="voltot"     name="volo"     long_name="sea_water_volume"                              />
-	  <field field_ref="sshtot"     name="zosga"    long_name="global_average_sea_level_change"               />
-	  <field field_ref="sshsteric"  name="zossga"   long_name="global_average_steric_sea_level_change"        />
-	  <field field_ref="sshthster"  name="zostoga"  long_name="global_average_thermosteric_sea_level_change"  />
-	  <field field_ref="temptot"    name="thetaoga" long_name="sea_water_potential_temperature"               />
-	  <field field_ref="saltot"     name="soga"     long_name="sea_water_salinity"                            />
-	</file>   
-	<!--
-..............................................    icemod   .................................................
-	-->
-	<file id="file14" name_suffix="_icemod_table2.2" >         <!-- scalar -->
-	  <field field_ref="ice_pres"                     />
-	  <field field_ref="ice_cover"    name="sic"        long_name="sea_ice_area_fraction"                            />
-	  <field field_ref="icethic_cea"  name="sit"        long_name="sea_ice_thickness"                                />
-	  <field field_ref="subl_ai_cea"  name="evap"       long_name="water_evaporation_flux"                           />
-	  <field field_ref="snowthic_cea" name="snd"        long_name="surface_snow_thickness"                           />
-	  <!-- snc : surface_snow_area_fraction : same as sic -->
-	  <field field_ref="icealb_cea"   name="ialb"       long_name="Bare Sea Ice Albedo"                              />
-	  <!-- ssi : Sea Ice Salinity : cte = sice = 6, expect in baltic sea = 2 -->
-	  <field field_ref="ist_cea"      name="tsice"      long_name="Surface Temperature of Sea Ice"                   />
-	  <!-- tsnint : Temperature at Interface Between Sea Ice and Snow : not available -->
-	  <!-- pr : Surface Rainfall Rate into the Sea Ice Portion of the Grid Cell = 0 -->
-	  <field field_ref="snow_ai_cea"  name="prsn"       long_name="Surface Snowfall Rate into the Sea Ice Portion of the Grid Cell" />
-	  <!-- ageice   : Age of Sea Ice : not available ??? -->
-	  <!-- grFrazil : Frazil Sea Ice Growth (Leads) Rate ??? -->
-	  <!-- grCongel : Congelation Sea Ice Growth Rate ??? -->
-	  <field field_ref="licepro_cea"  name="grLateral"  long_name="Lateral Sea Ice Growth Rate"                      />
-	  <field field_ref="sntoice_cea"  name="snoToIce"   long_name="Snow-Ice Formation Rate"                          />
-	  <field field_ref="snowmel_cea"  name="snomelt"    long_name="Snow Melt Rate"                                   />
-	  <field field_ref="ticemel_cea"  name="tmelt"      long_name="Rate of Melt at Upper Surface of Sea Ice"         />
-	  <field field_ref="bicemel_cea"  name="bmelt"      long_name="Rate of Melt at Sea Ice Base"                     />
-	  <!-- hcice  : Sea Ice Total Heat Content ??? -->
-	  <field field_ref="qsr_ai_cea"   name="rsdssi"     long_name="surface_downwelling_shortwave_flux_in_air"        />
-	  <!-- rsussi : surface_upwelling_shortwave_flux_in_air ??? -->
-	  <!-- rldssi : surface_downwelling_longwave_flux_in_air ??? -->
-	  <!-- rlussi : surface_upwelling_longwave_flux_in_air ??? -->
-	  <!-- hfssi  : surface_upward_sensible_heat_flux ??? -->
-	  <!-- hflssi : surface_upward_latent_heat_flux ??? -->
-	  <field field_ref="subl_ai_cea"  name="sblsi"      long_name="surface_snow_and_ice_sublimation_flux"             />
-	  <field field_ref="u_imasstr"    name="transix"    long_name="Eastward Sea Ice Transport"                        />
-	  <field field_ref="v_imasstr"    name="transiy"    long_name="Northward Sea Ice Transport"                       />
-	  <field field_ref="fram_trans"   name="transifs"   long_name="Sea Ice Mass Transport Through Fram Strait"        />
-	  <field field_ref="utau_ice"     name="strairx"    long_name="Eastward Atmospheric Stress On Sea Ice"            />
-	  <field field_ref="vtau_ice"     name="strairy"    long_name="Northward Atmospheric Stress On Sea Ice"           />
-	  <!-- strocnx : Eastward Ocean Stress On Sea Ice ??? -->
-	  <!-- strocny : Northward Ocean Stress On Sea Ice ??? -->
-	  <!-- streng  : Compressive Sea Ice Strength ??? -->
-	  <!-- divice  : Strain Rate Divergence of Sea Ice ??? -->
-	  <!-- shrice  : Strain Rate Shear of Sea Ice ??? -->
-	  <!-- ridgice : Sea Ice Ridging Rate ??? -->
-	</file>   
-      </file_group>
-
-      <!-- 
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-        -->
-    </file_definition>
-    
-    <!-- 
-============================================================================================================
-=                                           grid definition                                                =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    
-
-   <axis_definition>  
-      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
-      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
-      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
-      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
-      <axis id="nfloat" long_name="Float number"      unit="-"  />
-      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <grid_definition>    
-     <grid id="grid_T_2D" domain_ref="grid_T"/>
-     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
-     <grid id="grid_U_2D" domain_ref="grid_U"/>
-     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
-     <grid id="grid_V_2D" domain_ref="grid_V"/>
-     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
-     <grid id="grid_W_2D" domain_ref="grid_W"/>
-     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
-    </grid_definition>    
-
-  </context>
-  
-
-  <context id="xios">
-
-      <variable_definition>
-	
-     <!-- 
-        We must have buffer_size > jpi*jpj*jpk*8*3 (with jpi and jpj the subdomain size)
--->
-	  <variable id="buffer_size"               type="integer">25000000</variable>
-	  <variable id="buffer_server_factor_size" type="integer">2</variable>
-	  <variable id="info_level"                type="integer">0</variable>
-	  <variable id="using_server"              type="boolean">false</variable>
-	  <variable id="using_oasis"               type="boolean">false</variable>
-	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
-	
-      </variable_definition>
-               
-  </context>
-  
-</simulation>
-  
Index: unk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_default.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_default.xml	(revision 5106)
+++ 	(revision )
@@ -1,336 +1,0 @@
-<?xml version="1.0"?>
-<simulation> 
-
- <context id="nemo" time_origin="1950-01-01 00:00:00" >
-    
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.xml"/>
-    <!-- 
-============================================================================================================
-=                                           output files definition                                        =
-=                                            Define your own files                                         =
-=                                         put the variables you want...                                    =
-============================================================================================================
-    -->
-    
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
-    
-      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
-
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
-
-      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
-
-      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
-
-      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
-
-      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
-
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE." > <!-- 1d files -->
-
-	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
-	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
-	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
-	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
-	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
-	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
-	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
-	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
-	  <field field_ref="mldkz5"       />
-	  <field field_ref="mldr10_1"     />
-      <field field_ref="heatc"        name="heatc"    long_name="Heat content vertically integrated"            />
-      <field field_ref="saltc"        name="saltc"    long_name="Salt content vertically integrated"            />
-	</file>
-
-	<file id="file2" name_suffix="_SBC" description="surface fluxes variables" > <!-- time step automaticaly defined based on nn_fsbc -->
-	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
-	  <field field_ref="qsr_oce"      name="qsr_oce"  long_name="downward shortwave flux at ocean surface"           />
-	  <field field_ref="qns_oce"      name="qns_oce"  long_name="downward non solar flux at ocean surface"           />
-	  <field field_ref="qt_oce"       name="qt_oce"   long_name="downward total flux at ocean surface"           />
-	  <field field_ref="qsr_ice"      name="qsr_ice"  long_name="downward shortwave flux at ice surface"           />
-	  <field field_ref="qns_ice"      name="qns_ice"  long_name="downward non solar flux at ice surface"           />
-	  <field field_ref="qtr_ice"      name="qtr_ice"  long_name="shortwave flux transmitted thru the ice"           />
-	  <field field_ref="qt_ice"       name="qt_ice"   long_name="downward total flux at ice surface"           />
-	  <field field_ref="saltflx"      name="sfx"  />
-	  <field field_ref="taum"         name="taum" />
-	  <field field_ref="wspd"         name="windsp"  />
-      <field field_ref="precip"       name="precip" />
-	  <!-- ice and snow -->
-	  <field field_ref="snowpre"      />
-      <field field_ref="utau_ice"         name="utau_ice" />
-      <field field_ref="vtau_ice"         name="vtau_ice" />
-
-	</file>
-
-	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
-	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
-	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
-          <!-- available with key_diaar5 -->
-	  <field field_ref="u_masstr"     name="vozomatr"  />
-	  <field field_ref="u_heattr"     name="sozohetr"  />
-      <field field_ref="u_salttr"     name="sozosatr"  />
-	</file>
-	
-	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
-	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
-	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
-          <!-- available with key_diaar5 -->
-	  <field field_ref="v_masstr"     name="vomematr"  />
-	  <field field_ref="v_heattr"     name="somehetr"  />
-      <field field_ref="v_salttr"     name="somesatr"  />
-	</file>
-	
-	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
-	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
-	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
-	  <field field_ref="w_masstr"     name="vovematr"  />
-	</file>
-
-	<file id="file6" name_suffix="_icemod" description="ice variables" enabled=".true." >
-	  <field field_ref="snowthic_cea"     name="snthic"     long_name="surface_snow_thickness"   />
-	  <field field_ref="icethic_cea"      name="sithic"     long_name="sea_ice_thickness"        />
-          <field field_ref="icevolu"          name="sivolu" />
-          <field field_ref="snowvol"          name="snvolu" />
-          <field field_ref="iceconc"          name="siconc"  />
-
-          <field field_ref="vfxbog"          name="vfxbog" />
-          <field field_ref="vfxdyn"          name="vfxdyn" />
-          <field field_ref="vfxopw"          name="vfxopw" />
-          <field field_ref="vfxsni"          name="vfxsni" />
-          <field field_ref="vfxsum"          name="vfxsum" />
-          <field field_ref="vfxbom"          name="vfxbom" />
-          <field field_ref="vfxres"          name="vfxres" />
-          <field field_ref="vfxice"          name="vfxice" />
-          <field field_ref="vfxsnw"          name="vfxsnw" />
-          <field field_ref="vfxsub"          name="vfxsub" />
-          <field field_ref="vfxspr"          name="vfxspr" />
-
-          <field field_ref="icetrp"          name="sivtrp" />
-          <field field_ref="snwtrp"          name="snvtrp" />
-          <field field_ref="deitrp"          name="deitrp" />
-          <field field_ref="destrp"          name="destrp" />
-
-          <field field_ref="sfxbri"           name="sfxbri" />
-          <field field_ref="sfxdyn"           name="sfxdyn" />
-          <field field_ref="sfxres"           name="sfxres" />
-          <field field_ref="sfxbog"           name="sfxbog" />
-          <field field_ref="sfxbom"           name="sfxbom" />
-          <field field_ref="sfxsum"           name="sfxsum" />
-          <field field_ref="sfxsni"           name="sfxsni" />
-          <field field_ref="sfxopw"           name="sfxopw" />
-          <field field_ref="sfx"              name="sfx" />
-
-          <field field_ref="hfxsum"          name="hfxsum"    />
-          <field field_ref="hfxbom"          name="hfxbom"    />
-          <field field_ref="hfxbog"          name="hfxbog"    />
-          <field field_ref="hfxdif"          name="hfxdif"    />
-          <field field_ref="hfxopw"          name="hfxopw"    />
-          <field field_ref="hfxout"          name="hfxout"    />
-          <field field_ref="hfxin"           name="hfxin"    />
-          <field field_ref="hfxsnw"          name="hfxsnw"    />
-          <field field_ref="hfxerr"          name="hfxerr"    />
-          <field field_ref="hfxerr_rem"      name="hfxerr_rem"    />
-
-	  <!-- ice-ocean heat flux from mass exchange -->
-          <field field_ref="hfxdyn"          name="hfxdyn"    />
-          <field field_ref="hfxres"          name="hfxres"    />
-          <field field_ref="hfxthd"          name="hfxthd"    />
-	  <!-- ice-atm. heat flux from mass exchange -->
-          <field field_ref="hfxsub"          name="hfxsub"    />
-          <field field_ref="hfxspr"          name="hfxspr"    />
-
-	  <!-- diags -->
-          <field field_ref="hfxdhc"          name="hfxdhc"    />
-          <field field_ref="hfxtur"          name="hfxtur"    />
-
-          <field field_ref="isst"             name="sst" />
-          <field field_ref="isss"             name="sss" />
-          <field field_ref="micesalt"         name="sisali" />
-          <field field_ref="micet"            name="sitemp" />
-          <field field_ref="icest"            name="sistem" />
-          <field field_ref="icehc"            name="siheco" />
-          <field field_ref="isnowhc"          name="snheco" />
-          <field field_ref="miceage"          name="siages" />
-
-          <field field_ref="uice_ipa"         name="sivelu" />
-          <field field_ref="vice_ipa"         name="sivelv" />
-          <field field_ref="icevel"           name="sivelo" />
-          <field field_ref="idive"            name="sidive" />
-          <field field_ref="ishear"           name="sishea" />
-          <field field_ref="icestr"           name="sistre" />
-
-          <field field_ref="ibrinv"           name="sibrin" />
-          <field field_ref="icecolf"          name="sicolf" />
-
-          <field field_ref="iceage_cat"       name="siagecat"/>
-          <field field_ref="iceconc_cat"      name="siconcat"/>
-          <field field_ref="icethic_cat"      name="sithicat"/>
-          <field field_ref="snowthic_cat"     name="snthicat"/>
-          <field field_ref="salinity_cat"     name="salincat"/>
-          <field field_ref="brinevol_cat"     name="sibricat"/>
-
-	</file>
-
-        <file id="file7" name_suffix="_scalar" description="scalar variables" enabled=".true." >
-          <field field_ref="voltot"       name="scvoltot"  />
-          <field field_ref="sshtot"       name="scsshtot"  />
-          <field field_ref="sshsteric"    name="scsshste"  />
-          <field field_ref="sshthster"    name="scsshtst"  />
-          <field field_ref="masstot"      name="scmastot"  />
-          <field field_ref="temptot"      name="sctemtot"  />
-          <field field_ref="saltot"       name="scsaltot"  />
-
-          <field field_ref="bgtemper"     name="bgtemper"    />
-          <field field_ref="bgsaline"     name="bgsaline"    />
-          <field field_ref="bgheatco"     name="bgheatco"    />
-          <field field_ref="bgsaltco"     name="bgsaltco"    />
-          <field field_ref="bgvolssh"     name="bgvolssh"    /> 
-          <field field_ref="bgvole3t"     name="bgvole3t"    />
-          <field field_ref="bgfrcvol"     name="bgfrcvol"    />
-          <field field_ref="bgfrctem"     name="bgfrctem"    />
-          <field field_ref="bgfrcsal"     name="bgfrcsal"    />
-
-          <field field_ref="ibgvoltot"    name="ibgvoltot"   />
-          <field field_ref="sbgvoltot"    name="sbgvoltot"   />
-          <field field_ref="ibgarea"      name="ibgarea"     />
-          <field field_ref="ibgsaline"    name="ibgsaline"   />
-          <field field_ref="ibgtemper"    name="ibgtemper"   />
-          <field field_ref="ibgheatco"    name="ibgheatco"   />
-          <field field_ref="sbgheatco"    name="sbgheatco"   />
-          <field field_ref="ibgsaltco"    name="ibgsaltco"   />
-
-          <field field_ref="ibgvfx"       name="ibgvfx"      />
-          <field field_ref="ibgvfxbog"    name="ibgvfxbog"      />
-          <field field_ref="ibgvfxopw"    name="ibgvfxopw"      />
-          <field field_ref="ibgvfxsni"    name="ibgvfxsni"      />
-          <field field_ref="ibgvfxdyn"    name="ibgvfxdyn"      />
-          <field field_ref="ibgvfxbom"    name="ibgvfxbom"      />
-          <field field_ref="ibgvfxsum"    name="ibgvfxsum"      />
-          <field field_ref="ibgvfxres"    name="ibgvfxres"      />
-          <field field_ref="ibgvfxspr"    name="ibgvfxspr"      />
-          <field field_ref="ibgvfxsnw"    name="ibgvfxsnw"      />
-          <field field_ref="ibgvfxsub"    name="ibgvfxsub"      />
-
-          <field field_ref="ibgsfx"       name="ibgsfx"     />
-          <field field_ref="ibgsfxbri"    name="ibgsfxbri"    />
-          <field field_ref="ibgsfxdyn"    name="ibgsfxdyn" />
-          <field field_ref="ibgsfxres"    name="ibgsfxres" />
-          <field field_ref="ibgsfxbog"    name="ibgsfxbog"      />
-          <field field_ref="ibgsfxopw"    name="ibgsfxopw"      />
-          <field field_ref="ibgsfxsni"    name="ibgsfxsni"      />
-          <field field_ref="ibgsfxbom"    name="ibgsfxbom"      />
-          <field field_ref="ibgsfxsum"    name="ibgsfxsum"      />
-
-          <field field_ref="ibghfxdhc"    name="ibghfxdhc"    />
-          <field field_ref="ibghfxspr"    name="ibghfxspr"    />
-
-          <field field_ref="ibghfxres"    name="ibghfxres"    />
-          <field field_ref="ibghfxsub"    name="ibghfxsub"    />
-          <field field_ref="ibghfxdyn"    name="ibghfxdyn"    />
-          <field field_ref="ibghfxthd"    name="ibghfxthd"    />
-          <field field_ref="ibghfxsum"    name="ibghfxsum"    />
-          <field field_ref="ibghfxbom"    name="ibghfxbom"    />
-          <field field_ref="ibghfxbog"    name="ibghfxbog"    />
-          <field field_ref="ibghfxdif"    name="ibghfxdif"    />
-          <field field_ref="ibghfxopw"    name="ibghfxopw"    />
-          <field field_ref="ibghfxout"    name="ibghfxout"    />
-          <field field_ref="ibghfxin"    name="ibghfxin"    />
-          <field field_ref="ibghfxsnw"    name="ibghfxsnw"    />
-
-          <field field_ref="ibgfrcvol"    name="ibgfrcvol"   />
-          <field field_ref="ibgfrcsfx"    name="ibgfrcsfx"  />
-          <field field_ref="ibgvolgrm"    name="ibgvolgrm"    />
-
-        </file>
-
-	<!--
-	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
-	  <field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       />
-	  <field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  />
-	  <field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "       />
-	  <field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  />
-	  <field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       />
-	  <field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  />
-	</file>
-	-->
-
-      </file_group>
-
-      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
-      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/>  <!-- 5d files -->   
-
-      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
-
-
-      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
-      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
-      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
-      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
-
-      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
-      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
-      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
-      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
-
-   </file_definition>
-    
-    <!-- 
-============================================================================================================
-= grid definition = = DO NOT CHANGE =
-============================================================================================================
-    -->
-    
-   <axis_definition>  
-      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
-      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
-      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
-      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
-      <axis id="nfloat" long_name="Float number"      unit="-"  />
-      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
-      <axis id="ncatice" long_name="Ice categories"   unit="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <grid_definition>    
-     <grid id="grid_T_2D" domain_ref="grid_T"/>
-     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
-     <grid id="grid_U_2D" domain_ref="grid_U"/>
-     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
-     <grid id="grid_V_2D" domain_ref="grid_V"/>
-     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
-     <grid id="grid_W_2D" domain_ref="grid_W"/>
-     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
-    </grid_definition>   
-  </context>
-  
-
-  <context id="xios">
-
-      <variable_definition>
-	
-     <!-- 
-        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
--->
-	  <variable id="buffer_size"               type="integer">5000000</variable>
-	  <variable id="buffer_server_factor_size" type="integer">2</variable>
-	  <variable id="info_level"                type="integer">0</variable>
-	  <variable id="using_server"              type="boolean">true</variable>
-	  <variable id="using_oasis"               type="boolean">false</variable>
-	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
-	
-      </variable_definition>
-               
-  </context>
-  
-</simulation>
Index: unk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_demo.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_demo.xml	(revision 5106)
+++ 	(revision )
@@ -1,125 +1,0 @@
-<?xml version="1.0"?>
-<simulation> 
-
-  <context id="nemo" time_origin="1900-01-01 00:00:00" >
-    
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.xml"/>
-    <!-- 
-============================================================================================================
-=                                           output files definition                                        =
-=                                            Define your own files                                         =
-=                                         put the variables you want...                                    =
-============================================================================================================
-    -->
-    
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
-    
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."> <!-- 1h files -->
-	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
-	  <field field_ref="sst"  />
-	  <field field_ref="qsr"  />
-	</file>
-      </file_group>
-
-     
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
-	
-	<!-- example of "hand made" zoom  -->
-	<file id="file2" name_suffix="_grid_T_myzoom" >
-	  <!-- group of variables sharing the same zoom. see zoom definition in domain_def.xml -->
-	  <field_group id="blabla" domain_ref="myzoom" >    
-	    <field field_ref="toce" />
-	    <field field_ref="soce" />
-	  </field_group>
-	</file>
-	
-	<!-- mooring: automatic definition of the file name suffix based on id="0n180wT"  -->
-	<!-- include a group of variables. see field_def.xml for mooring variables definition  -->
-	<file id="0n180wT">
-	  <field_group group_ref="mooring" domain_ref="0n180wT" />  
-	</file>
-	
-	<!-- Equatorial section: automatic definition of the file name suffix based on id="EqT" -->
-	<!-- Zoom over vertical axis. def of axis_ref in the axis_definition bellow -->
-	<file id="EqT" >
-	  <field_group id="EqT" domain_ref="EqT" >
-	    <field field_ref="toce" name="votemper" axis_ref="deptht_myzoom"  />
-	    <field field_ref="sss" />
-	  </field_group>
-	</file>
-	
-	<!-- global file with different operations on data   -->
-	<file id="file3" >
-	  <field field_ref="toce"   default_value="-10" />    <!-- redefine the missing value -->
-	  <field field_ref="sst"    name="sstmooring1" domain_ref="0n180wT"  />   <!-- include a mooring -->
-	  <field field_ref="sst"    name="sst_1d_ave"  />                         <!-- mean -->
-	  <field field_ref="sst"    name="sst_1d_inst" operation="instant" />     <!-- instant value -->
-	  <field field_ref="sst"    name="sst_1d_max"  operation="maximum" />     <!-- max -->
-	  <field field_ref="suoce"  />   <!-- include a U-grid variable in the list -->
-	</file>
-	
-      </file_group>
-      
-    </file_definition>
-    
-    <!-- 
-============================================================================================================
-= grid definition = = DO NOT CHANGE =
-============================================================================================================
-    -->
-    
-   <axis_definition>  
-     <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" >
-       <axis id="deptht" />
-       <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" />
-     </axis_group>
-      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
-      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
-      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
-      <axis id="nfloat" long_name="Float number"      unit="-"  />
-      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <grid_definition>    
-     <grid id="grid_T_2D" domain_ref="grid_T"/>
-     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
-     <grid id="grid_U_2D" domain_ref="grid_U"/>
-     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
-     <grid id="grid_V_2D" domain_ref="grid_V"/>
-     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
-     <grid id="grid_W_2D" domain_ref="grid_W"/>
-     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
-    </grid_definition>    
-
-  </context>
-  
-
-  <context id="xios">
-
-      <variable_definition>
-	
-     <!-- 
-        We must have buffer_size > jpi*jpj*jpk*8*3 (with jpi and jpj the subdomain size)
--->
-	  <variable id="buffer_size"               type="integer">25000000</variable>
-	  <variable id="buffer_server_factor_size" type="integer">2</variable>
-	  <variable id="info_level"                type="integer">0</variable>
-	  <variable id="using_server"              type="boolean">false</variable>
-	  <variable id="using_oasis"               type="boolean">false</variable>
-	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
-	
-      </variable_definition>
-               
-  </context>
-  
-</simulation>
Index: unk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_oldstyle.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef_oldstyle.xml	(revision 5106)
+++ 	(revision )
@@ -1,153 +1,0 @@
-<?xml version="1.0"?>
-<simulation> 
-
- <context id="nemo" time_origin="1900-01-01 00:00:00" >
-    
-    <!-- $id$ -->
-    
-    <!-- 
-============================================================================================================
-=                                  definition of all existing variables                                    =
-=                                            DO NOT CHANGE                                                 =
-============================================================================================================
-    -->
-    <field_definition src="./field_def.xml"/>
-    <!-- 
-============================================================================================================
-=                                           output files definition                                        =
-=                                            Define your own files                                         =
-=                                         put the variables you want...                                    =
-============================================================================================================
-    -->
-    
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
-    
-      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
-
-      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
-      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
-      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
-      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
-      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->
-     
-      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
-      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
-      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
-
-	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
-	  <field field_ref="toce"         name="votemper"  />
-	  <field field_ref="soce"         name="vosaline"  />
-	  <field field_ref="sst"          name="sosstsst"  />
-	  <field field_ref="sss"          name="sosaline"  />
-	  <field field_ref="ssh"          name="sossheig"  />
-	  <field field_ref="empmr"        name="sowaflup"  />
-	  <field field_ref="qsr"          name="soshfldo"  />
-          <field field_ref="saltflx"      name="sosfldow"  />
-	  <field field_ref="qt"           name="sohefldo"  />
-	  <field field_ref="mldr10_1"     name="somxl010"  />
-	  <field field_ref="mldkz5"       name="somixhgt"  />
-	  <field field_ref="ice_cover"    name="soicecov"  />
-	  <field field_ref="wspd"         name="sowindsp"  />
-	  <field field_ref="erp"          name="sowafldp"  />
-	  <field field_ref="ist_ipa"      name="soicetem"  />
-	  <field field_ref="icealb_cea"   name="soicealb"  />   
-	</file>
-	
-	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="uoce"         name="vozocrtx"  />
-	  <field field_ref="uoce_eiv"     name="vozoeivu"  />
-	  <field field_ref="utau"         name="sozotaux"  />
-	</file>
-	
-	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="voce"         name="vomecrty"  />
-	  <field field_ref="voce_eiv"     name="vomeeivv"  />
-	  <field field_ref="vtau"         name="sometauy"  />
-	</file>
-	
-	<file id="file4" name_suffix="_grid_W" description="ocean V grid variables" >
-	  <field field_ref="woce"         name="vovecrtz" />
-	  <field field_ref="avt"          name="votkeavt" />
-	  <field field_ref="avs"          name="voddmavs" />
-	  <field field_ref="aht2d_eiv"    name="soleaeiw" />
-	</file>
-	
-	<file id="file5" name_suffix="_icemod" description="ocean V grid variables" >
-	  <field field_ref="ice_pres"                     />
-	  <field field_ref="snowthic_cea" name="isnowthi" />
-	  <field field_ref="icethic_cea"  name="iicethic" />
-	  <field field_ref="iceprod_cea"  name="iiceprod" />
-	  <field field_ref="ist_ipa"      name="iicetemp" />
-	  <field field_ref="ioceflxb"     name="ioceflxb" />
-	  <field field_ref="uice_ipa"     name="iicevelu" />
-	  <field field_ref="vice_ipa"     name="iicevelv" />
-	  <field field_ref="utau_ice"     name="iicestru" />
-	  <field field_ref="vtau_ice"     name="iicestrv" />
-	  <field field_ref="qsr_io_cea"   name="iicesflx" />
-	  <field field_ref="qns_io_cea"   name="iicenflx" />
-	  <field field_ref="snowpre"      name="isnowpre" />
-	</file>
-	
-      </file_group>
-
-      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
-      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
-      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
-      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
-      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
-
-      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
-      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
-      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
-      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
-
-   </file_definition>
-    
-    <!-- 
-============================================================================================================
-= grid definition = = DO NOT CHANGE =
-============================================================================================================
-    -->
-    
-   <axis_definition>  
-      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
-      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
-      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
-      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
-      <axis id="nfloat" long_name="Float number"      unit="-"  />
-      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
-   </axis_definition> 
-    
-   <domain_definition src="./domain_def.xml"/>
-   
-   <grid_definition>    
-     <grid id="grid_T_2D" domain_ref="grid_T"/>
-     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
-     <grid id="grid_U_2D" domain_ref="grid_U"/>
-     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
-     <grid id="grid_V_2D" domain_ref="grid_V"/>
-     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
-     <grid id="grid_W_2D" domain_ref="grid_W"/>
-     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
-    </grid_definition>   
-  </context>
-
-  <context id="xios">
-
-      <variable_definition>
-	
-     <!-- 
-        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
--->
-	  <variable id="buffer_size"               type="integer">25000000</variable>
-	  <variable id="buffer_server_factor_size" type="integer">2</variable>
-	  <variable id="info_level"                type="integer">0</variable>
-	  <variable id="using_server"              type="boolean">false</variable>
-	  <variable id="using_oasis"               type="boolean">false</variable>
-	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
-	
-      </variable_definition>
-               
-  </context>
-  
-</simulation>
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/iodef.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/iodef.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/iodef.xml	(revision 5107)
@@ -53,5 +53,5 @@
 	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
 	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
 	</file>
@@ -59,5 +59,5 @@
 	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
 	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
 	</file>
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml	(revision 5107)
@@ -40,9 +40,9 @@
 
 	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	</file>
 	
 	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	</file>
 
@@ -86,5 +86,5 @@
 	<file id="file6" name_suffix="_grid_U" description="ocean U grid variables" >
 	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
           <!-- variables available with MLE
@@ -95,5 +95,5 @@
 	<file id="file7" name_suffix="_grid_V" description="ocean V grid variables" >
 	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
           <!-- variables available with MLE
Index: /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/iodef.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/iodef.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/iodef.xml	(revision 5107)
@@ -43,9 +43,9 @@
 
 	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="suoce"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="suoce"     long_name="sea_surface_x_velocity"    />
 	</file>
 	
 	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="svoce"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="svoce"     long_name="sea_surface_y_velocity"    />
 	</file>
 
@@ -69,10 +69,10 @@
 	
 	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
 	</file>
 	
 	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
 	</file>
Index: /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5106)
+++ /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5107)
@@ -16,17 +16,34 @@
       
      <field_group id="grid_T" grid_ref="grid_T_2D" >
-         <field id="toce"         long_name="temperature"                               unit="degC" grid_ref="grid_T_3D"/>
-         <field id="soce"         long_name="salinity"                                  unit="psu"  grid_ref="grid_T_3D"/>
+         <field id="e3t"          long_name="T-cell thickness"                          unit="m"      grid_ref="grid_T_3D"/>
+
+         <field id="toce"         long_name="temperature"                               unit="degC"   grid_ref="grid_T_3D"/>
+         <field id="toce_e3t"     long_name="temperature * e3t"                         unit="degC*m" grid_ref="grid_T_3D" > toce * e3t </field >
+         <field id="soce"         long_name="salinity"                                  unit="psu"    grid_ref="grid_T_3D"/>
+         <field id="soce_e3t"     long_name="salinity * e3t"                            unit="psu*m"  grid_ref="grid_T_3D" > soce * e3t </field >
+
          <field id="sst"          long_name="sea surface temperature"                   unit="degC"                     />
-         <field id="sst2"         long_name="square of sea surface temperature"         unit="degC2"                    />
+         <field id="sst2"         long_name="square of sea surface temperature"         unit="degC2"                     >  sst * sst </field >
+         <field id="sstmax"       long_name="max of sea surface temperature"       field_ref="sst"  operation="maximum" />
+         <field id="sstmin"       long_name="min of sea surface temperature"       field_ref="sst"  operation="minimum" />
          <field id="sstgrad"      long_name="module of sst gradient"                    unit="degC/m"                   />
          <field id="sstgrad2"     long_name="square of module of sst gradient"          unit="degC2/m2"                 />
+         <field id="sbt"          long_name="sea bottom temperature"                    unit="degC"                     />
+	 
          <field id="sss"          long_name="sea surface salinity"                      unit="psu"                      />
-         <field id="sss2"         long_name="square of sea surface salinity"            unit="psu2"                     />
+         <field id="sss2"         long_name="square of sea surface salinity"            unit="psu2"                      >  sss * sss </field >
+         <field id="sssmax"       long_name="max of sea surface salinity"          field_ref="sss"  operation="maximum" />
+         <field id="sssmin"       long_name="min of sea surface salinity"          field_ref="sss"  operation="minimum" />
+         <field id="sbs"          long_name="sea bottom salinity"                       unit="psu"                      />
+
          <field id="ssh"          long_name="sea surface height"                        unit="m"                        />
-         <field id="ssh2"         long_name="square of sea surface height"              unit="m2"                       />
+         <field id="ssh2"         long_name="square of sea surface height"              unit="m2"                        >  ssh * ssh </field >
+         <field id="sshmax"       long_name="max of sea surface height"            field_ref="ssh"  operation="maximum" />
+
          <field id="mldkz5"       long_name="mixing layer depth (Turbocline)"           unit="m"                        />
          <field id="mldr10_1"     long_name="Mixed Layer Depth 0.01 ref.10m"            unit="m"                        />
-         <field id="heatc"        long_name="Heat content vertically integrated"        unit="J/m2"                      />
+         <field id="mldr10_1max"  long_name="max of Mixed Layer Depth 0.01 ref.10m" field_ref="mldr10_1"  operation="maximum" />
+         <field id="mldr10_1min"  long_name="min of Mixed Layer Depth 0.01 ref.10m" field_ref="mldr10_1"  operation="minimum" />
+         <field id="heatc"        long_name="Heat content vertically integrated"        unit="J/m2"                     />
          <field id="saltc"        long_name="Salt content vertically integrated"        unit="PSU*kg/m2"                />
          <!-- EOS -->
@@ -57,5 +74,4 @@
          <field id="botpres"      long_name="Pressure at sea floor"                     unit="dbar"                     />
          <!-- variables available with key_diaar5/key_vvl -->
-         <field id="cellthc"      long_name="Cell thickness"                            unit="m"    grid_ref="grid_T_3D"/>
          <!-- variables available with key_vvl -->
          <field id="tpt_dep"      long_name="T-point depth"                             unit="m"    grid_ref="grid_T_3D"/>
@@ -145,9 +161,9 @@
 
          <field id="empmr"        long_name="Net Upward Water Flux"                                        unit="kg/m2/s"  />
-         <field id="saltflx"      long_name="Downward salt flux"                                           unit="PSU/m2/s"  />
+         <field id="saltflx"      long_name="Downward salt flux"                                           unit="PSU/m2/s" />
          <field id="fmmflx"       long_name="Water flux due to freezing/melting"                           unit="kg/m2/s"  />
          <field id="snowpre"      long_name="Snow precipitation"                                           unit="kg/m2/s"  />
          <field id="runoffs"      long_name="River Runoffs"                                                unit="Kg/m2/s"  />
-         <field id="precip"       long_name="Total precipitation"                                           unit="kg/m2/s"  />
+         <field id="precip"       long_name="Total precipitation"                                          unit="kg/m2/s"  />
 
 
@@ -169,6 +185,6 @@
          <field id="isfgammat"    long_name="transfert coefficient for isf (temperature) "                 unit="m/s"      />
          <field id="isfgammas"    long_name="transfert coefficient for isf (salinity)    "                 unit="m/s"      />
- 	     <field id="stbl"         long_name="salinity in the Losh tbl                    "                 unit="PSU"      />
-	     <field id="ttbl"         long_name="temperature in the Losh tbl                 "                 unit="C"        />
+ 	 <field id="stbl"         long_name="salinity in the Losh tbl                    "                 unit="PSU"      />
+	 <field id="ttbl"         long_name="temperature in the Losh tbl                 "                 unit="C"        />
 
          <!-- *_oce variables available with ln_blk_clio or ln_blk_core -->
@@ -202,5 +218,5 @@
          <field id="snowmel_cea"   long_name="Snow Melt Rate (cell average)"                               unit="kg/m2/s"  />
          <field id="sntoice_cea"   long_name="Snow-Ice Formation Rate (cell average)"                      unit="kg/m2/s"  />
-         <field id="ticemel_cea"      long_name="Rate of Melt at Upper Surface of Sea Ice (cell average)"     unit="kg/m2/s"  />
+         <field id="ticemel_cea"   long_name="Rate of Melt at Upper Surface of Sea Ice (cell average)"     unit="kg/m2/s"  />
 
 	 <!-- ice fields -->
@@ -259,5 +275,5 @@
 
          <field id="micet"        long_name="Mean ice temperature"                                         unit="degC"     />
-         <field id="icehc"        long_name="ice total heat content"                                       unit="10^9J"   /> 
+         <field id="icehc"        long_name="ice total heat content"                                       unit="10^9J"    /> 
          <field id="isnowhc"      long_name="snow total heat content"                                      unit="10^9J"    />
          <field id="icest"        long_name="ice surface temperature"                                      unit="degC"     />
@@ -268,11 +284,11 @@
          <field id="idive"        long_name="divergence"                                                   unit="10-8s-1"  />
          <field id="ishear"       long_name="shear"                                                        unit="10-8s-1"  />
-         <field id="icevolu"      long_name="ice volume"                                                   unit="m"      />
-         <field id="snowvol"      long_name="snow volume"                                                  unit="m"      />
+         <field id="icevolu"      long_name="ice volume"                                                   unit="m"        />
+         <field id="snowvol"      long_name="snow volume"                                                  unit="m"        />
 
          <field id="icetrp"       long_name="ice volume transport"                                         unit="m/day"   />
          <field id="snwtrp"       long_name="snw volume transport"                                         unit="m/day"   />
-         <field id="deitrp"       long_name="advected ice enhalpy"                                         unit="W/m2"   />
-         <field id="destrp"       long_name="advected snw enhalpy"                                         unit="W/m2"   />
+         <field id="deitrp"       long_name="advected ice enhalpy"                                         unit="W/m2"    />
+         <field id="destrp"       long_name="advected snw enhalpy"                                         unit="W/m2"    />
 
          <field id="sfxbri"       long_name="brine salt flux"                                              unit="psu*kg/m2/day" />
@@ -314,9 +330,9 @@
          <field id="hfxres"   long_name="heat fluxes from ice-ocean mass exchange during resultant"           unit="W/m2"  />
          <field id="hfxsub"   long_name="heat fluxes from ice-atm. mass exchange during sublimation"          unit="W/m2"  />
-         <field id="hfxspr"   long_name="heat fluxes from ice-atm. mass exchange during snow precip"          unit="W/m2" />
+         <field id="hfxspr"   long_name="heat fluxes from ice-atm. mass exchange during snow precip"          unit="W/m2"  />
 
 	 <!-- diags -->
          <field id="hfxdhc"    long_name="Heat content variation in snow and ice"   unit="W/m2" />
-         <field id="hfxtur"    long_name="turbulent heat flux at the ice base"      unit="W/m2"  />
+         <field id="hfxtur"    long_name="turbulent heat flux at the ice base"      unit="W/m2" />
 
       </field_group>
@@ -325,25 +341,28 @@
       
       <field_group id="grid_U"   grid_ref="grid_U_2D">
-         <field id="utau"         long_name="Wind Stress along i-axis"                    unit="N/m2" />
-         <field id="uoce"         long_name="ocean current along i-axis"                  unit="m/s"  grid_ref="grid_U_3D" />
-         <field id="ssu"          long_name="ocean surface current along i-axis"          unit="m/s"     />
-         <field id="uocetr_eff"   long_name="Effective ocean transport along i-axis"      unit="m3/s" grid_ref="grid_U_3D" />
+         <field id="e3u"          long_name="U-cell thickness"                               unit="m"        grid_ref="grid_U_3D" />
+         <field id="utau"         long_name="Wind Stress along i-axis"                       unit="N/m2"                          />
+         <field id="uoce"         long_name="ocean current along i-axis"                     unit="m/s"      grid_ref="grid_U_3D" />
+         <field id="uoce_e3u"     long_name="ocean current along i-axis * e3u"               unit="m2/s"     grid_ref="grid_U_3D"  > uoce * e3u </field>
+         <field id="ssu"          long_name="ocean surface current along i-axis"             unit="m/s"                           />
+         <field id="sbu"          long_name="ocean bottom current along i-axis"              unit="m/s"                           />
+         <field id="uocetr_eff"   long_name="Effective ocean transport along i-axis"         unit="m3/s"     grid_ref="grid_U_3D" />
          <field id="uocet"        long_name="ocean transport along i-axis times temperature" unit="degC.m/s" grid_ref="grid_U_3D" />
          <field id="uoces"        long_name="ocean transport along i-axis times salinity"    unit="psu.m/s"  grid_ref="grid_U_3D" />
          <!-- variables available with MLE -->
-         <field id="psiu_mle"     long_name="MLE streamfunction along i-axis"             unit="m3/s"  grid_ref="grid_U_3D"  />
+         <field id="psiu_mle"     long_name="MLE streamfunction along i-axis"                unit="m3/s"     grid_ref="grid_U_3D" />
          <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv -->
-         <field id="uoce_eiv"     long_name="EIV ocean current along i-axis"              unit="m/s"  grid_ref="grid_U_3D" />
+         <field id="uoce_eiv"     long_name="EIV ocean current along i-axis"                 unit="m/s"      grid_ref="grid_U_3D" />
          <!-- uoce_eiv: available with key_trabbl -->
-         <field id="uoce_bbl"     long_name="BBL ocean current along i-axis"              unit="m/s"  grid_ref="grid_U_3D" />
-	     <field id="ahu_bbl"      long_name="BBL diffusive flux along i-axis"             unit="m3/s" />
+         <field id="uoce_bbl"     long_name="BBL ocean current along i-axis"                 unit="m/s"      grid_ref="grid_U_3D" />
+	 <field id="ahu_bbl"      long_name="BBL diffusive flux along i-axis"                unit="m3/s"                          />
          <!-- variable for ice shelves -->
-	     <field id="utbl"         long_name="zonal current in the Losh tbl"               unit="m/s"  axis_ref="none" />
+	 <field id="utbl"         long_name="zonal current in the Losh tbl"                  unit="m/s"                           />
          <!-- variables available with key_diaar5 -->
-         <field id="u_masstr"     long_name="ocean eulerian mass transport along i-axis"  unit="kg/s" grid_ref="grid_U_3D" />
-         <field id="u_heattr"     long_name="ocean eulerian heat transport along i-axis"  unit="W"    />
-         <field id="u_salttr"     long_name="ocean eulerian salt transport along i-axis"  unit="PSU*kg/s"    />
-         <field id="ueiv_heattr"  long_name="ocean bolus heat transport along i-axis"     unit="W"    />
-         <field id="udiff_heattr" long_name="ocean diffusion heat transport along i-axis" unit="W"    />
+         <field id="u_masstr"     long_name="ocean eulerian mass transport along i-axis"     unit="kg/s"     grid_ref="grid_U_3D" />
+         <field id="u_heattr"     long_name="ocean eulerian heat transport along i-axis"     unit="W"                             />
+         <field id="u_salttr"     long_name="ocean eulerian salt transport along i-axis"     unit="PSU*kg/s"                      />
+         <field id="ueiv_heattr"  long_name="ocean bolus heat transport along i-axis"        unit="W"                             />
+         <field id="udiff_heattr" long_name="ocean diffusion heat transport along i-axis"    unit="W"                             />
      </field_group>
       
@@ -351,25 +370,28 @@
       
       <field_group id="grid_V"   grid_ref="grid_V_2D">
-         <field id="vtau"         long_name="Wind Stress along j-axis"                    unit="N/m2" />
-         <field id="voce"         long_name="ocean current along j-axis"                  unit="m/s"  grid_ref="grid_V_3D" />
-         <field id="ssv"          long_name="ocean surface current along j-axis"          unit="m/s"  />
-         <field id="vocetr_eff"   long_name="Effective ocean transport along j-axis"      unit="m3/s" grid_ref="grid_V_3D" />
+         <field id="e3v"          long_name="V-cell thickness"                               unit="m"        grid_ref="grid_V_3D" />
+         <field id="vtau"         long_name="Wind Stress along j-axis"                       unit="N/m2"                          />
+         <field id="voce"         long_name="ocean current along j-axis"                     unit="m/s"      grid_ref="grid_V_3D" />
+         <field id="voce_e3v"     long_name="ocean current along j-axis * e3v"               unit="m2/s"     grid_ref="grid_V_3D"  > voce * e3v </field>
+         <field id="ssv"          long_name="ocean surface current along j-axis"             unit="m/s"                           />
+         <field id="sbv"          long_name="ocean bottom current along j-axis"              unit="m/s"                           />
+         <field id="vocetr_eff"   long_name="Effective ocean transport along j-axis"         unit="m3/s"     grid_ref="grid_V_3D" />
          <field id="vocet"        long_name="ocean transport along j-axis times temperature" unit="degC.m/s" grid_ref="grid_V_3D" />
          <field id="voces"        long_name="ocean transport along j-axis times salinity"    unit="psu.m/s"  grid_ref="grid_V_3D" />
          <!-- variables available with MLE -->
-         <field id="psiv_mle"     long_name="MLE streamfunction along j-axis"             unit="m3/s"  grid_ref="grid_V_3D"  />
+         <field id="psiv_mle"     long_name="MLE streamfunction along j-axis"                unit="m3/s"     grid_ref="grid_V_3D" />
          <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv -->
-         <field id="voce_eiv"     long_name="EIV ocean current along j-axis"              unit="m/s"  grid_ref="grid_V_3D" />
+         <field id="voce_eiv"     long_name="EIV ocean current along j-axis"                 unit="m/s"      grid_ref="grid_V_3D" />
          <!-- voce_eiv: available with key_trabbl -->
-         <field id="voce_bbl"     long_name="BBL ocean current along j-axis"              unit="m/s"  grid_ref="grid_V_3D" />
-	     <field id="ahv_bbl"      long_name="BBL diffusive flux along j-axis"             unit="m3/s"                   />
+         <field id="voce_bbl"     long_name="BBL ocean current along j-axis"                 unit="m/s"      grid_ref="grid_V_3D" />
+	 <field id="ahv_bbl"      long_name="BBL diffusive flux along j-axis"                unit="m3/s"                          />
          <!-- variable for ice shelves -->
-	     <field id="vtbl"         long_name="meridional current in the Losh tbl"        unit="m/s"  axis_ref="none" />
+	 <field id="vtbl"         long_name="meridional current in the Losh tbl"             unit="m/s"                           />
          <!-- variables available with key_diaar5 -->
-         <field id="v_masstr"     long_name="ocean eulerian mass transport along j-axis"  unit="kg/s" grid_ref="grid_V_3D" />
-         <field id="v_heattr"     long_name="ocean eulerian heat transport along j-axis"  unit="W"     />
-         <field id="v_salttr"     long_name="ocean eulerian salt transport along i-axis"  unit="PSU*kg/s"    />
-         <field id="veiv_heattr"  long_name="ocean bolus heat transport along j-axis"     unit="W"     />
-         <field id="vdiff_heattr" long_name="ocean diffusion heat transport along j-axis" unit="W"     />
+         <field id="v_masstr"     long_name="ocean eulerian mass transport along j-axis"     unit="kg/s"     grid_ref="grid_V_3D" />
+         <field id="v_heattr"     long_name="ocean eulerian heat transport along j-axis"     unit="W"                             />
+         <field id="v_salttr"     long_name="ocean eulerian salt transport along i-axis"     unit="PSU*kg/s"                      />
+         <field id="veiv_heattr"  long_name="ocean bolus heat transport along j-axis"        unit="W"                             />
+         <field id="vdiff_heattr" long_name="ocean diffusion heat transport along j-axis"    unit="W"                             />
       </field_group>
       
@@ -377,5 +399,7 @@
       
       <field_group id="grid_W" grid_ref="grid_W_3D">
+        <field id="e3w"          long_name="W-cell thickness"                            unit="m"   />
         <field id="woce"         long_name="ocean vertical velocity"                  unit="m/s"    />
+        <field id="woce_e3w"     long_name="ocean vertical velocity * e3v"            unit="m2/s"    > woce * e3w </field>
         <field id="wocetr_eff"   long_name="effective ocean vertical transport"       unit="m3/s"   />
         <!-- woce_eiv: available with key_traldf_eiv and key_diaeiv -->
@@ -430,12 +454,12 @@
       <field_group id="SBC_scalar"  domain_ref="1point" >
          <!-- available with ln_limdiaout -->
-	 <field id="ibgvoltot"    long_name="global mean ice volume"                   unit="km3"   />
-	 <field id="sbgvoltot"    long_name="global mean snow volume"                  unit="km3"   />
-	 <field id="ibgarea"      long_name="global mean ice area"                     unit="km2"   />
-	 <field id="ibgsaline"    long_name="global mean ice salinity"                 unit="psu"   />
-	 <field id="ibgtemper"    long_name="global mean ice temperature"              unit="degC"   />
+	 <field id="ibgvoltot"    long_name="global mean ice volume"                   unit="km3"      />
+	 <field id="sbgvoltot"    long_name="global mean snow volume"                  unit="km3"      />
+	 <field id="ibgarea"      long_name="global mean ice area"                     unit="km2"      />
+	 <field id="ibgsaline"    long_name="global mean ice salinity"                 unit="psu"      />
+	 <field id="ibgtemper"    long_name="global mean ice temperature"              unit="degC"     />
 	 <field id="ibgheatco"    long_name="global mean ice heat content"             unit="10^20J"   />
 	 <field id="sbgheatco"    long_name="global mean snow heat content"            unit="10^20J"   />
-	 <field id="ibgsaltco"    long_name="global mean ice salt content"             unit="psu*km3"   />
+	 <field id="ibgsaltco"    long_name="global mean ice salt content"             unit="psu*km3"  />
 
 	 <field id="ibgvfx"       long_name="global mean volume flux (emp)"               unit="m/day"   />
@@ -466,9 +490,9 @@
 
         <field id="ibghfxthd"   long_name="heat fluxes from ice-ocean exchange during thermo"              unit="W"  />
-        <field id="ibghfxsum"   long_name="heat fluxes causing surface ice melt"              unit="W"  />
-        <field id="ibghfxbom"   long_name="heat fluxes causing bottom ice melt"              unit="W"  />
-        <field id="ibghfxbog"   long_name="heat fluxes causing bottom ice growth"              unit="W"  />
-        <field id="ibghfxdif"   long_name="heat fluxes causing ice temperature change"              unit="W"  />
-        <field id="ibghfxopw"   long_name="heat fluxes causing open water ice formation"              unit="W"  />
+        <field id="ibghfxsum"   long_name="heat fluxes causing surface ice melt"                           unit="W"  />
+        <field id="ibghfxbom"   long_name="heat fluxes causing bottom ice melt"                            unit="W"  />
+        <field id="ibghfxbog"   long_name="heat fluxes causing bottom ice growth"                          unit="W"  />
+        <field id="ibghfxdif"   long_name="heat fluxes causing ice temperature change"                     unit="W"  />
+        <field id="ibghfxopw"   long_name="heat fluxes causing open water ice formation"                   unit="W"  />
         <field id="ibghfxdyn"   long_name="heat fluxes from ice-ocean exchange during dynamic"             unit="W"  />
         <field id="ibghfxres"   long_name="heat fluxes from ice-ocean exchange during resultant"           unit="W"  />
@@ -479,5 +503,5 @@
 
 	 <field id="ibgfrcvol"    long_name="global mean forcing volume (emp)"         unit="km3"      />
-	 <field id="ibgfrcsfx"    long_name="global mean forcing salt   (sfx)"         unit="psu*km3"   />
+	 <field id="ibgfrcsfx"    long_name="global mean forcing salt   (sfx)"         unit="psu*km3"  />
 	 <field id="ibgvolgrm"    long_name="global mean ice growth+melt volume"       unit="km3"      />
       </field_group>
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5106)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5107)
@@ -82,6 +82,4 @@
       CALL wrk_alloc( jpi , jpj , jpk        , zrhd      , zrhop    )
       CALL wrk_alloc( jpi , jpj , jpk , jpts , ztsn                 )
-
-      CALL iom_put( 'cellthc', fse3t(:,:,:) )
 
       zarea_ssh(:,:) = area(:,:) * sshn(:,:)
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5106)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5107)
@@ -142,85 +142,60 @@
       ENDIF
 
-      IF( lk_vvl ) THEN
-         z3d(:,:,:) = tsn(:,:,:,jp_tem) * fse3t_n(:,:,:)
-         CALL iom_put( "toce" , z3d                        )   ! heat content
+      IF( .NOT.lk_vvl ) THEN
+         CALL iom_put( "e3t" , fse3t_n(:,:,:) )
+         CALL iom_put( "e3u" , fse3u_n(:,:,:) )
+         CALL iom_put( "e3v" , fse3v_n(:,:,:) )
+         CALL iom_put( "e3w" , fse3w_n(:,:,:) )
+      ENDIF
+      
+      CALL iom_put( "toce", tsn(:,:,:,jp_tem) )    ! 3D temperature
+      CALL iom_put(  "sst", tsn(:,:,1,jp_tem) )    ! surface temperature
+      IF ( iom_use("sbt") ) THEN
          DO jj = 1, jpj
             DO ji = 1, jpi
-               z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_tem) * fse3t_n(ji,jj,mikt(ji,jj))
-            END DO
-         END DO  
-         CALL iom_put( "sst"  , z2d(:,:)                 )   ! sea surface heat content      
+               z2d(ji,jj) = tsn(ji,jj,MAX(mbathy(ji,jj),1),jp_tem)
+            END DO
+         END DO
+         CALL iom_put( "sbt", z2d )                ! bottom temperature
+      ENDIF
+      
+      CALL iom_put( "soce", tsn(:,:,:,jp_sal) )    ! 3D salinity
+      CALL iom_put(  "sss", tsn(:,:,1,jp_sal) )    ! surface salinity
+      IF ( iom_use("sbs") ) THEN
          DO jj = 1, jpj
             DO ji = 1, jpi
-               z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_tem)**2 * fse3t_n(ji,jj,mikt(ji,jj))
-            END DO
-         END DO  
-         CALL iom_put( "sst2" , z2d(:,:)      )   ! sea surface content of squared temperature
-         z3d(:,:,:) = tsn(:,:,:,jp_sal) * fse3t_n(:,:,:)            
-         CALL iom_put( "soce" , z3d                        )   ! salinity content
+               z2d(ji,jj) = tsn(ji,jj,MAX(mbathy(ji,jj),1),jp_sal)
+            END DO
+         END DO
+         CALL iom_put( "sbs", z2d )                ! bottom salinity
+      ENDIF
+         
+      CALL iom_put( "uoce", un(:,:,:)         )    ! 3D i-current
+      CALL iom_put(  "ssu", un(:,:,1)         )    ! surface i-current
+      IF ( iom_use("sbu") ) THEN
          DO jj = 1, jpj
             DO ji = 1, jpi
-               z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_sal) * fse3t_n(ji,jj,mikt(ji,jj))
-            END DO
-         END DO  
-         CALL iom_put( "sss"  , z2d(:,:)                 )   ! sea surface salinity content
+               z2d(ji,jj) = un(ji,jj,MAX(mbathy(ji,jj),1))
+            END DO
+         END DO
+         CALL iom_put( "sbu", z2d )                ! bottom i-current
+      ENDIF
+      
+      CALL iom_put( "voce", vn(:,:,:)         )    ! 3D j-current
+      CALL iom_put(  "ssv", vn(:,:,1)         )    ! surface j-current
+      IF ( iom_use("sbv") ) THEN
          DO jj = 1, jpj
             DO ji = 1, jpi
-               z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_sal)**2 * fse3t_n(ji,jj,mikt(ji,jj))
-            END DO
-         END DO  
-         CALL iom_put( "sss2" , z2d(:,:)                 )   ! sea surface content of squared salinity
-      ELSE
-         CALL iom_put( "toce" , tsn(:,:,:,jp_tem)        )   ! temperature
-         IF ( iom_use("sst") ) THEN
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_tem)
-               END DO
-            END DO
-            CALL iom_put( "sst"  , z2d(:,:)            ) ! sea surface temperature
-         ENDIF
-         IF ( iom_use("sst2") )   CALL iom_put( "sst2" , z2d(:,:) * z2d(:,:) ) ! square of sea surface temperature
-         CALL iom_put( "soce" , tsn(:,:,:,jp_sal)          )   ! salinity
-         IF ( iom_use("sss") ) THEN
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_sal)
-               END DO
-            END DO
-            CALL iom_put( "sss"  , z2d(:,:)            ) ! sea surface salinity
-         ENDIF
-         CALL iom_put( "sss2" , z2d(:,:) * z2d(:,:) ) ! square of sea surface salinity
-      END IF
-      IF( lk_vvl .AND. (.NOT. ln_dynadv_vec) ) THEN
-         CALL iom_put( "uoce" , umask(:,:,:) * un(:,:,:) * fse3u_n(:,:,:) )    ! i-transport
-         CALL iom_put( "voce" , vmask(:,:,:) * vn(:,:,:) * fse3v_n(:,:,:) )    ! j-transport
-      ELSE
-         CALL iom_put( "uoce" , umask(:,:,:) * un(:,:,:)                  )    ! i-current
-         CALL iom_put( "voce" , vmask(:,:,:) * vn(:,:,:)                  )    ! j-current
-         IF ( iom_use("ssu") ) THEN
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  z2d(ji,jj) = un(ji,jj,miku(ji,jj))
-               END DO
-            END DO
-            CALL iom_put( "ssu"   , z2d                                    )    ! i-current
-         ENDIF
-         IF ( iom_use("ssv") ) THEN
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  z2d(ji,jj) = vn(ji,jj,mikv(ji,jj))
-               END DO
-            END DO
-            CALL iom_put( "ssv"   , z2d                                    )    ! j-current
-         ENDIF
-      ENDIF
-      CALL iom_put(    "avt"  , avt                        )    ! T vert. eddy diff. coef.
-      CALL iom_put(    "avm"  , avmu                       )    ! T vert. eddy visc. coef.
-      IF( lk_zdfddm ) THEN
-         CALL iom_put( "avs" , fsavs(:,:,:)                          )    ! S vert. eddy diff. coef.
-      ENDIF
-
-      IF ( iom_use("sstgrad2") .OR. iom_use("sstgrad2") ) THEN
+               z2d(ji,jj) = vn(ji,jj,MAX(mbathy(ji,jj),1))
+            END DO
+         END DO
+         CALL iom_put( "sbv", z2d )                ! bottom j-current
+      ENDIF
+
+      CALL iom_put( "avt" , avt                        )    ! T vert. eddy diff. coef.
+      CALL iom_put( "avm" , avmu                       )    ! T vert. eddy visc. coef.
+      CALL iom_put( "avs" , fsavs(:,:,:)               )    ! S vert. eddy diff. coef. (useful only with key_zdfddm)
+
+      IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN
          DO jj = 2, jpjm1                                    ! sst gradient
             DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -234,5 +209,4 @@
          CALL lbc_lnk( z2d, 'T', 1. )
          CALL iom_put( "sstgrad2",  z2d               )    ! square of module of sst gradient
-         !CDIR NOVERRCHK<
          z2d(:,:) = SQRT( z2d(:,:) )
          CALL iom_put( "sstgrad" ,  z2d               )    ! module of sst gradient
@@ -243,11 +217,10 @@
          z2d(:,:)  = 0._wp 
          DO jk = 1, jpkm1
-            DO jj = 2, jpjm1
-               DO ji = fs_2, fs_jpim1   ! vector opt.
+            DO jj = 1, jpj
+               DO ji = 1, jpi
                   z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
                END DO
             END DO
          END DO
-         CALL lbc_lnk( z2d, 'T', 1. )
          CALL iom_put( "heatc", (rau0 * rcp) * z2d )    ! vertically integrated heat content (J/m2)
       ENDIF
@@ -256,11 +229,10 @@
          z2d(:,:)  = 0._wp 
          DO jk = 1, jpkm1
-            DO jj = 2, jpjm1
-               DO ji = fs_2, fs_jpim1   ! vector opt.
+            DO jj = 1, jpj
+               DO ji = 1, jpi
                   z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk)
                END DO
             END DO
          END DO
-         CALL lbc_lnk( z2d, 'T', 1. )
          CALL iom_put( "saltc", rau0 * z2d )   ! vertically integrated salt content (PSU*kg/m2)
       ENDIF
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 5106)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 5107)
@@ -588,11 +588,8 @@
       INTEGER, INTENT( in )               :: kt       ! time step
       !! * Local declarations
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: z_e3t_def
       INTEGER                             :: ji,jj,jk       ! dummy loop indices
       !!----------------------------------------------------------------------
 
       IF( nn_timing == 1 )  CALL timing_start('dom_vvl_sf_swp')
-      !
-      CALL wrk_alloc( jpi, jpj, jpk, z_e3t_def                )
       !
       IF( kt == nit000 )   THEN
@@ -679,14 +676,15 @@
       ! Write outputs
       ! =============
-      z_e3t_def(:,:,:) = ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2
-      CALL iom_put( "cellthc" , fse3t_n  (:,:,:) )
+      CALL iom_put(     "e3t" , fse3t_n  (:,:,:) )
+      CALL iom_put(     "e3u" , fse3u_n  (:,:,:) )
+      CALL iom_put(     "e3v" , fse3v_n  (:,:,:) )
+      CALL iom_put(     "e3w" , fse3w_n  (:,:,:) )
       CALL iom_put( "tpt_dep" , fsde3w_n (:,:,:) )
-      CALL iom_put( "e3tdef"  , z_e3t_def(:,:,:) )
+      IF( iom_use("e3tdef") )   &
+         CALL iom_put( "e3tdef"  , ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 )
 
       ! write restart file
       ! ==================
       IF( lrst_oce ) CALL dom_vvl_rst( kt, 'WRITE' )
-      !
-      CALL wrk_dealloc( jpi, jpj, jpk, z_e3t_def )
       !
       IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_sf_swp')
