Index: trunk/LMDZ.MARS/libf/phymars/improvedclouds.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/improvedclouds.F	(revision 1885)
+++ trunk/LMDZ.MARS/libf/phymars/improvedclouds.F	(revision 1909)
@@ -1,5 +1,5 @@
-      subroutine improvedclouds(ngrid,nlay,ptimestep,
-     &             pplay,pt,pdt,
-     &             pq,pdq,pdqcloud,pdtcloud,
+      subroutine improvedclouds(ngrid,nlay,microtimestep,
+     &             pplay,pteff,sum_subpdt,
+     &             pqeff,sum_subpdq,subpdqcloud,subpdtcloud,
      &             nq,tauscaling)
 ! to use  'getin'
@@ -42,20 +42,20 @@
       INTEGER ngrid,nlay
       integer nq                 ! nombre de traceurs
-      REAL ptimestep             ! pas de temps physique (s)
+      REAL microtimestep             ! pas de temps physique (s)
       REAL pplay(ngrid,nlay)     ! pression au milieu des couches (Pa)
             
-      REAL pt(ngrid,nlay)        ! temperature at the middle of the
+      REAL pteff(ngrid,nlay)        ! temperature at the middle of the
                                  !   layers (K)
-      REAL pdt(ngrid,nlay)       ! tendance temperature des autres
+      REAL sum_subpdt(ngrid,nlay)       ! tendance temperature des autres
                                  !   param.
-      REAL pq(ngrid,nlay,nq)     ! traceur (kg/kg)
-      REAL pdq(ngrid,nlay,nq)    ! tendance avant condensation
+      REAL pqeff(ngrid,nlay,nq)     ! traceur (kg/kg)
+      REAL sum_subpdq(ngrid,nlay,nq)    ! tendance avant condensation
                                  !   (kg/kg.s-1)
       REAL tauscaling(ngrid)     ! Convertion factor for qdust and Ndust
 
 c     Outputs:
-      REAL pdqcloud(ngrid,nlay,nq) ! tendance de la condensation
+      REAL subpdqcloud(ngrid,nlay,nq) ! tendance de la condensation
                                    !   H2O(kg/kg.s-1)
-      REAL pdtcloud(ngrid,nlay)    ! tendance temperature due
+      REAL subpdtcloud(ngrid,nlay)    ! tendance temperature due
                                    !   a la chaleur latente
 
@@ -216,5 +216,5 @@
 ! 1. Initialisation
 !=============================================================
-      cste = 4*pi*rho_ice*ptimestep
+      cste = 4*pi*rho_ice*microtimestep
 
       res_out(:,:) = 0
@@ -222,15 +222,15 @@
 
 c     Initialize the tendencies
-      pdqcloud(1:ngrid,1:nlay,1:nq)=0
-      pdtcloud(1:ngrid,1:nlay)=0
+      subpdqcloud(1:ngrid,1:nlay,1:nq)=0
+      subpdtcloud(1:ngrid,1:nlay)=0
     
       
       zt(1:ngrid,1:nlay) = 
-     &      pt(1:ngrid,1:nlay) + 
-     &      pdt(1:ngrid,1:nlay) * ptimestep
+     &      pteff(1:ngrid,1:nlay) + 
+     &      sum_subpdt(1:ngrid,1:nlay) * microtimestep
 
       zq(1:ngrid,1:nlay,1:nq) = 
-     &      pq(1:ngrid,1:nlay,1:nq) + 
-     &      pdq(1:ngrid,1:nlay,1:nq) * ptimestep
+     &      pqeff(1:ngrid,1:nlay,1:nq) + 
+     &      sum_subpdq(1:ngrid,1:nlay,1:nq) * microtimestep
       
       
@@ -317,8 +317,8 @@
         dM = 0.
         do i = 1, nbin_cld
-          n_aer(i) = n_aer(i)/( 1. + rate(i)*ptimestep)
-          m_aer(i) = m_aer(i)/( 1. + rate(i)*ptimestep)
-          dN       = dN + n_aer(i) * rate(i) * ptimestep
-          dM       = dM + m_aer(i) * rate(i) * ptimestep
+          n_aer(i) = n_aer(i)/( 1. + rate(i)*microtimestep)
+          m_aer(i) = m_aer(i)/( 1. + rate(i)*microtimestep)
+          dN       = dN + n_aer(i) * rate(i) * microtimestep
+          dM       = dM + m_aer(i) * rate(i) * microtimestep
         enddo
 
@@ -386,5 +386,5 @@
        lw=(2834.3-0.28*(zt(ig,l)-To)-
      &     0.004*(zt(ig,l)-To)*(zt(ig,l)-To))*1.e+3
-       pdtcloud(ig,l)= dMice*lw/cpp/ptimestep
+       subpdtcloud(ig,l)= dMice*lw/cpp/microtimestep
           
           
@@ -420,25 +420,25 @@
       
       ! Get cloud tendencies
-        pdqcloud(1:ngrid,1:nlay,igcm_h2o_vap) =
+        subpdqcloud(1:ngrid,1:nlay,igcm_h2o_vap) =
      &   (zq(1:ngrid,1:nlay,igcm_h2o_vap) - 
-     &    zq0(1:ngrid,1:nlay,igcm_h2o_vap))/ptimestep
-        pdqcloud(1:ngrid,1:nlay,igcm_h2o_ice) =
+     &    zq0(1:ngrid,1:nlay,igcm_h2o_vap))/microtimestep
+        subpdqcloud(1:ngrid,1:nlay,igcm_h2o_ice) =
      &   (zq(1:ngrid,1:nlay,igcm_h2o_ice) -
-     &    zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ptimestep
-        pdqcloud(1:ngrid,1:nlay,igcm_ccn_mass) =
+     &    zq0(1:ngrid,1:nlay,igcm_h2o_ice))/microtimestep
+        subpdqcloud(1:ngrid,1:nlay,igcm_ccn_mass) =
      &   (zq(1:ngrid,1:nlay,igcm_ccn_mass) -
-     &    zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ptimestep
-        pdqcloud(1:ngrid,1:nlay,igcm_ccn_number) =
+     &    zq0(1:ngrid,1:nlay,igcm_ccn_mass))/microtimestep
+        subpdqcloud(1:ngrid,1:nlay,igcm_ccn_number) =
      &   (zq(1:ngrid,1:nlay,igcm_ccn_number) -
-     &    zq0(1:ngrid,1:nlay,igcm_ccn_number))/ptimestep
+     &    zq0(1:ngrid,1:nlay,igcm_ccn_number))/microtimestep
      
       if (scavenging) then
       
