Index: /XIOS/trunk/generic_testcase/iodef.xml
===================================================================
--- /XIOS/trunk/generic_testcase/iodef.xml	(revision 1921)
+++ /XIOS/trunk/generic_testcase/iodef.xml	(revision 1922)
@@ -8,5 +8,5 @@
       <variable id="timestep"> 1h </variable>
       <variable id="domain"> lmdz </variable>
-      <variable id="domain_mask"> true </variable>
+      <variable id="domain_mask"> false </variable>
       <variable id="axis_mask"> false </variable>
       <variable id="init_field2D"> rank </variable>
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/iodef.xml
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/iodef.xml	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/iodef.xml	(revision 1922)
@@ -8,5 +8,5 @@
       <variable id="timestep"> 1h </variable>
       <variable id="domain"> XIOS::ATMdomain </variable>
-      <variable id="domain_mask"> true </variable>
+      <variable id="domain_mask"> false </variable>
       <variable id="axis_mask"> false </variable>
       <variable id="init_field2D"> rank </variable>
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/checkfile.def
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/checkfile.def	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/checkfile.def	(revision 1922)
@@ -1,12 +1,7 @@
 #all
 
-atm_output.nc
+atm_output_domain_transformation_reorder.nc
+atm_output_domain_transformation_extract.nc
+atm_output_domain_transformation_zoom.nc
+atm_output_domain_transformation_interpolate.nc
 
-atm_output_expand.nc
-
-
-atm_output_extract.nc
-
-atm_output_interpolate.nc
-
-atm_output_zoom.nc
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/context_atm.xml
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/context_atm.xml	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/test_domain_algo/context_atm.xml	(revision 1922)
@@ -7,12 +7,13 @@
     <domain id="domain" />
     <domain id="other_domain" />
-  </domain>
-  
+    <domain id="square_domain" ni_glo="36" nj_glo="36" type="rectilinear"/>
+  </domain_definition>
+
   <axis_definition>
     <axis id="axis" />
-    <axis id="axis_dup" />
     <axis id="domain_X" />
     <axis id="domain_Y" />
     <axis id="ensemble" />
+
 
     <axis id="other_axis" />
@@ -22,16 +23,4 @@
   </axis_definition>
 
-  <axis_definition>
-    <axis id="axis_zoom" axis_ref="axis">
-        <zoom_axis begin="0" n="5"/>
-    </axis>
-    <axis id="domain_X_zoom" axis_ref="domain_X">
-        <zoom_axis begin="0" n="1"/>
-    </axis>
-    <axis id="domain_Y_zoom" axis_ref="domain_Y">
-        <zoom_axis begin="3" n="1"/>
-    </axis>
-  </axis_definition>
-
   <scalar_definition>
     <scalar id="scalar" /> 
@@ -54,11 +43,52 @@
       <axis axis_ref="axis" />
     </grid>
+   
+    <grid id="grid2D_zoom">
+      <domain domain_ref="domain">
+      <zoom_domain ni="10" ibegin="15" nj="16" jbegin="0"/>
+      </domain> 
+    </grid>
+
+    <grid id="grid2D_extract">
+      <domain domain_ref="domain">
+      <zoom_domain ni="10" ibegin="15" nj="16" jbegin="0"/>
+      </domain> 
+    </grid>
+
+    <grid id="grid3D_zoom">
+      <domain domain_ref="domain">
+      <zoom_domain ni="10" ibegin="15" nj="16" jbegin="0"/>
+      </domain> 
+      <axis axis_ref="axis" />
+    </grid>
+
+    <grid id="grid3D_extract">
+      <domain domain_ref="domain">
+      <zoom_domain ni="10" ibegin="15" nj="16" jbegin="0"/>
+      </domain> 
+      <axis axis_ref="axis" />
+    </grid>
+
+    <grid id="grid2D_square">
+      <domain domain_ref="square_domain">
+      <generate_rectilinear_domain lon_start="-175"/>
+      <interpolate_domain />
+      </domain> 
+    </grid>
+
+    <grid id="grid2D_reorder">
+      <domain domain_ref="domain">
+      <reorder_domain invert_lat="true" />
+      </domain> 
+    </grid>
+
+
+
+
+
+
 
     <grid id="grid_X">
       <axis axis_ref="domain_X" />
-    </grid>
-
-     <grid id="grid_X_zoom">
-      <axis axis_ref="domain_X_zoom" />
     </grid>
 
@@ -140,19 +170,4 @@
     </grid>
 
-
-    <grid id="grid_XY_zoom_Y">
-      <axis axis_ref="domain_X" />
-      <axis axis_ref="domain_Y_zoom" />
-    </grid>
-
-    <grid id="grid_XY_zoom_X">
-      <axis axis_ref="domain_X_zoom" />
-      <axis axis_ref="domain_Y" />
-
-    </grid>
-
- 
- 
- 
  
  
@@ -251,82 +266,22 @@
     </grid>
 
