Index: LMDZ5/trunk/DefLists/CMIP6_ping_atmos.xml
===================================================================
--- LMDZ5/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 2988)
+++ LMDZ5/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 2991)
@@ -97,5 +97,5 @@
    <field id="CMIP6_dtauc"         field_ref="dummy_XYA"        /> <!-- P3 (1.0) atmosphere_optical_thickness_due_to_convective_cloud : This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell -->
    <field id="CMIP6_dtaus"         field_ref="dummy_XYA"        /> <!-- P3 (1.0) atmosphere_optical_thickness_due_to_stratiform_cloud : This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell. -->
-   <field id="CMIP6_edt"           field_ref="Kz"               /> <!-- P1 (m2 s-1) atmosphere_heat_diffusivity : Vertical diffusion coefficient for temperature due to parametrised eddies -->
+   <field id="CMIP6_edt"           field_ref="kz"               /> <!-- P1 (m2 s-1) atmosphere_heat_diffusivity : Vertical diffusion coefficient for temperature due to parametrised eddies -->
    <field id="CMIP6_epfy"          field_ref="dummy_XYA"        /> <!-- P1 (m3 s-2) northward_eliassen_palm_flux_in_air : Transformed Eulerian Mean Diagnostics Meridional component Fy of Eliassen-Palm (EP) flux (Fy, Fz) derived from 6hr or higher frequency fields (use daily fields or 12 hr fields if the 6 hr are not available). Please use the definitions given by equation 3.5.3a of Andrews, Holton and Leovy text book, but scaled by density to have units m3 s-2. -->
    <field id="CMIP6_epfz"          field_ref="dummy_XYA"        /> <!-- P1 (m3 s-2) upward_eliassen_palm_flux_in_air : Transformed Eulerian Mean Diagnostics Meridional component Fz of the Eliassen-Palm (EP) flux (Fy, Fz) derived from 6hr or higher frequency fields (use daily fields or 12 hr fields if the 6 hr are not available). Please use the definitions given by equation 3.5.3b of Andrews, Holton and Leovy text book, but scaled by density to have units m3 s-2. -->
@@ -116,10 +116,10 @@
    <field id="CMIP6_hfsbl"         field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_snow_and_ice_sublimation_heat_flux : Energy consumed or released during vapor/solid phase changes. -->
    <field id="CMIP6_hfss"          field_ref="sens"             /> <!-- P1 (W m-2) surface_upward_sensible_heat_flux : Surface Upward Sensible Heat Flux -->
-   <field id="CMIP6_hur"           field_ref="hur"              /> <!-- P1 (%) relative_humidity : The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
+   <field id="CMIP6_hur"           field_ref="rhum"              /> <!-- P1 (%) relative_humidity : The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
    <field id="CMIP6_hurs"          field_ref="rh2m"             /> <!-- P1 (%) relative_humidity : The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
    <field id="CMIP6_hursmax"       field_ref="CMIP6_hurs" freq_op="1d"  operation="maximum"> @this </field>   <!-- P1 (%) relative_humidity : Daily Maximum Near-Surface Relative Humidity -->
    <field id="CMIP6_hursmin"       field_ref="dummy_XY"         /> <!-- P1 (%) relative_humidity : Daily Minimum Near-Surface Relative Humidity -->
    <field id="CMIP6_hursminCrop"   field_ref="dummy_XY"         /> <!-- P1 (%) relative_humidity : minimum near-surface (usually, 2 meter) relative humidity (add cell_method attribute "time: min") -->
-   <field id="CMIP6_hus"           field_ref="hus"              /> <!-- P1 (1.0) specific_humidity : Specific Humidity -->
+   <field id="CMIP6_hus"           field_ref="ovap"             /> <!-- P1 (1.0) specific_humidity : Specific Humidity -->
    <field id="CMIP6_huss"          field_ref="q2m"              /> <!-- P1 (1.0) specific_humidity : Near-surface (usually, 2 meter) specific humidity. -->
    <field id="CMIP6_iareafl"       field_ref="dummy_0d"         /> <!-- P3 (m2) floating_ice_shelf_area : Total area of the floating ice shelves (the component of ice sheet that flows over ocean) -->
