Index: trunk/LMDZ.PLUTO/deftank/dynamico/context_dynamico.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/context_dynamico.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/context_dynamico.xml	(revision 3544)
@@ -0,0 +1,398 @@
+<!-- =========================================================================================================== -->
+<!-- DYNAMICO context                                                                                            -->
+<!-- context_dynamico.xml : Configuration file for DYNAMICO for reading and writing  files using XIOS            -->
+<!--                                                                                                             -->
+<!-- =========================================================================================================== -->
+
+<context id="icosagcm" >
+  <calendar type="d360" start_date="2000-01-01 00:00:00" time_origin="2000-01-01 00:00:00"/>
+
+  <!-- =========================================================================================================== -->
+  <!-- Definition of all existing variables in field_def_dynamico.xml                                              -->
+  <!-- =========================================================================================================== -->
+  <field_definition src="./field_def_dynamico.xml" />
+
+
+  <!-- =========================================================================================================== -->
+  <!-- Definition of restart files and other input files                                                           -->
+  <!-- =========================================================================================================== -->
+  <file_definition type="one_file" par_access="collective">
+
+    <file id="output" name="output" enabled=".FALSE."  output_freq="1ts" sync_freq="1ts" output_level="10" >
+      <field_group group_ref="standard_output"/>
+    </file>
+
+  <!-- =========================================================================================================== -->
+  <!-- Writing restart file                                                                                         -->
+  <!-- =========================================================================================================== -->
+
+    <file id="restart"  enabled="true">
+       <field_group id="group_restart" operation="once">
+          <field id="it_restart" name="iteration"  grid_ref="scalar" />
+
+          <field_group domain_ref="i" prec="8">
+             <field id="xcell_restart" name="xcell" />
+             <field id="ycell_restart" name="ycell" />
+             <field id="zcell_restart" name="zcell" />
+             <field id="ps_restart" name="ps" />
+             <field id="phis_restart" name="phis" />
+             <field_group axis_ref="lev" >
+                <field id="theta_rhodz_restart" name="theta_rhodz" />
+                <field id="u_restart" name="u" domain_ref="u"/>
+                <field id="ulon_restart" name="ulon" />
+                <field id="ulat_restart" name="ulat" />
+                <field id="p_restart" name="p" />
+
+                <field_group id="tracers_restart">
+                  <!-- tracers will be add atomatically here-->
+                </field_group>
+
+             </field_group>
+
+             <field_group id="non_hydro_restart" axis_ref="levp1" >
+              <!-- this group will be activated automatically if needed -->
+               <field id="geopot_restart" name="geopot" />
+               <field id="W_restart" name="W" />
+             </field_group>
+
+          </field_group>
+       </field_group>
+    </file>
+
+   <!-- =========================================================================================================== -->
+   <!-- Writing initial state file (when not previously read from start file)                                       -->
+   <!-- =========================================================================================================== -->
+
+   <file id="start0"  mode="write" output_freq="1ts" enabled="true">
+       <field_group id="group_start0" operation="once">
+          <field id="it_start0" name="iteration"  grid_ref="scalar" />
+
+          <field_group domain_ref="i" prec="8">
+             <field id="xcell_start0" name="xcell" />
+             <field id="ycell_start0" name="ycell" />
+             <field id="zcell_start0" name="zcell" />
+             <field id="ps_start0" name="ps" />
+             <field id="phis_start0" name="phis" />
+             <field_group axis_ref="lev" >
+                <field id="theta_rhodz_start0" name="theta_rhodz" />
+                <field id="u_start0" name="u" domain_ref="u"/>
+                <field id="ulon_start0" name="ulon" />
+                <field id="ulat_start0" name="ulat" />
+                <field id="p_start0" name="p" />
+
+                <field_group id="tracers_start0">
+                  <!-- tracers will be add atomatically here-->
+                </field_group>
+
+             </field_group>
+          </field_group>
+       </field_group>
+    </file>
+
+   <!-- =========================================================================================================== -->
+   <!-- reading start file                                                                                          -->
+   <!-- =========================================================================================================== -->
+
+    <file id="start" enabled="false" mode="read">
+       <field_group id="group_start" operation="once">
+          <field id="it_start" name="iteration"  grid_ref="scalar" />
+          <field_group domain_ref="i" prec="8">
+
+            <field id="xcell_start" name="xcell" />
+            <field id="ycell_start" name="ycell" />
+            <field id="zcell_start" name="zcell" />
+            <field id="ps_start" name="ps" />
+            <field id="phis_start" name="phis" />
+
+            <field_group axis_ref="lev" >
+              <field id="theta_rhodz_start" name="theta_rhodz" />
+              <field id="u_start" name="u" domain_ref="u"/>
+              <field id="ulon_start" name="ulon" />
+              <field id="ulat_start" name="ulat" />
+
+              <field_group id="tracers_start">
+                <!-- tracers will be add atomatically here-->
+              </field_group>
+	    </field_group>
+
+	    <field_group id="non_hydro_start" axis_ref="levp1" >
+              <!-- this group will be activated automatically if needed -->
+              <field id="geopot_start" name="geopot" />
+              <field id="W_start" name="W" />
+            </field_group>
+
+          </field_group>
+       </field_group>
+    </file>
+
+   <!-- =========================================================================================================== -->
+   <!-- reading start file and perform interpolation (restarting from a different resolution)                       -->
+   <!-- =========================================================================================================== -->
+
+    <file id="start_interp" enabled="false" mode="read">
+       <field_group operation="once">
+          <field id="it_start_interp" name="iteration"  grid_ref="scalar" />
+          <field_group domain_ref="i_start_interp_read" prec="8">
+             <field id="ps_start_interp_read" name="ps" />
+             <field id="phis_start_interp_read" name="phis" />
+             <field_group axis_ref="lev_start_interp_read" >
+                <field id="theta_rhodz_start_interp_read" name="theta_rhodz" />
+                <field id="ulon_start_interp_read" name="ulon" />
+                <field id="ulat_start_interp_read" name="ulat" />
+                <field id="p_start_interp_read" name="p" />
+
+                <field_group id="tracers_start_interp_read">
+                  <!-- tracers will be add atomatically here-->
+                </field_group>
+
+             </field_group>
+          </field_group>
+       </field_group>
+    </file>
+
+  </file_definition>
+
+  <field_definition>
+    <field_group id="start_interp">
+      <field_group domain_ref="i_start_interp" >
+         <field id="ps_start_interp" field_ref="ps_start_interp_read" />
+         <field id="phis_start_interp" field_ref="phis_start_interp_read" />
+
+         <field id="p_start_interp_horiz" field_ref="p_start_interp_read" axis_ref="lev_start_interp_read"/>
+
+          <field_group axis_ref="lev_start_interp" >
+             <field id="theta_rhodz_start_interp" field_ref="theta_rhodz_start_interp_read"  />
+             <field id="ulon_start_interp" field_ref="ulon_start_interp_read" />
+             <field id="ulat_start_interp" field_ref="ulat_start_interp_read" />
+
+             <field_group id="tracers_start_interp">
+               <!-- tracers will be add atomatically here-->
+             </field_group>
+          </field_group>
+
+       </field_group>
+    </field_group>
+
+    <field id="p_start_interp" domain_ref="i" axis_ref="lev" />
+
+  </field_definition>
+
+  <domain_definition>
+    <domain id="i_start_interp_read" type="unstructured" >
+      <generate_rectilinear_domain/>
+    </domain>
+
+    <domain id="i_start_interp" domain_ref="i">
+      <interpolate_domain order="1" />
+    </domain>
+
+  </domain_definition>
+
+  <axis_definition>
+    <axis id="lev_start_interp_read" />
+    <axis id="lev_start_interp"      axis_ref="lev">
+      <interpolate_axis order="1" coordinate_src="p_start_interp_horiz" coordinate_dst="p_start_interp" extrapolate="true"/>
+    </axis>
+  </axis_definition>
+
+
+<!-- ========================================================================================================================= -->
+<!-- Pressure is automatically resent at initialization to XIOS workflow to optionnaly do an interpolation in pressure level   -->
+<!-- And reinject tracer in the initial state                                                                                  -->
+<!-- ========================================================================================================================= -->
+
+  <field_definition>
+    <field id="p_init0" domain_ref="i" axis_ref="lev"/>
+    <field id="ps_init0" domain_ref="i" />
+  </field_definition>
+
+
+
+
+  <!-- =========================================================================================================== -->
+  <!-- read field from file for etat0_database                                                                                  -->
+  <!-- =========================================================================================================== -->
+  <field_definition>
+
+     <field_group id="read_fields" enabled="false" operation="instant">
+
+        <!-- field_ref attribute will be added automatically from model -->
+        <!-- folowing etat0_database_type option "legacy" or "ERA5_forcing "-->
+        <!-- ex : <field id="ps_db" field_ref="ps_db_legacy">  -->
+
+        <field id="relief_db" domain_ref="from_relief" read_access="true"  />
+        <field_group domain_ref="from_ecdyn" read_access="true" >
+           <field id="ps_db"  />
+           <field id="z_db"   />
+           <field id="ts_db"  />
+           <field_group axis_ref="lev_ecdyn" >
+              <field id="u_db"     />
+              <field id="v_db"     />
+              <field id="temp_db"  />
+              <field id="q_db"     />
+           </field_group>
+        </field_group>
+
+     </field_group>
+
+  </field_definition>
+
+
+  <file_definition>
+   <file_group id="read_files_legacy" enabled="false" >
+
+       <file id="relief" name="Relief" type="one_file" mode="read" output_freq="10ts">
+           <field id="relief_db_legacy" name="RELIEF" domain_ref="domain_relief" operation="instant" />
+       </file>
+
+
+
+       <file id="ECDYN"  name="ECDYN" type="one_file" mode="read" output_freq="10ts">
+          <field_group domain_ref="domain_ecdyn" operation="instant">
+             <field id="ps_db_legacy"   name="SP"      />
+             <field id="z_db_legacy"    name="Z"       />
+             <field id="ts_db_legacy"   name="ST"      />
+             <field_group axis_ref="lev_ecdyn"   >
+                <field id="u_db_legacy"    name="U"     />
+                <field id="v_db_legacy"    name="V"     />
+                <field id="temp_db_legacy" name="TEMP"  />
+                <field id="q_db_legacy"    name="R"     />
+             </field_group>
+          </field_group>
+       </file>
+
+     </file_group>
+
+     <file_group id="read_files_ERA5_forcing" enabled="false" >
+
+       <file name="nudging_forcing" type="one_file" mode="read" output_freq="1000y" time_counter_name="time">
+          <field id="relief_db_forcing" name="z" domain_ref="domain_relief" operation="once"> this/9.81 </field>
+
+          <field_group domain_ref="domain_ecdyn" operation="once">
+             <field id="ps_db_forcing"     name="sp"    />
+             <field id="z_db_forcing"      name="z"     />
+             <field id="ts_db_forcing"     name="t2m"   />
+             <field_group axis_ref="lev_ecdyn"  >
+                <field id="u_db_forcing"    name="u" />
+                <field id="v_db_forcing"    name="v" />
+                <field id="temp_db_forcing" name="t" />
+                <field id="q_db_forcing"    name="r" />
+             </field_group>
+          </field_group>
+       </file>
+
+    </file_group>
+  </file_definition>
+
+
+  <!-- =========================================================================================================== -->
+  <!-- Axis definitions                                                                                            -->
+  <!-- =========================================================================================================== -->
+  <axis_definition prec="8">
+    <axis id="lev"      name="lev"                positive="down" standard_name="atmopshere_hybrid_sigma_pressure_coordinate"  long_name="hybrid level at midpoints" axis_type="Z"/>
+    <axis id="levp1"    name="ilev"  unit="level" positive="down" standard_name="atmopshere_hybride_sigma_pressure_coordinate" long_name="hybrid level at interface" axis_type="Z" />
+    <axis id="nq"       name="nq" />
+    <axis id="nq_start" name="nq" />
+    <axis id="lev_ecdyn" />
+
+
+    <axis id="lev_pressure" positive="down"  n_glo="2" unit="Pa" value="(0,1)[85000 50000]" >
+      <interpolate_axis order="1" coordinate="p" />
+    </axis>
+
+    <axis id="presnivs_mb" >
+      <interpolate_axis order="1" />
+    </axis>
+  </axis_definition>
+
+  <!-- =========================================================================================================== -->
+  <!-- Domain definitions                                                                                          -->
+  <!-- =========================================================================================================== -->
+  <domain_definition prec="8">
+
+    <domain_group id="i">
+      <domain id="i" name="mesh"/>
+
+      <domain id="from_relief" >
+        <interpolate_domain/>
+      </domain>
+
+      <domain id="from_ecdyn" >
+        <interpolate_domain/>
+      </domain>
+    </domain_group>
+
+    <domain id="v" />
+    <domain id="u" />
+
+    <domain id="regular_half_degree" type="rectilinear" ni_glo="720" nj_glo="360" >
+      <generate_rectilinear_domain />
+      <interpolate_domain order="1"/>
+    </domain>
+
+    <domain id="regular_one_degree" type="rectilinear" ni_glo="360" nj_glo="180" >
+      <generate_rectilinear_domain />
+      <interpolate_domain order="1"/>
+    </domain>
+
+    <domain id="regular_two_degree" type="rectilinear" ni_glo="180" nj_glo="90" >
+      <generate_rectilinear_domain />
+      <interpolate_domain order="1"/>
+    </domain>
+
+    <domain id="domain_relief" type="rectilinear" >
+      <generate_rectilinear_domain />
+    </domain>
+
+    <domain id="domain_ecdyn" type="rectilinear" >
+      <generate_rectilinear_domain />
+    </domain>
+
+  </domain_definition>
+
+  <scalar_definition>
+     <scalar id="scalar" />
+  </scalar_definition>
+
+  <!-- =========================================================================================================== -->
+  <!-- Grid definitions                                                                                            -->
+  <!-- =========================================================================================================== -->
+  <grid_definition>
+    <grid id="scalar">
+      <scalar />
+    </grid>
+
+    <grid id="grid_q">
+      <domain domain_ref="i" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq" />
+    </grid>
+
+    <grid id="grid_q_start">
+      <domain domain_ref="i" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq_start" />
+    </grid>
+
+    <grid id="grid_q_regular_two_degree">
+      <domain domain_ref="regular_two_degree" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq" />
+    </grid>
+
+    <grid id="grid_q_regular_one_degree">
+      <domain domain_ref="regular_one_degree" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq" />
+    </grid>
+
+    <grid id="grid_q_regular_alf_degree">
+      <domain domain_ref="regular_half_degree" />
+      <axis axis_ref="lev" />
+      <axis axis_ref="nq" />
+    </grid>
+
+
+  </grid_definition>
+
+</context>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/context_input_dynamico.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/context_input_dynamico.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/context_input_dynamico.xml	(revision 3544)
@@ -0,0 +1,17 @@
+<context id="icosagcm_input" >
+  <calendar type="d360" start_date="2000-01-01 00:00:00" time_origin="2000-01-01 00:00:00"/>
+
+   <file_definition type="one_file" par_access="collective">
+
+      <file id="start" name="start" enabled="false" mode="read" output_freq="1d">
+          <field id="xcell_start" name="xcell" domain_ref="i" operation="instant" prec="8"/>
+          <field id="ycell_start" name="ycell" domain_ref="i" operation="instant" prec="8"/>
+          <field id="zcell_start" name="zcell" domain_ref="i" operation="instant" prec="8"/>
+      </file>
+   </file_definition>
+
+  <domain_definition>
+    <domain id="i"/>
+  </domain_definition>
+
+</context>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/context_pcm_physics.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/context_pcm_physics.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/context_pcm_physics.xml	(revision 3544)
@@ -0,0 +1,150 @@
+<context id="LMDZ">
+
+    <!-- Definition of a calendar is done in code via wxios_set_cal -->
+
+    <!-- Definition of domains and groups of domains -->
+    <domain_definition>
+        <domain_group id="dom_glo" data_dim="1">
+          <domain id="dom_glo" />
+        </domain_group>
+
+    </domain_definition>
+
+    <domain_definition>
+        <domain id="dom_64_48" type="rectilinear" ni_glo="64" nj_glo="48"   >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_96_95" type="rectilinear"  ni_glo="96" nj_glo="95"  >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_144_142" type="rectilinear" ni_glo="144" nj_glo="142"   >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_512_360" type="rectilinear" ni_glo="512" nj_glo="360"   >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_720_360" type="rectilinear" ni_glo="720" nj_glo="360" >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_128_96" type="rectilinear" ni_glo="128" nj_glo="96" >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_256_192" type="rectilinear" ni_glo="256" nj_glo="192" >
+          <generate_rectilinear_domain/>
+          <interpolate_domain order="1"/>
+        </domain>
+
+        <domain id="dom_out" domain_ref="dom_128_96"/>
+    </domain_definition>
+    <!-- <domain_definition src="./domain_def.xml"/> -->
+
+    <!-- Definition of vertical axes
+                           NB: these must be defined and set in code via
+         xios_output_mod -->
+    <axis_definition>
+        <axis id="presnivs"
+              standard_name="Pseudo-pressure of model vertical levels"
+              unit="Pa">
+        </axis>
+        <axis id="altitude"
+              standard_name="Pseudo-altitude of model vertical levels"
+              unit="km">
+        </axis>
+        <axis id="soil_layers"
+              standard_name="soil layer depth at intermediate level"
+              unit="m">
+        </axis>
+        <axis id="interlayer"
+              standard_name="Levels between layers (altitude+1)"
+              unit="km">
+        </axis>
+        <axis id="controle_axe"
+              standard_name="Controle"
+              n_glo="100">
+        </axis>
+        <!--Added for diagspecIR-->
+        <axis id="IR_Wavenumber"
+               standard_name="Band mid frequency in the infrared"
+               unit="cm-1">
+        </axis>
+        <!--Added for diagspecVI-->
+        <axis id="VI_Wavenumber"
+              standard_name="Band mid frequency in the visible"
+              unit=
+            "cm-1">
+        </axis>
+
+    </axis_definition>
+
+    <scalar_definition>
+           <scalar id="scalar" />
+    </scalar_definition>
+
+    <grid_definition>
+        <!-- toggle axis id below to change output vertical axis -->
+        <grid id="grid_3D">
+            <domain domain_ref="dom_glo" />
+            <axis axis_ref="altitude" />
+        </grid>
+        <grid id="grid_2D">
+            <domain domain_ref="dom_glo" />
+        </grid>
+        <!--Added for diagspecIR-->
+        <grid id='grid_IR_3D'>
+            <domain domain_ref="dom_glo" />
+            <axis axis_ref='IR_Wavenumber'/>
+        </grid>
+        <!-- Added for diagspecVI-->
+        <grid id="grid_VI_3D">
+          <domain domain_ref="dom_glo" />
+          <axis axis_ref="VI_Wavenumber"/>
+        </grid>
+        <!-- grid for interpolated lon-lat outputs -->
+        <!-- to output scalars -->
+        <grid id="scalarpoint" >
+            <scalar scalar_ref="scalar" />
+        </grid>
+        <!-- output grids -->
+        <grid id="grid_3D_out">
+            <domain domain_ref="dom_out" />
+            <axis axis_ref="altitude" />
+        </grid>
+        <grid id="grid_2D_out">
+            <domain domain_ref="dom_out" />
+        </grid>
+        <!--added for diagspecIR-->
+        <grid id="grid_IR_3D_out">
+            <domain domain_ref="dom_out"/>
+            <axis axis_ref="IR_Wavenumber"/>
+        </grid>
+        <grid id="grid_IR">
+            <axis axis_ref="IR_Wavenumber"/>
+        </grid>
+        <!--Added for diagspecVI-->
+        <grid id="grid_VI_3D_out">
+            <domain domain_ref="dom_out"/>
+            <axis axis_ref="VI_Wavenumber"/>
+        </axis>
+        <grid id="grid_VI">
+          <axis axis_ref="VI_Wavenumber"/>
+        </grid>
+    </grid_definition>
+
+    <!-- Definition of model variables -->
+    <field_definition src="./field_def_physics.xml" />
+
+    <!-- Definition of output files -->
+    <file_definition src="./file_def_physics.xml" />
+</context>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/field_def_dynamico.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/field_def_dynamico.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/field_def_dynamico.xml	(revision 3544)
@@ -0,0 +1,142 @@
+<!-- =========================================================================================================== -->
+<!-- field_def_dynamico.xml                                                                                      -->
+<!-- Definition of all existing variables that can be output from DYNAMCIO                                       -->
+<!-- =========================================================================================================== -->
+
+<field_definition>
+
+  <field_group id="standard_output" level="1" enabled=".TRUE." operation="instant">
+
+    <field id="timestep" grid_ref="scalar" unit="s"/>
+    <field id="preff" grid_ref="scalar"    unit="Pa"/>
+    <field id="ap" axis_ref="levp1"   long_name="hybrid A coefficient at layer interface" />
+    <field id="bp" axis_ref="levp1"  long_name="hybrid B coefficient at layer interface" />
+    <field id="mid_ap" axis_ref="lev"   long_name="hybrid A coefficient at midpoints" />
+    <field id="mid_bp" axis_ref="lev"  long_name="hybrid B coefficient at midpoints" />
+
+    <field_group id="standard_output2D" domain_ref="i">
+      <field id="ps" standard_name="surface_pressure" long_name="Surface pressure"   unit="Pa"/>
+      <field id="dps"  />
+      <field id="Ai" />
+      <field id="phis" operation="once" freq_offset="0ts" name="PHIS"   standard_name="surface_geopotential" long_name="Surface geopotential" unit="m2/m2" />
+      <field id="phi" />
+      <field id="precl" name="PRECT"     standard_name="rainfall_rate"  long_name="Large Scale precipitation rate"  unit="m/s"/>/>
+      <field id="Q1_col_int" />
+      <field id="Q2_col_int" />
+      <field id="ps_init" />
+      <field id="coeff_nudging" freq_offset="0ts"/>
+
+      <field id="u850"     name="U850"       long_name="Zonal wind at 850 hPa"                 unit="m/s"/>
+      <field id="v850"     name="V850"       long_name="Meridional wind at 850 hPa"            unit="m/s"/>
+      <field id="w850"     name="W850"       long_name="Vertical velocity at 850 hPa"          unit="m/s"/>
+      <field id="t850"     name="T850"       long_name="Temperature at 850 hPa"                unit="K"/>
+      <field id="omega850" name="OMEGA850"   long_name="Vertical pressure velocity at 850 hPa" unit="Pa/s"/>
+      <field id="q1_850"   name="Q1_850"     long_name="First tracer at 850 hPa"               unit="kg/kg"/>
+      <field id="u500"     name="U500"       long_name="Zonal wind at 500 hPa"                 unit="m/s"/>
+      <field id="v500"     name="V500"       long_name="Meridional wind at 850 hPa"            unit="m/s"/>
+      <field id="w500"     name="W500"       long_name="Vertical velocity at 500 hPa"          unit="m/s"/>
+      <field id="t500"     name="T500"       long_name="Temperature at 850 hPa"                unit="K"/>
+      <field id="omega500" name="OMEGA500"   long_name="Vertical pressure velocity at 500 hPa" unit="Pa/s"/>
+      <field id="q1_500"   name="Q1_500"     long_name="First tracer at 500 hPa"               unit="kg/kg"/>
+      <field id="SST"      name="SST"        long_name="Sea surface temperature"               unit="K"/>
+      <field id="ulon_850_500" field_ref="p" axis_ref="lev_pressure" />
+
+
+      <field_group id="standard_output3D" axis_ref="lev">
+
+        <field id="mass" />
+        <field id="div" />
+        <field id="dmass"/>
+        <field id="p" name="P" standard_name="air_pressure" long_name="Pressure" unit="Pa"/>
+        <field id="theta" />
+        <field id="dyn_q" />
+        <field id="pk"/>
+        <field id="ulon" name="U" standard_name="eastward_wind" long_name="Zonal wind" unit="m/s"/>
+        <field id="ulat" name="V" standard_name="northward_wind" long_name="Meridional wind" unit="m/s"/>
+        <field id="uz"   name="W" standard_name="upward_air_velocity" long_name="Vertical velocity" unit="m/s"/>
+        <field id="omega" name="OMEGA" standard_name="lagrangian_tendency_of_air_pressure" long_name="Vertical pressure velocity"  unit="Pa/s"/>
+        <field id="temp"  name="T"   standard_name="air_temperature" long_name="Temperature"     unit="K"/>
+        <field id="kinetic_trisk" />
+        <field id="kinetic" />
+
+        <field id="dulon_diss1"/>
+        <field id="dulat_diss1"/>
+        <field id="dulon_diss2"/>
+        <field id="dulat_diss2"/>
+        <field id="dulon_phys"/>
+        <field id="dulat_phys"/>
+
+	<field id="mass_t"           long_name="Time-averaged air mass"   unit="kg/m2"/>
+        <field id="massflux_lon"     long_name="Time-averaged air mass flux, zonal"   unit="kg/m/s"/>
+        <field id="massflux_lat"     long_name="Time-averaged air mass flux, meridional"   unit="kg/m/s"/>
+
+        <field id="ulon_t"           long_name="Time-averaged zonal momentum"   unit="kg/m/s"/>
+        <field id="ulonflux_lon"     long_name="Time-averaged zonal momentum flux, zonal"   unit="kg/s2"/>
+        <field id="ulonflux_lat"     long_name="Time-averaged zonal momentum flux, meridional"   unit="kg/s2"/>
+
+        <field id="theta_t"          long_name="Time-averaged potential temperature"   unit="K.kg/m2"/>
+        <field id="thetaflux_lon"    long_name="Time-averaged potential temperature flux, zonal"   unit="K.kg/m/s"/>
+        <field id="thetaflux_lat"    long_name="Time-averaged potential temperature flux, meridional"   unit="K/kg/m/s"/>
+
+        <field id="epot_t"           long_name="Time-averaged potential energy"   unit="J/m2"/>
+        <field id="epotflux_lon"     long_name="Time-averaged potential energy flux, zonal"   unit="J/m/s"/>
+        <field id="epotflux_lat"     long_name="Time-averaged potential energy flux, meridional"   unit="J/m/s"/>
+
+        <field id="ekin_t"           long_name="Time-averaged kinetic energy"   unit="J/m2"/>
+        <field id="ekinflux_lon"     long_name="Time-averaged kinetic energy flux, zonal"   unit="J/m/s"/>
+        <field id="ekinflux_lat"     long_name="Time-averaged kinetic energy flux, meridional"   unit="J/m/s"/>
+
+        <field id="enthalpy_t"       long_name="Time-averaged enthalpy"   unit="J/m2"/>
+        <field id="enthalpyflux_lon" long_name="Time-averaged enthalpy flux, zonal"   unit="J/m/s"/>
+        <field id="enthalpyflux_lat" long_name="Time-averaged enthalpy flux, meridional"   unit="J/m/s"/>
+
+	<field id="mass_init" />
+        <field id="div_init" />
+        <field id="p_init" />
+        <field id="theta_init" />
+        <field id="dyn_q_init" />
+        <field id="ulon_init"/>
+        <field id="ulat_init"/>
+        <field id="uz_init"/>
+        <field id="temp_init"/>
+        <field id="kinetic_trisk_init" />
+        <field id="kinetic_init" />
+
+        <field_group id="standard_output_tracers">
+          <!-- tracers are automatically inserted here -->
+        </field_group>
+
+        <field_group id="standard_output_tracers_init" operation="once">
+          <!-- tracers are automatically inserted here -->
+        </field_group>
+
+      </field_group>
+
+
+      <field_group axis_ref="levp1">
+        <field id="geopot" name="PHI"   standard_name="geopotential" long_name="geopotential" unit="m2/s2"/>
+        <field id="geopot_init"/>
+      </field_group>
+
+    </field_group>
+
+    <field_group grid_ref="grid_q">
+      <field id="q_init" />
+      <field id="q" />
+      <field id="qmass_t" />
+      <field id="qflux_lon" />
+      <field id="qflux_lat" />
+    </field_group>
+
+    <field_group domain_ref="v" axis_ref="lev">
+      <field id="vort" />
+      <field id="vort_init" />
+      <field id="pv" />
+    </field_group>
+
+
+  </field_group>
+
+
+</field_definition>
+
Index: trunk/LMDZ.PLUTO/deftank/dynamico/field_def_physics.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/field_def_physics.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/field_def_physics.xml	(revision 3544)
@@ -0,0 +1,362 @@
+<!-- ============================================================== -->
+<!-- field_def_physics.xml                                          -->
+<!-- Definition of all existing variables that can be outputed
+     from Generic PCM physics                                       -->
+<!-- ============================================================== -->
+
+    <field_definition prec="4"
+                      freq_op="1ts"
+                      enabled="true">
+
+        <!-- 0D variables -->
+        <field_group id="fields_0D" grid_ref="scalarpoint">
+            <field id="Ls"
+                   long_name="Solar longitude"
+                   unit="degrees" />
+            <field id="RA"
+                   long_name="Right Ascension"
+                   unit="degrees" />
+            <field id="Declin"
+                   long_name="Solar declination"
+                   unit="degrees" />
+            <field id="dist_star"
+                   long_name="Distance to star"
+                   unit="AU" />
+        </field_group>
+
+        <field_group id="fields_controle" grid_ref="controle_grid">
+            <field id="controle"
+                   long_name="controle" />
+        </field_group>
+
+        <field_group id="fields_altitude" grid_ref="altitude_grid">
+            <field id="aps"
+                   long_name="aps" />
+            <field id="bps"
+                   long_name="bps" />
+        </field_group>
+
+        <field_group id="fields_interlayer" grid_ref="interlayer_grid">
+            <field id="ap"
+                   long_name="ap" />
+            <field id="bp"
+                   long_name="bp" />
+        </field_group>
+
+        <!-- 1D variables (spectral)-->
+        <field_group id="IR_fields" grid_ref="grid_IR">
+              <field id="IR_Bandwidth"
+                     long_name="Bandwidth in the infrared"
+                     unit="cm-1"/>
+        </field_group>
+        <field_group id="VI_field" grid_ref="grid_VI">
+              <field id="VI_Bandwidth"
+                     long_name="Bandwith in the visible"
+                     unit="cm-1"/>
+       </field_group>
+        <!-- 2D variables -->
+        <field_group id="fields_2D" grid_ref="grid_2D">
+            <field id="area"
+                   long_name="Mesh area"
+                   unit="m2" />
+            <field id="phisfi"
+                   long_name="Surface geopotential"
+                   unit="m2.s-2" />
+            <field id="emis"
+                   long_name="Surface emissivity"
+                   unit="" />
+            <field id="ALB"
+                   long_name="Surface Albedo"
+                    unit="" />
+
+            <field id="ps"
+                   long_name="Surface Pressure"
+                   unit="Pa" />
+            <field id="tsurf"
+                   long_name="Surface Temperature"
+                   unit="K" />
+
+            <!-- Tracers -->
+            <field id="n2_surf"
+                   long_name="N2 ice thickness"
+                   unit="kg/m2" />
+            <field id="ch4_gas_surf"
+                   long_name="CH4 vapor at surface"
+                   unit="kg/m2" />
+            <field id="ch4_ice_surf"
+                   long_name="CH4 ice at surface"
+                   unit="kg/m2" />
+            <field id="co_gas_surf"
+                   long_name="co vapor at surface"
+                   unit="kg/m2" />
+            <field id="co_ice_surf"
+                   long_name="co ice at surface"
+                   unit="kg/m2" />
+            <field id="haze_surf"
+                   long_name="haze at surface"
+                   unit="kg/m2" />
+            <field id="prec_haze_surf"
+                   long_name="precursor haze at surface"
+                   unit="kg/m2" />
+
+            <field id="n2_col"
+                   long_name="N2 vapor column"
+                   unit="kg/m2" />
+            <field id="ch4_gas_col"
+                   long_name="CH4 vapor column"
+                   unit="kg/m2" />
+            <field id="ch4_ice_col"
+                   long_name="CH4 ice column"
+                   unit="kg/m2" />
+            <field id="co_gas_col"
+                   long_name="co vapor column"
+                   unit="kg/m2" />
+            <field id="co_ice_col"
+                   long_name="co ice column"
+                   unit="kg/m2" />
+            <field id="haze_col"
+                   long_name="haze column"
+                   unit="kg/m2" />
+            <field id="prec_haze_col"
+                   long_name="precursor haze column"
+                   unit="kg/m2" />
+
+            <field id="n2_iceflux"
+                   long_name="N2 flux"
+                   unit="kg/m2/s" />
+            <field id="ch4_iceflux"
+                   long_name="CH4 ice flux"
+                   unit="kg/m2/s" />
+            <field id="co_iceflux"
+                   long_name="co ice flux"
+                   unit="kg/m2/s" />
+
+            <field id="vmr_ch4"
+                   long_name="CH4 volume mixing ratio"
+                   unit="" />
+            <field id="vmr_co"
+                   long_name="CO volume mixing ratio"
+                   unit="" />
+
+            <field id="tau_col"
+                   long_name="Total aerosol optical depth"
+                   unit="opacity" />
+
+            <field id="zdqsdif_ch4_ice"
+                   long_name="zdqsdif ch4"
+                   unit="" />
+            <field id="zdqssed_ch4"
+                   long_name="zdqssed ch4"
+                   unit="" />
+            <field id="zdqssed_haze"
+                   long_name="zdqssed haze"
+                   unit="" />
+
+            <!-- Radiation -->
+            <field id="ASR"
+                   long_name="Absorbed stellar radiation"
+                    unit="W/m2" />
+            <field id="ISR"
+                   long_name="incoming solar radiation"
+                   unit="W/m2" />
+            <field id="OLR"
+                   long_name="outgoing longwave radiation"
+                   unit="W/m2" />
+            <field id="GND"
+                   long_name="Heat flux from ground"
+                   unit="W/m2" />
+            <field id="DYN"
+                   long_name="Dynamical heat input"
+                   unit="W/m2" />
+            <field id="fluxsurf_lw"
+                   long_name="Longwave radiation at the surface"
+                   unit="W.m-2" />
+            <field id="sensibFlux"
+                   long_name="Sensible heat flux"
+                   unit="W/m2" />
+            <field id="lscaledE"
+                   long_name="heat from largescale"
+                   unit="W/m2" />
+            <field id="madjdE"
+                   long_name="heat from moistadj"
+                   unit="W/m2" />
+            <field id="genericconddE"
+                   long_name="heat from generic condensation"
+                   unit="W/m2" />
+
+        </field_group>
+
+        <!-- 3D variables -->
+        <field_group id="fields_3D" grid_ref="grid_3D">
+
+            <field id="zzlay"
+                   long_name="Midlayer altitude"
+                   unit="m" />
+            <field id="zzlev"
+                   long_name="Interlayer altitude"
+                   unit="m" />
+            <field id="pphi"
+                   long_name="Geopotential"
+                   unit="m2.s-2" />
+
+            <field id="temperature"
+                   long_name="Atmospheric temperature"
+                   unit="K" />
+            <field id="teta"
+                   long_name="Potential temperature"
+                   unit="K" />
+            <field id="u"
+                   long_name="Eastward Zonal Wind"
+                   unit="m/s" />
+            <field id="v"
+                   long_name="Northward Meridional Wind"
+                   unit="m/s" />
+            <field id="w"
+                   long_name="Downward Vertical Wind"
+                   unit="m/s" />
+            <field id="omega"
+                   long_name="Downward omega velocity"
+                   unit="Pa/s" />
+            <field id="p"
+                   long_name="Atmospheric pressure"
+                   unit="Pa" />
+            <field id="detr"
+                   long_name="Detrainment"
+                   unit="kg/m2/s" />
+            <field id="entr"
+                   long_name="Entrainment"
+                   unit="kg/m2/s" />
+            <field id="w_plm"
+                   long_name="Plume vertical velocity"
+                   unit="m/s" />
+            <field id="q2"
+                   long_name="turbulent kinetic energy"
+                   unit="J.kg^-1" />
+            <field id="dEzradsw"
+                   long_name="radiative heating"
+                   unit="w.m^-2" />
+            <field id="dEzradlw"
+                   long_name="radiative heating"
+                   unit="w.m^-2" />
+            <field id="qsatatm"
+                   long_name="atm qsat"
+                   unit=" " />
+            <field id="dt_generic_condensation"
+                   long_name="heating from generic condensation"
+                   unit="K s-1" />
+            <field id="zdtsw"
+                   long_name="SW heating"
+                   unit="T s-1" />
+            <field id="zdtlw"
+                   long_name="LW heating"
+                   unit="T s-1" />
+            <field id="dtrad"
+                   long_name="radiative heating"
+                   unit="K s-1" />
+            <field id="zdtdyn"
+                   long_name="Dyn. heating"
+                   unit="T s-1" />
+            <field id="dtmoistadj"
+                   long_name="moist adj heating"
+                   unit="K s-1" />
+            <field id="dtdryadj"
+                   long_name="dry adj heating"
+                   unit="K s-1" />
+
+            <!--Tracers-->
+            <field id="n2"
+                   long_name="N2 mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="ch4_gas"
+                   long_name="CH4 vapor mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="ch4_ice"
+                   long_name="CH4 ice mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="co_gas"
+                   long_name="co vapor mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="co_ice"
+                   long_name="co ice mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="haze"
+                   long_name="haze mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="prec_haze"
+                   long_name="precursor haze mass mixing ratio"
+                   unit="kg/kg" />
+            <field id="zdtc"
+                   long_name="tendancy T cond N2"
+                   unit="K" />
+
+            <field id="zrho_ch4"
+                   long_name="zrho_ch4"
+                   unit="kg/m3" />
+            <field id="zrho_co"
+                   long_name="zrho_co"
+                   unit="kg/m3" />
+            <field id="zrho_haze"
+                   long_name="zrho_haze"
+                   unit="kg/m3" />
+            <field id="zdqcn2_ch4"
+                   long_name="zdq condn2 ch4"
+                   unit="" />
+            <field id="zdqdif_ch4"
+                   long_name="zdqdif_ch4"
+                   unit="" />
+            <field id="zdqadj_ch4"
+                   long_name="zdqadj_ch4"
+                   unit="" />
+            <field id="zdqsed_ch4"
+                   long_name="zdqsed_ch4"
+                   unit="" />
+            <field id="zdtch4cloud"
+                   long_name="ch4 cloud"
+                   unit="T s-1" />
+            <field id="zdqch4cloud"
+                   long_name="ch4 cloud"
+                   unit="T s-1" />
+            <field id="zdqrho_photprec"
+                   long_name="zdqrho_photprec"
+                   unit="kg/m3/s" />
+            <field id="zdqphot_prec"
+                   long_name="zdqphot_prec"
+                   unit="" />
+            <field id="zdqphot_ch4"
+                   long_name="zdqphot_ch4"
+                   unit="" />
+
+            <field id="zdqhaze_ch4"
+                   long_name="zdqhaze_ch4"
+                   unit="" />
+            <field id="zdqhaze_prec"
+                   long_name="zdqhaze_prec"
+                   unit="" />
+            <field id="zdqhaze_haze"
+                   long_name="zdqhaze_haze"
+                   unit="" />
+            <field id="zdqconv_prec"
+                   long_name="zdqconv_prec"
+                   unit="" />
+
+        </field_group>
+
+        <!--Spectral IR 3D variables-->
+        <field_group id="spectral_IR_3D" grid_ref="grid_IR_3D">
+              <field id="OLR3D"
+                     long_name="OLR(lon,lat,band)"
+                     unit="W/m^2/cm^-1" />
+        </field_group>
+
+        <!-- SPectral VI 3D variables-->
+        <field_group id="spectral_VI_3D" grid_ref="grid_VI_3D">
+              <field id="OSR3D"
+                     long_name="OSR(lon,lat,band"
+                     unit="W/m^2/cm^-1"/>
+              <field id="GSR3D"
+                     long_name="GSR(lon,lat,band)"
+                     unit="w/m^2/cm^-1"/>
+        </field_group>
+    </field_definition>
+
+
Index: trunk/LMDZ.PLUTO/deftank/dynamico/file_def_dynamico.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/file_def_dynamico.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/file_def_dynamico.xml	(revision 3544)
@@ -0,0 +1,79 @@
+<!-- =========================================================================================================== -->
+<!-- file_def_dynamico                                                                                           -->
+<!-- Definition of output diagnostic files (not including restart files)                                         -->
+<!-- =========================================================================================================== -->
+<context id="icosagcm" >
+
+
+  <field_definition>
+
+    <field_group id="H&S_scalar" >
+      <field field_ref="timestep" />
+      <field field_ref="preff"/>
+      <field field_ref="ap" />
+      <field field_ref="bp" />
+      <field field_ref="mid_ap" />
+      <field field_ref="mid_bp" />
+    </field_group>
+
+    <field_group id="H&S" operation="instant" >
+      <field field_ref="ps" />
+      <field field_ref="phis" operation="once" />
+      <field field_ref="geopot" />
+      <field field_ref="ulon"/>
+      <field field_ref="ulat"/>
+      <field field_ref="uz"/>
+      <field field_ref="omega" />
+      <field field_ref="p"  />
+      <field field_ref="temp"  />
+      <field field_ref="u850" />
+      <field field_ref="v850" />
+      <field field_ref="w850" />
+      <field field_ref="t850" />
+      <field field_ref="omega850" />
+      <field field_ref="u500" />
+      <field field_ref="v500" />
+      <field field_ref="w500" />
+      <field field_ref="t500" />
+      <field field_ref="omega500" />
+    </field_group>
+
+  </field_definition>
+
+
+
+  <file_definition>
+
+    <file id="daily_output" convention="CF" enabled="false" output_freq="1d" sync_freq="1d" output_level="10" timeseries="none" description="daily output for Held & Suarez test case" >
+
+      <field_group group_ref="H&S_scalar"/>
+      <field_group group_ref="H&S" domain_ref="regular_one_degree"              freq_op="1d" expr="@this_ref"/>
+
+      <variable name="model" type="string" > dynamico </variable>
+      <variable name="test_case" type="string" > held & Suarez </variable>
+      <variable name="horizontal_resolution" type="string" > 2 degree native (grid points : 40x40x39) </variable>
+      <variable name="levels" type="string" > L39 </variable>
+      <variable name="grid" type="string" > hex </variable>
+      <variable name="equation" type="string" > hydro </variable>
+      <variable name="time_frequency" type="string" > 1day </variable>
+
+    </file>
+
+    <file id="daily_output_native" convention="CF" enabled="false" output_freq="1d" sync_freq="1d" output_level="10" timeseries="none" description="daily output for Held & Suarez test case" >
+
+      <field_group group_ref="H&S_scalar"/>
+      <field_group group_ref="H&S"          freq_op="1d" expr="@this_ref"/>
+
+      <variable name="model" type="string" > dynamico </variable>
+      <variable name="test_case" type="string" > held & Suarez </variable>
+      <variable name="horizontal_resolution" type="string" > 2 degree native (grid points : 40x40x39) </variable>
+      <variable name="levels" type="string" > L39 </variable>
+      <variable name="grid" type="string" > hex </variable>
+      <variable name="equation" type="string" > hydro </variable>
+      <variable name="time_frequency" type="string" > 1day </variable>
+
+    </file>
+
+  </file_definition>
+
+</context>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/file_def_physics.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/file_def_physics.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/file_def_physics.xml	(revision 3544)
@@ -0,0 +1,123 @@
+<!-- =================================================================== -->
+<!-- file_def_physics.xml                                                -->
+<!-- Definition of output files for Generic PCM physics                  -->
+<!-- =================================================================== -->
+
+    <file_definition>
+
+        <!-- Instantaneous outputs; Here output_freq in physics time steps -->
+        <!--
+           1 ts == 1 physical ts
+           if physical ts is half a day,
+           10ts   below means every 5 days
+           2000ts below means every 1000 days
+          -->
+        <file id="histins"
+              name="Xhistins"
+              output_freq="1ts"
+              sync_freq="1ts"
+              type="one_file"
+              time_units="days"
+              enabled="true">
+
+
+            <!-- VARS 0D -->
+            <field_group operation="instant"
+                         grid_ref="scalarpoint"
+                         freq_op="1ts">
+                <field field_ref="Ls" />
+            </field_group>
+
+            <!--<field_group domain_ref="dom_glo"> -->
+            <!--<field_group grid_ref="grid_2D_out">-->
+            <!-- toggle domain_ref to output on native or lon-lat domain -->
+
+              <!-- VARS 2D -->
+              <field_group operation="instant" prec="4"
+                           grid_ref="grid_2D_out"
+                           freq_op="1ts">
+                  <field field_ref="area" operation="once" />
+                  <field field_ref="ps" enabled="true" />
+                  <field field_ref="ISR" enabled="true" />
+                  <field field_ref="OLR" enabled="true" />
+                  <field field_ref="ASR" enabled="true" />
+              </field_group>
+
+              <!-- VARS 3D -->
+              <field_group operation="instant"
+                           grid_ref="grid_3D_out"
+                           freq_op="1ts">
+                  <field field_ref="u" />
+                  <field field_ref="v" />
+                  <field field_ref="omega"/>
+                  <field field_ref="temperature" />
+                  <field field_ref="n2" />
+                  <field field_ref="ch4_gas" />
+                  <field field_ref="ch4_ice" />
+                  <field field_ref="co_gas" />
+                  <field field_ref="co_ice" />
+                  <field field_ref="haze" />
+
+                  <!--field field_ref="h2o_vap" />
+                  <field field_ref="h2o_ice" />
+                  <field field_ref="w_plm" />
+                  <field field_ref="detr" />
+                  <field field_ref="entr" /-->
+              </field_group>
+
+            <!--</field_group>-->
+        </file>
+       <!--XspecIR-->
+      <file id="specIR"
+            name="XspecIR"
+            output_freq="400ts"
+            type="one_file"
+            time_units="days"
+            enabled="false">
+          <!--Var 1D ?-->
+          <field_group operation="instant"
+                        grid_ref="grid_IR"
+                        freq_op="1ts">
+              <field field_ref="IR_Bandwidth" operation="once"/>
+          </field_group>
+          <!--Var 2D-->
+          <field_group operation="instant" prec="4"
+                        grid_ref="grid_2D_out"
+                        freq_op="1ts">
+              <field field_ref="area" operation="once" />
+          </field_group>
+          <!--Var 3D-->
+          <field_group operation="instant"
+                        grid_ref="grid_IR_3D_out"
+                        freq_op="1ts">
+              <field field_ref="OLR3D" />
+          </field_group>
+      </file>
+       <!--XspecVI-->
+      <file id="specVI"
+            name="XspecVI"
+            output_freq="400ts"
+            type="one_file"
+            time_units="days"
+            enabled="true">
+          <!--Var 1D -->
+          <field_group operation="instant"
+                        grid_ref="grid_VI"
+                        freq_op="1ts">
+              <field field_ref="VI_Bandwidth" operation="once"/>
+          </field_group>
+          <!--Var 2D-->
+          <field_group operation="instant" prec="4"
+                        grid_ref="grid_2D_out"
+                        freq_op="1ts">
+              <field field_ref="area" operation="once" />
+          </field_group>
+          <!--Var 3D-->
+          <field_group operation="instant"
+                        grid_ref="grid_VI_3D_out"
+                        freq_op="1ts">
+              <field field_ref="OSR3D" />
+              <field field_ref="GSR3D" />
+          </field_group>
+      </file>
+    </file_definition>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/iodef.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/iodef.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/iodef.xml	(revision 3544)
@@ -0,0 +1,37 @@
+
+<?xml version="1.0"?>
+<simulation>
+
+  <context  id="xios">
+    <variable_definition>
+      <variable id="print_file" type="bool"> true </variable>
+      <!--variable id="min_buffer_size" type="double">1000000</variable-->
+      <variable id="buffer_size_factor" type="double"> 4   </variable>
+      <variable id="recv_field_timeout" type="double"> 100 </variable>
+      <variable_group id="buffer">
+      </variable_group>
+
+      <variable_group id="parameters" >
+        <variable id="info_level"   type="int">  100   </variable>
+        <variable id="xios_stack"   type="bool"> true  </variable>
+        <variable id="system_stack" type="bool"> false </variable>
+        <variable id="using_server" type="bool"> false </variable>
+      </variable_group>
+    </variable_definition>
+  </context>
+
+  <context id="icosagcm_input"  src="./context_input_dynamico.xml" />
+  <context id="icosagcm"        src="./context_dynamico.xml" />
+  <context id="icosagcm"        src="./file_def_dynamico.xml" />
+  <!-- <context id="icosagcm"        src="./nudging_dynamico.xml" /> -->
+  <!-- <context id="icosagcm"        src="./tracers_dynamico.xml" /> -->
+
+  <!-- For running with LMDZ, following line is added by dynamicolmdz.driver while using libIGCM:   -->
+  <context id="LMDZ" src="./context_pcm_physics.xml" />
+
+
+</simulation>
+
+<!-- This file was generated by : python iodef.xml.py -->
+<!-- For help : python iodef.xml.py -h -->
+
Index: trunk/LMDZ.PLUTO/deftank/dynamico/nudging_dynamico.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/nudging_dynamico.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/nudging_dynamico.xml	(revision 3544)
@@ -0,0 +1,229 @@
+<!-- =========================================================================================================== -->
+<!-- nudging_dynamico.xml                                                                                           -->
+<!-- Definition of nudging input/output                                          -->
+<!-- =========================================================================================================== -->
+<context id="icosagcm" >
+
+
+  <!-- output forcing field for nudging  -->
+
+  <file_definition>
+
+      <file id="nudging_forcing" enabled="false" output_freq="3h" >
+         <field_group operation="instant" domain_ref="domain_forcing" freq_offset="0ts">
+            <field field_ref="ulon_forcing" name="u"/>
+            <field field_ref="ulat_forcing" name="v"/>
+            <field field_ref="temp_forcing" name="t"/>
+            <field field_ref="ps_forcing" name="sp" />
+            <field field_ref="p_forcing" name="pressure"/>
+            <field field_ref="H2O-g_forcing"  name="q"/>
+            <field field_ref="H2O-l_forcing"  name="clwc"/>
+            <field field_ref="H2O-s_forcing"  name="ciwc"/>
+         </field_group>
+      </file > 
+
+   </file_definition>
+   
+   <field_definition>
+ 
+      <field_group domain_ref="i">
+        <field id="ulon_forcing"  axis_ref="lev"/>
+        <field id="ulat_forcing"  axis_ref="lev"/>
+        <field id="temp_forcing"  axis_ref="lev"/>
+        <field id="ps_forcing" />
+        <field id="p_forcing" axis_ref="lev"/>
+        <field id="H2O-g_forcing"   axis_ref="lev"/>
+        <field id="H2O-l_forcing"   axis_ref="lev"/>
+        <field id="H2O-s_forcing"   axis_ref="lev"/>
+      </field_group>   
+   
+   </field_definition>
+
+   <domain_definition>
+     <domain id="domain_forcing" type="rectilinear" >
+       <generate_rectilinear_domain id="nudging_zone"  />
+       <interpolate_domain order="2"/>
+     </domain>
+   </domain_definition>
+
+
+
+
+<!-- =========================================================================================================== -->
+<!-- nudging configuration -->
+
+  <file_definition>
+     
+    <file_group id="nudging_files" enabled="false">  <!-- enabled will be set from model in nudging case --> 
+    
+       <file id="nudging_out" enabled="false" output_freq="1h" sync_freq="1ts" output_level="10" > 
+          <field_group freq_offset="0ts" scale_factor="_reset_" add_offset="_reset_">
+            <field field_ref="ulon_nudged" scale_factor="_reset_" add_offset="_reset_"/>
+            <field field_ref="ulat_nudged" scale_factor="_reset_" add_offset="_reset_"/>
+            <field field_ref="temp_nudged"  scale_factor="_reset_" add_offset="_reset_"/>
+            <field field_ref="ps_nudged" scale_factor="_reset_" add_offset="_reset_"/>
+          </field_group>
+        </file>
+
+       <file id="nudging_test" enabled="false" output_freq="1ts" sync_freq="1ts" output_level="10" > 
+          <field id="coeff_i" domain_ref="i" operation="instant" enabled="true" prec="8"/>
+          <field id="ps_nudged_out" domain_ref="i" operation="instant" enabled="true" prec="8"/>
+          <field id="temp_nudged_out" domain_ref="i" axis_ref="lev" operation="instant" enabled="true" prec="8" />
+       </file>
+
+
+       <file id="nudging_in" name="nudging_forcing" enabled="false" output_freq="1h" mode="read" record_offset="1" time_counter_name="time" cyclic="true">
+         <field_group   operation="instant" freq_offset="1ts" >
+            <field id="ps_nudged_read"      name="sp"     domain_ref="domain_nudged" />
+            <field id="p_nudged_read"       name="pressure"     domain_ref="domain_nudged" axis_ref="axis_nudged" enabled="false" />
+            <field id="ulon_nudged_read"    name="u"      domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="ulat_nudged_read"    name="v"      domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="temp_nudged_read"    name="t"      domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="H2O-g_nudged_read"   name="q"     domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="H2O-l_nudged_read"   name="clwc"  domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="H2O-s_nudged_read"   name="ciwc"  domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="q_nudged_read"       name="q"    grid_ref="grid_q_nudged" enabled="false"/>
+         </field_group>
+       </file>
+
+       <file id="nudging_in0" name="nudging_forcing" enabled="false" output_freq="1000y" mode="read" record_offset="0" time_counter_name="time">
+         <field_group   operation="once" freq_offset="1ts" >
+            <field id="ps_nudged_read0"      name="sp"           domain_ref="domain_nudged" />
+            <field id="p_nudged_read0"       name="pressure"     domain_ref="domain_nudged" axis_ref="axis_nudged" enabled="false"/>
+            <field id="ulon_nudged_read0"    name="u"            domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="ulat_nudged_read0"    name="v"            domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="temp_nudged_read0"    name="t"            domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="H2O-g_nudged_read0"   name="q"            domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="H2O-l_nudged_read0"   name="clwc"         domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="H2O-s_nudged_read0"   name="ciwc"         domain_ref="domain_nudged" axis_ref="axis_nudged" />
+            <field id="q_nudged_read0"       name="q"           grid_ref="grid_q_nudged" enabled="false"/>
+         </field_group>
+      </file>
+   
+     </file_group>
+   
+   </file_definition>
+
+
+
+   <field_definition>
+
+      <field id="temp_nudged_horiz_interp" field_ref="temp_nudged_read"  domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="ulon_nudged_horiz_interp" field_ref="ulon_nudged_read"  domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="ulat_nudged_horiz_interp" field_ref="ulat_nudged_read"  domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="q_nudged_horiz_interp"    field_ref="q_nudged_read"     grid_ref="grid_q_from_nudged_horiz_interp"/>
+      <field id="H2O-g_nudged_horiz_interp"    field_ref="H2O-g_nudged_read"     domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="H2O-l_nudged_horiz_interp"    field_ref="H2O-l_nudged_read"     domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="H2O-s_nudged_horiz_interp"    field_ref="H2O-s_nudged_read"     domain_ref="from_nudged" axis_ref="axis_nudged"/>
+
+      <field_group id="nudging_fields" read_access="false"> <!-- read_access will be set from model  -->
+         <field id="ps_nudged"    field_ref="ps_nudged_read" domain_ref="from_nudged"/>
+
+         <field id="p_nudged_horiz_interp" field_ref="p_nudged_read" domain_ref="from_nudged" axis_ref="axis_nudged" read_access="false" /> <!-- read_access will be set from model  -->
+
+         <field id="temp_nudged"  field_ref="temp_nudged_horiz_interp"  domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="ulon_nudged"  field_ref="ulon_nudged_horiz_interp"  domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="ulat_nudged"  field_ref="ulat_nudged_horiz_interp"  domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="ulat_nudged"  field_ref="ulat_nudged_horiz_interp"  domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="H2O-g_nudged" field_ref="H2O-g_nudged_horiz_interp" domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="H2O-l_nudged" field_ref="H2O-l_nudged_horiz_interp" domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="H2O-s_nudged" field_ref="H2O-s_nudged_horiz_interp" domain_ref="from_nudged" axis_ref="from_nudged"/>
+         <field id="q_nudged"    field_ref="q_nudged_horiz_interp"     grid_ref="grid_q_from_nudged"/>
+      </field_group>
+
+      <field id="p_nudged"  domain_ref="i" axis_ref="lev" /> <!--sent from model-->    
+ 
+ 
+      <field id="temp_nudged_horiz_interp0" field_ref="temp_nudged_read0"  domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="ulon_nudged_horiz_interp0" field_ref="ulon_nudged_read0"  domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="ulat_nudged_horiz_interp0" field_ref="ulat_nudged_read0"  domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="q_nudged_horiz_interp0"    field_ref="q_nudged_read0"     grid_ref="grid_q_from_nudged_horiz_interp"/>
+      <field id="H2O-g_nudged_horiz_interp0"    field_ref="H2O-g_nudged_read0"     domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="H2O-l_nudged_horiz_interp0"    field_ref="H2O-l_nudged_read0"     domain_ref="from_nudged" axis_ref="axis_nudged"/>
+      <field id="H2O-s_nudged_horiz_interp0"    field_ref="H2O-s_nudged_read0"     domain_ref="from_nudged" axis_ref="axis_nudged"/>
+
+      <field_group id="nudging_fields0" read_access="false"> <!-- read_access will be set from model  -->
+         <field id="ps_nudged0"    field_ref="ps_nudged_read0" domain_ref="from_nudged"/>
+
+         <field id="p_nudged_horiz_interp0" field_ref="p_nudged_read0" domain_ref="from_nudged" axis_ref="axis_nudged" read_access="false"/> <!-- read_access will be set from model  -->
+       
+         <field id="temp_nudged0" field_ref="temp_nudged_horiz_interp0"  domain_ref="from_nudged" axis_ref="from_nudged0"/>
+         <field id="ulon_nudged0" field_ref="ulon_nudged_horiz_interp0"  domain_ref="from_nudged" axis_ref="from_nudged0" build_workflow_graph="true" />
+         <field id="ulat_nudged0" field_ref="ulat_nudged_horiz_interp0"  domain_ref="from_nudged" axis_ref="from_nudged0"/>
+         <field id="q_nudged0"    field_ref="q_nudged_horiz_interp0"     grid_ref="grid_q_from_nudged0"/>
+         <field id="H2O-g_nudged0" field_ref="H2O-g_nudged_horiz_interp0" domain_ref="from_nudged" axis_ref="from_nudged0"/>
+         <field id="H2O-l_nudged0" field_ref="H2O-l_nudged_horiz_interp0" domain_ref="from_nudged" axis_ref="from_nudged0"/>
+         <field id="H2O-s_nudged0" field_ref="H2O-s_nudged_horiz_interp0" domain_ref="from_nudged" axis_ref="from_nudged0"/>
+      </field_group>
+
+      <field id="p_nudged0"  domain_ref="i" axis_ref="lev" /> <!--sent from model-->    
+ 
+ 
+  </field_definition>  
+
+
+
+   
+   <domain_definition>
+     <domain id="domain_nudged" type="rectilinear">
+       <generate_rectilinear_domain/>
+     </domain>
+     
+    <domain id="from_nudged" domain_ref="i">
+       <interpolate_domain order="2" />
+    </domain>
+
+   </domain_definition>
+   
+   <axis_definition>
+     <axis id="axis_nudged" axis_type="Z" convert_from_factor="100" /> <!-- ERA5 files are in milibar => pascal --> 
+
+     <axis id="nudged_vert_interp_src_dest"  axis_ref="lev">
+       <interpolate_axis order="1" coordinate_src="p_nudged_horiz_interp" coordinate_dst="p_nudged" />
+     </axis>   
+
+     <axis id="nudged_vert_interp_src_dest0"  axis_ref="lev">
+       <interpolate_axis order="1" coordinate_src="p_nudged_horiz_interp0" coordinate_dst="p_nudged0" />
+     </axis>   
+
+     <axis id="nudged_vert_interp_dest"  axis_ref="lev">
+       <interpolate_axis order="1" coordinate_dst="p_nudged" />
+     </axis> 
+
+
+     <axis id="from_nudged"  axis_ref="axis_nudged" /> <!-- axis_ref will be set from model -->
+
+     <axis id="from_nudged0" axis_ref="axis_nudged" /> <!-- axis_ref will be set from model -->   
+     
+   </axis_definition>
+
+   
+   <grid_definition>
+   
+     <grid id="grid_q_nudged">
+       <domain domain_ref="domain_nudged" />
+       <axis axis_ref="axis_nudged" />
+       <axis axis_ref="nq" />
+     </grid>
+
+    <grid id="grid_q_from_nudged_horiz_interp">
+       <domain domain_ref="from_nudged" />
+       <axis axis_ref="axis_nudged" />
+       <axis axis_ref="nq" />
+     </grid>
+ 
+     <grid id="grid_q_from_nudged">
+       <domain domain_ref="from_nudged" />
+       <axis axis_ref="from_nudged" />
+       <axis axis_ref="nq" />
+     </grid>
+
+     <grid id="grid_q_from_nudged0">
+       <domain domain_ref="from_nudged" />
+       <axis axis_ref="from_nudged0" />
+       <axis axis_ref="nq" />
+     </grid>
+   
+   </grid_definition>
+    
+</context>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/run.def
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/run.def	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/run.def	(revision 3544)
@@ -0,0 +1,89 @@
+#---------------- Mesh ----------------
+
+# Number of subdivisions on a main triangle : integer (default=40)
+nbp = 40
+
+# Number of vertical layers : integer (default=19)
+llm = 27
+
+# Vertical grid : [std|ncar|ncarl30] (default=std)
+# disvert = std
+disvert = plugin
+hybrid = .false.
+
+# Mesh optimisation : number of iterations : integer (default=0)
+optim_it = 1000
+
+# Sub splitting of main rhombus : integer (default=1)
+nsplit_i = 10
+nsplit_j = 10
+
+#number of openmp task on vertical level
+omp_level_size=1
+
+#---------------- Numerics ----------------
+
+# Advection called every itau_adv time steps : integer (default=2)
+itau_adv = 1
+
+# Time step in s : real (default=480)
+# dt = 720
+# Alternative to specifying "dt", specify number of steps per day : day_step
+day_step = 8000
+
+# Number of tracers : integer (default=1)
+nqtot = 7
+
+#---------------- Time and output ----------------
+
+# Time style : [none|dcmip] (default=dcmip)
+time_style = none
+
+# Run length in s : real (default=??)
+# run_length = 100
+# Alternative to specifying "run_length", specify number of days to run : ndays
+ndays=1
+
+# Interval in s between two outputs : integer (default=??)
+write_period = 1000
+
+
+
+#---------------- Planet ----------------
+
+INCLUDEDEF=pluto_const.def
+
+#---------------- Physical parameters ----------------
+
+# Initial state :
+#   [jablonowsky06|academic|dcmip[1-4]|heldsz|dcmip2_schaer_noshear] (default=jablonowsky06)
+etat0 = start_file
+etat0_start_file_colocated=true
+
+# Physics package : [none|held_suarez|dcmip] (default=none)
+# physics = held_suarez
+# physics = none
+physics = phys_external
+
+startphy_file = true
+# startphy_file = false
+
+# Dissipation time for grad(div) : real (default=5000)
+tau_graddiv = 18000
+
+# Exponent of grad(div) disspation : integer (default=1)
+nitergdiv = 2
+
+# Dissipation time for curl(curl) : real (default=5000)
+tau_gradrot = 18000
+
+# Exponent of curl(curl) disspation : integer (default=1)
+nitergrot = 2
+
+# Dissipation time for div(grad) : real (default=5000)
+tau_divgrad = 18000
+
+# Exponent of div(grad) disspation : integer (default=1)
+niterdivgrad = 2
+
+INCLUDEDEF=callphys.def
Index: trunk/LMDZ.PLUTO/deftank/dynamico/run.def.no_startfi
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/run.def.no_startfi	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/run.def.no_startfi	(revision 3544)
@@ -0,0 +1,90 @@
+#---------------- Mesh ----------------
+
+# Number of subdivisions on a main triangle : integer (default=40)
+nbp = 40
+
+# Number of vertical layers : integer (default=19)
+llm = 19
+
+# Vertical grid : [std|ncar|ncarl30] (default=std)
+# disvert = std
+disvert = plugin
+hybrid = .false.
+
+# Mesh optimisation : number of iterations : integer (default=0)
+optim_it = 1000
+
+# Sub splitting of main rhombus : integer (default=1)
+nsplit_i = 10
+nsplit_j = 10
+
+#number of openmp task on vertical level
+omp_level_size=1
+
+#---------------- Numerics ----------------
+
+# Advection called every itau_adv time steps : integer (default=2)
+itau_adv = 1
+
+# Time step in s : real (default=480)
+# dt = 720
+# Alternative to specifying "dt", specify number of steps per day : day_step
+day_step = 12000
+
+# Number of tracers : integer (default=1)
+nqtot = 7
+
+#---------------- Time and output ----------------
+
+# Time style : [none|dcmip] (default=dcmip)
+time_style = none
+
+# Run length in s : real (default=??)
+run_length = 1500
+# Alternative to specifying "run_length", specify number of days to run : ndays
+# ndays=1
+
+# Interval in s between two outputs : integer (default=??)
+write_period = 1000
+
+
+
+#---------------- Planet ----------------
+
+INCLUDEDEF=pluto_const.def
+
+#---------------- Physical parameters ----------------
+
+# Initial state :
+#   [jablonowsky06|academic|dcmip[1-4]|heldsz|dcmip2_schaer_noshear] (default=jablonowsky06)
+etat0 = isothermal
+etat0_isothermal_temp=50
+etat0_ps_white_noise=0.01
+etat0_theta_rhodz_white_noise=0.01
+
+# Physics package : [none|held_suarez|dcmip] (default=none)
+# physics = held_suarez
+# physics = none
+physics = phys_external
+
+startphy_file = false
+
+# Dissipation time for grad(div) : real (default=5000)
+tau_graddiv = 18000
+
+# Exponent of grad(div) disspation : integer (default=1)
+nitergdiv = 2
+
+# Dissipation time for curl(curl) : real (default=5000)
+tau_gradrot = 18000
+
+# Exponent of curl(curl) disspation : integer (default=1)
+nitergrot = 2
+
+# Dissipation time for div(grad) : real (default=5000)
+tau_divgrad = 18000
+
+# Exponent of div(grad) disspation : integer (default=1)
+niterdivgrad = 2
+
+INCLUDEDEF=callphys.def
Index: trunk/LMDZ.PLUTO/deftank/dynamico/sponge_dynamico.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/sponge_dynamico.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/sponge_dynamico.xml	(revision 3544)
@@ -0,0 +1,110 @@
+<!-- =========================================================================================================== -->
+<!-- nudging_dynamico.xml                                                                                           -->
+<!-- Definition of sponge layer zonal mean                                          -->
+<!-- =========================================================================================================== -->
+<context id="icosagcm" >
+
+
+   <axis_definition>
+     
+     <axis id="reduced_sponge" > <!-- n_glo is set from model -->
+       <reduce_domain  operation="average" direction="iDir"/>
+     </axis>
+
+     <axis id="lev_sponge" axis_type="Z" /> <!-- n_glo is set from model -->
+     
+    </axis_definition>
+    
+    <grid_definition>
+
+      <grid id="sponge_i">
+        <domain domain_ref="i" />
+        <axis axis_ref="lev_sponge"/>
+      </grid>
+   
+      <grid id="to_sponge">
+        <domain id="to_sponge" type="rectilinear" > <!-- ni_glo and nj_glo are set from model -->
+          <generate_rectilinear_domain />
+          <interpolate_domain order="1"/>
+        </domain> 
+        <axis axis_ref="lev_sponge"/>
+      </grid>
+         
+      <grid id="reduced_sponge">
+        <axis axis_ref="reduced_sponge"/>
+        <axis axis_ref="lev_sponge"/>
+      </grid>
+      
+      <grid id="from_sponge">
+        <domain domain_ref="i">
+          <interpolate_domain order="1"/>
+        </domain> 
+        <axis axis_ref="lev_sponge"/>
+      </grid>
+      
+    </grid_definition>
+    
+    <field_definition>
+      <field id="ulon_sponge"                                        grid_ref="sponge_i"/>
+      <field id="ulon_sponge_interp" field_ref="ulon_sponge"         grid_ref="to_sponge" />
+      <field id="ulon_sponge_reduced" field_ref="ulon_sponge_interp" grid_ref="reduced_sponge" read_access="false"/>
+      <field id="ulon_sponge_mean"                                   grid_ref="to_sponge" />
+      <field id="ulon_from_sponge" field_ref="ulon_sponge_mean"      grid_ref="from_sponge" read_access="false"/>
+
+      <field id="ulat_sponge"                                        grid_ref="sponge_i"/>
+      <field id="ulat_sponge_interp" field_ref="ulat_sponge"         grid_ref="to_sponge" />
+      <field id="ulat_sponge_reduced" field_ref="ulat_sponge_interp" grid_ref="reduced_sponge" read_access="false"/>
+      <field id="ulat_sponge_mean"                                   grid_ref="to_sponge" />
+      <field id="ulat_from_sponge" field_ref="ulat_sponge_mean"      grid_ref="from_sponge" read_access="false"/>
+
+      <field id="theta_sponge"                                        grid_ref="sponge_i"/>
+      <field id="theta_sponge_interp" field_ref="theta_sponge"         grid_ref="to_sponge" />
+      <field id="theta_sponge_reduced" field_ref="theta_sponge_interp" grid_ref="reduced_sponge" read_access="false"/>
+      <field id="theta_sponge_mean"                                   grid_ref="to_sponge" />
+      <field id="theta_from_sponge" field_ref="theta_sponge_mean"      grid_ref="from_sponge" read_access="false"/>
+
+      <field id="rhodz_sponge"                                        grid_ref="sponge_i"/>
+      <field id="rhodz_sponge_interp" field_ref="rhodz_sponge"         grid_ref="to_sponge" />
+      <field id="rhodz_sponge_reduced" field_ref="rhodz_sponge_interp" grid_ref="reduced_sponge" read_access="false"/>
+
+     <field id="dulon_sponge" domain_ref="i" axis_ref="lev" />
+     <field id="dulat_sponge" domain_ref="i" axis_ref="lev" />
+     <field id="dtheta_sponge" domain_ref="i" axis_ref="lev" />
+ 
+
+    </field_definition>
+
+    <file_definition>
+      <file id="check_sponge" output_freq="1ts" type="one_file" sync_freq="1ts" enabled="false" >
+        <field_group  prec="8">
+          <field field_ref="ulon_sponge" operation="instant" enabled="true"/>
+          <field field_ref="ulon_sponge_interp" operation="instant" enabled="true"/>
+          <field field_ref="ulon_sponge_reduced" operation="instant" enabled="true"/>
+          <field field_ref="ulon_sponge_mean" operation="instant" enabled="true"/>
+          <field field_ref="ulon_from_sponge" operation="instant" enabled="true"/>
+
+          <field field_ref="ulat_sponge" operation="instant" enabled="true"/>
+          <field field_ref="ulat_sponge_interp" operation="instant" enabled="true"/>
+          <field field_ref="ulat_sponge_reduced" operation="instant" enabled="true"/>
+          <field field_ref="ulat_sponge_mean" operation="instant" enabled="true"/>
+          <field field_ref="ulat_from_sponge" operation="instant" enabled="true"/>
+
+          <field field_ref="theta_sponge" operation="instant" enabled="true"/>
+          <field field_ref="theta_sponge_interp" operation="instant" enabled="true"/>
+          <field field_ref="theta_sponge_reduced" operation="instant" enabled="true"/>
+          <field field_ref="theta_sponge_mean" operation="instant" enabled="true"/>
+          <field field_ref="theta_from_sponge" operation="instant" enabled="true"/>
+          
+          <field field_ref="rhodz_sponge" operation="instant" enabled="true"/>
+          <field field_ref="rhodz_sponge_interp" operation="instant" enabled="true"/>
+          <field field_ref="rhodz_sponge_reduced" operation="instant" enabled="true"/>
+
+         <field field_ref="dulon_sponge" operation="instant" enabled="true"/>
+         <field field_ref="dulat_sponge" operation="instant" enabled="true"/>
+         <field field_ref="dtheta_sponge" operation="instant" enabled="true"/>
+
+        </field_group>
+      </file>
+    </file_definition>
+    
+</context>
Index: trunk/LMDZ.PLUTO/deftank/dynamico/tracer.def
===================================================================
--- trunk/LMDZ.PLUTO/deftank/dynamico/tracer.def	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/dynamico/tracer.def	(revision 3544)
@@ -0,0 +1,11 @@
+&version=1.0
+&dynamico
+default parent=air scheme=vanleer default_init_value=0 phases=g
+n2 default_init_value=0.95
+co_ice
+co_gas default_init_value=0.005
+ch4_ice
+ch4_gas default_init_value=0.05
+prec_haze
+haze
+
Index: trunk/LMDZ.PLUTO/deftank/iodef.xml
===================================================================
--- trunk/LMDZ.PLUTO/deftank/iodef.xml	(revision 3544)
+++ trunk/LMDZ.PLUTO/deftank/iodef.xml	(revision 3544)
@@ -0,0 +1,28 @@
+<!-- xml example for XIOS outputs in LMDZ dynamics (no DYNAMICO) -->
+<?xml version="1.0"?>
+<simulation>
+        <context  id="xios">
+            <variable_definition>
+                <!-- set print_file to true to have XIOS write its
+                     outputs in separate files -->
+                <variable id="print_file" type="bool"> true </variable>
+
+                <variable id="buffer_size_factor" type="double">4</variable>
+                <variable_group id="buffer">
+                buffer_size = 85000000
+                buffer_server_factor_size = 2
+                </variable_group>
+
+                <variable_group id="parameters" >
+                    <!-- set using_server to true to run with XIOS
+                         in detached server/client mode -->
+                    <variable id="using_server" type="bool">false</variable>
+                    <!-- info_level is the verbosity level of XIOS
+                         0 for no messages; 100 for lots -->
+                    <variable id="info_level" type="int">100</variable>
+                </variable_group>
+            </variable_definition>
+        </context>
+
+        <context id="LMDZ" src="./context_pcm_physics.xml"/>
+</simulation>
Index: trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3542)
+++ trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3544)
@@ -89,4 +89,5 @@
       use wxios, only: wxios_context_init, xios_context_finalize
 #endif
+      USE mod_grid_phy_lmdz, ONLY: grid_type,unstructured,regular_lonlat
       use write_output_mod, only: write_output
 
@@ -952,4 +953,5 @@
       !    albedo(i,:) = albedo(1,:)
       ! enddo
+      ! AF24: TODO check albedo has been initialized here
 
       if (firstcall.and.callsoil) then
@@ -2066,6 +2068,10 @@
 
       if(lastcall) then
-         ztime_fin = ptime + ptimestep/(float(iphysiq)*daysec)
-
+         IF (grid_type==unstructured) THEN !IF DYNAMICO
+            ! DYNAMICO: no need to add a dynamics time step to ztime_fin
+            ztime_fin = ptime
+         ELSE ! LMDZ
+            ztime_fin = ptime + ptimestep/(float(iphysiq)*daysec)
+         ENDIF ! of IF (grid_type==unstructured)
          !! Update surface ice distribution to iterate to steady state if requested
          !! AF24: removed