-
-
-
-
-
-
-
-
-
-    <grid id="grid_vert_reduce">
-      <domain domain_ref="domain" />
-      <scalar >
-        <reduce_axis operation="sum" />
-      </scalar>
-    </grid>
-
-    <grid id="grid_horiz_reduce">
-      <scalar >
-        <reduce_domain operation="sum" />
-      </scalar>
-      <axis axis_ref="axis" />
-    </grid>
-      
-    <grid id="grid_zoom_vert">
-      <domain domain_ref="domain" />
-      <axis axis_ref="axis_zoom" />
-    </grid>
-
-    <grid id="grid_zoom_vert_sum">
-      <scalar >
-        <reduce_domain operation="sum" />
-      </scalar>
-      <axis axis_ref="axis_zoom" />
-    </grid>
-
-   <grid id="grid_lat">
-       <axis axis_ref="domain_Y">
-         <reduce_domain direction="iDir" operation="sum"/> 
-       </axis>
-       <axis axis_ref="axis" />
-    </grid>
-    
-
-    <grid id="grid3D_invert">
-      <domain domain_ref="domain">
-        <reorder_domain invert_lat="true" />
-      </domain>
-      <axis axis_ref="axis" />
-    </grid>
-    
-    <grid id="grid2D_invert">
-      <domain domain_ref="domain">
-        <reorder_domain invert_lat="true" shift_lon_fraction="0.5" min_lon="0" max_lon="360"/>
-      </domain>
-    </grid>
-
-    
+   
   </grid_definition>
   
   
   <field_definition level="1" prec="8" operation="instant" freq_op="1ts" enabled=".true." default_value="1.e+20" detect_missing_value="true">
-    <field id="field2D" grid_ref="grid2D" build_workflow_graph="false" />
-    <field id="field3D" grid_ref="grid3D" build_workflow_graph="true"  />
+    <field id="field2D" grid_ref="grid2D" />
+    <field id="field3D" grid_ref="grid3D"  />
     <field id="pressure" grid_ref="grid3D"  />
     <field id="field3D_recv" read_access="true" grid_ref="grid3D"  field_ref="field3D" />
     <field id="field3D_resend" grid_ref="grid3D" />
 
-    <field id="field_X" grid_ref="grid_X" build_workflow_graph="false" />
-    <field id="field_Y" grid_ref="grid_Y" build_workflow_graph="false" />
-    <field id="field_Z" grid_ref="grid1D" build_workflow_graph="false" />
+    <field id="field_X" grid_ref="grid_X" />
+    <field id="field_Y" grid_ref="grid_Y" />
+    <field id="field_Z" grid_ref="grid1D" />
     <field id="field_XY" grid_ref="grid_XY" />
     <field id="field_XYZ" grid_ref="grid_XYZ" />
     <field id="field_XZ" grid_ref="grid_XZ" />
     <field id="field_YZ" grid_ref="grid_YZ" />
-
-    <field id="field_zoom_vert" field_ref="field3D" grid_ref="grid_zoom_vert"  />
-    <field id="field_zoom_vert_sum" field_ref="field_zoom_vert" grid_ref="grid_zoom_vert_sum"  />
-
 
 
@@ -346,6 +301,4 @@
 
 
-
-
     <field id="other_field2D" grid_ref="other_grid2D"/>
     <field id="other_field3D" grid_ref="other_grid3D"  />
@@ -376,69 +329,82 @@
     <field id="other_field_YZW" grid_ref="other_grid_YZW" />
 
-
-
-
     
     
   </field_definition>
+
+
+
+<!-- implementation of specifics test case -->
+<!-- simplest test cases : output data to file -->
+
   
 
   <file_definition  type="one_file" >
-    
-    <file id="atm_output" output_freq="1ts" type="one_file" enabled="true">
-       <!-- <field id="id_fieldXY" field_ref="field_XY" operation="once" enabled="true"/> -->
-       <field field_ref="field_X" operation="instant" enabled="true"/>
-    </file>
-
-    <file id="atm_output_expand" output_freq="1ts" enabled="true">
-       <field field_ref="field_X" operation="instant" enabled="true"/>
-    </file>
-
-    <file id="atm_output_extract" output_freq="1ts" enabled="true">
-       <field field_ref="field_X" operation="instant" enabled="true"/>
-    </file>
-
-    <file id="atm_output_interpolate" output_freq="1ts" enabled="true">
-       <field field_ref="field_X" operation="instant" enabled="true"/>
-    </file>
-
-    <file id="atm_output_zoom" output_freq="1ts" enabled="true">
-       <field field_ref="field_X" operation="instant" enabled="true"/>
-    </file>
-
-
-    <file id="atm_output_other" output_freq="1ts"  enabled="false">
-       <field field_ref="other_field3D" enabled="false"/>
-       <field field_ref="other_field2D" enabled="true"/> 
-       <field field_ref="other_field_X" enabled="false"/>
-       <field field_ref="other_field_Y" enabled="false"/>
-       <field field_ref="other_field_XY" enabled="false"/>
-       <field field_ref="other_field_Z" enabled="false"/>
-       <field field_ref="other_field_XYZ" enabled="false"/>
-       <field field_ref="other_field_XZ" enabled="false"/>
-       <field field_ref="other_field_YZ" enabled="false"/>
+    <file id="atm_output_domain_transformation_zoom" output_freq="12ts" type="one_file" enabled="true">
+       <field field_ref="field2D" />
+       <field field_ref="field3D" />
+       <field id="field2D_zoom" field_ref="field2D" grid_ref="grid2D_zoom" />
+       <field id="field3D_zoom" field_ref="field3D" grid_ref="grid3D_zoom" />
+    </file>
+
+    <file id="atm_output_domain_transformation_extract" output_freq="12ts" type="one_file" enabled="true">
+       <field field_ref="field2D" />
+       <field field_ref="field3D" />
+       <field id="field2D_extract" field_ref="field2D" grid_ref="grid2D_extract" />
+       <field id="field3D_extract" field_ref="field3D" grid_ref="grid3D_extract" />
+    </file>
+
+    <file id="atm_output_domain_transformation_interpolate" output_freq="12ts" type="one_file" enabled="true">
+       <field field_ref="field2D" />
+       <field id="field2D_interpolate" field_ref="field2D" grid_ref="grid2D_square" />
+    </file>
+
+   <file id="atm_output_domain_transformation_reorder" output_freq="12ts" type="one_file" enabled="true">
+       <field field_ref="field2D" />
+       <field id="field2D_reorder" field_ref="field2D" grid_ref="grid2D_reorder" />
+    </file>
+
+
+
+    <file id="atm_output" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="field3D" />
+       <field field_ref="field2D" /> 
+       <field field_ref="field_X" />
+       <field field_ref="field_Y" />
+       <field field_ref="field_XY" />
+       <field field_ref="field_Z" />
+       <field field_ref="field_XYZ" />
+       <field field_ref="field_XZ" />
+       <field field_ref="field_YZ" />
+       <field field_ref="pressure"  /> 
+       <field field_ref="field3D_resend" />
+    </file>
+
+    <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="other_field3D" />
+       <field field_ref="other_field2D" /> 
+       <field field_ref="other_field_X" />
+       <field field_ref="other_field_Y" />
+       <field field_ref="other_field_XY" />
+       <field field_ref="other_field_Z" />
+       <field field_ref="other_field_XYZ" />
+       <field field_ref="other_field_XZ" />
+       <field field_ref="other_field_YZ" />
+       <field field_ref="other_pressure"  /> 
+       <field field_ref="other_field3D_resend" />
     </file>
 
     <file id="atm_output_W" output_freq="1ts" enabled="false">