@@ -248,5 +248,5 @@
    <field id="CMIP6_rsut4co2"      field_ref="rsut4co2"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : TOA Outgoing Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
    <field id="CMIP6_rsutcs"        field_ref="SWupTOAclr"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated in the absence of clouds. -->
-   <field id="CMIP6_rsutcs4co2"    field_ref="rsutcs4co2"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
+   <field id="CMIP6_rsutcs4co2"    field_ref="rsutcs4co2"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
    <field id="CMIP6_rsutcsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) band_toa_outgoing_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
    <field id="CMIP6_rsutcsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
@@ -276,8 +276,8 @@
    <field id="CMIP6_swtoaasdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : proposed name: toa_instantaneous_shortwave_forcing_due_to_dust_ambient_aerosol -->
    <field id="CMIP6_swtoacsdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : proposed name: toa_instantaneous_shortwave_forcing_due_to_dust_ambient_aerosol_assuming_clear_sky -->
-   <field id="CMIP6_swtoafluxaerocs" field_ref="dummy_XY"         /> <!-- P1 (W m-2) shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
+   <field id="CMIP6_swtoafluxaerocs" field_ref="dummy_XY"       /> <!-- P1 (W m-2) shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
    <field id="CMIP6_sza"           field_ref="dummy_XY"         /> <!-- P1 (degree) solar_zenith_angle : The angle between the line of sight to the sun and the local vertical -->
    <field id="CMIP6_t2"            field_ref="dummy_XYA"        /> <!-- P2 (K2) square_of_air_temperature : Air temperature squared -->
-   <field id="CMIP6_ta"            field_ref="ta"               /> <!-- P3 (K) air_temperature : Air Temperature -->
+   <field id="CMIP6_ta"            field_ref="temp"             /> <!-- P3 (K) air_temperature : Air Temperature -->
    <field id="CMIP6_tas"           field_ref="t2m"              /> <!-- P1 (K) air_temperature : near-surface (usually, 2 meter) air temperature -->
    <field id="CMIP6_tasmax"        field_ref="CMIP6_tas" freq_op="1d"  operation="maximum"> @this </field>   <!-- P1 (K) air_temperature : maximum near-surface (usually, 2 meter) air temperature (add cell_method attribute "time: max") -->
@@ -296,5 +296,5 @@
    <field id="CMIP6_tnhus"         field_ref="tnhus"            /> <!-- P1 (s-1) tendency_of_specific_humidity : Tendency of Specific Humidity -->
    <field id="CMIP6_tnhusa"        field_ref="dqdyn"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_advection : Tendency of Specific Humidity due to Advection -->
-   <field id="CMIP6_tnhusc"        field_ref="rnhusc"           /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_convection : Tendencies from cumulus convection scheme. -->
+   <field id="CMIP6_tnhusc"        field_ref="tnhusc"           /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_convection : Tendencies from cumulus convection scheme. -->
    <field id="CMIP6_tnhusd"        field_ref="dqvdf"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_diffusion : Tendency of specific humidity due to numerical diffusion.This includes any horizontal or vertical numerical moisture diffusion not associated with the parametrized moist physics or the resolved dynamics.  For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics.   This term is required to check the closure of the moisture budget. -->
    <field id="CMIP6_tnhusmp"       field_ref="dqphy"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_model_physics : Tendency of specific humidity due to model physics. This includes sources and sinks from parametrized moist physics (e.g. convection, boundary layer, stratiform condensation/evaporation, etc.) and excludes sources and sinks from resolved dynamics or from horizontal or vertical numerical diffusion not associated with model physicsl.  For example any diffusive mixing by the boundary layer scheme would be included. -->