-        pdqcloud(1:ngrid,1:nlay,igcm_dust_mass) =
+        subpdqcloud(1:ngrid,1:nlay,igcm_dust_mass) =
      &   (zq(1:ngrid,1:nlay,igcm_dust_mass) -
-     &    zq0(1:ngrid,1:nlay,igcm_dust_mass))/ptimestep
-        pdqcloud(1:ngrid,1:nlay,igcm_dust_number) =
+     &    zq0(1:ngrid,1:nlay,igcm_dust_mass))/microtimestep
+        subpdqcloud(1:ngrid,1:nlay,igcm_dust_number) =
      &   (zq(1:ngrid,1:nlay,igcm_dust_number) -
-     &    zq0(1:ngrid,1:nlay,igcm_dust_number))/ptimestep
+     &    zq0(1:ngrid,1:nlay,igcm_dust_number))/microtimestep
           
       endif
Index: trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F	(revision 1885)
+++ trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F	(revision 1909)
@@ -98,6 +98,6 @@
 
       ! global tendency (clouds+physics)
-      REAL subpdq(ngrid,nlay,nq)      ! cf. pdqcloud
-      REAL subpdt(ngrid,nlay)         ! cf. pdtcloud
+      REAL sum_subpdq(ngrid,nlay,nq)      ! cf. pdqcloud
+      REAL sum_subpdt(ngrid,nlay)         ! cf. pdtcloud
 
       ! no supersaturation when option supersat is false
@@ -119,5 +119,5 @@
       REAL ::  spant ! delta T for the temperature distribution
 !      REAL :: zqsat(ngrid,nlay) ! saturation