-       <field field_ref="field3D_W" enabled="true"/>
-       <field field_ref="field2D_W" enabled="true"/> 
-       <field field_ref="field_XW" enabled="true"/>
-       <field field_ref="field_YW" enabled="true"/>
-       <field field_ref="field_XYW" enabled="true"/>
-       <field field_ref="field_ZW" enabled="true"/>
-       <field field_ref="field_XYZW" enabled="true"/>
-       <field field_ref="field_XZW" enabled="true"/>
-       <field field_ref="field_YZW" enabled="true"/>
-    </file>
-    
-
-    <file id="atm_output_reorder" output_freq="1ts" enabled="false" >
-       <field field_ref="field2D" grid_ref="grid2D_invert" enabled="true"/>
-    </file>
-    
-    <file id="test_grid_lat" output_freq="1ts" enabled="false">
-      <field field_ref="field3D" operation="instant" />
-      <field id="field_reduce_lat" field_ref="field3D" grid_ref="grid_lat" operation="instant" />
-    </file>
+       <field field_ref="field3D_W" />
+       <field field_ref="field2D_W" /> 
+       <field field_ref="field_XW" />
+       <field field_ref="field_YW" />
+       <field field_ref="field_XYW" />
+       <field field_ref="field_ZW" />
+       <field field_ref="field_XYZW" />
+       <field field_ref="field_XZW" />
+       <field field_ref="field_YZW" />
+    </file>
+    
     
   </file_definition>
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/test_function/checkfile.def
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/test_function/checkfile.def	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/test_function/checkfile.def	(revision 1922)
@@ -1,7 +1,11 @@
 
 #atm_output.nc
-atm_output_max.nc
-atm_output_min.nc
-atm_output_sum.nc
-atm_output_ave.nc
+atm_output_reduction_1D.nc
+atm_output_reduction_2D.nc
+atm_output_reduction_3D.nc
+atm_output_reduction_ref.nc
+#atm_output_max.nc
+#atm_output_min.nc
+#atm_output_sum.nc
+#atm_output_ave.nc
 #atm_output_ensemble.nc
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/test_function/context_atm.xml
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/test_function/context_atm.xml	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/test_function/context_atm.xml	(revision 1922)
@@ -7,12 +7,12 @@
     <domain id="domain" />
     <domain id="other_domain" />
-  </domain>
-  
+  </domain_definition>
+
   <axis_definition>
     <axis id="axis" />
-    <axis id="axis_dup" />
     <axis id="domain_X" />
     <axis id="domain_Y" />
     <axis id="ensemble" />
+
 
     <axis id="other_axis" />
@@ -22,10 +22,4 @@
   </axis_definition>
 
-  <axis_definition>
-    <axis id="axis_zoom" axis_ref="axis">
-        <zoom_axis begin="0" n="5"/>
-    </axis>
-  </axis_definition>
-
   <scalar_definition>
     <scalar id="scalar" /> 
@@ -48,4 +42,7 @@
       <axis axis_ref="axis" />
     </grid>
+   
+
+
 
     <grid id="grid_X">
@@ -130,7 +127,4 @@
     </grid>
 
- 
- 
- 
  
  
@@ -229,82 +223,22 @@
     </grid>
 
