Index: LMDZ6/branches/Ocean_skin/DefLists/field_def_lmdz.xml
===================================================================
--- LMDZ6/branches/Ocean_skin/DefLists/field_def_lmdz.xml	(revision 3428)
+++ LMDZ6/branches/Ocean_skin/DefLists/field_def_lmdz.xml	(revision 3605)
@@ -1,2 +1,3 @@
+<!-- $Id$ -->
 <field_definition level="1" prec="4" operation="average" freq_op="1ts" enabled=".true." default_value="9.96921e+36">
     
@@ -7,4 +8,15 @@
 <!--    </field_group>  -->
 
+    <field_group id="remap_expr" level="_reset_" prec="_reset_" operation="_reset_" freq_op="_reset_" enabled="_reset_" default_value="_reset_">
+      <field_group id="remap_1ts" />
+      <field_group id="remap_1800s" />
+      <field_group id="remap_1h" />
+      <field_group id="remap_3h" />
+      <field_group id="remap_6h" />
+      <field_group id="remap_1d" />
+      <field_group id="remap_1mo" />
+    </field_group>
+    
+    
     <field_group id="coordinates" grid_ref="grid_glo">
         <field id="io_lon"  />
@@ -13,14 +25,18 @@
 
     <field_group id="coord_hyb">
-        <field id="Ahyb"      axis_ref="klev" />
-        <field id="Ahyb_inter" grid_ref="klev_bnds" />
-        <field id="Bhyb"       axis_ref="klev"  />
-        <field id="Bhyb_inter"  grid_ref="klev_bnds" />
+        <field id="Ahyb" long_name="Ahyb at level interface"     axis_ref="klevp1" />
+        <field id="Ahyb_bounds" long_name="" grid_ref="klevp1_bnds" />
+        <field id="Bhyb" long_name="Bhyb at level interface"       axis_ref="klevp1"  />
+        <field id="Bhyb_bounds" long_name=""  grid_ref="klevp1_bnds" />
+        <field id="Ahyb_mid" long_name="Ahyb at the middle of the level"      axis_ref="klev" />
+        <field id="Ahyb_mid_bounds" long_name="" grid_ref="klev_bnds" />
+        <field id="Bhyb_mid" long_name="Bhyb at the middle of the level"       axis_ref="klev"  />
+        <field id="Bhyb_mid_bounds" long_name=""  grid_ref="klev_bnds" />
     </field_group>
     
     <field_group id="fields_2D" grid_ref="grid_glo">
         <field id="phis"    long_name="Surface geop.height"     unit="m2/s2" />
-        <field id="aire"    long_name="Grid area"               unit="-"    />
-        <field id="contfracATM"     long_name="% sfce ter+lic"  unit="-"    />
+        <field id="aire"    long_name="Grid area"               unit="m2"    />
+        <field id="contfracATM"     long_name="% sfce ter+lic"  unit="-"   /> 
         <field id="contfracOR"      long_name="% sfce terre OR" unit="-" />
         <field id="sza"     long_name="Solar zenithal angle "   unit="deg" />
@@ -43,6 +59,6 @@
         <field id="gusts"    long_name="surface gustiness"    unit="m2/s2" />
         <field id="wind10m"    long_name="10-m wind speed"      unit="m/s" />
-        <field id="wind10max"  long_name="10m wind speed max"   unit="m/s" />
-	<field id="sfcWindmax" field_ref="wind10m" operation="maximum" />
+        <field id="wind10max"  long_name="10m wind speed max"   unit="m/s" operation="maximum"/>
+        <field id="sfcWindmax" field_ref="wind10m" operation="maximum" />
         <field id="sicf"    long_name="Sea-ice fraction"        unit="-" />
         <field id="q2m"     long_name="Specific humidity 2m"    unit="kg/kg" />
@@ -76,9 +92,9 @@
         <field id="cldtjn"      long_name="Total cloudiness Day"         unit="-" />
         <field id="rnebjn"      long_name="Cloud fraction in day"         unit="-" />
-        <field id="ndayrain"    long_name="Number of dayrain(liq+sol)"  unit="-" />
+        <field id="ndayrain"    long_name="Number of dayrain(liq+sol)"  unit="-" operation="instant"/>
         <field id="precip"      long_name="Precip Totale liq+sol"       unit="kg/(s*m2)" />
         <field id="prhmax"      field_ref="precip" operation="maximum"           />
         <field id="rain_fall"   long_name="Precip Totale liq"   unit="kg/(s*m2)" />
-        <field id="rain_con"   long_name="Precip convective liq"   unit="kg/(s*m2)" />
+        <field id="rain_con"    long_name="Precip convective liq"   unit="kg/(s*m2)" />
         <field id="plul"    long_name="Large-scale Precip."     unit="kg/(s*m2)" />
         <field id="plun"    long_name="Numerical Precip."       unit="kg/(s*m2)" />
