Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/context_input_orchidee.xml
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/context_input_orchidee.xml	(revision 7259)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/context_input_orchidee.xml	(revision 7260)
@@ -8,5 +8,5 @@
 <!-- Recent change:  added block to read params_sp_mip.nc (Salma Tafasca and Agnes Ducharne, November 2020)      -->
 <!--                                                                                                             --> 
-<!-- $HeadURL$                -->
+<!-- $HeadURL$          -->
 <!-- $Date$                                                      -->
 <!-- $Revision$                                                                                           -->
@@ -28,35 +28,35 @@
 
     <file id="soils_param_file" mode="read" output_freq="1y" enabled="true">
-      <field id="soilcolor" name="soilcolor" domain_ref="soil" operation="instant" freq_offset="1ts"/>
-      <field id="soiltext" name="soiltext" domain_ref="soil" operation="instant" freq_offset="1ts"/>
+      <field id="soilcolor" name="soilcolor" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts"/>
+      <field id="soiltext" name="soiltext" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts"/>
     </file>
 
     <!-- Default file name: params_sp_mip.nc for both all soil hydraulic parameters. -->
     <file id="soilparam_file" mode="read" output_freq="1y" enabled="true">
-      <field id="soilks" name="soilks" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
-      <field id="soilnvan" name="soilnvan" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
-      <field id="soilavan" name="soilavan" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
-      <field id="soilmcr" name="soilmcr" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
-      <field id="soilmcs" name="soilmcs" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
-      <field id="soilmcfc" name="soilmcfc" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
-      <field id="soilmcw" name="soilmcw" domain_ref="soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilks" name="soilks" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilnvan" name="soilnvan" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilavan" name="soilavan" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilmcr" name="soilmcr" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilmcs" name="soilmcs" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilmcfc" name="soilmcfc" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
+      <field id="soilmcw" name="soilmcw" domain_ref="dom_file_soil" operation="instant" freq_offset="1ts" > this &gt; $min_sechiba ? 1e10 : 0 </field>
     </file>
 
     
     <file  id="PFTmap_file"  mode="read" output_freq="1y">
-      <field id="maxvegetfrac_read"  name="maxvegetfrac" domain_ref="pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? this : 0 </field>
-      <field id="maxvegetfrac_mask"  name="maxvegetfrac" domain_ref="pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? 1 : 0 </field>
+      <field id="maxvegetfrac_read"  name="maxvegetfrac" domain_ref="dom_file_pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? this : 0 </field>
+      <field id="maxvegetfrac_mask"  name="maxvegetfrac" domain_ref="dom_file_pft" axis_ref="nvm" operation="instant"  freq_offset="1ts"> this &lt; 1e10 ? 1 : 0 </field>
     </file>
     
     <file id="topography_file"  mode="read" output_freq="1y">
-      <!--      <field id="pente"  domain_ref="topo"  operation="instant"  freq_offset="1ts" > (this &gt; 1e10) ? 1 : this </field>     ==> In reference, missing value are use for computing, this probably wrong -->
-      <field id="pente_read"       name="pente" domain_ref="topo"  operation="instant"  freq_offset="1ts" > ((this/$slope_noreinf) &lt; 1)? this/$slope_noreinf : 1 </field>
-      <field id="mask_pente_read"  name="pente" domain_ref="topo"  operation="instant"  freq_offset="1ts" > (this &lt; $min_sechiba)? 0 : 1                         </field>  <!-- create mask -->
+      <!--      <field id="pente"  domain_ref="dom_file_topo"  operation="instant"  freq_offset="1ts" > (this &gt; 1e10) ? 1 : this </field>     ==> In reference, missing value are use for computing, this probably wrong -->
+      <field id="pente_read"       name="pente" domain_ref="dom_file_topo"  operation="instant"  freq_offset="1ts" > ((this/$slope_noreinf) &lt; 1)? this/$slope_noreinf : 1 </field>
+      <field id="mask_pente_read"  name="pente" domain_ref="dom_file_topo"  operation="instant"  freq_offset="1ts" > (this &lt; $min_sechiba)? 0 : 1                         </field>  <!-- create mask -->
     </file>
     
     <file id="albedo_file" mode="read" output_freq="1y">
