Index: XIOS3/trunk/generic_testcase/context_oce.xml
===================================================================
--- XIOS3/trunk/generic_testcase/context_oce.xml	(revision 2362)
+++ XIOS3/trunk/generic_testcase/context_oce.xml	(revision 2392)
@@ -3,12 +3,14 @@
   
   <calendar type="Gregorian" time_origin="1850-01-01 00:00:00" /> 
-  
-  <domain_definition>
-    <domain id="domain" />
-    <domain id="other_domain" />
-  </domain>
-  
+ 
+  <scalar_definition>
+    <scalar id="scalar" /> 
+    <scalar id="other_scalar" /> 
+  </scalar_definition>
+ 
+ 
   <axis_definition>
     <axis id="axis" />
+    <axis id="axis_str" n_glo="10" label="(0,9) [toto titi tata turlututu tito tati tuto tato tete tetu ] "/>
     <axis id="domain_X" />
     <axis id="domain_Y" />
@@ -19,15 +21,12 @@
     <axis id="other_domain_Y" />
     <axis id="other_ensemble" />
+
   </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" /> 
-  </scalar_definition>
+ 
+  <domain_definition>
+    <domain id="domain" />
+    <domain id="other_domain" />
+  </domain_definition>
   
   
@@ -41,9 +40,13 @@
     
     <grid id="grid2D">
-      <domain domain_ref="domain" />
+      <domain domain_ref="domain" id="grid2D_dom" />
     </grid>
 
     <grid id="grid1D">
       <axis axis_ref="axis" />
+    </grid>
+
+    <grid id="grid0D">
+      <scalar scalar_ref="scalar" />
     </grid>
 
@@ -94,4 +97,9 @@
     </grid>
 
+    <grid id="grid0D_W">
+      <scalar scalar_ref="scalar" />
+      <axis axis_ref="ensemble" />
+    </grid>
+
     <grid id="grid_XW">
       <axis axis_ref="domain_X" />
@@ -129,8 +137,4 @@
     </grid>
 
- 
- 
- 
- 
  
     <grid id="other_grid3D">
@@ -147,4 +151,8 @@
     </grid>
 
+    <grid id="other_grid0D">
+      <scalar scalar_ref="other_scalar" />
+    </grid>
+
     <grid id="other_grid_X">
       <axis axis_ref="other_domain_X" />
@@ -193,4 +201,9 @@
     </grid>
 
+    <grid id="other_grid0D_W">
+      <scalar scalar_ref="other_scalar" />
+      <axis axis_ref="other_ensemble" />
+    </grid>
+
     <grid id="other_grid_XW">
       <axis axis_ref="other_domain_X" />
@@ -229,70 +242,16 @@
 
 
-
-
-
-
-
-
-
-
-    <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"/>
+    <field id="field0D" grid_ref="grid0D"/>
+    <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="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" />
     <field id="field_Y" grid_ref="grid_Y" />
@@ -303,14 +262,12 @@
     <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"  />
-
-
-
+
+
+    <field id="field0D_W" grid_ref="grid0D_W"/>
     <field id="field2D_W" grid_ref="grid2D_W"/>
     <field id="field3D_W" grid_ref="grid3D_W"  />
     <field id="pressure_W" grid_ref="grid3D_W"  />
-    <!--field id="field3D_recv_W" read_access="true" grid_ref="grid3D_W"  field_ref="field3D_W"/>
-    <field id="field3D_resend_W" grid_ref="grid3D_W" /-->
+    <field id="field3D_recv_W" read_access="true" grid_ref="grid3D_W"  field_ref="field3D_W"/>
+    <field id="field3D_resend_W" grid_ref="grid3D_W" />
 
     <field id="field_XW" grid_ref="grid_XW" />
@@ -324,11 +281,10 @@
 
 
-
+    <field id="other_field0D" grid_ref="other_grid0D"/>
     <field id="other_field2D" grid_ref="other_grid2D"/>
     <field id="other_field3D" grid_ref="other_grid3D"  />
     <field id="other_pressure" grid_ref="other_grid3D"  />
-    <!--field id="other_field3D_recv" read_access="true" grid_ref="other_grid3D"  field_ref="other_field3D"/>
-    <field id="other_field3D_resend" grid_ref="other_grid3D" /-->
-
+    <field id="other_field3D_recv" read_access="true" grid_ref="other_grid3D"  field_ref="other_field3D"/>
+    <field id="other_field3D_resend" grid_ref="other_grid3D" />
     <field id="other_field_X" grid_ref="other_grid_X" />
     <field id="other_field_Y" grid_ref="other_grid_Y" />
@@ -339,9 +295,10 @@
     <field id="other_field_YZ" grid_ref="other_grid_YZ" />
 
+    <field id="other_field0D_W" grid_ref="other_grid0D_W"/>
     <field id="other_field2D_W" grid_ref="other_grid2D_W"/>
     <field id="other_field3D_W" grid_ref="other_grid3D_W"  />
     <field id="other_pressure_W" grid_ref="other_grid3D_W"  />
-    <!--field id="other_field3D_recv_W" read_access="true" grid_ref="other_grid3D_W"  field_ref="other_field3D_W"/>
-    <field id="other_field3D_resend_W" grid_ref="other_grid3D_W" /-->
+    <field id="other_field3D_recv_W" read_access="true" grid_ref="other_grid3D_W"  field_ref="other_field3D_W"/>
+    <field id="other_field3D_resend_W" grid_ref="other_grid3D_W" />
 
     <field id="other_field_XW" grid_ref="other_grid_XW" />
