Index: /LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml
===================================================================
--- /LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 3112)
+++ /LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 3113)
@@ -58,9 +58,9 @@
    <field id="CMIP6_clcalipsoice"  field_ref="clcalipsoice"     /> <!-- P1 (%) ice_cloud_area_fraction_in_atmosphere_layer : CALIPSO ice cloud Fraction -->
    <field id="CMIP6_clcalipsoliq"  field_ref="clcalipsoice"     /> <!-- P1 (%) liquid_cloud_area_fraction_in_atmosphere_layer : CALIPSO liquid cloud Fraction -->
-   <field id="CMIP6_cldicemxrat"   field_ref="dummy_XYA"        /> <!-- P3 (1.0) cloud_ice_mixing_ratio : Cloud ice mixing ratio -->
+   <field id="CMIP6_cldicemxrat"   field_ref="cldicemxrat"        /> <!-- P3 (1.0) cloud_ice_mixing_ratio : Cloud ice mixing ratio -->
    <field id="CMIP6_cldnci"        field_ref="dummy_XY"         /> <!-- P1 (m-3) number_concentration_of_ice_crystals_in_air_at_ice_cloud_top : Concentration 'as seen from space' over ice-cloud portion of grid cell.  This is the value from uppermost model layer with ice cloud or, if available, it is the sum over all ice cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total ice cloud top fraction (as seen from TOA) of each time sample when computing monthly mean. -->
    <field id="CMIP6_cldncl"        field_ref="cldncl"         /> <!-- P1 (m-3) number_concentration_of_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Droplets are liquid only.  Report concentration 'as seen from space' over liquid cloudy portion of grid cell.  This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of  (as seen from TOA) each time sample when computing monthly mean. -->
    <field id="CMIP6_cldnvi"        field_ref="cldnvi"           /> <!-- P1 (m-2) atmosphere_number_content_of_cloud_droplets : Droplets are liquid only.  Values are weighted by liquid cloud fraction in each layer when vertically integrating, and for monthly means the samples are weighted by total liquid cloud fraction (as seen from TOA). -->
-   <field id="CMIP6_cldwatmxrat"   field_ref="dummy_XYA"        /> <!-- P2 (1.0) cloud_liquid_water_mixing_ratio : Cloud water mixing ratio -->
+   <field id="CMIP6_cldwatmxrat"   field_ref="cldwatmxrat"        /> <!-- P2 (1.0) cloud_liquid_water_mixing_ratio : Cloud water mixing ratio -->
    <field id="CMIP6_clhcalipso"    field_ref="pclhcalipso"       /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover in layer centred on 220hPa -->
    <field id="CMIP6_cli"           field_ref="iwcon"            /> <!-- P1 (kg kg-1) mass_fraction_of_cloud_ice_in_air : Includes both large-scale and convective cloud. This is calculated as the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. It includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
Index: /LMDZ6/trunk/DefLists/field_def_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/field_def_lmdz.xml	(revision 3112)
+++ /LMDZ6/trunk/DefLists/field_def_lmdz.xml	(revision 3113)
@@ -568,6 +568,8 @@
         <field id="lcc3dcon"    long_name="Convective cloud liquid fraction"    unit="1" />
         <field id="lcc3dstra"    long_name="Stratiform cloud liquid fraction"    unit="1" />
+        <field id="cldwatmxrat"    long_name="Cloud Water Mixing Ratio"    unit="1" />
         <field id="icc3dcon"    long_name="Mass Fraction of Convective Cloud Ice"    unit="kg/kg" />
         <field id="icc3dstra"    long_name="Mass Fraction of Stratiform Cloud Ice "    unit="kg/kg" />
+        <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="Ma"    long_name="undilute adiab updraft"    unit="kg/m2/s" />
Index: /LMDZ6/trunk/DefLists/file_def_histday_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/file_def_histday_lmdz.xml	(revision 3112)
+++ /LMDZ6/trunk/DefLists/file_def_histday_lmdz.xml	(revision 3113)
@@ -512,6 +512,8 @@
                 <field field_ref="lcc3dcon" level="6" />
                 <field field_ref="lcc3dstra" level="6" />
+                <field field_ref="cldwatmxrat" level="2" />
                 <field field_ref="icc3dcon" level="6" />
                 <field field_ref="icc3dstra" level="6" />
+                <field field_ref="cldicemxrat" level="2" />
                 <field field_ref="clwcon" level="10" />
                 <field field_ref="Ma" level="10" />
Index: /LMDZ6/trunk/DefLists/file_def_histhf_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/file_def_histhf_lmdz.xml	(revision 3112)
+++ /LMDZ6/trunk/DefLists/file_def_histhf_lmdz.xml	(revision 3113)
@@ -533,6 +533,8 @@
                 <field field_ref="lcc3dcon" level="5" />
                 <field field_ref="lcc3dstra" level="5" />
+                <field field_ref="cldwatmxrat" level="2" />
                 <field field_ref="icc3dcon" level="5" />
                 <field field_ref="icc3dstra" level="5" />