-      <field id="mask_alb_read"    name="mask"       domain_ref="albedo"  operation="instant"  freq_offset="1ts" />
-      <field id="bg_alb_vis_read"  name="bg_alb_vis" domain_ref="albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
-      <field id="bg_alb_nir_read"  name="bg_alb_nir" domain_ref="albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
+      <field id="mask_alb_read"    name="mask"       domain_ref="dom_file_albedo"  operation="instant"  freq_offset="1ts" />
+      <field id="bg_alb_vis_read"  name="bg_alb_vis" domain_ref="dom_file_albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
+      <field id="bg_alb_nir_read"  name="bg_alb_nir" domain_ref="dom_file_albedo"  operation="instant"  freq_offset="1ts" >  mask_alb_read &gt; 0.99 ? this : $missing_value  </field>
     </file>
     
@@ -67,55 +67,31 @@
 
     <file id="fertilizer_file" mode="read" output_freq="1y" cyclic="true">
-      <field id="N_qt_OTHER_year_read"  name="N_qt_OTHER_year" domain_ref="fertilizer" operation="instant"  freq_offset="1ts"/>
-      <field id="N_qt_WRICE_year_read"  name="N_qt_WRICE_year" domain_ref="fertilizer" operation="instant"  freq_offset="1ts"/>
+      <field id="N_qt_OTHER_year_read"  name="N_qt_OTHER_year" domain_ref="dom_file_fertilizer" operation="instant"  freq_offset="1ts"/>
+      <field id="N_qt_WRICE_year_read"  name="N_qt_WRICE_year" domain_ref="dom_file_fertilizer" operation="instant"  freq_offset="1ts"/>
     </file>
     
     <file id="bbg_clim_file" mode="read" output_freq="1y" cyclic="true">
-      <field id="flx_co2_bbg_year_read"  name="flx_co2_bbg_year" domain_ref="bbg_clim" operation="instant"  freq_offset="1ts"/>
+      <field id="flx_co2_bbg_year_read"  name="flx_co2_bbg_year" domain_ref="dom_file_bbg_clim" operation="instant"  freq_offset="1ts"/>
     </file>
     
     <file id="reftemp_file" mode="read" output_freq="1y" cyclic="true">
-      <field id="reftemp_read"  name="temperature" domain_ref="reftemp" operation="instant"  freq_offset="1ts"/>
+      <field id="reftemp_read"  name="temperature" domain_ref="dom_file_reftemp" operation="instant"  freq_offset="1ts"/>
     </file>
     
     <file id="woodharvest_file" mode="read" output_freq="1y" cyclic="true">
-      <field id="woodharvest_read"  name="woodharvest" domain_ref="woodharvest" operation="instant"  freq_offset="1ts"/>
-    </file>
-    
-    
-    
-    <file id="interp_diag" output_freq="1ts" sync_freq="1ts" enabled=".FALSE.">
-      <field_group domain_ref="domain_landpoints" operation="once" default_value="9.96921e+36">
-        <field id="interp_diag_aveget" name="aveget" />
-        <field id="interp_diag_vegetrefrac" name="vegetrefrac" axis_ref="nvm"/>
-        <field id="interp_diag_atext" name="atext" />
-        <field id="interp_diag_soilclass" name="soilclass"     axis_ref="ncsm"/>
-        <field id="interp_diag_clayfraction" name="clayfraction"  />
-        <field id="interp_diag_aslope" name="aslope"    />
-        <field id="interp_diag_reinf_slope" name="reinf_slope"  />
-	
-        <field id="interp_diag_alb_vis" name="alb_vis"  />
-        <field id="interp_diag_alb_nir" name="alb_nir"  />
-	
-        <field id="interp_diag_N_qt_WRICE_year" name="wrice"  />
-        <field id="interp_diag_N_qt_OTHER_year" name="other"  />
-        <field id="interp_diag_flx_co2_bbg_year" name="co2_bbg"  />
-	
-      </field_group>
-      <field id="interp_diag_lai" grid_ref="from_lai" name="lai"  operation="once" default_value="9.96921e+36" enabled="false"/>
-      <field field_ref="mask_alb_read" operation="once" default_value="9.96921e+36"  freq_offset="0ts" enabled="false"/>
-    </file>
-
-
+      <field id="woodharvest_read"  name="woodharvest" domain_ref="dom_file_woodharvest" operation="instant"  freq_offset="1ts"/>
+    </file>
+    
+       
     <file id="nudge_moistc" name="nudge_moistc" type="one_file" mode="read" output_freq="1d">
