Index: LMDZ6/branches/Ocean_skin/DefLists/context_lmdz.xml
===================================================================
--- LMDZ6/branches/Ocean_skin/DefLists/context_lmdz.xml	(revision 3428)
+++ LMDZ6/branches/Ocean_skin/DefLists/context_lmdz.xml	(revision 3605)
@@ -1,2 +1,3 @@
+<!-- $Id$ -->
 <!-- Context LMDZ -->
 <context id="LMDZ">
@@ -12,18 +13,32 @@
   <file_definition src="./file_def_histhf_lmdz.xml"/>
   <file_definition src="./file_def_histins_lmdz.xml"/>
-<!--  <file_definition src="./file_def_histLES_lmdz.xml"/> -->
+  <file_definition src="./file_def_histLES_lmdz.xml"/>
   <file_definition src="./file_def_histmth_lmdz.xml"/>
-<!--  <file_definition src="./file_def_histstn_lmdz.xml"/> -->
+  <file_definition src="./file_def_histstn_lmdz.xml"/>
   <file_definition src="./file_def_histmthNMC_lmdz.xml"/>
   <file_definition src="./file_def_histdayNMC_lmdz.xml"/>
   <file_definition src="./file_def_histhfNMC_lmdz.xml"/>
-<!--  <file_definition src="./file_def_histmthCOSP_lmdz.xml"/> -->
-<!--  <file_definition src="./file_def_histdayCOSP_lmdz.xml"/> -->
-<!--  <file_definition src="./file_def_histhfCOSP_lmdz.xml"/> -->
+  <file_definition src="./file_def_histmthCOSP_lmdz.xml"/>
+  <file_definition src="./file_def_histdayCOSP_lmdz.xml"/> 
+  <file_definition src="./file_def_histhfCOSP_lmdz.xml"/>  
   <file_definition src="./file_def_histstrataer_lmdz.xml"/>
- 
+  <file_definition src="./file_def_histdaystrataer_lmdz.xml"/>
+
   <!-- Define domains and groups of domains -->
   <domain_definition>
-    <domain id="dom_glo" data_dim="2" />
+
+    <domain id="dom_glo"  data_dim="1" />
+
+    <domain id="greordered"  domain_ref="dom_glo">
+      <reorder_domain invert_lat="true" shift_lon_fraction="0.5" min_lon="0" max_lon="360" />
+    </domain> 
+   
+    <domain id="dom_regular" ni_glo="144" nj_glo="143" type="rectilinear"  >
+      <generate_rectilinear_domain lat_start="-90" lat_end="90" lon_start="0"/>
+      <interpolate_domain order="1"/>
+    </domain>
+   
+    <domain id="dom_out" domain_ref="dom_glo"/>
+    
   </domain_definition>
   
@@ -36,5 +51,5 @@
   <grid_definition>
     <grid id="grid_scalar" >
-    <scalar/>
+      <scalar/>
     </grid>
   </grid_definition>
@@ -42,54 +57,40 @@
   <!-- Define groups of vertical axes -->
   <axis_definition>
-    <axis id="presnivs" standard_name="Vertical levels" unit="Pa">
-    </axis>
-    <axis id="Ahyb" standard_name="Ahyb comp of Hyb Cord" unit="Pa">
-    </axis> 
-    <axis id="Bhyb" standard_name="Bhyb comp of Hyb Cord" unit="">
-    </axis>
-    <axis id="Ahyb_inter" standard_name="A comp of Hyb Cord at interface" unit="Pa">
-    </axis> 
-    <axis id="Bhyb_inter" standard_name="B comp of Hyb Cord at interface" unit="">
-    </axis>
-    <axis id="Alt" standard_name="Height approx for scale heigh of 8km at levels" unit="km">
-    </axis>
-    <axis id="plev" standard_name="model_level_number" unit="Pa">
-    </axis>
-    <axis id="klev"  prec="8" long_name = "hybrid sigma pressure coordinate"
-          standard_name ="atmosphere_hybrid_sigma_pressure_coordinate" unit="1">
-    </axis>
-    <axis id="bnds" standard_name="bounds" unit="1" >
+    <axis id="time_month" n_glo="12" value="(0,11) [1 2 3 4 5 6 7 8 9 10 11 12]"/>
+    <axis id="time_year" unit="day" />
+    <axis id="presnivs" standard_name="Vertical levels" unit="Pa"/>
+    <axis id="Ahyb" standard_name="Ahyb comp of Hyb Cord" unit="Pa"/>
+    <axis id="Bhyb" standard_name="Bhyb comp of Hyb Cord" unit=""/>
+    <axis id="Ahyb_inter" standard_name="A comp of Hyb Cord at interface" unit="Pa"/>
+    <axis id="Bhyb_inter" standard_name="B comp of Hyb Cord at interface" unit=""/>
+    <axis id="Alt" standard_name="Height approx for scale heigh of 8km at levels" unit="km"/>
+    <axis id="plev" standard_name="model_level_number" unit="Pa"/>
+    <axis id="klev"  prec="8" long_name="number of layers" standard_name="number of layers" unit="1" />
+    <axis id="klevp1"  prec="8" long_name="number of layer interfaces" standard_name="number of layer interfaces" unit="1" />
+    <axis id="bnds" standard_name="bounds" unit="1" />
+    <axis id="spectband" standard_name="Sensor Band Central Radiation Wavenumber" unit="m-1"/>
+    <axis id="axis_lat" standard_name="Latitude axis">
+        <reduce_domain operation="average" direction="iDir" />
     </axis>
     <axis id="spectband" standard_name="Sensor Band Central Radiation Wavenumber" unit="m-1">
     </axis>
     <axis id="axis_lat" standard_name="Latitude axis">