+                <field field_ref="cldicemxrat" level="2" />
                 <field field_ref="clwcon" level="10" />
                 <field field_ref="Ma" level="10" />
Index: /LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml	(revision 3112)
+++ /LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml	(revision 3113)
@@ -554,6 +554,8 @@
                 <field field_ref="lcc3dcon" level="2" />
                 <field field_ref="lcc3dstra" level="2" />
+                <field field_ref="cldwatmxrat" level="2" />
                 <field field_ref="icc3dcon" level="2" />
                 <field field_ref="icc3dstra" level="2" />
+                <field field_ref="cldicemxrat" level="2" />
                 <field field_ref="clwcon" level="4" />
                 <field field_ref="Ma" level="4" />
Index: /LMDZ6/trunk/libf/phylmd/newmicro.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/newmicro.F90	(revision 3112)
+++ /LMDZ6/trunk/libf/phylmd/newmicro.F90	(revision 3113)
@@ -10,5 +10,5 @@
   USE dimphy
   USE phys_local_var_mod, ONLY: scdnc, cldncl, reffclwtop, lcc, reffclws, &
-    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra
+    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra, zfice
   USE phys_state_var_mod, ONLY: rnebcon, clwcon
   USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)
@@ -152,5 +152,4 @@
   REAL zrho(klon, klev) !--rho pour la couche
   REAL dh(klon, klev) !--dz pour la couche
-  REAL zfice(klon, klev)
   REAL rad_chaud(klon, klev) !--rayon pour les nuages chauds
   REAL rad_chaud_pi(klon, klev) !--rayon pour les nuages chauds pre-industriels
Index: /LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 3112)
+++ /LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90	(revision 3113)
@@ -175,4 +175,6 @@
       REAL, SAVE, ALLOCATABLE :: icc3dcon(:,:)
       !$OMP THREADPRIVATE(icc3dcon)
+      REAL, SAVE, ALLOCATABLE :: zfice(:,:)
+      !$OMP THREADPRIVATE(zfice)
       REAL, SAVE, ALLOCATABLE :: od443aer(:) 
       !$OMP THREADPRIVATE(od443aer) 
@@ -603,4 +605,5 @@
       ALLOCATE(icc3dcon(klon, klev))
       ALLOCATE(icc3dstra(klon, klev))
+      ALLOCATE(zfice(klon, klev))
       ALLOCATE(od443aer(klon))
       ALLOCATE(od550aer(klon))
@@ -883,4 +886,5 @@
       DEALLOCATE(icc3dcon)
       DEALLOCATE(icc3dstra)
+      DEALLOCATE(zfice)
       DEALLOCATE(od443aer)
       DEALLOCATE(od550aer)
Index: /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3112)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3113)
@@ -1453,4 +1453,10 @@
     'icc3dstra', 'Mass Fraction of Stratiform Cloud Ice', &
     'kg kg-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldicemxrat = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldicemxrat', 'Cloud Ice Mixing Ratio', &
+    '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldwatmxrat = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldwatmxrat', 'Cloud Water Mixing Ratio', &
+    '1', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_solbnd = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'solbnd', 'Top-of-Atmosphere Solar Insolation for each band', 'W m-2', (/ ('', i=1, 10) /))
Index: /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3112)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3113)
@@ -123,5 +123,6 @@
          o_rsdsdiff, o_rsdscsdiff, o_stratomask,&
          o_cldnvi, o_lcc, o_lcc3d, o_lcc3dcon, &
-         o_lcc3dstra, o_icc3dcon, o_icc3dstra, o_reffclwtop, o_ec550aer, &
+         o_lcc3dstra, o_icc3dcon, o_icc3dstra, &
+         o_cldicemxrat, o_cldwatmxrat, o_reffclwtop, o_ec550aer, &
          o_lwcon, o_iwcon, o_temp, o_theta, &
          o_ovapinit, o_ovap, o_oliq, o_ocond, o_geop, &
@@ -280,5 +281,6 @@
          scdnc, cldncl, reffclws, reffclwc, cldnvi, &
          PSFSWDIR, PSFSWDIF, stratomask,&
-         lcc, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra, reffclwtop, &
+         lcc, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra, &
+         zfice, reffclwtop, &
          ec550aer, flwc, fiwc, t_seri, theta, q_seri, &
          ql_seri, qs_seri, tr_seri, &
@@ -1410,4 +1412,7 @@
           CALL histwrite_phy(o_icc3dcon, icc3dcon)
           CALL histwrite_phy(o_icc3dstra, icc3dstra)
+          CALL histwrite_phy(o_cldicemxrat, zfice)
+          zx_tmp_fi3d(:,:)=1-zfice(:,:)
+          CALL histwrite_phy(o_cldwatmxrat, zx_tmp_fi3d)
           CALL histwrite_phy(o_reffclwtop, reffclwtop)
        ENDIF