-
-
-
-
-
-
-
-
-
-    <grid id="grid_vert_reduce">
-      <domain domain_ref="domain" />
-      <scalar >
-        <reduce_axis operation="sum" />
-      </scalar>
-    </grid>
-
-    <grid id="grid_horiz_reduce">
-      <scalar >
-        <reduce_domain operation="sum" />
-      </scalar>
-      <axis axis_ref="axis" />
-    </grid>
-      
-    <grid id="grid_zoom_vert">
-      <domain domain_ref="domain" />
-      <axis axis_ref="axis_zoom" />
-    </grid>
-
-    <grid id="grid_zoom_vert_sum">
-      <scalar >
-        <reduce_domain operation="sum" />
-      </scalar>
-      <axis axis_ref="axis_zoom" />
-    </grid>
-
-   <grid id="grid_lat">
-       <axis axis_ref="domain_Y">
-         <reduce_domain direction="iDir" operation="sum"/> 
-       </axis>
-       <axis axis_ref="axis" />
-    </grid>
-    
-
-    <grid id="grid3D_invert">
-      <domain domain_ref="domain">
-        <reorder_domain invert_lat="true" />
-      </domain>
-      <axis axis_ref="axis" />
-    </grid>
-    
-    <grid id="grid2D_invert">
-      <domain domain_ref="domain">
-        <reorder_domain invert_lat="true" shift_lon_fraction="0.5" min_lon="0" max_lon="360"/>
-      </domain>
-    </grid>
-
-    
+   
   </grid_definition>
   
   
   <field_definition level="1" prec="8" operation="instant" freq_op="1ts" enabled=".true." default_value="1.e+20" detect_missing_value="true">
-    <field id="field2D" grid_ref="grid2D" build_workflow_graph="false" />
-    <field id="field3D" grid_ref="grid3D" build_workflow_graph="true"  />
+    <field id="field2D" grid_ref="grid2D" />
+    <field id="field3D" grid_ref="grid3D"  />
     <field id="pressure" grid_ref="grid3D"  />
     <field id="field3D_recv" read_access="true" grid_ref="grid3D"  field_ref="field3D" />
     <field id="field3D_resend" grid_ref="grid3D" />
 
-    <field id="field_X" grid_ref="grid_X" build_workflow_graph="false" />
-    <field id="field_Y" grid_ref="grid_Y" build_workflow_graph="false" />
-    <field id="field_Z" grid_ref="grid1D" build_workflow_graph="false" />
+    <field id="field_X" grid_ref="grid_X" />
+    <field id="field_Y" grid_ref="grid_Y" />
+    <field id="field_Z" grid_ref="grid1D" />
     <field id="field_XY" grid_ref="grid_XY" />
     <field id="field_XYZ" grid_ref="grid_XYZ" />
     <field id="field_XZ" grid_ref="grid_XZ" />
     <field id="field_YZ" grid_ref="grid_YZ" />
-
-    <field id="field_zoom_vert" field_ref="field3D" grid_ref="grid_zoom_vert"  />
-    <field id="field_zoom_vert_sum" field_ref="field_zoom_vert" grid_ref="grid_zoom_vert_sum"  />
-
 
 
@@ -324,6 +258,4 @@
 
 
-
-
     <field id="other_field2D" grid_ref="other_grid2D"/>
     <field id="other_field3D" grid_ref="other_grid3D"  />
@@ -354,112 +286,85 @@
     <field id="other_field_YZW" grid_ref="other_grid_YZW" />
 
-
-
-
     
     
   </field_definition>
+
+
+
+<!-- implementation of specifics test case -->
+<!-- simplest test cases : output data to file -->
+
   
 
   <file_definition  type="one_file" >