-      <field  id="moistc_in" name="moistc" operation="instant" grid_ref="grid_inputfile_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
-      <field  id="mask_moistc_in" name="moistc" operation="instant" grid_ref="grid_inputfile_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
+      <field  id="moistc_in" name="moistc" operation="instant" grid_ref="grid_file_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
+      <field  id="mask_moistc_in" name="moistc" operation="instant" grid_ref="grid_file_moistc" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
     </file>
     
     <file id="nudge_snow" name="nudge_snow" type="one_file" mode="read" output_freq="1d">
-      <field  id="snowdz_in" name="snowdz" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
-      <field  id="snowrho_in" name="snowrho" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
-      <field  id="snowtemp_in" name="snowtemp" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
-      <field  id="mask_snow_in" name="snowdz" operation="instant" grid_ref="grid_inputfile_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
+      <field  id="snowdz_in" name="snowdz" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
+      <field  id="snowrho_in" name="snowrho" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
+      <field  id="snowtemp_in" name="snowtemp" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : this </field>
+      <field  id="mask_snow_in" name="snowdz" operation="instant" grid_ref="grid_file_snow" freq_offset="1ts" > (this &gt; 1e10) ? 0 : 1 </field>
     </file>
     
@@ -132,17 +108,17 @@
 
       <field_group id="soil_color" enabled="false">
-        <field id="soilcolor0" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 0 </field>
-        <field id="soilcolor1" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 1 </field>
-        <field id="soilcolor2" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 2 </field>
-        <field id="soilcolor3" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 3 </field>
-        <field id="soilcolor4" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 4 </field>
-        <field id="soilcolor5" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 5 </field>
-        <field id="soilcolor6" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 6 </field>
-        <field id="soilcolor7" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 7 </field>
-        <field id="soilcolor8" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 8 </field>
-        <field id="soilcolor9" field_ref="soilcolor" domain_ref="from_soil" > soilcolor == 9 </field>
+        <field id="soilcolor0" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 0 </field>
+        <field id="soilcolor1" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 1 </field>
+        <field id="soilcolor2" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 2 </field>
+        <field id="soilcolor3" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 3 </field>
+        <field id="soilcolor4" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 4 </field>
+        <field id="soilcolor5" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 5 </field>
+        <field id="soilcolor6" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 6 </field>
+        <field id="soilcolor7" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 7 </field>
+        <field id="soilcolor8" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 8 </field>
+        <field id="soilcolor9" field_ref="soilcolor" domain_ref="dom_from_soil" > soilcolor == 9 </field>
       </field_group>
 
-      <field_group id="soil_text" field_ref="soiltext" domain_ref="from_soil" enabled="true" read_access="true">
+      <field_group id="soil_text" field_ref="soiltext" domain_ref="dom_from_soil" enabled="true" read_access="true">
         <field id="soiltext1"  > soiltext == 1 </field>
         <field id="soiltext2"  > soiltext == 2 </field>
@@ -157,32 +133,32 @@
         <field id="soiltext11" > soiltext == 11 </field>
         <field id="soiltext12" > soiltext == 12 </field>
+        <field id="soiltext13" > soiltext == 13 </field>
       </field_group>
       