-      REAL :: zteff(ngrid, nlay)! effective temperature in the cloud,neb
+      REAL :: pteff(ngrid, nlay)! effective temperature in the cloud,neb
       REAL :: pqeff(ngrid, nlay, nq)! effective tracers quantities in the cloud
       REAL :: cloudfrac(ngrid,nlay) ! cloud fraction
@@ -158,6 +158,6 @@
       
 c-----Initialization
-      subpdq(1:ngrid,1:nlay,1:nq) = 0
-      subpdt(1:ngrid,1:nlay)      = 0
+      sum_subpdq(1:ngrid,1:nlay,1:nq) = 0
+      sum_subpdt(1:ngrid,1:nlay)      = 0
       
       ! default value if no ice
@@ -168,9 +168,9 @@
 c------------------
 c-----Initialization
-      zteff(1:ngrid,1:nlay) = 0
+      pteff(1:ngrid,1:nlay) = 0
       pqeff(1:ngrid,1:nlay,1:nq) = 0
       DO l=1,nlay
         DO ig=1,ngrid
-             zteff(ig,l)=pt(ig,l)
+             pteff(ig,l)=pt(ig,l)
         END DO
       END DO
@@ -212,15 +212,15 @@
               zdelt=spant !MAX(spant*ztclf(ig,l),1.e-12), now totally in K. Fixed width
               IF (tcond(ig,l) .ge. (ztclf(ig,l)+zdelt)) THEN
-                 zteff(ig,l)=ztclf(ig,l)
+                 pteff(ig,l)=ztclf(ig,l)
                  cloudfrac(ig,l)=1.
               ELSE IF (tcond(ig,l) .le. (ztclf(ig,l)-zdelt)) THEN
-                 zteff(ig,l)=ztclf(ig,l)-zdelt
+                 pteff(ig,l)=ztclf(ig,l)-zdelt
                  cloudfrac(ig,l)=mincloud
               ELSE
                  cloudfrac(ig,l)=(tcond(ig,l)-ztclf(ig,l)+zdelt)/
      &                           (2.0*zdelt)
-                 zteff(ig,l)=(tcond(ig,l)+ztclf(ig,l)-zdelt)/2.
+                 pteff(ig,l)=(tcond(ig,l)+ztclf(ig,l)-zdelt)/2.
               END IF
-              zteff(ig,l)=zteff(ig,l)-pdt(ig,l)*ptimestep
+              pteff(ig,l)=pteff(ig,l)-pdt(ig,l)*ptimestep
               IF (cloudfrac(ig,l).le.mincloud) THEN !MV17: replaced .le.0 by .le.mincloud
                  cloudfrac(ig,l)=mincloud
@@ -251,14 +251,14 @@
          pqeff(:,:,igcm_h2o_ice)=pq(:,:,igcm_h2o_ice)/
      &                           cloudfrac(:,:)
-      END IF ! end if (CLFvarying)
-      !! MV17: CLFvarying outputs
+      !! CLFvarying outputs
       CALL WRITEDIAGFI(ngrid,'pqeffice','pqeffice',
      &             'kg/kg',3,pqeff(:,:,igcm_h2o_ice))
-      CALL WRITEDIAGFI(ngrid,'zteff','zteff',
-     &             'K',3,zteff(:,:))
+      CALL WRITEDIAGFI(ngrid,'pteff','pteff',
+     &             'K',3,pteff(:,:))
       CALL WRITEDIAGFI(ngrid,'tcond','tcond',
      &             'K',3,tcond(:,:))
       CALL WRITEDIAGFI(ngrid,'cloudfrac','cloudfrac',
      &             'K',3,cloudfrac(:,:))
+      END IF ! end if (CLFvarying)
 c------------------------------------------------------------------
 c Time subsampling for microphysics
@@ -277,24 +277,24 @@
         DO l=1,nlay
           DO ig=1,ngrid
-             subpdt(ig,l) = subpdt(ig,l)
+             sum_subpdt(ig,l) = sum_subpdt(ig,l)
      &        + pdt(ig,l) ! At each micro timestep we add pdt in order to have a stepped entry
           ENDDO
         ENDDO