-    
-     <file id="atm_output_max" output_freq="4ts" enabled="true" >
-       <field field_ref="field2D"  operation = "maximum" />
-       <field field_ref="field3D"  operation = "maximum" />
-       <field field_ref="pressure" operation = "maximum" />
-     </file>
-
-
-     <file id="atm_output_min" output_freq="4ts" enabled="true" >
-       <field field_ref="field2D"  operation = "minimum" />
-       <field field_ref="field3D"  operation = "minimum" />
-       <field field_ref="pressure" operation = "minimum" />
-     </file>
-
-     <file id="atm_output_ave" output_freq="4ts" enabled="true" >
-       <field field_ref="field2D"  operation = "average" />
-       <field field_ref="field3D"  operation = "average" />
-       <field field_ref="pressure" operation = "average" />
-     </file>
-
-     <file id="atm_output_sum" output_freq="4ts" enabled="true" >
-       <field field_ref="field2D"  operation = "accumulate" />
-       <field field_ref="field3D"  operation = "accumulate" />
-       <field field_ref="pressure" operation = "accumulate" />
-     </file>
-     
-     <file id="atm_output_once" output_freq="4ts" enabled="true" >
-       <field field_ref="field2D"  operation = "once" />
-       <field field_ref="field3D"  operation = "once" />
-       <field field_ref="pressure" operation = "once" />
-     </file>
-     
-     <file id="atm_output_instant" output_freq="4ts" enabled="true" >
-       <field field_ref="field2D"  operation = "instant" />
-       <field field_ref="field3D"  operation = "instant" />
-       <field field_ref="pressure" operation = "instant" />
-     </file>
-
-
-     <file id="atm_output" output_freq="4ts" enabled="false" >
-       
-       <field field_ref="field2D" operation="average" enabled="true"/>
-       <field field_ref="field3D" operation="average" enabled="false"/>
-       <field field_ref="pressure" operation="average" enabled="false"/>
-       <field field_ref="field3D_recv" operation="average" enabled="false"/>
-       <field field_ref="field3D_resend" operation="average" enabled="false"/>
-       
-       <!-- <field field_ref="field_X" operation="average" enabled="true"/>
-       <field field_ref="field_Y" operation="average" enabled="true"/>
-       <field field_ref="field_Z" operation="average" enabled="true"/>
-       <field field_ref="field_XY" operation="average" enabled="true"/>
-       <field field_ref="field_XYZ" operation="average" enabled="true"/>
-       <field field_ref="field_XZ" operation="average" enabled="true"/>
-       <field field_ref="field_YZ" operation="average" enabled="true"/>
-       
-       <field field_ref="field_zoom_vert" operation="average" enabled="true"/>
-       <field field_ref="field_zoom_vert_sum" operation="average" enabled="true"/> -->
-       
-    </file>
-
-
-    <file id="atm_output_ensemble" output_freq="4ts" enabled="false">
-       <field field_ref="field2D_W" operation="average" />
-       <field field_ref="field3D_W" operation="average" />
-       <field field_ref="pressure_W" operation="average" />
-       <field field_ref="field3D_recv_W" operation="average" />
-       <field field_ref="field3D_resend_W" operation="average" />
-
-       <field field_ref="field_XW" operation="average" enabled="false" />
-       <field field_ref="field_YW" operation="average" enabled="false" />
-       <field field_ref="field_XYW" operation="average" enabled="false" />
-       <field field_ref="field_ZW" operation="average" enabled="false" />
-       <field field_ref="field_XYZW" operation="average" enabled="false" />
-       <field field_ref="field_XZW" operation="average" enabled="false" />
-       <field field_ref="field_YZW" operation="average" enabled="false" />
-    </file>
-
-
-    <file id="atm_output_other" output_freq="1ts"  enabled="false">
-       <field field_ref="other_field3D" enabled="false"/>
-       <field field_ref="other_field2D" enabled="true"/> 
-       <field field_ref="other_field_X" enabled="false"/>
-       <field field_ref="other_field_Y" enabled="false"/>
-       <field field_ref="other_field_XY" enabled="false"/>
-       <field field_ref="other_field_Z" enabled="false"/>
-       <field field_ref="other_field_XYZ" enabled="false"/>
-       <field field_ref="other_field_XZ" enabled="false"/>
-       <field field_ref="other_field_YZ" enabled="false"/>
-    </file>
-    
-
-    <file id="atm_output_reorder" output_freq="1ts" enabled="false" >
-       <field field_ref="field2D" grid_ref="grid2D_invert" enabled="true"/>
-    </file>
-    
-    <file id="test_grid_lat" output_freq="1ts" enabled="false">
-      <field field_ref="field3D" operation="instant" />
-      <field id="field_reduce_lat" field_ref="field3D" grid_ref="grid_lat" operation="instant" />
-    </file>
+    <file id="atm_output_reduction_1D" output_freq="6ts" type="one_file" enabled="true" >
+       <field field_ref="field_Z" freq_op="3ts" operation="average" name="field1D_average"/>
+       <field field_ref="field_Z" freq_op="3ts" operation="accumulate" name="field1D_sum"/>
+       <field field_ref="field_Z" freq_op="3ts" operation="maximum" name="field1D_max"/>
+       <field field_ref="field_Z" freq_op="3ts" operation="minimum" name="field1D_min"/>
+    </file>
+   
+    <file id="atm_output_reduction_2D" output_freq="6ts" type="one_file" enabled="true"  >
+       <field field_ref="field2D" freq_op="3ts" operation="average" name="field2D_average"/>
+       <field field_ref="field2D" freq_op="3ts" operation="accumulate" name="field2D_sum"/>
+       <field field_ref="field2D" freq_op="3ts" operation="maximum" name="field2D_max"/>
+       <field field_ref="field2D" freq_op="3ts" operation="minimum" name="field2D_min"/>
+    </file>
+   
+    <file id="atm_output_reduction_3D" output_freq="6ts" type="one_file" enabled="true"  >
+       <field field_ref="field3D" freq_op="3ts" operation="average" name="field3D_average"/>
+       <field field_ref="field3D" freq_op="3ts" operation="accumulate" name="field3D_sum"/>
+       <field field_ref="field3D" freq_op="3ts" operation="maximum" name="field3D_max"/>
+       <field field_ref="field3D" freq_op="3ts" operation="minimum" name="field3D_min"/>
+    </file>
+   
+    <file id="atm_output_reduction_ref" output_freq="1ts" type="one_file" enabled="true">
+       <field field_ref="field_Z"   />
+       <field field_ref="field2D"   />
+       <field field_ref="field3D"   />
+    </file>
+
+
+  
+    <file id="atm_output" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="field3D" />
+       <field field_ref="field2D" /> 
+       <field field_ref="field_X" />
+       <field field_ref="field_Y" />
+       <field field_ref="field_XY" />
+       <field field_ref="field_Z" />
+       <field field_ref="field_XYZ" />
+       <field field_ref="field_XZ" />
+       <field field_ref="field_YZ" />
+       <field field_ref="pressure"  /> 
+       <field field_ref="field3D_resend" />
+    </file>
+
+    <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="other_field3D" />
+       <field field_ref="other_field2D" /> 
+       <field field_ref="other_field_X" />
+       <field field_ref="other_field_Y" />
+       <field field_ref="other_field_XY" />
+       <field field_ref="other_field_Z" />
+       <field field_ref="other_field_XYZ" />
+       <field field_ref="other_field_XZ" />
+       <field field_ref="other_field_YZ" />
+       <field field_ref="other_pressure"  /> 
+       <field field_ref="other_field3D_resend" />
+    </file>
+
+    <file id="atm_output_W" output_freq="1ts" enabled="false">
+       <field field_ref="field3D_W" />
+       <field field_ref="field2D_W" /> 
+       <field field_ref="field_XW" />
+       <field field_ref="field_YW" />
+       <field field_ref="field_XYW" />
+       <field field_ref="field_ZW" />
+       <field field_ref="field_XYZW" />
+       <field field_ref="field_XZW" />
+       <field field_ref="field_YZW" />
+    </file>
+    
     
   </file_definition>
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/test_scalar_algo/checkfile.def
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/test_scalar_algo/checkfile.def	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/test_scalar_algo/checkfile.def	(revision 1922)
@@ -1,4 +1,3 @@
-#atm_output1.nc
-
-atm_output.nc
-atm_output_zoom.nc
+atm_output_scalar_transformation_reduce_axis.nc
+atm_output_scalar_transformation_reduce_domain.nc
+atm_output_scalar_transformation_extract.nc
Index: /XIOS/trunk/xios_test_suite/TEST_SUITE/test_scalar_algo/context_atm.xml
===================================================================
--- /XIOS/trunk/xios_test_suite/TEST_SUITE/test_scalar_algo/context_atm.xml	(revision 1921)
+++ /XIOS/trunk/xios_test_suite/TEST_SUITE/test_scalar_algo/context_atm.xml	(revision 1922)
@@ -11,5 +11,4 @@
   <axis_definition>
     <axis id="axis" />