-           <reduce_domain operation="average" direction="iDir" />
+        <reduce_domain operation="average" direction="iDir" />
     </axis>
 
 <!-- Cosp axis definitions-->
-    <axis id="height" standard_name="Cosp levels" unit="m"> 
-    </axis>
-    <axis id="height_mlev" standard_name="height_mlev" unit="m"> 
-    </axis>
-    <axis id="sza" standard_name="solar_zenith_angle" unit="degrees">
-    </axis>
-    <axis id="pressure2" standard_name="pressure" unit="mb">
-    </axis>
-    <axis id="column" standard_name="column" unit="count"> 
-    </axis> 
-    <axis id="temp" standard_name="temperature" unit="K"> 
-    </axis> 
-    <axis id="cth" standard_name="altitude" unit="m"> 
-    </axis> 
-    <axis id="ReffIce" standard_name="ReffIce" unit="microne" >
-    </axis>
-    <axis id="ReffLiq" standard_name="ReffLiq" unit="microne" >
-    </axis>
-    <axis id="scatratio" standard_name="scatratio" unit="1" >
-    </axis>
-    <axis id="dbze" standard_name="dbze" unit="dBZ" >
-    </axis>
-    <axis id="tau" standard_name="tau" unit="1" >
-    </axis>
+    <axis id="height" standard_name="Cosp levels" unit="m"/> 
+    <axis id="height_mlev" standard_name="height_mlev" unit="m"/> 
+    <axis id="sza" standard_name="solar_zenith_angle" unit="degrees"/>
+    <axis id="pressure2" standard_name="pressure" unit="mb"/>
+    <axis id="column" standard_name="column" unit="count"/> 
+    <axis id="temp" standard_name="temperature" unit="K"/> 
+<!--    <axis id="cth16" standard_name="altitude" unit="m"/>   ym unused now to be in adequation with axis definition from model --> 
+    <axis id="cth" standard_name="altitude" unit="m"/> 
+    <axis id="ReffIce" standard_name="ReffIce" unit="microne" />
+    <axis id="ReffLiq" standard_name="ReffLiq" unit="microne" />
+    <axis id="scatratio" standard_name="scatratio" unit="1" />
+    <axis id="dbze" standard_name="dbze" unit="dBZ" />
+    <axis id="tau" standard_name="tau" unit="1" />
   </axis_definition>
 
@@ -97,107 +98,193 @@
 
     <grid id="klev_bnds"> <axis axis_ref="klev" /> <axis axis_ref="bnds" /> </grid>
+    <grid id="klevp1_bnds"> <axis axis_ref="klevp1" /> <axis axis_ref="bnds" /> </grid>
 
      <grid id="grid_glo">
-        <domain id="dom_glo" />
+        <domain domain_ref="dom_glo" />
+     </grid>
+     <grid id="grid_out">
+        <domain domain_ref="dom_out" />
      </grid>
 
      <grid id="grid_glo_presnivs">
-        <domain id="dom_glo" />
-        <axis id="presnivs" />
-     </grid>
-
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="presnivs" />
+     </grid>
+     <grid id="grid_out_presnivs">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="presnivs" />
+     </grid>
 
      <grid id="grid_glo_plev">
-        <domain id="dom_glo" />
-        <axis id="plev" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="plev" />
+     </grid>
+     <grid id="grid_out_plev">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="plev" />
      </grid>
 
      <grid id="grid_glo_spectband">
-        <domain id="dom_glo" />
-        <axis id="spectband" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="spectband" />
+     </grid>
+     <grid id="grid_out_spectband">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="spectband" />
      </grid>
 
      <grid id="grid_glo_height">
-        <domain id="dom_glo" />
-        <axis id="height" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="height" />
+     </grid>
+     <grid id="grid_out_height">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="height" />
      </grid>
 
      <grid id="grid_glo_heightmlev">