-c------ Tracers tendencies subpdq
+c------ Tracers tendencies subpdq are additionned
 c------ At each micro timestep we add pdq in order to have a stepped entry
         IF (microphys) THEN
           DO l=1,nlay
             DO ig=1,ngrid
-              subpdq(ig,l,igcm_dust_mass) = 
-     &            subpdq(ig,l,igcm_dust_mass)
+              sum_subpdq(ig,l,igcm_dust_mass) = 
+     &            sum_subpdq(ig,l,igcm_dust_mass)
      &          + pdq(ig,l,igcm_dust_mass)
-              subpdq(ig,l,igcm_dust_number) = 
-     &            subpdq(ig,l,igcm_dust_number)
+              sum_subpdq(ig,l,igcm_dust_number) = 
+     &            sum_subpdq(ig,l,igcm_dust_number)
      &          + pdq(ig,l,igcm_dust_number)
-              subpdq(ig,l,igcm_ccn_mass) = 
-     &            subpdq(ig,l,igcm_ccn_mass)
+              sum_subpdq(ig,l,igcm_ccn_mass) = 
+     &            sum_subpdq(ig,l,igcm_ccn_mass)
      &          + pdq(ig,l,igcm_ccn_mass)
-              subpdq(ig,l,igcm_ccn_number) = 
-     &            subpdq(ig,l,igcm_ccn_number)
+              sum_subpdq(ig,l,igcm_ccn_number) = 
+     &            sum_subpdq(ig,l,igcm_ccn_number)
      &          + pdq(ig,l,igcm_ccn_number)
             ENDDO
@@ -303,9 +303,9 @@
         DO l=1,nlay
           DO ig=1,ngrid
-            subpdq(ig,l,igcm_h2o_ice) = 
-     &          subpdq(ig,l,igcm_h2o_ice)
+            sum_subpdq(ig,l,igcm_h2o_ice) = 
+     &          sum_subpdq(ig,l,igcm_h2o_ice)
      &        + pdq(ig,l,igcm_h2o_ice)
-            subpdq(ig,l,igcm_h2o_vap) = 
-     &          subpdq(ig,l,igcm_h2o_vap)
+            sum_subpdq(ig,l,igcm_h2o_vap) = 
+     &          sum_subpdq(ig,l,igcm_h2o_vap)
      &        + pdq(ig,l,igcm_h2o_vap)
           ENDDO
@@ -317,12 +317,12 @@
         IF (microphys) THEN
            CALL improvedclouds(ngrid,nlay,microtimestep,
-     &             pplay,zteff,subpdt, 
-     &             pqeff,subpdq,subpdqcloud,subpdtcloud,
+     &             pplay,pteff,sum_subpdt, 
+     &             pqeff,sum_subpdq,subpdqcloud,subpdtcloud,
      &             nq,tauscaling)
 
         ELSE
            CALL simpleclouds(ngrid,nlay,microtimestep,
-     &             pplay,pzlay,zteff,subpdt,
-     &             pqeff,subpdq,subpdqcloud,subpdtcloud,
+     &             pplay,pzlay,pteff,sum_subpdt,
+     &             pqeff,sum_subpdq,subpdqcloud,subpdtcloud,
      &             nq,tau,rice)
         ENDIF
@@ -335,15 +335,15 @@
           DO l=1,nlay
             DO ig=1,ngrid
-              subpdq(ig,l,igcm_dust_mass) =
-     &            subpdq(ig,l,igcm_dust_mass)
+              sum_subpdq(ig,l,igcm_dust_mass) =
+     &            sum_subpdq(ig,l,igcm_dust_mass)
      &          + subpdqcloud(ig,l,igcm_dust_mass)
-              subpdq(ig,l,igcm_dust_number) =
-     &            subpdq(ig,l,igcm_dust_number)
+              sum_subpdq(ig,l,igcm_dust_number) =
+     &            sum_subpdq(ig,l,igcm_dust_number)
      &          + subpdqcloud(ig,l,igcm_dust_number)