-    <axis id="axis_dup" />
     <axis id="domain_X" />
     <axis id="domain_Y" />
@@ -22,18 +21,32 @@
   </axis_definition>
 
-  <axis_definition>
-    <axis id="axis_zoom" axis_ref="axis">
-        <zoom_axis begin="0" n="5"/>
-    </axis>
-    <axis id="domain_X_zoom" axis_ref="domain_X">
-        <zoom_axis begin="0" n="1"/>
-    </axis>
-    <axis id="domain_Y_zoom" axis_ref="domain_Y">
-        <zoom_axis begin="3" n="1"/>
-    </axis>
-  </axis_definition>
-
   <scalar_definition>
     <scalar id="scalar" /> 
+    <scalar id="reduce_axis_max">
+      <reduce_axis operation="max"/>
+    </scalar>
+    <scalar id="reduce_axis_min">
+      <reduce_axis operation="min"/>
+    </scalar>
+    <scalar id="reduce_axis_sum">
+      <reduce_axis operation="sum"/>
+    </scalar>
+    <scalar id="reduce_axis_ave">
+      <reduce_axis operation="average"/>
+    </scalar>
+    <scalar id="reduce_domain_max">
+      <reduce_domain operation="max"/>
+    </scalar>
+    <scalar id="reduce_domain_min">
+      <reduce_domain operation="min"/>
+    </scalar>
+    <scalar id="reduce_domain_sum">
+      <reduce_domain operation="sum"/>
+    </scalar>
+    <scalar id="reduce_domain_ave">
+      <reduce_domain operation="average"/>
+    </scalar>
+ 
+  
   </scalar_definition>
   
@@ -54,4 +67,67 @@
       <axis axis_ref="axis" />
     </grid>
+      
+    <grid id="grid0D_reduce_axis_max">
+      <scalar scalar_ref="reduce_axis_max" />
+    </grid>
+ 
+    <grid id="grid0D_reduce_axis_min">
+      <scalar scalar_ref="reduce_axis_min" />
+    </grid>
+ 
+    <grid id="grid0D_reduce_axis_sum">
+      <scalar scalar_ref="reduce_axis_sum" />
+    </grid>
+ 
+    <grid id="grid0D_reduce_axis_ave">
+      <scalar scalar_ref="reduce_axis_ave" />
+    </grid>
+ 
+    <grid id="grid0D_extract_pos4">
+      <scalar id="extract_axis_to_scalar_pos4">
+        <extract_axis position="4" /> 
+      </scalar>
+    </grid>
+
+   <grid id="grid0D_extract_pos5">
+      <scalar id="extract_axis_to_scalar_pos5">
+        <extract_axis position="5" /> 
+      </axis>
+    </grid>
+
+    <grid id="grid2D_extract_pos4">
+      <domain domain_ref="domain" />
+      <scalar id="extract2D_axis_to_scalar_pos4">
+        <extract_axis position="4" /> 
+      </scalar>
+    </grid>
+    
+    <grid id="grid2D_extract_pos5">
+      <domain domain_ref="domain" />
+      <scalar id="extract2D_axis_to_scalar_pos5">
+        <extract_axis position="5" /> 
+      </scalar>
+    </grid>
+
+ 
+    <grid id="grid2D_reduce_domain_max">
+      <scalar scalar_ref="reduce_domain_max" />
+    </grid>
+ 
+    <grid id="grid2D_reduce_domain_min">
+      <scalar scalar_ref="reduce_domain_min" />
+    </grid>
+ 
+    <grid id="grid2D_reduce_domain_sum">
+      <scalar scalar_ref="reduce_domain_sum" />
+    </grid>
+ 
+    <grid id="grid2D_reduce_domain_ave">
+      <scalar scalar_ref="reduce_domain_ave" />
+    </grid>
+ 
+
+
+
 
     <grid id="grid_X">
@@ -59,8 +135,4 @@
     </grid>
 