@@ -320,5 +320,5 @@
    <field id="CMIP6_twap"          field_ref="dummy_XYA"        /> <!-- P2 (K Pa s-1) product_of_omega_and_air_temperature : Product of air temperature and pressure tendency -->
    <field id="CMIP6_u2"            field_ref="dummy_XYA"        /> <!-- P2 (m2 s-2) square_of_eastward_wind : u*u -->
-   <field id="CMIP6_ua"            field_ref="ua"               /> <!-- P1 (m s-1) eastward_wind : Eastward Wind -->
+   <field id="CMIP6_ua"            field_ref="vitu"             /> <!-- P1 (m s-1) eastward_wind : Eastward Wind -->
    <field id="CMIP6_uas"           field_ref="u10m"             /> <!-- P1 (m s-1) eastward_wind : Eastward component of the near-surface (usually, 10 meters)  wind -->
    <field id="CMIP6_uqint"         field_ref="dummy_XY"         /> <!-- P1 (m2 s-1) integral_of_product_of_eastward_wind_and_specific_humidity_wrt_height : Column integrated eastward wind times specific humidity -->
@@ -332,5 +332,5 @@
    <field id="CMIP6_uwap"          field_ref="dummy_XYA"        /> <!-- P2 (Pa m s-2) product_of_eastward_wind_and_omega : u*omega -->
    <field id="CMIP6_v2"            field_ref="dummy_XYA"        /> <!-- P2 (m2 s-2) square_of_northward_wind : v*v -->
-   <field id="CMIP6_va"            field_ref="va"               /> <!-- P1 (m s-1) northward_wind : Northward component of the wind at 850hPa -->
+   <field id="CMIP6_va"            field_ref="vitv"             /> <!-- P1 (m s-1) northward_wind : Northward component of the wind at 850hPa -->
    <field id="CMIP6_vas"           field_ref="v10m"             /> <!-- P1 (m s-1) northward_wind : Northward component of the near surface wind -->
    <field id="CMIP6_vortmean"      field_ref="dummy_XY"         /> <!-- P1 (s-1) atmosphere_relative_vorticity : Mean vorticity over 850,700,600 hPa -->
@@ -341,5 +341,5 @@
    <field id="CMIP6_vtendogw"      field_ref="dummy_XYA"        /> <!-- P2 (m s-2) tendency_of_northward_wind_due_to_orographic_gravity_wave_drag : Tendency of the northward wind by parameterized orographic gravity waves.  (Note that CF name tables only have a general northward tendency for all gravity waves, and we need it separated by type.) -->
    <field id="CMIP6_vwap"          field_ref="dummy_XYA"        /> <!-- P2 (Pa m s-2) product_of_northward_wind_and_omega : v*omega -->
-   <field id="CMIP6_wap"           field_ref="wap"              /> <!-- P1 (Pa s-1) lagrangian_tendency_of_air_pressure : Omega (vertical velocity in pressure coordinates, positive downwards) -->
+   <field id="CMIP6_wap"           field_ref="vitw"             /> <!-- P1 (Pa s-1) lagrangian_tendency_of_air_pressure : Omega (vertical velocity in pressure coordinates, positive downwards) -->
    <field id="CMIP6_wap2"          field_ref="dummy_XYA"        /> <!-- P2 (Pa2 s-2) square_of_lagrangian_tendency_of_air_pressure : omega*omega -->
    <field id="CMIP6_wbptemp"       field_ref="dummy_XYA"        /> <!-- P1 (K) wet_bulb_potential_temperature : Wet bulb potential temperature -->
@@ -348,5 +348,5 @@
    <field id="CMIP6_ygwdparam"     field_ref="dummy_XYA"        /> <!-- P2 (Pa) atmosphere_northward_stress_due_to_gravity_wave_drag : Parameterised y- component of gravity wave drag -->
    <field id="CMIP6_zfull"         field_ref="dummy_XYA"        /> <!-- P2 (m) height_above_reference_ellipsoid : Altitude of Model Full-Levels -->
