Index: LMDZ5/branches/testing/libf/phylmd/cva_driver.F
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cva_driver.F	(revision 1750)
+++ LMDZ5/branches/testing/libf/phylmd/cva_driver.F	(revision 1795)
@@ -22,5 +22,5 @@
      &                   ,lalim_conv, 
      &                   da1,phi1,mp1,phi21,d1a1,dam1,sigij1,clw1,     ! RomP
-     &                   elij1,evap1,ep1,                              ! RomP 
+     &                   elij1,evap1,ep1,epmlmMm1,eplaMm1,             ! RomP 
      &                   wdtrainA1,wdtrainM1)                          ! RomP
 ***************************************************************
@@ -39,4 +39,7 @@
 C.............................START PROLOGUE............................
 C
+!
+! All argument names (except len,nd,ntra,nloc,delt and the flags) have a "1" appended.
+! The "1" is removed for the corresponding compressed variables.
 C PARAMETERS:
 C      Name            Type         Usage            Description
@@ -99,4 +102,33 @@
 C      supmax01      Real           Output
 C      asupmaxmin1   Real           Output
+!
+!      ftd1          Real           Output  Array of temperature tendency due to precipitations (K/s) of dimension ND,
+!                                           defined at same grid levels as T, Q, QS and P.
+!    
+!      fqd1          Real           Output  Array of specific humidity tendencies due to precipitations ((gm/gm)/s)
+!                                           of dimension ND, defined at same grid levels as T, Q, QS and P.
+!    
+!      wdtrainA1     Real           Output   precipitation detrained from adiabatic draught;
+!                                                       used in tracer transport (cvltr)
+!      wdtrainM1     Real           Output   precipitation detrained from mixed draughts;
+!                                                       used in tracer transport (cvltr)
+!      da1           Real           Output   used in tracer transport (cvltr)
+!      phi1          Real           Output   used in tracer transport (cvltr)
+!      mp1           Real           Output   used in tracer transport (cvltr)
+!    
+!      phi21         Real           Output   used in tracer transport (cvltr)
+!    
+!      d1a1          Real           Output   used in tracer transport (cvltr)
+!      dam1          Real           Output   used in tracer transport (cvltr)
+!    
+!      epmlmMm1      Real           Output   used in tracer transport (cvltr)
+!      eplaMm1       Real           Output   used in tracer transport (cvltr)
+!
+!      evap1         Real           Output
+!      ep1           Real           Output
+!      sigij1        Real           Output
+!      elij1         Real           Output
+
+C
 C S. Bony, Mar 2002:
 C 	* Several modules corresponding to different physical processes
@@ -188,14 +220,14 @@
 ! RomP >>> 
       real wdtrainA1(len,nd), wdtrainM1(len,nd)
-      real wdtrainA(nloc,klev),wdtrainM(nloc,klev)
       real da1(len,nd),phi1(len,nd,nd),mp1(len,nd)
-      real da(len,nd),phi(len,nd,nd)
+      real epmlmMm1(len,nd,nd),eplaMm1(len,nd)
       real evap1(len,nd),ep1(len,nd)
       real sigij1(len,nd,nd),elij1(len,nd,nd)
-      real phi2(len,nd,nd)
-      real d1a(len,nd), dam(len,nd)
       real phi21(len,nd,nd)
       real d1a1(len,nd), dam1(len,nd)
 ! RomP <<<
+!
+!-------------------------------------------------------------------
+!        Prolog by Kerry Emanuel.
 !-------------------------------------------------------------------
 ! --- ARGUMENTS
@@ -320,11 +352,4 @@
 !
 !  det:   Array of detrainment mass flux of dimension ND.
-!
-!  ftd:  Array of temperature tendency due to precipitations (K/s) of dimension ND,
-!        defined at same grid levels as T, Q, QS and P.
-!
-!  fqd:  Array of specific humidity tendencies due to precipitations ((gm/gm)/s)
-!        of dimension ND, defined at same grid levels as T, Q, QS and P.
-!
 !-------------------------------------------------------------------
 c
@@ -446,4 +471,13 @@
       real wghti(nloc,nd)
       real hnk(nloc),unk(nloc),vnk(nloc)
+!
+! RomP >>> 
+      real wdtrainA(nloc,klev),wdtrainM(nloc,klev)
+      real da(len,nd),phi(len,nd,nd)
+      real epmlmMm(nloc,klev,klev),eplaMm(nloc,klev)  
+      real phi2(len,nd,nd)
+      real d1a(len,nd), dam(len,nd)
+! RomP <<<
+!
       logical, save :: first=.true.
 c$OMP THREADPRIVATE(first)
@@ -498,45 +532,34 @@
       nword4=len*nd*nd
  