@@ -146,5 +162,5 @@
         <field id="flat_x"    long_name="flat off-wake"    unit="W/m2" />
         <field id="flat_w"    long_name="flat within-wake"    unit="W/m2" />
-        <field id="delta_tsurf"    long_name="Temperature difference (w-x)"    unit="K" />
+        <field id="delta_tsurf"    long_name="Temperature difference (w-x)"    unit="K" enabled="false" /> <!-- ym --field disabled-- delta_tsurf is not conform to the associated grid (the is an arry containing all sub_surface) --> 
         <field id="cdragh_x"    long_name="cdragh off-wake"    unit="-" />
         <field id="cdragh_w"    long_name="cdragh within-wake"    unit="-" />
@@ -327,6 +343,6 @@
         <field id="v10_sic"    long_name="-"    unit="-" />
         <field id="rh2m"    long_name="Relative humidity at 2m"    unit="%" />
-        <field id="rh2m_max"    field_ref="rh2m" operation="maximum" />
-        <field id="rh2m_min"    field_ref="rh2m" operation="minimum" />
+        <field id="rh2m_max"    field_ref="rh2m" operation="maximum" enabled="false"/> <!-- ym Problem : field is disabled check rh2m_min has a reference (field_ref) to rh2 but is also sent by model which is not compatible-->
+        <field id="rh2m_min"    field_ref="rh2m" operation="minimum" enabled="false"/> <!-- ym Problem : field is disabled check rh2m_max has a reference (field_ref) to rh2 but is also sent by model which is not compatible-->
 <!--        <field id="rh2m_min"    long_name="Min Relative humidity at 2m"    unit="%" /> -->
 <!--        <field id="rh2m_max"    long_name="Max Relative humidity at 2m"    unit="%" /> -->
@@ -335,7 +351,8 @@
         <field id="tpote"    long_name="Surface air equivalent potential temperature"    unit="K" />
         <field id="SWnetOR"    long_name="Sfce net SW radiation OR"    unit="W/m2" />
+        <field id="SWdownOR"    long_name="Sfce incident SW radiation OR"    unit="W/m2" />
         <field id="LWdownOR"    long_name="Sfce incident LW radiation OR"    unit="W/m2" />
         <field id="snowl"    long_name="Solid Large-scale Precip."    unit="kg/(m2*s)" />
-        <field id="cape_max"    long_name="CAPE max."    unit="J/kg" />
+        <field id="cape_max"    long_name="CAPE max."    unit="J/kg" operation="maximum"/>
         <field id="solldown"    long_name="Down. IR rad. at surface"    unit="W/m2" />
         <field id="dtsvdfo"    long_name="Boundary-layer dTs(o)"    unit="K/s" />
@@ -371,5 +388,5 @@
         <field id="od550_CSNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
         <field id="od550_CINO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="od550_STRAT"    long_name="Aerosol Optical depth at 550 nm "    unit="1" enabled="TRUE" />
+        <field id="od550_STRAT"    long_name="Aerosol Optical depth at 550 nm "    unit="1"  />
         <field id="dryod550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
         <field id="dryod550_ASPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
@@ -457,5 +474,5 @@
         <field id="alb1"    long_name="Surface VIS albedo"    unit="-" />
         <field id="alb2"    long_name="Surface Near IR albedo"    unit="-" />
-        <field id="ftime_con"    long_name="Fraction of time convection Occurs"    unit="-" />
+        <field id="ftime_con"    long_name="Fraction of time convection Occurs"    unit="-" operation="instant" />
         <field id="ftime_deepcv"    long_name="Fraction of time deep convection Occurs"    unit="-" />
         <field id="wake_h"    long_name="wake height"    unit="m" />
@@ -494,4 +511,8 @@
         <field id="colO3_strat"    long_name="Ozone stratospheric column"     unit="DU" />             <!-- Added ThL -->
         <field id="colO3_trop"     long_name="Ozone tropospheric column"      unit="DU" />             <!-- Added ThL -->
+        <field id="flx_co2_land"   long_name="CO2 flux from land"             unit="kg CO2/m2/s" />    <!-- Added OB -->
+        <field id="flx_co2_ocean"  long_name="CO2 flux from ocean"            unit="kg CO2/m2/s" />    <!-- Added OB -->
+        <field id="flx_co2_ff"     long_name="CO2 flux from ff"               unit="kg CO2/m2/s" />    <!-- Added OB -->
+        <field id="flx_co2_bb"     long_name="CO2 flux from bb"               unit="kg CO2/m2/s" />    <!-- Added OB -->
     </field_group>
 