-              subpdq(ig,l,igcm_ccn_mass) =
-     &            subpdq(ig,l,igcm_ccn_mass)
+              sum_subpdq(ig,l,igcm_ccn_mass) =
+     &            sum_subpdq(ig,l,igcm_ccn_mass)
      &          + subpdqcloud(ig,l,igcm_ccn_mass)
-              subpdq(ig,l,igcm_ccn_number) =
-     &            subpdq(ig,l,igcm_ccn_number)
+              sum_subpdq(ig,l,igcm_ccn_number) =
+     &            sum_subpdq(ig,l,igcm_ccn_number)
      &          + subpdqcloud(ig,l,igcm_ccn_number)
             ENDDO
@@ -352,9 +352,9 @@
         DO l=1,nlay
           DO ig=1,ngrid
-            subpdq(ig,l,igcm_h2o_ice) =
-     &          subpdq(ig,l,igcm_h2o_ice)
+            sum_subpdq(ig,l,igcm_h2o_ice) =
+     &          sum_subpdq(ig,l,igcm_h2o_ice)
      &        + subpdqcloud(ig,l,igcm_h2o_ice)
-            subpdq(ig,l,igcm_h2o_vap) =
-     &          subpdq(ig,l,igcm_h2o_vap)
+            sum_subpdq(ig,l,igcm_h2o_vap) =
+     &          sum_subpdq(ig,l,igcm_h2o_vap)
      &        + subpdqcloud(ig,l,igcm_h2o_vap)
           ENDDO
@@ -364,6 +364,6 @@
           DO l=1,nlay
             DO ig=1,ngrid
-              subpdt(ig,l) =
-     &            subpdt(ig,l) + subpdtcloud(ig,l)
+              sum_subpdt(ig,l) =
+     &            sum_subpdt(ig,l) + subpdtcloud(ig,l)
             ENDDO
           ENDDO
@@ -381,5 +381,5 @@
          DO ig=1,ngrid
              pdtcloud(ig,l) =
-     &         subpdt(ig,l)/real(imicro)-pdt(ig,l)
+     &         sum_subpdt(ig,l)/real(imicro)-pdt(ig,l)
           ENDDO
        ENDDO
@@ -389,8 +389,8 @@
          DO ig=1,ngrid
             pdqcloud(ig,l,igcm_h2o_ice) = 
-     &        subpdq(ig,l,igcm_h2o_ice)/real(imicro) 
+     &        sum_subpdq(ig,l,igcm_h2o_ice)/real(imicro) 
      &       - pdq(ig,l,igcm_h2o_ice)
             pdqcloud(ig,l,igcm_h2o_vap) = 
-     &        subpdq(ig,l,igcm_h2o_vap)/real(imicro) 
+     &        sum_subpdq(ig,l,igcm_h2o_vap)/real(imicro) 
      &       - pdq(ig,l,igcm_h2o_vap)
          ENDDO
@@ -401,8 +401,8 @@
          DO ig=1,ngrid
             pdqcloud(ig,l,igcm_ccn_mass) = 
-     &        subpdq(ig,l,igcm_ccn_mass)/real(imicro) 
+     &        sum_subpdq(ig,l,igcm_ccn_mass)/real(imicro) 
      &       - pdq(ig,l,igcm_ccn_mass)
             pdqcloud(ig,l,igcm_ccn_number) = 
-     &        subpdq(ig,l,igcm_ccn_number)/real(imicro) 
+     &        sum_subpdq(ig,l,igcm_ccn_number)/real(imicro) 
      &       - pdq(ig,l,igcm_ccn_number)
          ENDDO
@@ -414,8 +414,8 @@
          DO ig=1,ngrid
             pdqcloud(ig,l,igcm_dust_mass) = 
-     &        subpdq(ig,l,igcm_dust_mass)/real(imicro) 
+     &        sum_subpdq(ig,l,igcm_dust_mass)/real(imicro) 
      &       - pdq(ig,l,igcm_dust_mass)
             pdqcloud(ig,l,igcm_dust_number) = 
-     &        subpdq(ig,l,igcm_dust_number)/real(imicro)
+     &        sum_subpdq(ig,l,igcm_dust_number)/real(imicro)
      &       - pdq(ig,l,igcm_dust_number)
          ENDDO