-   <field id="CMIP6_zg"            field_ref="zg"               /> <!-- P1 (m) geopotential_height : Geopotential height on the 1000 hPa surface -->
+   <field id="CMIP6_zg"            field_ref="geop"             /> <!-- P1 (m) geopotential_height : Geopotential height on the 1000 hPa surface -->
    <field id="CMIP6_zhalf"         field_ref="dummy_XYA"        /> <!-- P2 (m) height_above_reference_ellipsoid : Altitude of Model Half-Levels -->
    <field id="CMIP6_zmla"          field_ref="dummy_XY"         /> <!-- P1 (m) atmosphere_boundary_layer_thickness : Height of Boundary Layer -->
Index: LMDZ5/trunk/DefLists/context_lmdz.xml
===================================================================
--- LMDZ5/trunk/DefLists/context_lmdz.xml	(revision 2988)
+++ LMDZ5/trunk/DefLists/context_lmdz.xml	(revision 2991)
@@ -85,4 +85,20 @@
     </grid>
 
+     <grid id="grid_glo">
+        <domain id="dom_glo" />
+     </grid>
+
+     <grid id="grid_glo_presnivs">
+        <domain id="dom_glo" />
+        <axis id="presnivs" />
+     </grid>
+
+
+     <grid id="grid_glo_plev">
+        <domain id="dom_glo" />
+        <axis id="plev" />
+     </grid>
+
+
 <!-- Define 4D grids for Cosp simulator -->
      <grid id="grid4Dcol">
Index: LMDZ5/trunk/DefLists/field_def_lmdz.xml
===================================================================
--- LMDZ5/trunk/DefLists/field_def_lmdz.xml	(revision 2988)
+++ LMDZ5/trunk/DefLists/field_def_lmdz.xml	(revision 2991)
@@ -1,2 +1,3 @@
+<context id="LMDZ">
 <field_definition level="1" prec="4" operation="average" freq_op="1ts" enabled=".true." default_value="9.96921e+36">
     
@@ -7,5 +8,5 @@
 <!--    </field_group>  -->
     
-    <field_group id="fields_2D" domain_ref="dom_glo">
+    <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="-"    />
@@ -461,5 +462,5 @@
     </field_group>
 
-    <field_group id="fields_3D" domain_ref="dom_glo" axis_ref="presnivs">
+    <field_group id="fields_3D" grid_ref="grid_glo_presnivs" >
         <field id="tke"    long_name="TKE"    unit="m2/s2" />
         <field id="tke_ter"    long_name="Max Turb. Kinetic Energy ter"    unit="m2/s2" />
@@ -656,8 +657,8 @@
     </field_group>
 
-    <field_group id="fields_strataer_trac_3D" domain_ref="dom_glo" axis_ref="presnivs"/>
-    <field_group id="fields_strataer_trac_2D" domain_ref="dom_glo"/>
-
-    <field_group id="fields_strataer_3D" domain_ref="dom_glo" axis_ref="presnivs">
+    <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 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" />
@@ -675,7 +676,7 @@
     </field_group>
 
-    <field_group id="fields_strataer_2D" domain_ref="dom_glo">
-        <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" />
+    <field_group id="fields_strataer_2D" grid_ref="grid_glo" >
+        <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" />
         <field id="surf_PM25_sulf"     long_name="Sulfate PM2.5 concentration at the surface"            unit="ug/m3" />
         <field id="p_tropopause"       long_name="Tropopause pressure"                                   unit="Pa" />
@@ -694,5 +695,5 @@
     </field_group>
     
-    <field_group  id="fields_NMC" domain_ref="dom_glo" axis_ref="plev">
+    <field_group  id="fields_NMC" grid_ref="grid_glo_plev" >
 <!--  <field id="tnondef" long_name="Undefined value of T" unit="K" detect_missing_value=".true." /> -->
       <field id="ta" long_name="Air temperature" unit="K" detect_missing_value=".true." />
@@ -717,5 +718,5 @@
     </field_group>
 
