Index: LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml
===================================================================
--- LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 3075)
+++ LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 3078)
@@ -82,7 +82,7 @@
    <field id="CMIP6_co2"           field_ref="dummy_XYA"        /> <!-- P1 (mol mol-1) mole_fraction_of_carbon_dioxide_in_air : CO2 volume mixing ratio -->
    <field id="CMIP6_co23D"         field_ref="dummy_XYA"        /> <!-- P2 (kg kg-1) CO2_3D_tracer : report 3D field of model simulated atmospheric CO2 mass mixing ration on model levels -->
-   <field id="CMIP6_co2mass"       field_ref="dummy_0d"         /> <!-- P1 (kg) atmosphere_mass_of_carbon_dioxide : Total atmospheric mass of Carbon Dioxide -->
+   <field id="CMIP6_co2mass"       field_ref="mass_sum"> co2_ppm*1e-6*44.011/28.97*mass_sum </field> <!-- P1 (kg) atmosphere_mass_of_carbon_dioxide : Total atmospheric mass of Carbon Dioxide -->
    <field id="CMIP6_co2s"          field_ref="dummy_XY"         /> <!-- P2 (1e-06) mole_fraction_of_carbon_dioxide_in_air : As co2, but only at the surface -->
-   <field id="CMIP6_co2totalmass"  field_ref="dummy_0d"         /> <!-- P1 (kg) CO2_total_mass_in_atmos : globally integrated mass of carbon as CO2 in atmosphere. Report as a single number for all emissions-driven runs -->
+   <field id="CMIP6_co2totalmass"  field_ref="mass_sum"> co2_ppm*1e-6*44.011/28.97*mass_sum </field> <!-- P1 (kg) CO2_total_mass_in_atmos : globally integrated mass of carbon as CO2 in atmosphere. Report as a single number for all emissions-driven runs -->
    <field id="CMIP6_columnmassflux" field_ref="dummy_XY"         /> <!-- P2 (kg m-2 s-1) atmosphere_net_upward_convective_mass_flux : Column integral of (mcu-mcd) -->
    <field id="CMIP6_conccmcn"      field_ref="dummy_not_provided"        /> <!-- P1 (m-3) number_concentration_of_coarse_mode_ambient_aerosol_in_air : includes all particles with diameter larger than 1 micron -->
@@ -160,5 +160,5 @@
    <field id="CMIP6_n2o"           field_ref="dummy_not_provided"        /> <!-- P1 (mol mol-1) mole_fraction_of_nitrous_oxide_in_air : N2O volume mixing ratio -->
    <field id="CMIP6_n2oglobal"     field_ref="N2O_ppb"          /> <!-- P1 (1e-09) mole_fraction_of_nitrous_oxide_in_air : Global mean Nitrous Oxide (N2O) -->
-   <field id="CMIP6_o3"            field_ref="tro3"             /> <!-- P1 (mol mol-1) mole_fraction_of_ozone_in_air : Ozone volume mixing ratio -->
+   <field id="CMIP6_o3"            field_ref="ozone"             /> <!-- P1 (mol mol-1) mole_fraction_of_ozone_in_air : Ozone volume mixing ratio -->
    <field id="CMIP6_od443dust"     field_ref="dummy_XY"         /> <!-- P1 (1.0) atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
    <field id="CMIP6_od550aerso"    field_ref="od550_STRAT"      /> <!-- P1 (1.0) strat_aerosol_optical_depth : From tropopause to stratopause as defined by the model -->
@@ -345,5 +345,5 @@
    <field id="CMIP6_ygwdparam"     field_ref="west_gwstress"        /> <!-- P2 (Pa) atmosphere_northward_stress_due_to_gravity_wave_drag : Parameterised y- component of gravity wave drag -->
    <field id="CMIP6_zfull"         field_ref="zfull"            /> <!-- 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="zhalf"            /> <!-- 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: LMDZ6/trunk/DefLists/context_lmdz.xml
===================================================================
--- LMDZ6/trunk/DefLists/context_lmdz.xml	(revision 3075)
+++ LMDZ6/trunk/DefLists/context_lmdz.xml	(revision 3078)
@@ -192,4 +192,25 @@
      </grid>
 
+ <!-- Grid definitions to allow summing of a 3D varaible -->    
+      <grid id="grid_3D" >
+         <domain id="dom_glo" />
+         <axis id="lev" />
+       </grid>
+
+       <grid id="grid_sum_axis">
+         <domain id="dom_glo" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+
+       <grid id="grid_sum">
+         <scalar >
+        <reduce_domain operation="sum"/>
+         </scalar>
+         <scalar>
+         </scalar>
+       </grid>     
+
   </grid_definition>
 
Index: LMDZ6/trunk/DefLists/field_def_lmdz.xml
===================================================================
--- LMDZ6/trunk/DefLists/field_def_lmdz.xml	(revision 3075)
+++ LMDZ6/trunk/DefLists/field_def_lmdz.xml	(revision 3078)
@@ -944,4 +944,7 @@
       <field id="CFC11_ppt" long_name="CFC11_ppt" unit="ppt" />
       <field id="CFC12_ppt" long_name="CFC12_ppt" unit="ppt" />
+<!-- reducing mass 3D variable to atmosphere total mass scalar -->
+      <field id="mass_sum_axis"    field_ref="mass" grid_ref="grid_sum_axis"/>
+      <field id="mass_sum" field_ref="mass_sum_axis" grid_ref="grid_sum"   />
    </field_group>
 