-!      call izilch(iflag1  ,nword1)
-!      call  zilch(iflag1  ,nword1)
-      do i=1,len
-         iflag1(i)=0
-         ktop1(i)=0
-         kbas1(i)=0
-      enddo
-      call  zilch(ft1     ,nword2)
-      call  zilch(fq1     ,nword2)
-      call  zilch(fu1     ,nword2)
-      call  zilch(fv1     ,nword2)
-      call  zilch(ftra1   ,nword3)
-      call  zilch(precip1 ,nword1)
-!      call izilch(kbas1   ,nword1)
-!      call  zilch(kbas1   ,nword1)
-!      call izilch(ktop1   ,nword1)
-!      call  zilch(ktop1   ,nword1)
-      call  zilch(cbmf1   ,nword1)
-      call  zilch(ptop21  ,nword1)
-      sigd1(:)=0.
-      call  zilch(Ma1     ,nword2)
-      call  zilch(mip1    ,nword2)
-!      call  zilch(Vprecip1,nword2)
-      Vprecip1=0.
-      call  zilch(upwd1   ,nword2)
-      call  zilch(dnwd1   ,nword2)
-      call  zilch(dnwd01  ,nword2)
-      call  zilch(qcondc1 ,nword2)
-!test
-!      call  zilch(qcondc ,nword2)
-      call  zilch(wd1     ,nword1)
-      call  zilch(cape1   ,nword1)
-      call  zilch(cin1    ,nword1)
-      call  zilch(tvp1    ,nword2)
-      call  zilch(ftd1    ,nword2)
-      call  zilch(fqd1    ,nword2)
-      call  zilch(Plim11  ,nword1)
-      call  zilch(Plim21  ,nword1)
-      call  zilch(asupmax1,nword2)
-      call  zilch(supmax01,nword1)
-      call  zilch(asupmaxmin1,nword1)
+      iflag1(:)     = 0
+      ktop1(:)      = 0
+      kbas1(:)      = 0
+      ft1(:,:)      = 0.0
+      fq1(:,:)      = 0.0
+      fu1(:,:)      = 0.0
+      fv1(:,:)      = 0.0
+      ftra1(:,:,:)  = 0.
+      precip1(:)    = 0.
+      cbmf1(:)      = 0.
+      ptop21(:)     = 0.
+      sigd1(:)      = 0.
+      Ma1(:,:)      = 0.
+      mip1(:,:)     = 0.
+      Vprecip1(:,:) = 0.
+      upwd1   (:,:) = 0.
+      dnwd1   (:,:) = 0.
+      dnwd01  (:,:) = 0.
+      qcondc1 (:,:) = 0.
+      wd1     (:)   = 0.
+      cape1   (:)   = 0.
+      cin1    (:)   = 0.
+      tvp1    (:,:) = 0.
+      ftd1    (:,:) = 0.
+      fqd1    (:,:) = 0.
+      Plim11  (:)   = 0.
+      Plim21  (:)   = 0.
+      asupmax1(:,:) = 0.
+      supmax01(:)   = 0.
+      asupmaxmin1(:)= 0.
 c
       DO il = 1,len
@@ -552,4 +575,20 @@
       endif
   
+! RomP >>> 
+       wdtrainA1(:,:)  = 0.
+       wdtrainM1(:,:)  = 0.
+       da1(:,:)        = 0.
+       phi1(:,:,:)     = 0.
+       epmlmMm1(:,:,:) = 0.
+       eplaMm1(:,:)    = 0.
+       mp1(:,:)        = 0.
+       evap1(:,:)      = 0.
+       ep1(:,:)        = 0.
+       sigij1(:,:,:)   = 0.
+       elij1(:,:,:)    = 0.
+       phi21(:,:,:)    = 0.
+       d1a1(:,:)       = 0.
+       dam1(:,:)       = 0.
+! RomP <<<
 !---------------------------------------------------------------------
 ! --- INITIALIZE LOCAL ARRAYS AND PARAMETERS
@@ -941,5 +980,6 @@
        CALL cv3_tracer(nloc,len,ncum,nd,nd,
      :                  ment,sigij,da,phi,phi2,d1a,dam,
-     :                  ep,Vprecip,elij,clw,icb,inb)
+     :                  ep,Vprecip,elij,clw,epmlmMm,eplaMm,
+     :                  icb,inb)
 !RomP <<<
       endif
@@ -964,6 +1004,6 @@
      :          ,asupmaxmin
      :          ,da,phi,mp,phi2,d1a,dam,sigij         ! RomP
-     :          ,wdtrainA,wdtrainM,elij,clw           ! RomP
-     :          ,evap,ep                              ! RomP
+     :          ,clw,elij,evap,ep,epmlmMm,eplaMm      ! RomP
+     :          ,wdtrainA,wdtrainM                    ! RomP
      o          ,iflag1,kbas1,ktop1
      o          ,precip1,cbmf1,plcl1,plfc1,wbeff1,sig1,w01,ptop21
@@ -976,6 +1016,6 @@
      o          ,asupmaxmin1
      o          ,da1,phi1,mp1,phi21,d1a1,dam1,sigij1  ! RomP
-     o          ,wdtrainA1,wdtrainM1,elij1,clw1       ! RomP
-     o          ,evap1,ep1)                           ! RomP
+     o          ,clw1,elij1,evap1,ep1,epmlmMm1,eplaMm1! RomP
+     o          ,wdtrainA1,wdtrainM1)                 ! RomP
       endif
 