-    <field_group id="fields_trac_2D" domain_ref="dom_glo">
+    <field_group id="fields_trac_2D" grid_ref="grid_glo_plev" >
           <field id="cumRN"    long_name="Cumulated tracer  RNVL1"    unit="-" />
           <field id="cumPB"    long_name="Cumulated tracer  PBVL1"    unit="-" />
@@ -726,5 +727,5 @@
     </field_group>
 
-    <field_group id="fields_trac_3D" domain_ref="dom_glo" axis_ref="presnivs">
+    <field_group id="fields_trac_3D" grid_ref="grid_glo_presnivs" >
       <field id="RN"    long_name="Tracer RNVL1"    unit="-" />
       <field id="dRN_vdf"    long_name="Tendance tracer RNVL1"    unit="-" />
@@ -771,5 +772,5 @@
     </field_group>
 
-    <field_group id="fields_COSP_CALIPSO" domain_ref="dom_glo" freq_op="3h">
+    <field_group id="fields_COSP_CALIPSO" grid_ref="grid_glo" freq_op="3h">
       <field id="cllcalipso"    long_name="Lidar Low-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
       <field id="clhcalipso"    long_name="Lidar Hight-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
@@ -813,5 +814,5 @@
       <field id="profSR" long_name="Scattering Ratio profiles" unit="1" freq_op="3h" grid_ref="grid4Dcol2"  detect_missing_value=".true." />
 
-    <field_group id="fields_COSP_CLOUDSAT" domain_ref="dom_glo" freq_op="3h">
+    <field_group id="fields_COSP_CLOUDSAT" grid_ref="grid_glo" freq_op="3h">
       <field id="cltlidarradar" long_name="Lidar and Radar Total Cloud Fraction" unit="1"  detect_missing_value=".true." />
       <field id="clcalipso2"  long_name="CALIPSO Cloud Fraction Undetected by CloudSat" unit="1" axis_ref="height"  detect_missing_value=".true." />
@@ -820,6 +821,6 @@
       <field id="cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" freq_op="3h" grid_ref="grid4Ddbze"  detect_missing_value=".true." />
 
-    <field_group id="fields_COSP_ISCCP" domain_ref="dom_glo" freq_op="3h">
-      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1" detect_missing_value=".true." />
+    <field_group id="fields_COSP_ISCCP" grid_ref="grid_glo" freq_op="3h">
+      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1"  detect_missing_value=".true." />
       <field id="boxtauisccp" long_name="Optical Depth in Each Column as Calculated by the ISCCP Simulator" unit="1" axis_ref="column"  detect_missing_value=".true." />
       <field id="boxptopisccp" long_name="Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator" unit="Pa" axis_ref="column"  detect_missing_value=".true." />
@@ -837,5 +838,5 @@
     </field_group>
 
-    <field_group id="fields_COSP_MODIS" domain_ref="dom_glo" freq_op="3h">
+    <field_group id="fields_COSP_MODIS" grid_ref="grid_glo"  freq_op="3h">
       <field id="cllmodis" long_name="MODIS Low-level Cloud Fraction" unit="1"  detect_missing_value=".true." />
       <field id="clmmodis" long_name="MODIS Mid-level Cloud Fraction" unit="1"  detect_missing_value=".true." />
@@ -860,5 +861,5 @@
       <field id="crlmodis" long_name="MODIS Optical_Thickness_vs_ReffLiq" unit="1" freq_op="3h" grid_ref="grid4Dreffl"  detect_missing_value=".true." />
 
-    <field_group id="fields_AIRS" domain_ref="dom_glo" operation="instant" freq_op="3h">
+    <field_group id="fields_AIRS" grid_ref="grid_glo" operation="instant" freq_op="3h">
       <field id="alt_tropo" long_name="Tropopause pressure" unit="hPa" />
       <field id="map_prop_hc" long_name="Proportion of high clouds" unit=" "/>
@@ -909,2 +910,3 @@
 
 </field_definition>
+</context>