@@ -502,8 +523,8 @@
         <field id="tke_oce"    long_name="Max Turb. Kinetic Energy oce"    unit="m2/s2" />
         <field id="tke_sic"    long_name="Max Turb. Kinetic Energy sic"    unit="m2/s2" />
-        <field id="tke_max_ter"    long_name="Max Turb. Kinetic Energy ter"    unit="m2/s2" />
-        <field id="tke_max_lic"    long_name="Max Turb. Kinetic Energy lic"    unit="m2/s2" />
-        <field id="tke_max_oce"    long_name="Max Turb. Kinetic Energy oce"    unit="m2/s2" />
-        <field id="tke_max_sic"    long_name="Max Turb. Kinetic Energy sic"    unit="m2/s2" />
+        <field id="tke_max_ter"    long_name="Max Turb. Kinetic Energy ter"    unit="m2/s2" operation="maximum"/>
+        <field id="tke_max_lic"    long_name="Max Turb. Kinetic Energy lic"    unit="m2/s2" operation="maximum"/>
+        <field id="tke_max_oce"    long_name="Max Turb. Kinetic Energy oce"    unit="m2/s2" operation="maximum"/>
+        <field id="tke_max_sic"    long_name="Max Turb. Kinetic Energy sic"    unit="m2/s2" operation="maximum"/>
         <field id="l_mix_ter"    long_name="PBL mixing length ter"    unit="m" />
         <field id="l_mix_lic"    long_name="PBL mixing length lic"    unit="m" />
@@ -524,7 +545,7 @@
         <field id="cldtau"    long_name="Cloud optical thickness"    unit="1" />
         <field id="cldemi"    long_name="Cloud optical emissivity"    unit="1" />
-        <field id="tke_max"    long_name="TKE max"    unit="m2/s2" />
+        <field id="tke_max"    long_name="TKE max"    unit="m2/s2" operation="maximum"/>
         <field id="kz"    long_name="Kz melange"    unit="m2/s" enabled="FALSE" />
-        <field id="kz_max"    long_name="Kz melange max"    unit="m2/s" enabled="FALSE" />
+        <field id="kz_max"    long_name="Kz melange max"    unit="m2/s" enabled="FALSE" operation="maximum" />
         <field id="concso4"    long_name="Concentration of Sulfate "    unit="kg/m3" />
         <field id="concno3"    long_name="Concentration of Nitrate "    unit="kg/m3" /> 
@@ -543,5 +564,5 @@
         <field id="ocond"    long_name="Condensed water"    unit="kg/kg" />
         <field id="geop"    long_name="Geopotential height"    unit="m2/s2" />
-        <field id="geoph"    field_ref="geop" long_name="Geopotential height" unit="m" > geop/9.80665 </field>
+        <field id="geoph" field_ref="geop" long_name="Geopotential height" unit="m" > geop/9.80665 </field>
         <field id="vitu"    long_name="Zonal wind"    unit="m/s" />
         <field id="vitv"    long_name="Meridional wind"    unit="m/s" />
@@ -583,4 +604,5 @@
         <field id="cldicemxrat"    long_name="Cloud Ice Mixing Ratio"    unit="1" />
         <field id="clwcon"    long_name="Convective Cloud Liquid water content"    unit="kg/kg" />
+        <field id="Mipsh"    long_name="mass flux shed from adiab. ascents"    unit="kg/m2/s" />
         <field id="Ma"    long_name="undilute adiab updraft"    unit="kg/m2/s" />
         <field id="dnwd"    long_name="saturated downdraft"    unit="kg/m2/s" />
@@ -603,6 +625,9 @@
         <field id="wake_omg"    long_name="wake_omg"    unit="-" />
         <field id="wdtrainA"    long_name="precipitation from AA"    unit="-" />
+        <field id="wdtrainS"    long_name="precipitation from shedding of AA"    unit="-" />
         <field id="wdtrainM"    long_name="precipitation from mixture"    unit="-" />
         <field id="Vprecip"    long_name="precipitation vertical profile"    unit="-" />
+        <field id="qtaa"    long_name="specific total water in adiabatic ascents"    unit="kg/kg" /> 
+        <field id="Clwaa"   long_name="specific condensed water in adiabatic ascents"    unit="kg/kg" />
         <field id="ftd"    long_name="tend temp due aux descentes precip"    unit="-" />
         <field id="fqd"    long_name="tend vap eau due aux descentes precip"    unit="-" />
@@ -698,11 +723,13 @@
         <field id="rldcs4co2"    long_name="Downwelling CS LW 4xCO2 atmosphere"    unit="W/m2" />
         <field id="stratomask"    long_name="Stratospheric fraction"    unit="-" />
