Index: trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F	(revision 1921)
+++ trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F	(revision 1922)
@@ -1,7 +1,13 @@
+      MODULE improvedCO2clouds_mod
+      
+      IMPLICIT NONE
+
+      CONTAINS
+ 
       subroutine improvedCO2clouds(ngrid,nlay,microtimestep,
      &             pplay,pplev,pteff,sum_subpdt,
      &             pqeff,sum_subpdq,subpdqcloudco2,subpdtcloudco2,
      &             nq,tauscaling,
-     &             memdMMccn,memdMMh2o,memdNNccn)
+     &             mem_Mccn_co2,mem_Mh2o_co2,mem_Nccn_co2)
       USE comcstfi_h, only: pi, g, cpp
       USE updaterad, only: updaterice_micro, updaterice_microco2
@@ -36,5 +42,5 @@
 c Memory of the origin of the co2 particles is kept and thus the 
 c water cycle shouldn't be modified by this.
-cWARNING: no sedimentation of the water ice origin is performed
+c WARNING: no sedimentation of the water ice origin is performed
 c in the microphysical timestep in co2cloud.F. 
 
@@ -104,7 +110,7 @@
       DOUBLE PRECISION Mo,No,No_dust,Mo_dust
       DOUBLE PRECISION  Rn, Rm, dev2,dev3, n_derf, m_derf
-      DOUBLE PRECISION memdMMccn(ngrid,nlay)
-      DOUBLE PRECISION memdMMh2o(ngrid,nlay)
-      DOUBLE PRECISION memdNNccn(ngrid,nlay)
+      DOUBLE PRECISION mem_Mccn_co2(ngrid,nlay) ! Memory of CCN mass of H2O and dust used by CO2
+      DOUBLE PRECISION mem_Mh2o_co2(ngrid,nlay) ! Memory of H2O mass integred into CO2 crystal
+      DOUBLE PRECISION mem_Nccn_co2(ngrid,nlay) ! Memory of CCN number of H2O and dust used by CO2
       
 !     Radius used by the microphysical scheme (m)
@@ -506,7 +512,7 @@
                 zq(ig,l,igcm_h2o_ice) = zq(ig,l,igcm_h2o_ice)-dMh2o_ice
                 zq(ig,l,igcm_ccn_mass)= zq(ig,l,igcm_ccn_mass)-dMh2o_ccn
-                memdMMh2o(ig,l)=memdMMh2o(ig,l)+dMh2o_ice
-                memdMMccn(ig,l)=memdMMccn(ig,l)+dMh2o_ccn
-                memdNNccn(ig,l)=memdNNccn(ig,l)+dNNh2o
+                mem_Mh2o_co2(ig,l)=mem_Mh2o_co2(ig,l)+dMh2o_ice
+                mem_Mccn_co2(ig,l)=mem_Mccn_co2(ig,l)+dMh2o_ccn
+                mem_Nccn_co2(ig,l)=mem_Nccn_co2(ig,l)+dNNh2o
              endif ! of if co2useh2o
            ENDIF   ! of is satu >1
@@ -566,16 +572,16 @@
 ! On sublime tout
                  if (co2useh2o) then
-                   if (memdMMccn(ig,l) .gt. 0) then
+                   if (mem_Mccn_co2(ig,l) .gt. 0) then
                     zq(ig,l,igcm_ccn_mass)=zq(ig,l,igcm_ccn_mass)
-     &                   +memdMMccn(ig,l)
+     &                   +mem_Mccn_co2(ig,l)
                    endif
-                   if (memdMMh2o(ig,l) .gt. 0) then
+                   if (mem_Mh2o_co2(ig,l) .gt. 0) then
                     zq(ig,l,igcm_h2o_ice)=zq(ig,l,igcm_h2o_ice)
-     &                   +memdMMh2o(ig,l)
+     &                   +mem_Mh2o_co2(ig,l)
                    endif
                  
-                   if (memdNNccn(ig,l) .gt. 0) then
+                   if (mem_Nccn_co2(ig,l) .gt. 0) then
                     zq(ig,l,igcm_ccn_number)=zq(ig,l,igcm_ccn_number)
-     &                   +memdNNccn(ig,l)
+     &                   +mem_Nccn_co2(ig,l)
                    endif
                  endif
@@ -583,8 +589,9 @@
      &                   zq(ig,l,igcm_dust_mass)
      &                   + zq(ig,l,igcm_ccnco2_mass)-
-     &                   (memdMMh2o(ig,l)+memdMMccn(ig,l))
+     &                   (mem_Mh2o_co2(ig,l)+mem_Mccn_co2(ig,l))
                     zq(ig,l,igcm_dust_number) = 
      &                   zq(ig,l,igcm_dust_number)
-     &                   + zq(ig,l,igcm_ccnco2_number)-memdNNccn(ig,l)
+     &                   + zq(ig,l,igcm_ccnco2_number)
+     &                   -mem_Nccn_co2(ig,l)
                  
                     zq(ig,l,igcm_co2) = zq(ig,l,igcm_co2) 
@@ -594,7 +601,7 @@
                  zq(ig,l,igcm_co2_ice)=0.
                  zq(ig,l,igcm_ccnco2_number)=0.
-                 memdNNccn(ig,l)=0.
-                 memdMMh2o(ig,l)=0.
-                 memdMMccn(ig,l)=0.
+                 mem_Nccn_co2(ig,l)=0.
+                 mem_Mh2o_co2(ig,l)=0.
+                 mem_Mccn_co2(ig,l)=0.
                  riceco2(ig,l)=0.
 
@@ -643,6 +650,14 @@
 
 
-        end
-      
-      
-      
+c     TEST D.BARDET 
+      call WRITEDIAGFI(ngrid,"No_dust","Nombre particules de poussière"
+     &        ,"part/kg",3,No_dust)
+      call WRITEDIAGFI(ngrid,"Mo_dust","Masse particules de poussière"
+     &        ,"kg/kg ",3,Mo_dust)      
+
+        END SUBROUTINE improvedCO2clouds
+
+        END MODULE improvedCO2clouds_mod
+      
+      
+      