-
-      <field id="frac_veget"      field_ref="maxvegetfrac_read" domain_ref="from_pft" read_access="true" enabled="true" />
-      <field id="frac_veget_frac" field_ref="maxvegetfrac_mask" domain_ref="from_pft" read_access="true" enabled="true" />
-
-      <field id="slope_tmp"           field_ref="pente_read"       domain_ref="from_topo"                                  />
-      <field id="frac_slope_interp"   field_ref="mask_pente_read"  domain_ref="from_topo" read_access="true" enabled="true"/>
-      <field id="reinf_slope_interp"                               domain_ref="from_topo" read_access="true" enabled="true"> (frac_slope_interp &gt; $min_sechiba ) ? 1-slope_tmp/(frac_slope_interp+1e-100) : $slope_default </field>
-
-      <field id="bg_alb_vis_tmp"   field_ref="bg_alb_vis_read"  domain_ref="from_albedo"  />
+      <field id="frac_veget"      field_ref="maxvegetfrac_read" domain_ref="dom_from_pft" read_access="true" enabled="true" />
+      <field id="frac_veget_frac" field_ref="maxvegetfrac_mask" domain_ref="dom_from_pft" read_access="true" enabled="true" />
+
+      <field id="slope_tmp"           field_ref="pente_read"       domain_ref="dom_from_topo"                                  />
+      <field id="frac_slope_interp"   field_ref="mask_pente_read"  domain_ref="dom_from_topo" read_access="true" enabled="true"/>
+      <field id="reinf_slope_interp"                               domain_ref="dom_from_topo" read_access="true" enabled="true"> (frac_slope_interp &gt; $min_sechiba ) ? 1-slope_tmp/(frac_slope_interp+1e-100) : $slope_default </field>
+
+      <field id="bg_alb_vis_tmp"   field_ref="bg_alb_vis_read"  domain_ref="dom_from_albedo"  />
       <field id="bg_alb_vis_interp" field_ref="bg_alb_vis_tmp"  read_access="true" enabled="true" > this == $missing_value ? $albbg_vis_default : this </field>
 
-      <field id="bg_alb_nir_tmp"    field_ref="bg_alb_nir_read"  domain_ref="from_albedo"  />
+      <field id="bg_alb_nir_tmp"    field_ref="bg_alb_nir_read"  domain_ref="dom_from_albedo"  />
       <field id="bg_alb_nir_interp" field_ref="bg_alb_nir_tmp"  read_access="true"  enabled="true" >  this == $missing_value ? $albbg_nir_default : this </field>
       
-      <field id="lai_tmp"          field_ref="lai_read"      grid_ref="from_lai" />
-      <field id="frac_lai_interp"  field_ref="mask_lai_read" grid_ref="from_lai" read_access="true" enabled="true" />
+      <field id="lai_tmp"          field_ref="lai_read"      grid_ref="grid_from_lai" />
+      <field id="frac_lai_interp"  field_ref="mask_lai_read" grid_ref="grid_from_lai" read_access="true" enabled="true" />
       <field id="lai_interp"       field_ref="lai_tmp"                           read_access="true" enabled="true"  >  lai_tmp/(frac_lai_interp+1e-100) </field>  <!-- renormalize -->
       
-      <field id="N_qt_WRICE_year_interp"  field_ref="N_qt_WRICE_year_read"  domain_ref="from_fertilizer" read_access="true" enabled="true" />
-      <field id="N_qt_OTHER_year_interp"  field_ref="N_qt_OTHER_year_read"  domain_ref="from_fertilizer" read_access="true" enabled="true" />
-      
-      <field id="flx_co2_bbg_year_interp"  field_ref="flx_co2_bbg_year_read"  domain_ref="from_bbg_clim" read_access="true" enabled="true" />
-
-      <field id="reftemp_interp"  field_ref="reftemp_read"  domain_ref="from_reftemp" read_access="true" enabled="true" />
-
-      <field id="woodharvest_interp"  field_ref="woodharvest_read"  domain_ref="from_woodharvest" read_access="true" enabled="true" />
+      <field id="N_qt_WRICE_year_interp"  field_ref="N_qt_WRICE_year_read"  domain_ref="dom_from_fertilizer" read_access="true" enabled="true" />
+      <field id="N_qt_OTHER_year_interp"  field_ref="N_qt_OTHER_year_read"  domain_ref="dom_from_fertilizer" read_access="true" enabled="true" />
+      
+      <field id="flx_co2_bbg_year_interp"  field_ref="flx_co2_bbg_year_read"  domain_ref="dom_from_bbg_clim" read_access="true" enabled="true" />
+
+      <field id="reftemp_interp"  field_ref="reftemp_read"  domain_ref="dom_from_reftemp" read_access="true" enabled="true" />
+
+      <field id="woodharvest_interp"  field_ref="woodharvest_read"  domain_ref="dom_from_woodharvest" read_access="true" enabled="true" />
       
     </field_group>
@@ -217,86 +193,98 @@
   <!-- =========================================================================================================== -->
   <!-- Definition of a horizontal domain for each input file                                                       -->