-        <domain id="dom_glo" />
-        <axis id="height_mlev" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="height_mlev" />
+     </grid>
+     <grid id="grid_out_heightmlev">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="height_mlev" />
      </grid>
 
      <grid id="grid_glo_temp">
-        <domain id="dom_glo" />
-        <axis id="temp" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="temp" />
+     </grid>
+     <grid id="grid_out_temp">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="temp" />
      </grid>
 
      <grid id="grid_glo_sza">
-        <domain id="dom_glo" />
-        <axis id="sza" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="sza" />
+     </grid>
+     <grid id="grid_out_sza">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="sza" />
      </grid>
 
      <grid id="grid_glo_column">
-        <domain id="dom_glo" />
-        <axis id="column" />
-     </grid>
-
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="column" />
+     </grid>
+     <grid id="grid_out_column">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="column" />
+     </grid>
 
 <!-- Define 4D grids for Cosp simulator -->
      <grid id="grid4Dcol">
-        <domain id="dom_glo" />
-        <axis id="column" />
-        <axis id="height_mlev" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="column" />
+        <axis axis_ref="height_mlev" />
+     </grid>
+     <grid id="grid4Dcol_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="column" />
+        <axis axis_ref="height_mlev" />
      </grid>
 
      <grid id="grid4Dsrbin">
-        <domain id="dom_glo" />
-        <axis id="height" />
-        <axis id="scatratio" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="height" />
+        <axis axis_ref="scatratio" />
+     </grid>
+     <grid id="grid4Dsrbin_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="height" />
+        <axis axis_ref="scatratio" />
      </grid>
 
      <grid id="grid4Ddbze">
-        <domain id="dom_glo" />
-        <axis id="height" />
-        <axis id="dbze" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="height" />
+        <axis axis_ref="dbze" />
+     </grid>
+     <grid id="grid4Ddbze_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="height" />
+        <axis axis_ref="dbze" />
      </grid>
 
      <grid id="grid4Dtau">
-        <domain id="dom_glo" />
-        <axis id="tau" />
-        <axis id="pressure2" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="tau" />
+        <axis axis_ref="pressure2" />
+     </grid>
+     <grid id="grid4Dtau_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="tau" />
+        <axis axis_ref="pressure2" />
      </grid>
 
      <grid id="grid4Dmisr">
-        <domain id="dom_glo" />
-        <axis id="cth" />
-        <axis id="tau" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="cth" />
+        <axis axis_ref="tau" />
+     </grid>
+     <grid id="grid4Dmisr_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="cth" />
+        <axis axis_ref="tau" />
      </grid>
 
      <grid id="grid4Dreffi">
-        <domain id="dom_glo" />
-        <axis id="tau" />
-        <axis id="ReffIce" />
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="tau" />
+        <axis axis_ref="ReffIce" />
+     </grid>
+     <grid id="grid4Dreffi_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="tau" />
+        <axis axis_ref="ReffIce" />
      </grid>
 
      <grid id="grid4Dreffl">
-        <domain id="dom_glo" />
-        <axis id="tau" />
-        <axis id="ReffLiq" />
-     </grid>
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="tau" />
+        <axis axis_ref="ReffLiq" />
+     </grid>
+     <grid id="grid4Dreffl_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="tau" />
+        <axis axis_ref="ReffLiq" />
+     </grid>
+
      <grid id="grid4Dcol2">
-        <domain id="dom_glo" />
-        <axis id="height" />
-        <axis id="column" />
-     </grid>
-
- <!-- Grid definitions to allow summing of a 3D varaible -->    
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="height" />
+        <axis axis_ref="column" />
+     </grid>
+     <grid id="grid4Dcol2_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="height" />
+        <axis axis_ref="column" />
+     </grid>
+
+     <grid id="grid4Dsza">
+        <domain domain_ref="dom_glo" />
+        <axis axis_ref="column" />
+        <axis axis_ref="sza" />
+     </grid>
+     <grid id="grid4Dsza_out">
+        <domain domain_ref="dom_out" />
+        <axis axis_ref="column" />
+        <axis axis_ref="sza" />
+     </grid>
+
+ <!-- Grid definitions to allow summing of a 3D variable -->    
       <grid id="grid_3D" >
-         <domain id="dom_glo" />
-         <axis id="lev" />
+         <domain domain_ref="dom_glo" />
+         <axis axis_ref="lev" />
        </grid>
 
        <grid id="grid_sum_axis">
-         <domain id="dom_glo" />
+         <domain domain_ref="dom_glo" />
          <scalar>
             <reduce_axis operation="sum" />
@@ -207,9 +294,8 @@
        <grid id="grid_sum">
          <scalar >
-        <reduce_domain operation="sum" local="true" />
-        <reduce_scalar operation="sum" />
+           <reduce_domain operation="sum" local="true" />
+           <reduce_scalar operation="sum" />
          </scalar>
-         <scalar>
-         </scalar>
+         <scalar/>
        </grid>
 