@@ -352,127 +309,56 @@
     <field id="other_field_XZW" grid_ref="other_grid_XZW" />
     <field id="other_field_YZW" grid_ref="other_grid_YZW" />
-
-
-
-
-    
     
   </field_definition>
   
 
-  <file_definition  type="one_file" >
-    
-    <file id="oce_output" output_freq="1ts" type="one_file" enabled="false">
-<!--      <field field_ref="field3D" />
+ <file_definition  type="one_file" >
+    
+    <file id="atm_output" output_freq="1ts" type="one_file" enabled="true">
+      <field field_ref="field3D" />
       <field field_ref="field2D" /> 
-      <field field_ref="field3D" grid_ref="grid_vert_reduce" name="field_vert_reduced" /> 
-      <field field_ref="field3D" grid_ref="grid_horiz_reduce" name="field_horiz_reduced" />
-      <field field_ref="field_zoom_vert"  /> 
-      <field field_ref="field_zoom_vert_sum"  /> 
       <field field_ref="pressure"  /> 
-      <field field_ref="field3D_resend" /> -->
+      <field field_ref="field3D_resend" /> 
        
-       <field field_ref="field3D" enabled="true"/>
-       <field field_ref="field2D" enabled="true"/> 
-       <field field_ref="field_X" enabled="true"/>
-       <field field_ref="field_Y" enabled="true"/>
-       <field field_ref="field_XY" enabled="true"/>
-       <field field_ref="field_Z" enabled="true"/>
-       <field field_ref="field_XYZ" enabled="true"/>
-       <field field_ref="field_XZ" enabled="true"/>
-       <field field_ref="field_YZ" enabled="true"/>
+      <field field_ref="field3D"    enabled="true"/>
+      <field field_ref="field2D"    enabled="true"/> 
+      <field field_ref="field_X"    enabled="true"/>
+      <field field_ref="field_Y"    enabled="true"/>
+      <field field_ref="field_XY "  enabled="true"/>
+      <field field_ref="field_Z"    enabled="true"/>
+      <field field_ref="field_XYZ"  enabled="true"/>
+      <field field_ref="field_XZ"   enabled="true"/>
+      <field field_ref="field_YZ"   enabled="true"/>
     </file>
 
-    <file id="oce_output_other" output_freq="1ts" type="one_file" 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_other" output_freq="1ts" type="one_file" enabled="false">
+       <field field_ref="other_field3D"   enabled="true"/>
+       <field field_ref="other_field2D"   enabled="true"/> 
+       <field field_ref="other_field_X"   enabled="true"/>
+       <field field_ref="other_field_Y"   enabled="true"/>
+       <field field_ref="other_field_XY"  enabled="true"/>
+       <field field_ref="other_field_Z"   enabled="true"/>
+       <field field_ref="other_field_XYZ" enabled="true"/>
+       <field field_ref="other_field_XZ"  enabled="true"/>
+       <field field_ref="other_field_YZ"  enabled="true"/>
     </file>
 
-    <file id="oce_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"/>
+    <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"/>
+       <field field_ref="field_XZW"  enabled="true"/>
+       <field field_ref="field_YZW"  enabled="true"/>
     </file>
 
-    <file id="oce_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_definition>
-  
-  
-  
-  <field_definition>
-    <field id="field_coupler" field_ref="field3D" operation="average" freq_op="4ts" freq_offset="2ts"/>
-  </field_definition>
-  
-  
-  <coupler_in_definition>
-     <coupler_in context="atm::atm">  
-        <field id="field3D_oce" operation="instant" grid_ref="grid_coupling" freq_op="4ts" freq_offset="4ts"/>
-     </coupler_in>
-  </coupler_in_definition>
- 
- 
-  <coupler_out_definition>
-     <coupler_out context="atm::atm">  
-        <field id="field3D_atm" field_ref="field_coupler" freq_op="4ts">@this</field>
-     </coupler_out>
-  </coupler_out_definition>
-
-
- <file_definition  type="one_file" >
-   <file id="test_coupling_atm" output_freq="4ts" sync_freq="1ts" enabled="true">
-     <field field_ref="field3D_oce" grid_ref="interp_grid3D" operation="instant" default_value="1.e+20" freq_offset="3ts"/> 
-   </file>
-
-   <file id="test_atm" output_freq="1ts" sync_freq="1ts" enabled="false">
-     <field field_ref="field3D" operation="instant" default_value="1.e+20"/> 
-   </file>
-
- </file_definition>
-
-  
-  <grid_definition>
-    <grid id="grid_coupling">
-      <domain domain_ref="domain_coupling" />
-      <axis id="axis_coupling" />
-    </grid>
-    
-    <grid id="interp_grid3D">
-       <domain domain_ref="domain"> 
-         <interpolate_domain order="1" />
-       </domain>
-       <axis axis_ref="axis_coupling"/>
-    </grid>
-    
-  </grid_definition>
-  
-  <domain_definition>
-    <domain id="domain_coupling"/>
-  </domain_definition>
-  
-  <axis_definition>
-    <axis id="axis_coupling"/>
-  </axis_definition>  
-  
+
+
+
   
 </context>