+        <field id="heat_volc"    long_name="SW heating rate from volcano"    unit="K/s" />
+        <field id="cool_volc"    long_name="LW cooling rate from volcano"    unit="K/s" />
         <field id="pvap"    long_name="pvap intermediary variable" unit="-">pres*ovap*461.5 / (287.04*(1.+ (10.9491/18.0153)*ovap)) </field>
     </field_group>
 
-    <field_group id="fields_strataer_trac_3D" grid_ref="grid_glo_presnivs"/>
-    <field_group id="fields_strataer_trac_2D" grid_ref="grid_glo"/>
-
-    <field_group id="fields_strataer_3D" grid_ref="grid_glo_presnivs" >
+    <field_group id="fields_strataer_trac_3D" grid_ref="grid_glo_presnivs" operation="average"/>
+    <field_group id="fields_strataer_trac_2D" grid_ref="grid_glo" operation="average"/>
+
+    <field_group id="fields_strataer_3D" grid_ref="grid_glo_presnivs" operation="average" >
         <field id="ext_strat_550"        long_name="Strat. aerosol extinction coefficient at 550 nm"       unit="1/m" />
         <field id="ext_strat_1020"       long_name="Strat. aerosol extinction coefficient at 1020 nm"      unit="1/m" />
@@ -720,5 +747,5 @@
     </field_group>
 
-    <field_group id="fields_strataer_2D" grid_ref="grid_glo" >
+    <field_group id="fields_strataer_2D" grid_ref="grid_glo" operation="average">
         <field id="OD550_strat_only"   long_name="Stratospheric Aerosol Optical depth at 550 nm "        unit="1" />
         <field id="OD1020_strat_only"  long_name="Stratospheric Aerosol Optical depth at 1020 nm "       unit="1" />
@@ -765,5 +792,5 @@
     </field_group>
 
-    <field_group id="fields_trac_2D" grid_ref="grid_glo_plev" >
+    <field_group id="fields_trac_2D" grid_ref="grid_glo" >
           <field id="cumRN"    long_name="Cumulated tracer  RNVL1"    unit="-" />
           <field id="cumPB"    long_name="Cumulated tracer  PBVL1"    unit="-" />
@@ -826,6 +853,8 @@
 
     <field_group id="fields_solbnd_3D" grid_ref="grid_glo_spectband" >
-      <field id="solbnd"    long_name="Top-of-Atmosphere Solar Insolation for each band"    unit="W m-2" />
-    </field_group>
+      <field id="solbnd"    long_name="Top-of-Atmosphere Solar Insolation for each band"    unit="W m-2"  enabled="false" /> <!-- this field is not sent by LMDZ, vertical axis "spectband" is not properly defined -->
+    </field_group>
+
+    <field_group operation="average" freq_offset="0ts" freq_op="3h">  <!-- ----------------------------COSP------------------------ -->
 
     <field_group id="fields_COSP_CALIPSO_2D" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h">
@@ -931,7 +960,10 @@
       <field id="iwpmodis" long_name="Modis Ice_Water_Path_Mean" unit="kg m-2" detect_missing_value=".true." />
     </field_group>
-      <field id="clmodis" long_name="MODIS Cloud Area Fraction" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dtau"  detect_missing_value=".true." />
-      <field id="crimodis" long_name="MODIS Optical_Thickness_vs_ReffIce" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dreffi"  detect_missing_value=".true." />
-      <field id="crlmodis" long_name="MODIS Optical_Thickness_vs_ReffLiq" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dreffl"  detect_missing_value=".true." />
+      <field id="clmodis" long_name="MODIS Cloud Area Fraction" unit="1"  grid_ref="grid4Dtau"  detect_missing_value=".true." />
+      <field id="crimodis" long_name="MODIS Optical_Thickness_vs_ReffIce" unit="1" grid_ref="grid4Dreffi"  detect_missing_value=".true." />
+      <field id="crlmodis" long_name="MODIS Optical_Thickness_vs_ReffLiq" unit="1" grid_ref="grid4Dreffl"  detect_missing_value=".true." />
+
+
+    </field_group>  <!-- ----------------------------COSP------------------------ -->
 
     <field_group id="fields_AIRS" grid_ref="grid_glo" operation="instant" freq_op="3h">
@@ -982,5 +1014,6 @@
       <field id="CFC12_ppt" long_name="CFC12_ppt" unit="ppt" />
 <!-- reducing mass 3D variable to atmosphere total mass scalar -->
-      <field id="mass_sum" field_ref="mass" grid_ref="grid_sum" grid_path="grid_sum_axis" freq_op="1mo" > @mass  </field>
+      <field id="mass_sum_axis"    field_ref="mass" grid_ref="grid_sum_axis" freq_op="1mo" > @mass  </field>
+      <field id="mass_sum" field_ref="mass_sum_axis" grid_ref="grid_sum" freq_op="1mo" > @mass_sum_axis*aire  </field>
    </field_group>
 