+  <!-- 2 different domains are specified for each input file X: dom_file_X and dom_from_X                          -->
+  <!--                                                                                                             -->
+  <!-- dom_file_X is the horizontal original grid in the input file. In this domain, specifications to help XIOS   -->
+  <!-- read the grid can be added such as generate_rectilinear_domain                                              -->
+  <!--                                                                                                             -->
+  <!-- dom_from_X describes how to make the interpolation from the file to the model grid. This domain contains    -->
+  <!-- the interpolation methode specific to the file.                                                             -->
+  <!--                                                                                                             -->
+  <!-- If the variable contains more dimensions than the horizontal domain and 1 axis, 2 grids must be specified:  -->
+  <!-- One for the orignial grid in the input file and one for the interpolation to model grid. These two grids    -->
+  <!-- uses 2 domains specified as above.                                                                          -->
+  <!-- We here suppose that the interpolation is only done on the horizontal domain                                -->
   <!-- =========================================================================================================== -->
 
   <domain_definition>
 
-    <domain id="domain_inputfile_moistc" type="rectilinear">
+    <domain id="dom_file_moistc" type="rectilinear">
       <generate_rectilinear_domain />
     </domain>
     
-    <domain id="domain_inputfile_snow" type="rectilinear">
+    <domain id="dom_file_snow" type="rectilinear">
       <generate_rectilinear_domain />
     </domain>
     
-    <domain id="from_soil" domain_ref="domain_landpoints">
+    <domain id="dom_from_soil" domain_ref="domain_landpoints">
       <interpolate_domain order="1" renormalize="false"/>
     </domain>
-    
-    <domain id="from_pft" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="from_topo" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="from_albedo" domain_ref="domain_landpoints">
+
+    <domain id="dom_from_pft" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_from_topo" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_from_albedo" domain_ref="domain_landpoints">
       <interpolate_domain order="1" renormalize="true" detect_missing_value="true"/>
     </domain>
     
-    <domain id="from_lai" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="from_bbg_clim" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="from_fertilizer" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="from_reftemp" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="from_woodharvest" domain_ref="domain_landpoints">
-      <interpolate_domain order="1" renormalize="false" />
-    </domain>
-    
-    <domain id="soil" type="rectilinear">
+    <domain id="dom_from_lai" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_from_bbg_clim" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_from_fertilizer" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_from_reftemp" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_from_woodharvest" domain_ref="domain_landpoints">
+      <interpolate_domain order="1" renormalize="false" />
+    </domain>
+    
+    <domain id="dom_file_soil" type="rectilinear">
       <!-- generate_rectilinear_domain bounds_lon_start="-180" bounds_lon_end="180" bounds_lat_start="-90" bounds_lat_end="90"/-->
       <generate_rectilinear_domain bounds_lon_start="-180" bounds_lon_end="180" bounds_lat_start="90" bounds_lat_end="-90"/>
     </domain>
     
-    <domain id="pft" type="rectilinear">
-      <generate_rectilinear_domain/>
-    </domain>
-    
-    <domain id="topo" type="rectilinear">
-      <generate_rectilinear_domain/>
-    </domain>
-    
-    <domain id="albedo" type="rectilinear">
+    <domain id="dom_file_pft" type="rectilinear">
+      <generate_rectilinear_domain/>
+    </domain>
+    
+    <domain id="dom_file_topo" type="rectilinear">
+      <generate_rectilinear_domain/>
+    </domain>
+    
+    <domain id="dom_file_albedo" type="rectilinear">
       <generate_rectilinear_domain />
     </domain>
     
-    <domain id="lai" type="rectilinear">
-      <generate_rectilinear_domain/>
-    </domain>
-    
-    <domain id="bbg_clim" type="rectilinear">
-      <generate_rectilinear_domain/>
-    </domain>
-    
-    <domain id="fertilizer" type="rectilinear">
-      <generate_rectilinear_domain/>
-    </domain>
-
-    <domain id="reftemp" type="rectilinear">
-      <generate_rectilinear_domain/>
-    </domain>
-
-    <domain id="woodharvest" type="rectilinear">
+    <domain id="dom_file_lai" type="rectilinear">
+      <generate_rectilinear_domain/>
+    </domain>
+    
+    <domain id="dom_file_bbg_clim" type="rectilinear">
+      <generate_rectilinear_domain/>
+    </domain>
+    
+    <domain id="dom_file_fertilizer" type="rectilinear">
+      <generate_rectilinear_domain/>
+    </domain>
+
+    <domain id="dom_file_reftemp" type="rectilinear">
+      <generate_rectilinear_domain/>
+    </domain>
+
+    <domain id="dom_file_woodharvest" type="rectilinear">
       <generate_rectilinear_domain/>
     </domain>