-     <grid id="grid_X_zoom">
-      <axis axis_ref="domain_X_zoom" />
-    </grid>
-
     <grid id="grid_Y">
       <axis axis_ref="domain_Y" />
@@ -140,19 +212,4 @@
     </grid>
 
-
-    <grid id="grid_XY_zoom_Y">
-      <axis axis_ref="domain_X" />
-      <axis axis_ref="domain_Y_zoom" />
-    </grid>
-
-    <grid id="grid_XY_zoom_X">
-      <axis axis_ref="domain_X_zoom" />
-      <axis axis_ref="domain_Y" />
-
-    </grid>
-
- 
- 
- 
  
  
@@ -251,82 +308,22 @@
     </grid>
 
-
-
-
-
-
-
-
-
-
-    <grid id="grid_vert_reduce">
-      <domain domain_ref="domain" />
-      <scalar >
-        <reduce_axis operation="sum" />
-      </scalar>
-    </grid>
-
-    <grid id="grid_horiz_reduce">
-      <scalar >
-        <reduce_domain operation="sum" />
-      </scalar>
-      <axis axis_ref="axis" />
-    </grid>
-      
-    <grid id="grid_zoom_vert">
-      <domain domain_ref="domain" />
-      <axis axis_ref="axis_zoom" />
-    </grid>
-
-    <grid id="grid_zoom_vert_sum">
-      <scalar >
-        <reduce_domain operation="sum" />
-      </scalar>
-      <axis axis_ref="axis_zoom" />
-    </grid>
-
-   <grid id="grid_lat">
-       <axis axis_ref="domain_Y">
-         <reduce_domain direction="iDir" operation="sum"/> 
-       </axis>
-       <axis axis_ref="axis" />
-    </grid>
-    
-
-    <grid id="grid3D_invert">
-      <domain domain_ref="domain">
-        <reorder_domain invert_lat="true" />
-      </domain>
-      <axis axis_ref="axis" />
-    </grid>
-    
-    <grid id="grid2D_invert">
-      <domain domain_ref="domain">
-        <reorder_domain invert_lat="true" shift_lon_fraction="0.5" min_lon="0" max_lon="360"/>
-      </domain>
-    </grid>
-
-    
+   
   </grid_definition>
   
   
   <field_definition level="1" prec="8" operation="instant" freq_op="1ts" enabled=".true." default_value="1.e+20" detect_missing_value="true">
-    <field id="field2D" grid_ref="grid2D" build_workflow_graph="false" />
-    <field id="field3D" grid_ref="grid3D" build_workflow_graph="true"  />
+    <field id="field2D" grid_ref="grid2D" />
+    <field id="field3D" grid_ref="grid3D"  />
     <field id="pressure" grid_ref="grid3D"  />
     <field id="field3D_recv" read_access="true" grid_ref="grid3D"  field_ref="field3D" />
     <field id="field3D_resend" grid_ref="grid3D" />
 
-    <field id="field_X" grid_ref="grid_X" build_workflow_graph="false" />
-    <field id="field_Y" grid_ref="grid_Y" build_workflow_graph="false" />
-    <field id="field_Z" grid_ref="grid1D" build_workflow_graph="false" />
+    <field id="field_X" grid_ref="grid_X" />
+    <field id="field_Y" grid_ref="grid_Y" />
+    <field id="field_Z" grid_ref="grid1D" />
     <field id="field_XY" grid_ref="grid_XY" />
     <field id="field_XYZ" grid_ref="grid_XYZ" />
     <field id="field_XZ" grid_ref="grid_XZ" />
     <field id="field_YZ" grid_ref="grid_YZ" />
-
-    <field id="field_zoom_vert" field_ref="field3D" grid_ref="grid_zoom_vert"  />
-    <field id="field_zoom_vert_sum" field_ref="field_zoom_vert" grid_ref="grid_zoom_vert_sum"  />
-
 
 
@@ -346,6 +343,4 @@
 
 
-
-
     <field id="other_field2D" grid_ref="other_grid2D"/>
     <field id="other_field3D" grid_ref="other_grid3D"  />
@@ -376,59 +371,84 @@
     <field id="other_field_YZW" grid_ref="other_grid_YZW" />
 
-
-
-
     
     
   </field_definition>
+
+
+
+<!-- implementation of specifics test case -->
+<!-- simplest test cases : output data to file -->
+
   
 
   <file_definition  type="one_file" >