@@ -306,22 +294,22 @@
 
   <!-- =========================================================================================================== -->
-  <!-- Definition of input grids                                                                        -->
+  <!-- Definition of input grids and interpolated grids                                                            -->
   <!-- =========================================================================================================== -->
 
   <grid_definition>
 
-    <grid id="grid_inputfile_moistc">
-      <domain domain_ref="domain_inputfile_moistc"/>
+    <grid id="grid_file_moistc">
+      <domain domain_ref="dom_file_moistc"/>
       <axis axis_ref="nslm" />
       <axis axis_ref="nstm" />
     </grid>  
 
-    <grid id="grid_inputfile_snow">
-      <domain domain_ref="domain_inputfile_snow"/>
+    <grid id="grid_file_snow">
+      <domain domain_ref="dom_file_snow"/>
       <axis axis_ref="nsnow" />
     </grid>  
     
-    <grid id="from_lai">
-      <domain domain_ref="from_lai" />
+    <grid id="grid_from_lai">
+      <domain domain_ref="dom_from_lai" />
       <axis axis_ref="nvm" />
       <axis axis_ref="lai_time" />
@@ -329,5 +317,5 @@
     
     <grid id="lai">
-      <domain domain_ref="lai" />
+      <domain domain_ref="dom_file_lai" />
       <axis axis_ref="nvm" />
       <axis axis_ref="lai_time" />
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/field_def_orchidee.xml
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/field_def_orchidee.xml	(revision 7259)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_xml/field_def_orchidee.xml	(revision 7260)
@@ -359,4 +359,18 @@
     <field id="mrro_lut" name="mrroLut" long_name="Total runoff from land use tile" unit="kg m-2 s-1" grid_ref="grid_nlut"/>
     <field id="gpplut" name="gppLut" long_name="Gross primary productivity on Landuse tiles" unit="kgC m-2 s-1" grid_ref="grid_nlut" />
+    <field id="interp_diag_aveget" name="interp_diag_aveget" long_name="aveget read from file" operation="once" freq_offset="0ts"/>
+    <field id="interp_diag_vegetrefrac" name="interp_diag_vegetrefrac" axis_ref="nvm" long_name="vegetfrac read from file" operation="once" freq_offset="0ts"/>
+    <field id="interp_diag_atext" name="interp_diag_atext" long_name="axtext read from file" operation="once" freq_offset="0ts"/>
+    <field id="interp_diag_soilclass" name="interp_diag_soilclass"     axis_ref="ncsm" long_name="soilclass read from file" operation="once" freq_offset="0ts"/>
+    <field id="interp_diag_clayfraction" name="interp_diag_clayfraction" long_name="clayfraction read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_aslope" name="interp_diag_aslope" long_name="aslope read from file" operation="once" freq_offset="0ts"   />
+    <field id="interp_diag_reinf_slope" name="interp_diag_reinf_slope" long_name="reinf_slope read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_alb_vis" name="interp_diag_alb_vis" long_name="alb_vis read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_alb_nir" name="interp_diag_alb_nir" long_name="alb_nir read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_N_qt_WRICE_year" name="interp_diag_N_qt_WRICE_year" long_name="N_qt_WRICE_year read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_N_qt_OTHER_year" name="interp_diag_N_qt_OTHER_year" long_name="N_qt_OTHER_year read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_flx_co2_bbg_year" name="interp_diag_flx_co2_bbg_year" long_name="flx_co2_bbg_year read from file" operation="once" freq_offset="0ts" />
+    <field id="interp_diag_lai" grid_ref="grid_from_lai" name="interp_diag_lai" long_name="lai read from file" operation="once" freq_offset="0ts"/>
+
     <field id="znetco2" name="znetco2" long_name="Sum CO2 flux over PFTs (variable in interface to LMDZ)" unit="kgC m-2 s-1" />
     <field id="zcarblu" name="zcarblu" long_name="Land Cover Change CO2 flux (variable in interface to LMDZ)" unit="kgC m-2 s-1" />