-    
-    <file id="atm_output" output_freq="1ts" type="one_file" enabled="true">
-       <!-- <field id="id_fieldXY" field_ref="field_XY" operation="once" enabled="true"/> -->
-       <field id="id_fieldX" field_ref="field_X" operation="once" enabled="true"/>
-    </file>
-
-     <file id="atm_output_zoom" output_freq="1ts" enabled="true">
-       <field id="fieldX_zoomX" field_ref="field_X" grid_ref="grid_X_zoom" operation="once" enabled="true"/>
-       <!-- <field id="fieldXY_zoomX" field_ref="field_XY" grid_ref="grid_XY_zoom_X" operation="once" enabled="true"/>
-       <field id="fieldXY_zoomY" field_ref="field_XY" grid_ref="grid_XY_zoom_Y" operation="once" enabled="true"/> -->
-    </file>
-
-
-    <file id="atm_output_other" output_freq="1ts"  enabled="false">
-       <field field_ref="other_field3D" enabled="false"/>
-       <field field_ref="other_field2D" enabled="true"/> 
-       <field field_ref="other_field_X" enabled="false"/>
-       <field field_ref="other_field_Y" enabled="false"/>
-       <field field_ref="other_field_XY" enabled="false"/>
-       <field field_ref="other_field_Z" enabled="false"/>
-       <field field_ref="other_field_XYZ" enabled="false"/>
-       <field field_ref="other_field_XZ" enabled="false"/>
-       <field field_ref="other_field_YZ" enabled="false"/>
+    <file id="atm_output_scalar_transformation_extract" output_freq="12ts" type="one_file" enabled="true" >
+       <field field_ref="field_Z" />
+       <field id="fieldZ_pos4" field_ref="field_Z" name="fieldZ_pos4" grid_ref="grid0D_extract_pos4" />
+       <field id="fieldZ_pos5" field_ref="field_Z" name="fieldZ_pos5" grid_ref="grid0D_extract_pos5" />
+       <field field_ref="field3D" />
+       <field id="field3D_pos4" enabled="true" field_ref="field3D" name="field3D_pos4" grid_ref="grid2D_extract_pos4" />
+       <field id="field3D_pos5" enabled="true" field_ref="field3D" name="field3D_pos5" grid_ref="grid2D_extract_pos5"/>
+    </file>
+
+    <file id="atm_output_scalar_transformation_reduce_axis" output_freq="4ts" type="one_file" enabled="true">
+       <field field_ref="field_Z" />
+       <field id="field_reduce_axis_max" field_ref="field_Z" name="field_reduce_axis_max" grid_ref="grid0D_reduce_axis_max" enabled="true"/>
+       <field id="field_reduce_axis_min" field_ref="field_Z" name="field_reduce_axis_min" grid_ref="grid0D_reduce_axis_min" enabled="true"/>
+       <field id="field_reduce_axis_sum" field_ref="field_Z" name="field_reduce_axis_sum" grid_ref="grid0D_reduce_axis_sum" enabled="true"/>
+       <field id="field_reduce_axis_ave" field_ref="field_Z" name="field_reduce_axis_ave" grid_ref="grid0D_reduce_axis_ave" enabled="true"/>
+    </file>
+   
+    <file id="atm_output_scalar_transformation_reduce_domain" output_freq="24ts" type="one_file" enabled="true">
+       <field field_ref="field2D" />
+       <field id="field_reduce_domain_max" field_ref="field2D" name="field_reduce_domain_max" grid_ref="grid2D_reduce_domain_max" />
+       <field id="field_reduce_domain_min" field_ref="field2D" name="field_reduce_domain_min" grid_ref="grid2D_reduce_domain_min" />
+       <field id="field_reduce_domain_sum" field_ref="field2D" name="field_reduce_domain_sum" grid_ref="grid2D_reduce_domain_sum" />
+       <field id="field_reduce_domain_ave" field_ref="field2D" name="field_reduce_domain_ave" grid_ref="grid2D_reduce_domain_ave" />
+    </file>
+
+
+
+  
+    <file id="atm_output" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="field3D" />
+       <field field_ref="field2D" /> 
+       <field field_ref="field_X" />
+       <field field_ref="field_Y" />
+       <field field_ref="field_XY" />
+       <field field_ref="field_Z" />
+       <field field_ref="field_XYZ" />
+       <field field_ref="field_XZ" />
+       <field field_ref="field_YZ" />
+       <field field_ref="pressure"  /> 
+       <field field_ref="field3D_resend" />
+    </file>
+
+    <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="other_field3D" />
+       <field field_ref="other_field2D" /> 
+       <field field_ref="other_field_X" />
+       <field field_ref="other_field_Y" />
+       <field field_ref="other_field_XY" />
+       <field field_ref="other_field_Z" />
+       <field field_ref="other_field_XYZ" />
+       <field field_ref="other_field_XZ" />
+       <field field_ref="other_field_YZ" />
+       <field field_ref="other_pressure"  /> 
+       <field field_ref="other_field3D_resend" />
     </file>
 
     <file id="atm_output_W" output_freq="1ts" enabled="false">
-       <field field_ref="field3D_W" enabled="true"/>
-       <field field_ref="field2D_W" enabled="true"/> 
-       <field field_ref="field_XW" enabled="true"/>
-       <field field_ref="field_YW" enabled="true"/>
-       <field field_ref="field_XYW" enabled="true"/>
-       <field field_ref="field_ZW" enabled="true"/>
-       <field field_ref="field_XYZW" enabled="true"/>
-       <field field_ref="field_XZW" enabled="true"/>
-       <field field_ref="field_YZW" enabled="true"/>
-    </file>
-    
-
-    <file id="atm_output_reorder" output_freq="1ts" enabled="false" >
-       <field field_ref="field2D" grid_ref="grid2D_invert" enabled="true"/>
-    </file>
-    
-    <file id="test_grid_lat" output_freq="1ts" enabled="false">
-      <field field_ref="field3D" operation="instant" />
-      <field id="field_reduce_lat" field_ref="field3D" grid_ref="grid_lat" operation="instant" />
-    </file>
+       <field field_ref="field3D_W" />
+       <field field_ref="field2D_W" /> 
+       <field field_ref="field_XW" />
+       <field field_ref="field_YW" />
+       <field field_ref="field_XYW" />
+       <field field_ref="field_ZW" />
+       <field field_ref="field_XYZW" />
+       <field field_ref="field_XZW" />
+       <field field_ref="field_YZW" />
+    </file>
+    
     
   </file_definition>
